Skip to content

Commit 1b44ede

Browse files
fix(provider): treat deepseek-flash as native multimodal
Closes #4436. - Remove 'deepseek-flash' from first-party DeepSeek's 'noVisionModels'. - Declare native 'text' and 'image' input in 'modelInputModalities'. - Keep compatibility aliases ('deepseek-chat', 'deepseek-reasoner', 'deepseek-v4-flash') and Zen gateway routes unchanged. - Update docs and structure SSOT files accordingly. - Add focused registry and end-to-end vision sidecar regression tests.
1 parent 2df82f4 commit 1b44ede

13 files changed

Lines changed: 154 additions & 15 deletions

File tree

‎docs-site/src/content/docs/fr/guides/providers.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,11 @@ Le préréglage DeepSeek intégré route également `deepseek-v4-flash` par son
364364
et conserve le streaming SSE en amont. Si ce modèle termine tous les éléments de sortie mais omet l'événement
365365
Responses final, opencodex applique une réparation après un délai de grâce de cinq secondes, limitée à ce
366366
modèle ; les flux mal formés ou partiels sont fermés comme incomplets, et non déclarés réussis.
367+
Le modèle DeepSeek de première partie `deepseek-flash` déclare nativement les entrées `text` et `image` ;
368+
les requêtes contenant une image sont donc envoyées directement à DeepSeek par défaut sans passer par le
369+
sidecar de vision. Les déclarations explicites `noVisionModels` ou texte seul restent prioritaires. Les modèles
370+
de première partie `deepseek-chat`, `deepseek-reasoner` et `deepseek-v4-flash` restent desservis par le sidecar
371+
par défaut ; les routes Zen sont inchangées et n'ont pas été sondées dans cette mise à jour.
367372

368373
> **Trois routes de facturation Volcengine :** `volcengine` correspond à l'API Ark facturée à l'usage,
369374
> `volcengine-coding-plan` consomme le quota Coding Plan et `volcengine-agent-plan` le quota Agent Plan.

‎docs-site/src/content/docs/guides/providers.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,11 @@ The built-in DeepSeek preset also routes `deepseek-v4-flash` over its native Res
525525
keeps upstream SSE streaming enabled. If that model finishes every output item but omits the final
526526
Responses event, opencodex applies a five-second model-scoped grace repair; malformed or partial
527527
streams close as incomplete rather than being reported as successful.
528+
The first-party `deepseek-flash` model advertises native `text` and `image` input, so image requests
529+
are sent directly to DeepSeek by default instead of through the vision sidecar. Explicit
530+
`noVisionModels` or text-only declarations remain authoritative. First-party `deepseek-chat`,
531+
`deepseek-reasoner`, and `deepseek-v4-flash` remain sidecar-backed by default. Zen routes are
532+
unchanged and were not probed in this update.
528533

529534
> **Three Volcengine billing routes:** `volcengine` is the pay-as-you-go Ark API,
530535
> `volcengine-coding-plan` consumes Coding Plan quota, and `volcengine-agent-plan` consumes Agent

‎docs-site/src/content/docs/guides/sidecars.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ allow attachments instead of blocking them before the sidecar runs. When
135135
use the `gpt-5.6-luna` fallback. Startup still migrates an explicitly persisted legacy
136136
`gpt-5.4-mini` value to `gpt-5.6-luna`; that migration applies to a stored value, not to an absent
137137
model field.
138+
The first-party DeepSeek `deepseek-flash` model is native multimodal (`text` and `image`) and does
139+
not use this sidecar by default. Explicit `noVisionModels` or text-only declarations remain
140+
authoritative. First-party `deepseek-chat`, `deepseek-reasoner`, and `deepseek-v4-flash` remain
141+
sidecar-backed by default; Zen routes are unchanged and were not probed in this update.
138142

139143
- Images can come from user, developer, and tool-result messages, including Codex's `view_image`.
140144
- On the OpenAI path (ChatGPT-login passthrough), each image is sent to the configured vision model

‎docs-site/src/content/docs/tr/guides/providers.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,11 @@ yönlendirir ve yukarı akış SSE akışını etkin tutar. Bu model tüm çıkt
410410
bitirir ancak son Responses olayını atlarsa opencodex beş saniyelik model
411411
kapsamlı bir yetkisiz kullanım onarımı uygular; hatalı biçimlendirilmiş veya
412412
kısmi akışlar başarılı olarak bildirilmek yerine tamamlanmamış olarak kapanır.
413+
Birinci taraf `deepseek-flash` modeli yerel olarak `text` ve `image` girdilerini bildirir; bu nedenle
414+
görüntü içeren istekler varsayılan olarak vision sidecar üzerinden geçmeden doğrudan DeepSeek'e gönderilir.
415+
Açık `noVisionModels` veya yalnızca metin bildirimleri önceliğini korur. Birinci taraf `deepseek-chat`,
416+
`deepseek-reasoner` ve `deepseek-v4-flash` varsayılan olarak sidecar üzerinden çalışmaya devam eder; Zen
417+
rotaları değişmedi ve bu güncellemede yoklanmadı.
413418

414419
> **Üç Volcengine faturalandırma rotası:** `volcengine` kullandıkça öde Ark API'sidir, `volcengine-coding-plan` Coding Plan kotasını tüketir ve `volcengine-agent-plan` Agent Plan kotasını tüketir. Aynı ürün için verilen anahtarı ve uç noktayı kullanın; sıradan `/api/v3` uç noktası bir Plan aboneliği mevcut olduğunda bile kullandıkça öde ücretlerine neden olabilir. Önayarlar özenle seçilmiş statik model katalogları kullanır çünkü Ark'ın `/models` yanıtı yerleştirme, görsel, video ve 3D kaynaklarını da içerir, Coding ağ geçidi aynı geniş kataloğu döndürür ve Agent Plan ağ geçidinin `/models` kaynağı yoktur. Kullandıkça öde varsayılan olarak `doubao-seed-2-1-pro-260628`'dir; seçilmiş kataloğu güncel DeepSeek ve GLM metin modellerini de içerir. Coding Plan varsayılan olarak `ark-code-latest`, Agent Plan ise varsayılan olarak `deepseek-v4-flash`'dur.
415420

‎docs-site/src/content/docs/zh-cn/guides/providers.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ Cline IDE/CLI 中提供,不能通过 API 使用;`minimax/minimax-m2.5` 是
236236
内置 DeepSeek preset 同样会让 `deepseek-v4-flash` 使用原生 Responses 端点,并保留上游 SSE
237237
流式输出。如果该模型已经完成全部输出项却缺少最终 Responses 事件,opencodex 会应用模型级
238238
5 秒宽限修复;不完整或格式异常的流会以 incomplete 结束,不会被误报为成功。
239+
第一方 `deepseek-flash` 模型原生声明支持 `text` 和 `image` 输入,因此图像请求默认会直接发送给
240+
DeepSeek,不经过 vision sidecar。显式的 `noVisionModels` 或纯文本声明仍然优先。第一方
241+
`deepseek-chat`、`deepseek-reasoner` 和 `deepseek-v4-flash` 默认仍使用 sidecar;Zen 路由保持不变,
242+
本次更新未进行探测。
239243

240244
> **三条火山方舟计费线路:**`volcengine` 是按量付费方舟 API,`volcengine-coding-plan`
241245
> 消耗 Coding Plan 额度,`volcengine-agent-plan` 消耗 Agent Plan 额度。密钥与端点需要属于

‎docs-site/src/content/docs/zh-tw/guides/providers.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,10 @@ provider,例如 **Xiaomi MiMo**,使用 `anthropic` adapter(`x-api-key`)
316316
原生 Responses endpoint,並保持上游 SSE streaming。若該模型完成所有 output item 卻省略最後的
317317
Responses event,opencodex 會套用 5 秒、model-scoped 的 grace repair;malformed 或 partial stream 會以
318318
incomplete 關閉,不會被誤報為成功。
319+
第一方 `deepseek-flash` 模型原生宣告支援 `text` 與 `image` 輸入,因此圖片請求預設會直接送往
320+
DeepSeek,不經過 vision sidecar。明確的 `noVisionModels` 或純文字宣告仍然優先。第一方
321+
`deepseek-chat`、`deepseek-reasoner` 與 `deepseek-v4-flash` 預設仍使用 sidecar;Zen 路由維持不變,
322+
本次更新未進行探測。
319323

320324
> **三條 Volcengine 計費路徑:** `volcengine` 是 pay-as-you-go Ark API,
321325
> `volcengine-coding-plan` 消耗 Coding Plan quota,`volcengine-agent-plan` 消耗 Agent Plan quota。請使用

‎src/providers/registry.ts‎

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -683,10 +683,9 @@ const DEEPSEEK_V4_LEGACY_MODELS = ["deepseek-v4-flash"];
683683
const DEEPSEEK_NATIVE_THINKING_MODELS = ["deepseek-flash", "deepseek-v4-flash"];
684684
const DEEPSEEK_GATEWAY_THINKING_MODELS = ["deepseek-v4.1-flash", "deepseek-v4-flash"];
685685
/*
686-
* DeepSeek's experimental vision preview (released 2026-08-21, api-docs.deepseek.com):
687-
* text+image input on the V4 Flash base. DeepSeek positions it as a preview id;
688-
* the expectation is that vision merges into `deepseek-v4-flash` proper later,
689-
* at which point this id retires the same way deepseek-chat/reasoner did.
686+
* DeepSeek's legacy vision preview id (released 2026-08-21). First-party probes
687+
* in #4436 resolve it to image-capable `deepseek-flash`; retain the existing
688+
* declarations because gateway support is specific to each served identifier.
690689
*/
691690
const DEEPSEEK_VISION_PREVIEW_MODEL = "deepseek-v4-flash-vision-exp";
692691
/**
@@ -2164,17 +2163,19 @@ export const PROVIDER_REGISTRY: readonly ProviderRegistryEntry[] = [
21642163
// the list only as compatibility aliases so existing saved configs and requests
21652164
// keep validating and routing (they previously mapped to v4-flash; devlog
21662165
// _fin/260710_provider_hardening/002_research_cn.md). The current offerings are
2167-
// the V4 ids — defaultModel and the model-specific wiring above use them.
2168-
// deepseek-v4-flash-vision-exp: experimental vision preview (2026-08-21) —
2169-
// expected to merge into deepseek-v4-flash later; see DEEPSEEK_VISION_PREVIEW_MODEL.
2166+
// V4.1-Flash — defaultModel and the model-specific wiring below use its live id.
2167+
// Keep the legacy vision-preview alias; see DEEPSEEK_VISION_PREVIEW_MODEL.
21702168
models: ["deepseek-chat", "deepseek-reasoner", ...DEEPSEEK_NATIVE_THINKING_MODELS, DEEPSEEK_VISION_PREVIEW_MODEL],
21712169
// V4.1-Flash is the current first-party offering; `deepseek-v4-flash` now routes there
21722170
// as a compatibility alias, so a new install should ask for the live id by name.
21732171
defaultModel: "deepseek-flash",
21742172
// Official DeepSeek Codex setup (codex-deepseek-setup.sh) advertises 1,048,576
21752173
// for both V4 models; the older 1,000,000 figure was a rounded approximation.
21762174
modelContextWindows: { "deepseek-flash": 1_048_576, "deepseek-v4-flash": 1_048_576, [DEEPSEEK_VISION_PREVIEW_MODEL]: 1_048_576 },
2177-
modelInputModalities: { [DEEPSEEK_VISION_PREVIEW_MODEL]: ["text", "image"] },
2175+
modelInputModalities: {
2176+
"deepseek-flash": ["text", "image"],
2177+
[DEEPSEEK_VISION_PREVIEW_MODEL]: ["text", "image"],
2178+
},
21782179
// DeepSeek documents both V4 models as native Responses API models adapted for Codex
21792180
// (model table marks Responses API ✓ for flash and pro; the /responses reference lists
21802181
// both ids as accepted `model` values — verified 2026-08-13 with the V4 Pro GA,
@@ -2244,10 +2245,10 @@ export const PROVIDER_REGISTRY: readonly ProviderRegistryEntry[] = [
22442245
modelReasoningEffortMap: Object.fromEntries(DEEPSEEK_NATIVE_THINKING_MODELS.map(id => [id, deepseekReasoningMapFor(id)])),
22452246
modelSupportsReasoningSummaries: Object.fromEntries(DEEPSEEK_NATIVE_THINKING_MODELS.map(id => [id, true])),
22462247
preserveReasoningContentModels: DEEPSEEK_NATIVE_THINKING_MODELS,
2247-
// Issue #88: every DeepSeek API model is text-only input (no image support upstream) — the
2248-
// vision sidecar describes attached images for them, and the catalog advertises image input
2249-
// on their behalf (same treatment as opencode-go's DeepSeek V4 entries above).
2250-
noVisionModels: ["deepseek-chat", "deepseek-reasoner", ...DEEPSEEK_NATIVE_THINKING_MODELS],
2248+
// #4436: first-party deepseek-flash accepts native images on Chat and Responses.
2249+
// Keep unprobed compatibility aliases on the #88 sidecar path. This must be fixed
2250+
// here: router enrichment unions this list with saved config, so config cannot remove it.
2251+
noVisionModels: ["deepseek-chat", "deepseek-reasoner", "deepseek-v4-flash"],
22512252
},
22522253
// llama-3.3-70b was deprecated by Cerebras on 2026-02-16. Evidence: devlog/_plan/260710_provider_hardening/003_research_aggregators.md.
22532254
{ id: "cerebras", label: "Cerebras", baseUrl: "https://api.cerebras.ai/v1", adapter: "openai-chat", authKind: "key", dashboardUrl: "https://cloud.cerebras.ai/platform/apikeys", defaultModel: "gpt-oss-120b" },

‎structure/providers/xai-grok.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ Devin CLI credential path composition in `src/oauth/devin-cli.ts` follows the se
9494
Provider-scoped catalog hints remain isolated by provider in `src/providers/registry.ts`. The
9595
OpenCode Go `deepseek-v4.1-flash` 1,048,576-token context hint does not change xAI model metadata or
9696
transport behavior.
97+
The first-party DeepSeek `deepseek-flash` native `text`/`image` declaration is likewise scoped to
98+
the DeepSeek provider and does not alter xAI metadata or transport behavior; explicit capability
99+
overrides remain authoritative. First-party `deepseek-chat`, `deepseek-reasoner`, and
100+
`deepseek-v4-flash` remain sidecar-backed by default. Zen routes are unchanged and unprobed here.
97101

98102
Native Chat applies qualifying effort ceilings independently of model pins; pin selection precedes the cap and only pins or cap rewrites enter wire mapping. The [catalog effort contract](../catalog.md#ultra-reasoning-level) records the V1/compaction exemptions and caller-preservation boundary.
99103

‎structure/runtime.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ Provider-scoped capability hints remain authoritative when discovery returns an
189189
capabilities. In particular, `src/providers/registry.ts` assigns OpenCode Go's live
190190
`deepseek-v4.1-flash` route the official 1,048,576-token window instead of the conservative 128k
191191
routed-model fallback.
192+
The same registry declares the first-party `deepseek-flash` model with `text` and `image` input,
193+
so it bypasses the vision sidecar by default; explicit `noVisionModels` or text-only declarations
194+
remain authoritative. First-party `deepseek-chat`, `deepseek-reasoner`, and `deepseek-v4-flash`
195+
remain sidecar-backed by default. Zen routes are unchanged and unprobed in this update.
192196

193197
The BigModel Coding Plan Responses preset uses the separately documented
194198
`https://open.bigmodel.cn/api/v1` transport and a static catalog. Its provider row

‎structure/subagents.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ featured or picker rank. Canonical `opencode-go` rows retain their configured re
117117
and provider-scoped context metadata both when generated and when merged from retained catalog
118118
state; `deepseek-v4.1-flash` therefore keeps its 1,048,576-token window, while synthetic max/ultra
119119
choices are not added to that provider's declared ladder.
120+
The first-party DeepSeek `deepseek-flash` row declares native `text` and `image` input and therefore
121+
does not require the vision sidecar by default; explicit `noVisionModels` or text-only declarations
122+
remain authoritative. First-party `deepseek-chat`, `deepseek-reasoner`, and `deepseek-v4-flash`
123+
remain sidecar-backed by default. Zen routes are unchanged and unprobed in this update.
120124

121125
Full derivation with per-line citations: `devlog/_plan/260816_codexrs_multiagent_v2_and_history_perf/013_five_cap_v1_vs_v2.md`.
122126

0 commit comments

Comments
 (0)