Skip to content

fix(core): recognize DeepSeek V4 Flash Vision image input - #3420

Closed
sunrioa wants to merge 1 commit into
apache:mainfrom
sunrioa:fix/deepseek-v4-vision-capability
Closed

sunrioa wants to merge 1 commit into
apache:mainfrom
sunrioa:fix/deepseek-v4-vision-capability

Conversation

@sunrioa

@sunrioa sunrioa commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Generated-by: OpenAI Codex

Summary

DeepSeek's first-party inventory returns deepseek-v4-flash-vision-exp as a bare ID. Without a catalog entry, Maka classifies it as text-only, filters image attachments, and displays only the raw model ID.

Add explicit static metadata from DeepSeek's Vision guide and model details, including text-and-image input, friendly display metadata, documented context/output limits, structured output, tool calling, and reasoning controls. Keep this entry local to the first-party DeepSeek provider until the generated models.dev catalog catches up.

Add focused coverage for metadata and modality resolution, catalog projection from a bare provider ID, and the adjacent non-vision deepseek-v4-flash model.

Fixes #3417

Root cause

The first-party /models response supplies no modality facts for the new model, and Maka's generated metadata snapshot predates the 2026-08-21 release. resolveModelVisionSupport() therefore finds no provider or static vision signal and resolves to false.

Verification

  • npm --workspace @maka/core test — 578 passed, 0 failed
  • npm run lint — passed
  • npm run format:check — passed
  • npm run build — passed
  • npm run typecheck — passed
  • ./node_modules/.bin/knip --workspace apps/desktop — passed
  • ./node_modules/.bin/knip --workspace packages/ui — passed
  • Desktop smoke test — selected deepseek-v4-flash-vision-exp, attached an image, and received an image-grounded response

Before: Maka classifies the model as text-only and filters the attached image.

Before: Maka filters the image as unsupported

After: Maka recognizes the model as multimodal, sends the same image, and receives an image-grounded response.

After: Maka sends the image to DeepSeek V4 Flash Vision

Full npm test was not completed locally: an earlier run stalled in packages/eval/dist/__tests__/provider-admission-integration.test.js and was interrupted. The affected Core suite completed without failures, and required CI will exercise the remaining workspaces.

Scope

  • The generated models.dev snapshot is unchanged; this is an explicit static entry until the upstream catalog includes the model.
  • No lifecycle is assigned because DeepSeek calls the model experimental, while Maka has no exact matching lifecycle value.
  • Protocol selection is unchanged; the model continues to use Chat Completions, whose image input path DeepSeek documents and the Desktop smoke test verified.
  • The model is not added to the offline fallback list.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope:

OpenAI Codex assisted with official-documentation review, diagnosis, implementation, regression tests, local verification, and drafting this description. I reproduced the issue, reviewed the final diff and test results, and performed the manual smoke test.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@Astro-Han

Astro-Han commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for filling in this metadata, especially for including the official docs link and the context window.

I am closing this because #3605 is doing the same thing — registering deepseek-v4-flash-vision-exp in STATIC_MODEL_METADATA.deepseek. #3605 is out of draft and under review, while this one has been in draft without updates since 21 August, so I am closing this side to avoid two parallel efforts.

Two things here differ from #3605, and I have raised both there — please take a look:

  1. Your thinkingOptions.efforts is ['low', 'high', 'max']; fix(core): add DeepSeek V4 Flash Vision to model metadata #3605 has ['high', 'max'], without the low tier.
  2. Your capabilities has no webSearch; fix(core): add DeepSeek V4 Flash Vision to model metadata #3605 adds webSearch: true.

You also included model-catalog.test.ts and model-metadata.test.ts, and #3605 has no tests at all. If you confirm those two facts and move the tests over to #3605, nothing from this PR is lost.

简体中文

谢谢你补这条元数据,尤其是把官方文档链接和上下文窗口这些都写全了。

这条我准备关掉,因为 #3605 在做同一件事——同样在 STATIC_MODEL_METADATA.deepseek 里注册 deepseek-v4-flash-vision-exp。#3605 已经脱离 draft 并在 review 中,这条从 8 月 21 日起一直是 draft 没有再动,为了避免两条并行我先关这边。

不过你这条有两处内容是 #3605 没有的,我已经在那边提出来了,麻烦你也过去看一眼:

  1. thinkingOptions.efforts 你写的是 ['low', 'high', 'max'],fix(core): add DeepSeek V4 Flash Vision to model metadata #3605 写的是 ['high', 'max'],少一档 low。
  2. capabilities 你没有 webSearch,fix(core): add DeepSeek V4 Flash Vision to model metadata #3605 加了 webSearch: true。

另外你还带了 model-catalog.test.ts 和 model-metadata.test.ts 两个测试,#3605 没有测试。如果你愿意把这两处事实确认一下、再把测试补到 #3605 上,这条的价值就都保住了。

@Astro-Han Astro-Han closed this Aug 24, 2026
M4n5ter added a commit that referenced this pull request Nov 27, 2026
Sync vendored third-party/nsh from 708105de3 (0.7.1) through
a901baa2e (0.7.2 + post-0.7.2 fixes):

- Remove superseded local patches now provided upstream:
  - nsh-bundler / nsh-cli / ui-build: fail_on_unresolved_imports option
    (upstream #3425 enables unresolved-import errors by default)
  - nsh-core: components.rs touch-selection patch (upstream #3380)
  - nsh-platform-ios: touch.rs scroll-gesture cancel patch (upstream #3420)
  - nsh-platform-windows: richedit.rs window-specific IME association
    patch (upstream #3411)
- Fix a Windows RichEdit caret-alignment regression introduced with
  follow-on-draw (#3411): moving RichEdit's client rectangle does not
  re-issue TxSetCaretPos when the previous caret pixel remains inside
  the moved rectangle, so translate the cached caret with client rect
  shifts (with a regression unit test).
- Update third-party/nsh provenance (upstream.json, SOURCE.md),
  Cargo.lock files, LICENSE, and CLI dependency notices.

Generated-by: Maka (Gemini)
M4n5ter added a commit that referenced this pull request Nov 27, 2026
Sync vendored third-party/nsh from 3f8ecd8b3 (0.7.0) through
a901baa2e (0.7.2 + post-0.7.2 fixes):

- Remove superseded local patches now provided upstream and migrate
  consumers to upstream canonical APIs:
  - nsh-engine / ios-shell: HostCall::sender() -> HostSender (#3357)
  - nsh-ios-host / nsh-platform-ios: AppOptions::host (#3354) and
    touch.rs gesture cancel fix (#3420)
  - TextView renderImage(image, context) & terminal images (#3359,
    #3260, #3372, #3290)
  - nsh-bundler / nsh-cli / ui-build: default unresolved-import errors
    (#3425)
  - nsh-core: list display: none retention (#3193) and touch-selection
    (#3380)
  - nsh-platform-macos: file_drop (#3385) and mount (#3386) cleanups
  - nsh-platform-windows: richedit.rs window-specific IME association
    (#3411)
- Preserve upstream RichEditor onReadonlyInput behavior (#3371) with
  opt-in readonly_sink for Maka's embedded composer.
- Fix a Windows RichEdit caret-alignment regression introduced with
  follow-on-draw (#3411): translate the cached caret when the client
  rectangle shifts (with a regression unit test).
- Update third-party/nsh provenance (upstream.json, SOURCE.md),
  Cargo.lock files, LICENSE, and CLI dependency notices.

Generated-by: Maka (Gemini)
M4n5ter added a commit that referenced this pull request Nov 27, 2026
Sync vendored third-party/nsh from 3f8ecd8b3 (0.7.0) through
a901baa2e (0.7.2 + post-0.7.2 fixes):

- Remove superseded local patches now provided upstream and migrate
  consumers to upstream canonical APIs:
  - nsh-engine / ios-shell: HostCall::sender() -> HostSender (#3357)
  - nsh-ios-host / nsh-platform-ios: AppOptions::host (#3354) and
    touch.rs gesture cancel fix (#3420)
  - TextView renderImage(image, context) & terminal images (#3359,
    #3260, #3372, #3290)
  - nsh-bundler / nsh-cli / ui-build: default unresolved-import errors
    (#3425)
  - nsh-core: list display: none retention (#3193) and touch-selection
    (#3380)
  - nsh-platform-macos: file_drop (#3385) and mount (#3386) cleanups
  - nsh-platform-windows: richedit.rs window-specific IME association
    (#3411)
- Preserve upstream RichEditor onReadonlyInput behavior (#3371) with
  opt-in readonly_sink for Maka's embedded composer.
- Fix a Windows RichEdit caret-alignment regression introduced with
  follow-on-draw (#3411): translate the cached caret when the client
  rectangle shifts (with a regression unit test).
- Update third-party/nsh provenance (upstream.json, SOURCE.md),
  Cargo.lock files, LICENSE, and CLI dependency notices.

Generated-by: Maka (Gemini)
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.

bug(core): DeepSeek V4 Flash Vision is treated as text-only

2 participants