Skip to content

feat(models): add DeepSeek V4.1 Flash (catalog sync to 1.53.0 + pricing) - #93

Merged
patlux merged 3 commits into
patlux:mainfrom
myohei:feat/deepseek-v4.1-flash
Sep 15, 2026
Merged

patlux merged 3 commits into
patlux:mainfrom
myohei:feat/deepseek-v4.1-flash

Conversation

@myohei

@myohei myohei commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

DeepSeek V4.1 Flash (deepseek/deepseek-v4.1-flash) is now available on Command Code. This PR:

  1. Syncs the generated catalog from command-code@1.44.0command-code@1.53.0 (npm run sync:commandcode-catalog):
    • Adds deepseek/deepseek-v4.1-flash — reasoning true, efforts low/high/max, text+image input, 1M context.
    • Also picks up gpt-6-astra, xai/grok-4.6, inclusionai/ling-3.0-flash-sante:free, and publishes upstream's own Muse Spark effort levels.
  2. Drops the manual Muse Spark effort overrides — upstream 1.53.0 ships them now; the override test requires removal once upstream publishes levels.
  3. Adds pricing for the 2026-09-10 catalog snapshot (src/pricing.ts + test fixtures):
    • deepseek/deepseek-v4.1-flash at the documented off-peak rate ($0.15/$0.60, cache $0.003).
    • The other six models present in the refreshed snapshot (Qwen 3.8 Max 0902, Gemini 3.8 Flash, Muse Spark 1.3 / 1.3 Contributor, LongCat 2.0 free, Ling 3.0 Flash Sante free).
    • Corrects deepseek/deepseek-v4-flash to the documented off-peak rate ($0.15/$0.60, cache $0.003).

Verification

  • npm run typecheck
  • npm run test:unit ✅ (all suites pass, including the catalog/pricing fixtures)
  • Live API probe: deepseek/deepseek-v4.1-flash accepts reasoning_effort (low/high/max) and tool calling against https://api.commandcode.ai/provider/v1/chat/completions

Note: V4.1 Flash carries a boosted per-model allowance on GOAT/Pro through 2026-09-17 ($60 GOAT / $70 Pro); per-token rates are unchanged and no temporary pricing entry is needed.

Adds DeepSeek V4.1 Flash (reasoning, efforts low/high/max, vision, 1M
context), GPT-6 Astra, xAI Grok 4.6, and inclusionai Ling 3.0 Flash
Sante (free). Upstream 1.53.0 now publishes selectable efforts for
every Muse Spark model, so the manual overrides are dropped.
…9-10

Adds deepseek/deepseek-v4.1-flash and the other six models present in
the 2026-09-10 catalog snapshot (Qwen 3.8 Max 0902, Gemini 3.8 Flash,
Muse Spark 1.3 / 1.3 Contributor, LongCat 2.0 free, Ling 3.0 Flash
Sante free). Corrects the DeepSeek V4 Flash rate to the documented
off-peak rate (/bin/bash.15//bin/bash.60, cache $0.003).
@zidanefaqih

Copy link
Copy Markdown

Independent verification of this PR — I applied the equivalent changes locally on top of 0.6.4 and tested against the live endpoint. It works:

  • --thinking max on deepseek/deepseek-v4.1-flash reaches the wire. The stream now carries thinking_start / thinking_delta / thinking_end (19 deltas on a short prompt), which on 0.6.4 was unreachable: reasoning:false made core.ts drop reasoning_effort before serialization and thinkingMetadataForModel returned undefined, so nothing surfaced.
  • Image input works: @red-square.png returns "Red". Without the MODEL_INPUT_MODALITIES entry the host declared the model text-only and the image was rejected before it ever hit the API.
  • Local cost matches recorded usage exactly — (148×0.15 + 17×0.6 + 1152×0.003)/1e6 = 3.5856e-05, identical to usage.cost.total.

Three review notes:

1. This PR and #86 are near-duplicates — only one can land cleanly.

Both bump COMMAND_CODE_CLI_VERSION to 1.53.0 and both add the same seven MODEL_COSTS keys (deepseek/deepseek-v4.1-flash, Qwen/Qwen3.8-Max-0902, google/gemini-3.8-flash, meta/muse-spark-1.3, meta/muse-spark-1.3-contributor, meituan/LongCat-2.0:free, inclusionai/ling-3.0-flash-sante:free).

The actual differences:

#86 #93
gpt-6-astra pricing + modality yes no
deepseek/deepseek-v4-flash 0.22 → 0.15 no yes
fixture fetchedAt assertion /^2026-09-/ /^2026-09-10T/

Worth deciding which one merges and closing the other, or folding the missing piece into whichever lands first.

2. Emptying MODEL_EFFORT_OVERRIDES is user-visible, not a no-op.

The comment says command-code@1.53.0 publishes efforts for every reasoning model tracked, which is true — but the published sets differ from the overrides being removed:

model override (removed) catalog 1.53.0 (added)
meta/muse-spark-1.1, 1.2, 1.2-contributor, 1.3-contributor minimal, low, medium, high, xhigh low, medium, high, xhigh
meta/muse-spark-1.3 minimal, low, medium, high, xhigh low, medium, high, xhigh, max

So minimal disappears for all five, and 1.3 gains max. The new sets match upstream, so this looks correct — but anyone on /thinking minimal for those models silently loses the option, and it reads as a cleanup when it probably deserves its own CHANGELOG line.

3. Leaving deepseek/deepseek-v4-flash-vision-exp at 0.22 is correct — please keep it.

The CLI's bundled models.md lists $0.15/$0.6 · cache $0.003 for that model, which invites "fixing" it to match flash. The pricing page JSON at PRICING_SOURCE_URL disagrees, and that is the source pricing.ts documents:

  • deepseek-v4-flash-vision-exp — off-peak 0.22/0.66/0.007, peak 0.44/1.32/0.014
  • deepseek-v4-flash — off-peak 0.15/0.6/0.003, peak 0.3/1.2/0.006

Both #86 and #93 keep 0.22, matching PRICING_SOURCE_URL. A note in the PR or an inline comment in pricing.ts would stop a future contributor or catalog sync from "correcting" it back to 0.15.

Also worth noting for sequencing: #91, #92, and #93 all modify src/commandcode-catalog-overrides.ts, so they will need rebasing in some order.

@patlux

patlux commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Consolidated this into pricing on current main; kept the newer 1.54.0 capability snapshot from #98. Re-fetched the live 69-model catalog and reviewed the official pricing page on 2026-09-15. Qwen 0902 and Gemini 3.8 cache writes are zero (unlike #85); Vision Exp now explicitly shows 0.15/0.60/0.003, so its older 0.22 rate was corrected too. Added explicit regression assertions and removed fixture-wide formatting noise. Full npm test passes including Pi and OMP, format and diff checks clean. Unique #86 Astra pricing was reviewed but intentionally not added: Astra remains absent from the live API, and preserving exact live-catalog pricing coverage avoids a special-case test exception. Its current long-context cache-write price is 25, not 12.5 as proposed in #86; add it with verified rates when API discovery exposes it. Other overlapping #85/#86 pricing is covered here. Waiting for CI.

@patlux

patlux commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Shipped in pi-commandcode-provider@0.7.0: https://github.com/patlux/pi-commandcode-provider/releases/tag/v0.7.0 . Public npm package model discovery and GOAT live smoke verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants