Skip to content

[Fix] DeepSeek Flash cannot read attached images - #1618

Draft
zoomote[bot] wants to merge 2 commits into
mainfrom
fix/deepseek-flash-images-1s7awc55n2tyz
Draft

[Fix] DeepSeek Flash cannot read attached images#1618
zoomote[bot] wants to merge 2 commits into
mainfrom
fix/deepseek-flash-images-1s7awc55n2tyz

Conversation

@zoomote

@zoomote zoomote Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

​Created by Roomote. Follow up by mentioning @roomote, in the web UI, or in Discord.

Related GitHub Issue

N/A. No approved GitHub issue is linked to this PR.

Description

DeepSeek's September 10 V4.1 release made deepseek-flash natively multimodal and temporarily routes the retired deepseek-v4-flash and deepseek-v4-flash-vision-exp IDs to the same model. Zoo Code previously treated the canonical ID as unknown and blocked images for deepseek-v4-flash.

This change adds deepseek-flash as the default, enables image input for the supported Flash IDs, keeps deepseek-v4-pro text-only, aligns the retired aliases with current pricing and behavior, and adds regression coverage for model discovery, image transport, and disabled-reasoning temperature behavior.

Test Procedure

  • Run pnpm --filter @roo-code/types exec vitest run src/__tests__/deepseek-v4-pro.test.ts.
  • Run pnpm --dir src exec vitest run api/providers/__tests__/deepseek.spec.ts api/providers/fetchers/__tests__/deepseek.spec.ts.
  • Run pnpm check-types.
  • In Zoo Code, configure the native DeepSeek provider with a valid API key, select deepseek-flash or a supported legacy Flash alias, attach an image, and confirm the request is accepted. Confirm deepseek-v4-pro still does not offer image attachment support.

Pre-Submission Checklist

  • Issue Linked: N/A; no approved GitHub issue is linked.
  • Scope: Changes are limited to the reported DeepSeek image-support regression and its tests.
  • Self-Review: The final diff was reviewed for scope and model-contract consistency.
  • Testing: Focused tests and repository type checks pass.
  • Visual Snapshot (UI changes only): N/A; this changes provider capability metadata and request behavior, not a static rendered UI state.
  • Documentation Impact: Paired documentation update: [Docs] Clarify DeepSeek Flash image support Zoo-Code-Docs#60
  • Contribution Guidelines: The repository contribution guidance was followed.

Visual Snapshots

N/A. No visual UI state changed.

Videos (interaction / animation only)

N/A. No interaction or animation changed.

Documentation Updates

Paired Zoo-Code-Docs PR: Zoo-Code-Org/Zoo-Code-Docs#60

Additional Notes

Authoritative DeepSeek references:

Get in Touch

Follow up by mentioning @roomote on this PR, through the linked Roomote session, or in the linked Discord thread.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit-review-active

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: b16d5307-42c9-4baa-8c61-a9b6e072d511

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 7a04ff25-c6f3-4da5-90cb-135b090d4267

📥 Commits

Reviewing files that changed from the base of the PR and between 745656a and 7d590e5.

📒 Files selected for processing (5)
  • packages/types/src/__tests__/deepseek-v4-pro.test.ts
  • packages/types/src/providers/deepseek.ts
  • src/api/providers/__tests__/deepseek.spec.ts
  • src/api/providers/deepseek.ts
  • src/api/providers/fetchers/__tests__/deepseek.spec.ts

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.

📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (6)
Treat model, provider, MCP, path, command, and tool data as untrusted.

⚙️ CodeRabbit configuration file

Files:

  • src/api/providers/fetchers/__tests__/deepseek.spec.ts
  • src/api/providers/deepseek.ts
  • src/api/providers/__tests__/deepseek.spec.ts
For persisted settings, verify the complete schema/storage/runtime/webview round trip, shared default semantics, and focused true plus false/unset tests.

⚙️ CodeRabbit configuration file

Files:

  • packages/types/src/__tests__/deepseek-v4-pro.test.ts
  • packages/types/src/providers/deepseek.ts
Require regression coverage at the lowest valid harness with behavior-focused assertions, including relevant negative, error, false/unset, and boundary cases.

⚙️ CodeRabbit configuration file

Files:

  • packages/types/src/__tests__/deepseek-v4-pro.test.ts
  • src/api/providers/fetchers/__tests__/deepseek.spec.ts
  • src/api/providers/__tests__/deepseek.spec.ts
Check strict typing and exhaustive behavior across normal, boundary, error, cancellation, retry, and compatibility paths.

⚙️ CodeRabbit configuration file

Files:

  • packages/types/src/__tests__/deepseek-v4-pro.test.ts
  • src/api/providers/fetchers/__tests__/deepseek.spec.ts
  • src/api/providers/deepseek.ts
  • src/api/providers/__tests__/deepseek.spec.ts
  • packages/types/src/providers/deepseek.ts
Verify extension/webview contracts, cancellation and error propagation, VS Code lifecycle correctness, and behavior under retries and partial failure.

⚙️ CodeRabbit configuration file

Files:

  • src/api/providers/fetchers/__tests__/deepseek.spec.ts
  • src/api/providers/deepseek.ts
  • src/api/providers/__tests__/deepseek.spec.ts
Act as an adversarial second-opinion reviewer.

⚙️ CodeRabbit configuration file

Files:

  • packages/types/src/__tests__/deepseek-v4-pro.test.ts
  • src/api/providers/fetchers/__tests__/deepseek.spec.ts
  • src/api/providers/deepseek.ts
  • src/api/providers/__tests__/deepseek.spec.ts
  • packages/types/src/providers/deepseek.ts
🪛 GitHub Check: mutation-diff
src/api/providers/deepseek.ts

[warning] 35-35: Mutation test advisory
Survived StringLiteral mutant (replacement: ""). See the job summary for the complete list and resolution guidance.


[warning] 34-34: Mutation test advisory
Survived StringLiteral mutant (replacement: ""). See the job summary for the complete list and resolution guidance.


[warning] 33-33: Mutation test advisory
Survived StringLiteral mutant (replacement: ""). See the job summary for the complete list and resolution guidance.


[warning] 32-32: Mutation test advisory
Survived StringLiteral mutant (replacement: ""). See the job summary for the complete list and resolution guidance.


[warning] 31-31: Mutation test advisory
Survived ArrayDeclaration mutant (replacement: []). See the job summary for the complete list and resolution guidance.

🔇 Additional comments (6)
src/api/providers/fetchers/__tests__/deepseek.spec.ts (2)

32-32: LGTM!


38-48: LGTM!

packages/types/src/providers/deepseek.ts (1)

9-26: LGTM!

Also applies to: 30-30, 36-40, 68-72

packages/types/src/__tests__/deepseek-v4-pro.test.ts (1)

13-24: LGTM!

Also applies to: 51-52

src/api/providers/deepseek.ts (1)

31-36: LGTM!

Also applies to: 57-57

src/api/providers/__tests__/deepseek.spec.ts (1)

243-243: LGTM!

Also applies to: 248-248, 255-255, 258-258, 371-409


📝 Summary

Summary by CodeRabbit

  • New Features

    • Added DeepSeek Flash as the default model.
    • Added image support for DeepSeek Flash and the existing V4 Flash model.
    • Added thinking/reasoning support for DeepSeek Flash.
    • Updated model discovery to include the new Flash model and its vision capabilities.
  • Updates

    • Updated DeepSeek Flash pricing for output and cached tokens.
    • Retained older V4 model names as legacy aliases with updated metadata and pricing.

Walkthrough

The DeepSeek provider now uses deepseek-flash as its default model. Legacy V4 model names remain available with updated pricing, image support, and metadata. Reasoning support and model discovery tests now include the canonical model.

Changes

DeepSeek Flash model migration

Layer / File(s) Summary
Model catalog and pricing
packages/types/src/providers/deepseek.ts, packages/types/src/__tests__/deepseek-v4-pro.test.ts
Adds deepseek-flash as the default model. Updates legacy aliases with current pricing, image support, and legacy descriptions.
Provider reasoning and request support
src/api/providers/deepseek.ts, src/api/providers/__tests__/deepseek.spec.ts
Adds deepseek-flash to reasoning normalization and validates default selection, image handling, metadata, and image/thinking requests.
Model discovery validation
src/api/providers/fetchers/__tests__/deepseek.spec.ts
Adds fallback and successful discovery coverage for deepseek-flash.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: hannesrudolph

Merge Risk: ⚪ Minimal · up to 7d590

The DeepSeek Flash migration updates the canonical model and legacy aliases consistently, with coverage for image support, reasoning controls, pricing, defaults, and discovery.


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore (reviewers only)

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Regression Evidence ❌ Error The pull request removes defaultTemperature: 1.0 and supportsTemperature from deepseek-v4-flash-vision-exp, but it does not add focused negative or unset coverage. The metadata test only checks … Add a catalog test that asserts deepseek-v4-flash-vision-exp does not have supportsTemperature or defaultTemperature. Add a handler request test for that alias with enableReasoningEffort: false (or reasoningEffort: "disable") that…
Description check ⚠️ Warning The description clearly explains the changes, motivation, and user impact, but it omits the required approved GitHub Issue link, Test Procedure, Pre-Submission Checklist, and other template sections. Add the required template sections. Provide an approved issue reference such as Closes: #123``, document the test commands and reproduction steps, complete the Pre-Submission Checklist, and address Documentation Updates and Additional Notes…
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the DeepSeek Flash image-support fix, which is the primary change in the pull request.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Security Boundaries ✅ Passed No changed path matches the security failure conditions. The PR changes DeepSeek model metadata, the default model ID, and the fixed set used to add DeepSeek thinking parameters. It does not add secre…
Persistence Integrity ✅ Passed PASS: The pull request changes DeepSeek model metadata, default-ID selection, request normalization, and tests. It does not add or modify a persistence, write, rollback, or atomic-update path. The cha…
Lifecycle Resource Cleanup ✅ Passed No changed lifecycle path can leak a resource or duplicate work. The implementation changes only DeepSeek model metadata and the thinking-model ID set. The existing createMessage stream path remains…
Full details: Description check

Resolution

Add the required template sections. Provide an approved issue reference such as Closes: #123``, document the test commands and reproduction steps, complete the Pre-Submission Checklist, and address Documentation Updates and Additional Notes as applicable.

Full details: Regression Evidence

Explanation

The pull request removes defaultTemperature: 1.0 and supportsTemperature from deepseek-v4-flash-vision-exp, but it does not add focused negative or unset coverage. The metadata test only checks positive fields, and the parameterized image test enables thinking, so it always omits temperature. In the changed runtime path, getModelParams falls back to the handler default of 0.0 when model.defaultTemperature is absent, and non-thinking requests then send that value. No test covers the vision alias with reasoning disabled or asserts that the removed metadata is absent.

Resolution

Add a catalog test that asserts deepseek-v4-flash-vision-exp does not have supportsTemperature or defaultTemperature. Add a handler request test for that alias with enableReasoningEffort: false (or reasoningEffort: "disable") that verifies the disabled thinking controls and the expected temperature: 0 behavior.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/deepseek-flash-images-1s7awc55n2tyz

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Review status

This PR was opened by an automated account. A human maintainer must verify the change intent, provenance, and validation before merging.

Current step: Mark the PR ready. Required CI must pass before CodeRabbit starts.

Review-state labels are managed by this workflow; do not edit them manually.

@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@edelauna

Copy link
Copy Markdown
Contributor

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@zoomote

zoomote Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the requested regression evidence and PR-template compliance in 24e0a7d.

  • Added explicit catalog assertions that the retired vision alias has neither supportsTemperature nor defaultTemperature.
  • Added disabled-reasoning request coverage for thinking: { type: "disabled" }, omitted reasoning_effort, and temperature: 0.
  • Rebuilt the PR description from .github/pull_request_template.md, preserving attribution and the paired docs PR, while marking the absent approved issue and non-UI sections accurately.
  • Focused tests, lint, and full type checking pass. GitHub CI restarted for the pushed commit and is currently in progress.

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.

2 participants