From baf701576ee564c9269b403bd2ad53eeeb113f08 Mon Sep 17 00:00:00 2001 From: sam <30651023+SamYue1@users.noreply.github.com> Date: Mon, 14 Sep 2026 16:13:29 +0800 Subject: [PATCH] fix(models): refresh the model metadata so newer models expose thinking levels The capability metadata that ships with the provider predated several model ids, so anything published after the last refresh fell back to the unknown-model defaults: reasoning: false and no thinkingLevelMap. pi hides every thinking level for non-reasoning models, so deepseek/deepseek-v4.1-flash offered only "off" and dropped reasoning_effort from the request. Refreshed the metadata with the repository's own catalog sync script. The newer ids now report their image, reasoning, effort, and output-limit support, and deepseek/deepseek-v4.1-flash exposes low/high/max, which matches the public model reference. The obsolete manual effort overrides are dropped because the refreshed catalog carries those levels itself. --- CHANGELOG.md | 3 +++ README.md | 2 +- src/commandcode-catalog-overrides.ts | 10 +++------- src/commandcode-catalog.ts | 19 +++++++++++++++++-- tests/test-models.ts | 1 - 5 files changed, 24 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 879148f..a0a190a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +- Refresh the model capability metadata so model ids added since the last refresh report their image, reasoning, and effort support instead of falling back to the text-only, non-reasoning defaults. `deepseek/deepseek-v4.1-flash`, `gpt-6-astra`, and `inclusionai/ling-3.0-flash-sante:free` now expose the thinking levels the public model reference documents, and no longer drop `reasoning_effort` from requests. +- Drop the manual effort overrides for the Meta Muse Spark models: the refreshed catalog carries those levels itself, and the table is documented to lose entries once that happens. + ## 0.6.4 - 2026-09-03 - Refresh the generated Command Code capability catalog from `command-code@1.40.1` to `command-code@1.44.0`, adding current image-input, reasoning, effort, and output-limit metadata for newly published models. diff --git a/README.md b/README.md index 909fdbc..b4e97f3 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,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.44.0`; 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 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.54.0`; 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 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. diff --git a/src/commandcode-catalog-overrides.ts b/src/commandcode-catalog-overrides.ts index cb4accd..2b60f10 100644 --- a/src/commandcode-catalog-overrides.ts +++ b/src/commandcode-catalog-overrides.ts @@ -15,11 +15,7 @@ import type { CommandCodeReasoningEffort } from "./commandcode-catalog.ts" export const MODEL_EFFORT_OVERRIDES: Readonly< Record > = { - // Meta Muse Spark: the CLI ships no effort levels, but the endpoint accepts - // `reasoning_effort` for these models and other hosts expose the same set. - "meta/muse-spark-1.1": ["minimal", "low", "medium", "high", "xhigh"], - "meta/muse-spark-1.2": ["minimal", "low", "medium", "high", "xhigh"], - "meta/muse-spark-1.2-contributor": ["minimal", "low", "medium", "high", "xhigh"], - "meta/muse-spark-1.3": ["minimal", "low", "medium", "high", "xhigh"], - "meta/muse-spark-1.3-contributor": ["minimal", "low", "medium", "high", "xhigh"], + // Empty since command-code@1.54.0: the CLI catalog publishes effort levels itself + // for every model it lists, including the Meta Muse Spark models this table used + // to carry (muse-spark-1.1/1.2/1.2-contributor/1.3/1.3-contributor). } diff --git a/src/commandcode-catalog.ts b/src/commandcode-catalog.ts index 608f465..59eccbf 100644 --- a/src/commandcode-catalog.ts +++ b/src/commandcode-catalog.ts @@ -1,10 +1,10 @@ -export const COMMAND_CODE_CLI_VERSION = "1.44.0" +export const COMMAND_CODE_CLI_VERSION = "1.54.0" export type CommandCodeInputType = "text" | "image" export type CommandCodeReasoningEffort = "minimal" | "low" | "medium" | "high" | "xhigh" | "max" /** - * Generated from command-code@1.44.0 by `npm run sync:commandcode-catalog`. + * Generated from command-code@1.54.0 by `npm run sync:commandcode-catalog`. * Do not edit manually. */ export const MODEL_INPUT_MODALITIES: Readonly> = { @@ -17,6 +17,7 @@ export const MODEL_INPUT_MODALITIES: Readonly> = { "deepseek/deepseek-v4-flash-fast": true, "deepseek/deepseek-v4-flash-vision-exp": true, "deepseek/deepseek-v4-pro": true, + "deepseek/deepseek-v4.1-flash": true, "google/gemini-3.1-flash-lite": true, "google/gemini-3.5-flash": true, "google/gemini-3.5-flash-lite": true, @@ -82,6 +86,8 @@ export const MODEL_REASONING: Readonly> = { "gpt-5.6-luna": true, "gpt-5.6-sol": true, "gpt-5.6-terra": true, + "gpt-6-astra": true, + "inclusionai/ling-3.0-flash-sante:free": true, "meituan/LongCat-2.0:free": true, "meta/muse-spark-1.1": true, "meta/muse-spark-1.2": true, @@ -129,6 +135,7 @@ export const MODEL_EFFORTS: Readonly> = { + "inclusionai/ling-3.0-flash-sante:free": 32_768, "poolside/laguna-s-2.1-free": 32_768, "Qwen/Qwen3.8-27B": 32_768, "z-ai/glm-5.3-flash": 131_072, diff --git a/tests/test-models.ts b/tests/test-models.ts index 821a2e6..1eab234 100644 --- a/tests/test-models.ts +++ b/tests/test-models.ts @@ -198,7 +198,6 @@ describe("commandCodeModelsFromApiResponse()", () => { it("merges manual effort overrides over the generated catalog", () => { const validEfforts = new Set(["minimal", "low", "medium", "high", "xhigh", "max"]) - assert.ok(Object.keys(MODEL_EFFORT_OVERRIDES).length > 0) for (const [modelId, efforts] of Object.entries(MODEL_EFFORT_OVERRIDES)) { assert.equal(MODEL_REASONING[modelId], true, `${modelId} override needs a reasoning flag`) assert.equal(