fix(models): support DeepSeek V4.1 vision and max effort
CI / typecheck (push) Failing after 51s
CI / format (push) Failing after 4s
CI / Oh My Pi compatibility (push) Failing after 1m7s
CI / CodeQL SAST (push) Failing after 26m15s
CI / Semgrep — pi extension audit (push) Failing after 8m15s
CI / Gitleaks — secrets scan (push) Failing after 8s
CI / Dependency review (push) Skipped
CI / npm audit (push) Failing after 6s
CI / Check lifecycle scripts (push) Failing after 2s
CI / typecheck (push) Failing after 51s
CI / format (push) Failing after 4s
CI / Oh My Pi compatibility (push) Failing after 1m7s
CI / CodeQL SAST (push) Failing after 26m15s
CI / Semgrep — pi extension audit (push) Failing after 8m15s
CI / Gitleaks — secrets scan (push) Failing after 8s
CI / Dependency review (push) Skipped
CI / npm audit (push) Failing after 6s
CI / Check lifecycle scripts (push) Failing after 2s
Refresh the generated capability catalog from command-code@1.44.0 to 1.53.1. deepseek/deepseek-v4.1-flash now advertises image input and its low, high, and max reasoning efforts, so pi forwards attached images and exposes the full thinking-level selector instead of reporting the model as text-only without selectable levels. The sync also adds gpt-6-astra, xai/grok-4.6, and inclusionai/ling-3.0-flash-sante:free metadata. Drop the now-obsolete manual Meta Muse Spark effort overrides because upstream publishes efforts for meta/muse-spark-1.1 through 1.3-contributor and MiniMaxAI/MiniMax-M3, and add a regression test for the V4.1 capabilities.
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
- Refresh the generated Command Code capability catalog from `command-code@1.44.0` to `command-code@1.53.1`. `deepseek/deepseek-v4.1-flash` now advertises image input and its `low`, `high`, and `max` reasoning efforts, so pi forwards attached images and exposes the full thinking-level selector instead of the text-only, level-less defaults. New `gpt-6-astra`, `xai/grok-4.6`, and `inclusionai/ling-3.0-flash-sante:free` metadata comes along.
|
||||
- Drop the now-obsolete manual Meta Muse Spark effort overrides: upstream ships efforts for `meta/muse-spark-1.1` through `1.3-contributor` and `MiniMaxAI/MiniMax-M3`, so `src/commandcode-catalog-overrides.ts` is empty.
|
||||
|
||||
## 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.
|
||||
|
||||
@@ -88,7 +88,7 @@ Other extensions that stream with the active Command Code model, such as backgro
|
||||
|
||||
### Reasoning support
|
||||
|
||||
Reasoning capability and selectable effort levels follow the official CLI catalog independently. Models can therefore be marked as reasoning-capable even when Command Code chooses their depth automatically. Models with explicit effort support register a model-specific `thinkingLevelMap`, so pi and OMP expose only valid levels. For a few reasoning models the CLI catalog ships no effort levels although the endpoint accepts `reasoning_effort`; `src/commandcode-catalog-overrides.ts` adds a manual level set for those (currently `meta/muse-spark-1.1`, `meta/muse-spark-1.2`, and `meta/muse-spark-1.2-contributor`) on top of the generated catalog, and the tests fail once upstream publishes its own levels so the override gets removed. Pi's native OpenAI- and Anthropic-compatible providers translate the selected level for Provider API accounts; the existing Command Code generate transport sends the matching `reasoning_effort` for Go accounts.
|
||||
Reasoning capability and selectable effort levels follow the official CLI catalog independently. Models can therefore be marked as reasoning-capable even when Command Code chooses their depth automatically. Models with explicit effort support register a model-specific `thinkingLevelMap`, so pi and OMP expose only valid levels, including the opt-in `xhigh` and `max` levels. `src/commandcode-catalog-overrides.ts` can add a manual level set for reasoning models that the CLI catalog ships without efforts; it is currently empty because upstream publishes efforts for every selectable model, and the tests fail once upstream publishes levels for a model that still has a manual override. Pi's native OpenAI- and Anthropic-compatible providers translate the selected level for Provider API accounts; the existing Command Code generate transport sends the matching `reasoning_effort` for Go accounts.
|
||||
|
||||
List Command Code models from the terminal:
|
||||
|
||||
@@ -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.53.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 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.
|
||||
|
||||
|
||||
@@ -11,15 +11,9 @@ import type { CommandCodeReasoningEffort } from "./commandcode-catalog.ts"
|
||||
*
|
||||
* Add a model only when the effort parameter is known to be accepted by the
|
||||
* Command Code endpoint; remove it once the CLI catalog ships its own efforts.
|
||||
* The map is currently empty: upstream published efforts for Meta Muse Spark
|
||||
* 1.1-1.3 and MiniMax M3, so no manual policy is needed.
|
||||
*/
|
||||
export const MODEL_EFFORT_OVERRIDES: Readonly<
|
||||
Record<string, readonly CommandCodeReasoningEffort[]>
|
||||
> = {
|
||||
// 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"],
|
||||
}
|
||||
> = {}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
export const COMMAND_CODE_CLI_VERSION = "1.44.0"
|
||||
export const COMMAND_CODE_CLI_VERSION = "1.53.1"
|
||||
|
||||
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.53.1 by `npm run sync:commandcode-catalog`.
|
||||
* Do not edit manually.
|
||||
*/
|
||||
export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCodeInputType[]>> = {
|
||||
@@ -17,6 +17,7 @@ export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCod
|
||||
"claude-sonnet-4-6": ["text", "image"],
|
||||
"claude-sonnet-5": ["text", "image"],
|
||||
"deepseek/deepseek-v4-flash-vision-exp": ["text", "image"],
|
||||
"deepseek/deepseek-v4.1-flash": ["text", "image"],
|
||||
"google/gemini-3.1-flash-lite": ["text", "image"],
|
||||
"google/gemini-3.5-flash": ["text", "image"],
|
||||
"google/gemini-3.5-flash-lite": ["text", "image"],
|
||||
@@ -30,6 +31,7 @@ export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCod
|
||||
"gpt-5.6-luna": ["text", "image"],
|
||||
"gpt-5.6-sol": ["text", "image"],
|
||||
"gpt-5.6-terra": ["text", "image"],
|
||||
"gpt-6-astra": ["text", "image"],
|
||||
"meta/muse-spark-1.1": ["text", "image"],
|
||||
"meta/muse-spark-1.2": ["text", "image"],
|
||||
"meta/muse-spark-1.2-contributor": ["text", "image"],
|
||||
@@ -53,6 +55,7 @@ export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCod
|
||||
"thinkingmachines/inkling": ["text", "image"],
|
||||
"thinkingmachines/inkling-small": ["text", "image"],
|
||||
"xai/grok-4.5": ["text", "image"],
|
||||
"xai/grok-4.6": ["text", "image"],
|
||||
"xiaomi/mimo-v2.5": ["text", "image"],
|
||||
"z-ai/glm-5.3-flash": ["text", "image"],
|
||||
}
|
||||
@@ -69,6 +72,7 @@ export const MODEL_REASONING: Readonly<Record<string, true>> = {
|
||||
"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<Record<string, true>> = {
|
||||
"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<Record<string, readonly CommandCodeReasonin
|
||||
"deepseek/deepseek-v4-flash-fast": ["low", "high", "max"],
|
||||
"deepseek/deepseek-v4-flash-vision-exp": ["high", "max"],
|
||||
"deepseek/deepseek-v4-pro": ["high", "max"],
|
||||
"deepseek/deepseek-v4.1-flash": ["low", "high", "max"],
|
||||
"google/gemini-3.1-flash-lite": ["low", "medium", "high"],
|
||||
"google/gemini-3.5-flash": ["low", "medium", "high"],
|
||||
"google/gemini-3.5-flash-lite": ["low", "medium", "high"],
|
||||
@@ -142,6 +149,13 @@ export const MODEL_EFFORTS: Readonly<Record<string, readonly CommandCodeReasonin
|
||||
"gpt-5.6-luna": ["low", "medium", "high", "xhigh", "max"],
|
||||
"gpt-5.6-sol": ["low", "medium", "high", "xhigh", "max"],
|
||||
"gpt-5.6-terra": ["low", "medium", "high", "xhigh", "max"],
|
||||
"gpt-6-astra": ["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"],
|
||||
"meta/muse-spark-1.3": ["low", "medium", "high", "xhigh", "max"],
|
||||
"meta/muse-spark-1.3-contributor": ["low", "medium", "high", "xhigh"],
|
||||
"MiniMaxAI/MiniMax-M3": ["low", "medium", "high"],
|
||||
"moonshotai/Kimi-K3": ["low", "high", "max"],
|
||||
"Qwen/Qwen3.8-27B": ["low", "medium", "xhigh"],
|
||||
"Qwen/Qwen3.8-Flash": ["low", "medium", "xhigh"],
|
||||
@@ -157,6 +171,7 @@ export const MODEL_EFFORTS: Readonly<Record<string, readonly CommandCodeReasonin
|
||||
}
|
||||
|
||||
export const MODEL_MAX_OUTPUT_TOKENS: Readonly<Record<string, number>> = {
|
||||
"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,
|
||||
|
||||
+16
-1
@@ -126,6 +126,22 @@ describe("commandCodeModelsFromApiResponse()", () => {
|
||||
assert.equal(modelSupportsImageInput("unknown-new-model"), false)
|
||||
})
|
||||
|
||||
it("exposes DeepSeek V4.1 vision input and its low/high/max thinking levels", () => {
|
||||
const modelId = "deepseek/deepseek-v4.1-flash"
|
||||
assert.deepEqual(inputModalitiesForModel(modelId), ["text", "image"])
|
||||
assert.equal(modelSupportsImageInput(modelId), true)
|
||||
assert.equal(MODEL_REASONING[modelId], true)
|
||||
assert.deepEqual(MODEL_EFFORTS[modelId], ["low", "high", "max"])
|
||||
assert.deepEqual(thinkingMetadataForModel(modelId)?.thinkingLevelMap, {
|
||||
minimal: null,
|
||||
low: "low",
|
||||
medium: null,
|
||||
high: "high",
|
||||
xhigh: null,
|
||||
max: "max",
|
||||
})
|
||||
})
|
||||
|
||||
it("tracks reasoning independently from selectable effort levels", () => {
|
||||
const reasoningModels = Object.keys(MODEL_REASONING)
|
||||
const effortModels = Object.keys(MODEL_EFFORTS)
|
||||
@@ -198,7 +214,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(
|
||||
|
||||
Reference in New Issue
Block a user