From 003d571b5e73e6eb4c48ef3c8d26cdec52d892b9 Mon Sep 17 00:00:00 2001 From: Patrick Wozniak Date: Tue, 25 Aug 2026 14:12:00 +0200 Subject: [PATCH] fix(models): refresh Command Code capabilities --- CHANGELOG.md | 1 + README.md | 2 +- src/core.ts | 2 +- src/models.ts | 14 +++++++++++--- tests/test-models.ts | 18 ++++++++++++++---- tests/test-stream.ts | 2 +- 6 files changed, 29 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f861b13..99640d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- Refresh static model capabilities from `command-code@1.32.2`, including new image and reasoning metadata. - Add `/commandcode-quota` with live credits, plan, usage totals, and rolling-limit diagnostics from Command Code's alpha usage endpoints. - Add `zai-org/GLM-5.3` with its verified reasoning efforts and display pricing. - Prefer Command Code's Provider API (`/provider/v1/chat/completions` and `/provider/v1/messages`) and automatically fall back to the existing `/alpha/generate` transport only when the Provider API returns `403 upgrade_required` for a Go-plan account. diff --git a/README.md b/README.md index 6c757dc..6caf1d2 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,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.32.1`; unknown models default to text-only until their upstream metadata is reviewed. +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.32.2`; unknown models default to text-only until their upstream metadata is reviewed. 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. diff --git a/src/core.ts b/src/core.ts index 2eb92f8..d2b95f8 100644 --- a/src/core.ts +++ b/src/core.ts @@ -43,7 +43,7 @@ export * from "./overflow.ts" export * from "./types.ts" export const DEFAULT_API_BASE = "https://api.commandcode.ai" -export const COMMAND_CODE_CLI_VERSION = "1.32.1" +export const COMMAND_CODE_CLI_VERSION = "1.32.2" const DEFAULT_GENERATE_MAX_TOKENS = 64_000 const DEFAULT_MAX_RETRIES = 0 diff --git a/src/models.ts b/src/models.ts index 706689d..0b30631 100644 --- a/src/models.ts +++ b/src/models.ts @@ -12,7 +12,7 @@ export type CommandCodeApi = "openai-completions" | "anthropic-messages" export type CommandCodeInputType = "text" | "image" /** - * Model input modalities from the command-code@1.32.1 bundled catalog. + * Model input modalities from the command-code@1.32.2 bundled catalog. * Models omitted here remain text-only so newly discovered IDs never claim * image support without upstream evidence. */ @@ -21,6 +21,7 @@ export const MODEL_INPUT_MODALITIES: Readonly * Per-model reasoning efforts supported by Command Code's generate endpoint. * * The Provider API does not expose reasoning metadata. This is an exact - * snapshot of `reasoningEfforts` from the command-code@1.32.1 model catalog + * snapshot of `reasoningEfforts` from the command-code@1.32.2 model catalog * (`packages/shared/src/model-catalog.ts`, also published in the generated * `dist/bundled/command-code-knowledge/reference/models.md`). Models omitted * here let Command Code choose their reasoning depth, matching the CLI. */ export const MODEL_EFFORTS: Readonly> = { + "Qwen/Qwen3.8-27B": ["low", "medium", "xhigh"], "Qwen/Qwen3.8-Max": ["low", "medium", "xhigh"], "claude-fable-5": ["low", "medium", "high", "xhigh", "max"], "claude-opus-4-7": ["low", "medium", "high", "xhigh", "max"], @@ -89,6 +93,7 @@ export const MODEL_EFFORTS: Readonly { ) }) - it("matches command-code@1.32.1 image input capabilities", () => { + it("matches command-code@1.32.2 image input capabilities", () => { assert.deepEqual(inputModalitiesForModel("gpt-5.6-luna"), ["text", "image"]) assert.deepEqual(inputModalitiesForModel("meta/muse-spark-1.2"), ["text", "image"]) assert.deepEqual(inputModalitiesForModel("deepseek/deepseek-v4-flash-vision-exp"), [ "text", "image", ]) + assert.deepEqual(inputModalitiesForModel("Qwen/Qwen3.8-27B"), ["text", "image"]) + assert.deepEqual(inputModalitiesForModel("google/gemini-3.7-flash"), ["text", "image"]) + assert.deepEqual(inputModalitiesForModel("stealth/ox-alpha"), ["text", "image"]) assert.deepEqual(inputModalitiesForModel("deepseek/deepseek-v4-pro"), ["text"]) + assert.deepEqual(inputModalitiesForModel("zai-org/GLM-5.3"), ["text"]) assert.deepEqual(inputModalitiesForModel("unknown-new-model"), ["text"]) assert.equal(modelSupportsImageInput("gpt-5.6-luna"), true) assert.equal(modelSupportsImageInput("deepseek/deepseek-v4-flash-vision-exp"), true) + assert.equal(modelSupportsImageInput("stealth/ox-alpha"), true) assert.equal(modelSupportsImageInput("deepseek/deepseek-v4-pro"), false) - assert.equal(Object.keys(MODEL_INPUT_MODALITIES).length, 38) + assert.equal(Object.keys(MODEL_INPUT_MODALITIES).length, 41) }) it("marks only known reasoning models as reasoning-capable", () => { @@ -128,8 +133,9 @@ describe("commandCodeModelsFromApiResponse()", () => { assert.equal(models[1]?.reasoning, false) }) - it("matches the exact command-code@1.32.1 reasoning effort catalog", () => { + it("matches the exact command-code@1.32.2 reasoning effort catalog", () => { assert.deepEqual(MODEL_EFFORTS, { + "Qwen/Qwen3.8-27B": ["low", "medium", "xhigh"], "Qwen/Qwen3.8-Max": ["low", "medium", "xhigh"], "claude-fable-5": ["low", "medium", "high", "xhigh", "max"], "claude-opus-4-7": ["low", "medium", "high", "xhigh", "max"], @@ -138,6 +144,7 @@ describe("commandCodeModelsFromApiResponse()", () => { "claude-sonnet-4-6": ["low", "medium", "high", "xhigh", "max"], "claude-sonnet-5": ["low", "medium", "high", "xhigh", "max"], "deepseek/deepseek-v4-flash": ["high", "max"], + "deepseek/deepseek-v4-flash-vision-exp": ["high", "max"], "deepseek/deepseek-v4-pro": ["high", "max"], "gpt-5.3-codex": ["low", "medium", "high", "xhigh"], "gpt-5.4": ["low", "medium", "high", "xhigh"], @@ -150,10 +157,13 @@ describe("commandCodeModelsFromApiResponse()", () => { "google/gemini-3.5-flash": ["low", "medium", "high"], "google/gemini-3.5-flash-lite": ["low", "medium", "high"], "google/gemini-3.6-flash": ["low", "medium", "high"], + "google/gemini-3.7-flash": ["low", "medium", "high"], "sakana/fugu-ultra": ["high", "xhigh"], + "stealth/ox-alpha": ["low", "high", "max"], "xai/grok-4.5": ["low", "medium", "high"], - "zai-org/GLM-5.3": ["low", "high", "max"], + "xai/grok-4.6": ["low", "medium", "high", "xhigh"], "zai-org/GLM-5.2": ["high", "max"], + "zai-org/GLM-5.3": ["low", "high", "max"], }) }) diff --git a/tests/test-stream.ts b/tests/test-stream.ts index f831dc2..6346416 100644 --- a/tests/test-stream.ts +++ b/tests/test-stream.ts @@ -569,7 +569,7 @@ describe("streamCommandCode — request serialization", () => { const headers = server.lastRequestHeaders() assert.equal(headers.authorization, "Bearer mock-key") - assert.equal(headers["x-command-code-version"], "1.32.1") + assert.equal(headers["x-command-code-version"], "1.32.2") assert.equal(headers["x-project-slug"], "repo") assert.equal(headers["x-taste-learning"], "true") assert.equal(headers["x-co-flag"], "false")