Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- Refresh the capability snapshot to `command-code@1.89.1`: advertise image input, reasoning and selectable efforts for `claude-fable-5-2`, `google/gemini-4-carbon`, `meta/muse-ember` and `thinkingmachines/inkling-2-small:free`; raise Inkling 2 Small's output limit to 131,072 tokens; drop stale capability metadata for the retired `reflection/beam:free` and `stealth/crouton-alpha`. Public pricing checks pass for all 98 advertised models; prices and endpoint routing are unchanged.

## 0.8.3 - 2026-11-13

- Tag the Responses `system`/`developer` and `user` items with the item-level `type: "message"` the Provider API adapter requires for `zai-org/GLM-5.3`, which answered `400 invalid_request: input item is missing type` on the first turn. The rewrite is limited to the models known to need the verbose form, so every other model keeps the exact body the host sends. ([#214](https://github.com/patlux/pi-commandcode-provider/issues/214), [#215](https://github.com/patlux/pi-commandcode-provider/pull/215))
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ The following environment variables are intended for tests, local mocks, and com

## Image input

The provider advertises image input only for models marked with the `image` input modality in the official Command Code CLI model catalog. The capability snapshot currently follows `command-code@1.88.5`; unknown models default to text-only until their upstream metadata is reviewed. A daily GitHub Actions job synchronizes the CLI version, image capabilities, reasoning flags, reasoning efforts, and model-specific output limits with the latest published CLI package, also dropping manual effort overrides that upstream has published itself, and opens or updates a reviewable pull request when they change. Pricing remains manually reviewed because temporary promotions and long-context tiers require explicit review.
The provider advertises image input only for models marked with the `image` input modality in the official Command Code CLI model catalog. The capability snapshot currently follows `command-code@1.89.1`; unknown models default to text-only until their upstream metadata is reviewed. A daily GitHub Actions job synchronizes the CLI version, image capabilities, reasoning flags, reasoning efforts, and model-specific output limits with the latest published CLI package, also dropping manual effort overrides that upstream has published itself, and opens or updates a reviewable pull request when they change. Pricing remains manually reviewed because temporary promotions and long-context tiers require explicit review.

For vision-capable models, Pi's native provider adapters forward image blocks from user messages and tool results using the documented OpenAI or Anthropic message schema. Unknown and text-only models remain marked text-only in Pi.

Expand Down
24 changes: 15 additions & 9 deletions src/commandcode-catalog.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const COMMAND_CODE_CLI_VERSION = "1.88.5"
export const COMMAND_CODE_CLI_VERSION = "1.89.1"

export type CommandCodeInputType = "text" | "image"
export type CommandCodeReasoningEffort =
Expand All @@ -11,12 +11,13 @@ export type CommandCodeReasoningEffort =
| "max"

/**
* Generated from command-code@1.88.5 by `npm run sync:commandcode-catalog`.
* Generated from command-code@1.89.1 by `npm run sync:commandcode-catalog`.
* Do not edit manually.
*/
export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCodeInputType[]>> = {
"claude-fable-5": ["text", "image"],
"claude-fable-5-1": ["text", "image"],
"claude-fable-5-2": ["text", "image"],
"claude-haiku-4-5-20251001": ["text", "image"],
"claude-haiku-5-5": ["text", "image"],
"claude-opus-4-7": ["text", "image"],
Expand All @@ -37,6 +38,7 @@ export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCod
"google/gemini-3.7-flash": ["text", "image"],
"google/gemini-3.8-flash": ["text", "image"],
"google/gemini-4-argon": ["text", "image"],
"google/gemini-4-carbon": ["text", "image"],
"gpt-5.3-codex": ["text", "image"],
"gpt-5.4": ["text", "image"],
"gpt-5.4-mini": ["text", "image"],
Expand All @@ -49,6 +51,7 @@ export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCod
"gpt-6-sol": ["text", "image"],
"gpt-6.1-sol": ["text", "image"],
"gpt-6.1-terra": ["text", "image"],
"meta/muse-ember": ["text", "image"],
"meta/muse-spark-1.1": ["text", "image"],
"meta/muse-spark-1.2": ["text", "image"],
"meta/muse-spark-1.2-contributor": ["text", "image"],
Expand Down Expand Up @@ -77,10 +80,10 @@ export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCod
"Qwen/Qwen3.8-Max-Prime": ["text", "image"],
"Qwen/Qwen3.8-Omni-Flash": ["text", "image"],
"sakana/fugu-ultra": ["text", "image"],
"stealth/crouton-alpha": ["text", "image"],
"stepfun/Step-3.7-Flash": ["text", "image"],
"stepfun/Step-5-Preview": ["text", "image"],
"thinkingmachines/inkling": ["text", "image"],
"thinkingmachines/inkling-2-small:free": ["text", "image"],
"thinkingmachines/inkling-small": ["text", "image"],
"xai/grok-4.5": ["text", "image"],
"xai/grok-4.6": ["text", "image"],
Expand All @@ -95,6 +98,7 @@ export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCod
export const MODEL_REASONING: Readonly<Record<string, true>> = {
"claude-fable-5": true,
"claude-fable-5-1": true,
"claude-fable-5-2": true,
"claude-haiku-5-5": true,
"claude-opus-4-7": true,
"claude-opus-4-8": true,
Expand All @@ -117,6 +121,7 @@ export const MODEL_REASONING: Readonly<Record<string, true>> = {
"google/gemini-3.7-flash": true,
"google/gemini-3.8-flash": true,
"google/gemini-4-argon": true,
"google/gemini-4-carbon": true,
"gpt-5.3-codex": true,
"gpt-5.4": true,
"gpt-5.4-mini": true,
Expand All @@ -132,6 +137,7 @@ export const MODEL_REASONING: Readonly<Record<string, true>> = {
"inclusionai/ling-3.1-flash": true,
"inclusionai/ling-3.1-flash-1019": true,
"meituan/LongCat-2.0": true,
"meta/muse-ember": true,
"meta/muse-spark-1.1": true,
"meta/muse-spark-1.2": true,
"meta/muse-spark-1.2-contributor": true,
Expand Down Expand Up @@ -160,16 +166,15 @@ export const MODEL_REASONING: Readonly<Record<string, true>> = {
"Qwen/Qwen3.8-Max-0902": true,
"Qwen/Qwen3.8-Max-Prime": true,
"Qwen/Qwen3.8-Omni-Flash": true,
"reflection/beam:free": true,
"sakana/fugu-ultra": true,
"stealth/crouton-alpha": true,
"stealth/glyph-cluster:free": true,
"stepfun/Step-3.5-Flash": true,
"stepfun/Step-3.7-Flash": true,
"stepfun/Step-5-Preview": true,
"tencent/hy3-paid": true,
"tencent/hy4-preview": true,
"thinkingmachines/inkling": true,
"thinkingmachines/inkling-2-small:free": true,
"thinkingmachines/inkling-small": true,
"xai/grok-4.5": true,
"xai/grok-4.6": true,
Expand All @@ -183,6 +188,7 @@ export const MODEL_REASONING: Readonly<Record<string, true>> = {
export const MODEL_EFFORTS: Readonly<Record<string, readonly CommandCodeReasoningEffort[]>> = {
"claude-fable-5": ["low", "medium", "high", "xhigh", "max"],
"claude-fable-5-1": ["low", "medium", "high", "xhigh", "max"],
"claude-fable-5-2": ["low", "medium", "high", "xhigh", "max"],
"claude-haiku-5-5": ["low", "medium", "high", "xhigh", "max"],
"claude-opus-4-7": ["low", "medium", "high", "xhigh", "max"],
"claude-opus-4-8": ["low", "medium", "high", "xhigh", "max"],
Expand All @@ -205,6 +211,7 @@ export const MODEL_EFFORTS: Readonly<Record<string, readonly CommandCodeReasonin
"google/gemini-3.7-flash": ["low", "medium", "high"],
"google/gemini-3.8-flash": ["low", "medium", "high"],
"google/gemini-4-argon": ["low", "medium", "high"],
"google/gemini-4-carbon": ["low", "medium", "high"],
"gpt-5.3-codex": ["low", "medium", "high", "xhigh"],
"gpt-5.4": ["low", "medium", "high", "xhigh"],
"gpt-5.4-mini": ["low", "medium", "high"],
Expand All @@ -219,6 +226,7 @@ export const MODEL_EFFORTS: Readonly<Record<string, readonly CommandCodeReasonin
"gpt-6.1-terra": ["low", "medium", "high", "xhigh", "max"],
"inclusionai/ling-3.1-flash": ["low", "medium", "high"],
"inclusionai/ling-3.1-flash-1019": ["low", "medium", "high"],
"meta/muse-ember": ["low", "medium", "high", "xhigh", "max"],
"meta/muse-spark-1.1": ["low", "medium", "high", "xhigh"],
"meta/muse-spark-1.2": ["low", "medium", "high", "xhigh"],
"meta/muse-spark-1.2-contributor": ["low", "medium", "high", "xhigh"],
Expand All @@ -238,12 +246,11 @@ export const MODEL_EFFORTS: Readonly<Record<string, readonly CommandCodeReasonin
"Qwen/Qwen3.8-Max-0902": ["low", "medium", "xhigh"],
"Qwen/Qwen3.8-Max-Prime": ["low", "medium", "xhigh"],
"Qwen/Qwen3.8-Omni-Flash": ["low", "medium", "xhigh"],
"reflection/beam:free": ["low", "medium", "high", "xhigh", "max"],
"sakana/fugu-ultra": ["high", "xhigh"],
"stealth/crouton-alpha": ["low", "medium", "high", "xhigh", "max"],
"stealth/glyph-cluster:free": ["low", "medium", "high", "xhigh"],
"stepfun/Step-5-Preview": ["low", "medium", "high"],
"tencent/hy4-preview": ["low", "medium", "high"],
"thinkingmachines/inkling-2-small:free": ["low", "medium", "high", "max"],
"xai/grok-4.5": ["low", "medium", "high"],
"xai/grok-4.6": ["low", "medium", "high", "xhigh"],
"xai/grok-4.7": ["low", "medium", "high", "xhigh"],
Expand All @@ -260,9 +267,8 @@ export const MODEL_MAX_OUTPUT_TOKENS: Readonly<Record<string, number>> = {
"Qwen/Qwen3.8-27B": 32_768,
"Qwen/Qwen3.8-Max-Prime": 131_072,
"Qwen/Qwen3.8-Omni-Flash": 131_072,
"reflection/beam:free": 131_072,
"stealth/crouton-alpha": 943_718,
"stealth/glyph-cluster:free": 256_000,
"thinkingmachines/inkling-2-small:free": 131_072,
"z-ai/glm-5.3-flash": 131_072,
"z-ai/glm-5.3-flashx": 131_072,
}
41 changes: 28 additions & 13 deletions tests/test-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,33 @@ describe("commandCodeModelsFromApiResponse()", () => {
assert.equal(modelSupportsImageInput("unknown-new-model"), false)
})

it("advertises the November additions from the reviewed CLI catalog", () => {
const effortsById = {
"claude-fable-5-2": ["low", "medium", "high", "xhigh", "max"],
"google/gemini-4-carbon": ["low", "medium", "high"],
"meta/muse-ember": ["low", "medium", "high", "xhigh", "max"],
"thinkingmachines/inkling-2-small:free": ["low", "medium", "high", "max"],
}
for (const [id, efforts] of Object.entries(effortsById)) {
assert.deepEqual(inputModalitiesForModel(id), ["text", "image"], id)
const [model] = commandCodeModelsFromApiResponse({
object: "list",
data: [{ ...API_RESPONSE.data[0], id }],
})
assert.equal(model?.reasoning, true, id)
assert.deepEqual(thinkingMetadataForModel(id)?.thinking?.efforts, efforts, id)
if (id === "thinkingmachines/inkling-2-small:free") {
assert.equal(model?.maxTokens, 131_072)
}
}
for (const id of ["reflection/beam:free", "stealth/crouton-alpha"]) {
assert.equal(MODEL_REASONING[id], undefined, id)
assert.equal(MODEL_EFFORTS[id], undefined, id)
assert.equal(MODEL_MAX_OUTPUT_TOKENS[id], undefined, id)
assert.equal(modelSupportsImageInput(id), false, id)
}
})

it("advertises Qwen 3.8 Omni Flash capabilities from the CLI catalog", () => {
const id = "Qwen/Qwen3.8-Omni-Flash"
assert.deepEqual(inputModalitiesForModel(id), ["text", "image"])
Expand Down Expand Up @@ -218,13 +245,6 @@ describe("commandCodeModelsFromApiResponse()", () => {
contextWindow: 1_000_000,
maxTokens: 262_144,
},
{
id: "stealth/crouton-alpha",
input: ["text", "image"],
efforts: ["low", "medium", "high", "xhigh", "max"],
contextWindow: 1_048_576,
maxTokens: 943_718,
},
]) {
it(`advertises the command-code@1.88.3 capabilities for ${id}`, () => {
assert.deepEqual(inputModalitiesForModel(id), input)
Expand All @@ -245,18 +265,13 @@ describe("commandCodeModelsFromApiResponse()", () => {
})
}

it("advertises MiniMax Flash, Beam, and Ornith capabilities from the refreshed CLI", () => {
it("advertises MiniMax Flash and Ornith capabilities from the refreshed CLI", () => {
const efforts = ["low", "medium", "high", "xhigh", "max"]
for (const id of ["minimax/minimax-m3.1-flash"]) {
assert.deepEqual(inputModalitiesForModel(id), ["text", "image"])
assert.equal(MODEL_REASONING[id], true)
assert.deepEqual(thinkingMetadataForModel(id)?.thinking?.efforts, efforts)
}
const beam = "reflection/beam:free"
assert.deepEqual(inputModalitiesForModel(beam), ["text"])
assert.equal(MODEL_REASONING[beam], true)
assert.deepEqual(thinkingMetadataForModel(beam)?.thinking?.efforts, efforts)
assert.equal(MODEL_MAX_OUTPUT_TOKENS[beam], 131_072)
for (const id of ["ornith/ornith-1.5-122b"]) {
assert.deepEqual(inputModalitiesForModel(id), ["text", "image"])
assert.equal(MODEL_REASONING[id], true)
Expand Down
Loading