Skip to content

feat(models): add fireworks + together deepseek v4 - #3484

Merged
steebchen merged 7 commits into
mainfrom
claude/pr-3431-mappings-e2e-nzjuct
Aug 8, 2026
Merged

steebchen merged 7 commits into
mainfrom
claude/pr-3431-mappings-e2e-nzjuct

Conversation

@steebchen

@steebchen steebchen commented Aug 8, 2026 •

Copy link
Copy Markdown
Member

Supersedes #3431. Carries @vicovaro's two DeepSeek V4 provider mappings unchanged (their commits are preserved with authorship intact), rebuilt on current main, plus one capability correction found while verifying the mappings against the live providers.

What & why

Adds the two missing DeepSeek V4 provider mappings — Fireworks for V4 Pro and Together AI for V4 Flash. Both providers already serve the sibling V4 model in the catalogue, so this closes the gaps. Only packages/models/src/models/deepseek.ts changes; no gateway logic.

Model Provider externalId Input / Cached / Output per 1M Context
deepseek-v4-pro fireworks accounts/fireworks/models/deepseek-v4-pro $1.74 / $0.145 / $3.48 1M
deepseek-v4-flash together-ai deepseek-ai/DeepSeek-V4-Flash-0731 $0.14 / $0.03 / $0.28 163K

Capability correction on top of #3431

#3431 declared the Together V4 Flash mapping tools: false, jsonOutput: false, on the basis that Together's model card lists Chat + Reasoning only. Probing the live deployment shows the card understates it:

  • Tools — returns a well-formed tool_calls with finish_reason: "tool_calls"
  • JSON mode (response_format: json_object) — honoured
  • JSON schema (response_format: json_schema) — honoured, schema respected

This matches the together-ai V4 Pro mapping, which already declares all three. The mapping now sets tools: true, jsonOutput: true, jsonOutputSchema: true.

The practical effect of the original values was not mis-billing but silent under-routing: the gateway would have steered tool-calling and JSON traffic away from Together for this model, users pinning together-ai/deepseek-v4-flash would lose those features, and — because a false flag generates no test case — e2e would never have covered those paths.

Both mappings also had trimmed reasoningEfforts lists copied from their siblings without the siblings' explanatory comments; those are restored, per the repo convention that a non-obvious restricted list keeps its rationale.

Not changed: the Fireworks Pro mapping carries no quantization field. #3431's description called it FP8, but Fireworks' /v1/models reports no quantization and the Fireworks V4 Flash sibling doesn't declare one either, so it seemed wrong to assert it in the catalogue. Worth a follow-up if someone can confirm from the deployment.

Verification

TEST_MODELS="fireworks/deepseek-v4-pro,together-ai/deepseek-v4-flash" pnpm test:e2e

Test Files  29 passed | 2 skipped (31)
     Tests  119 passed | 91 skipped (210)

Zero failures. The correction raises the count from 110 to 119 — the 9 additional tests are exactly the Together paths the false flags had suppressed: chat-json 6→10, chat-toolcalls 4→6, chat-toolcalls-result 3→4, responses 8→10.

Also verified: both externalIds resolve upstream; per-token cost math matches the declared rates exactly (106 prompt tokens → $0.00001484 at $0.14/M, 82 completion → $0.00002296 at $0.28/M); the Fireworks priority tier resolves and applies its 1.5× multiplier in both sync and streaming; requiresDisableThinkingParam and reasoningOutput: "omit" behave correctly on Together (reasoning tokens counted, no reasoning text emitted); Fireworks streams reasoning_content as expected. packages/models catalogue specs pass (131 tests).


Generated by Claude Code

Summary by CodeRabbit

  • New Features
    • Added Fireworks as a provider for DeepSeek V4 Pro.
    • Added Together AI as a provider for DeepSeek V4 Flash.
    • Added support for provider-specific pricing, capacity, reasoning, tool use, and JSON output capabilities.

vicovaro and others added 7 commits August 5, 2026 14:17
Adds Fireworks as a provider for DeepSeek V4 Pro
(accounts/fireworks/models/deepseek-v4-pro), 1.74 / 3.48 per 1M
tokens with 0.145 cached input, up to 1M context.

Co-Authored-By: Claude <noreply@anthropic.com>
Adds Together AI as a provider for DeepSeek V4 Flash
(deepseek-ai/DeepSeek-V4-Flash-0731), 0.14 / 0.28 per 1M tokens
with 0.03 cached input.

Co-Authored-By: Claude <noreply@anthropic.com>
Together's DeepSeek V4 Flash deployment was declared tools: false and
jsonOutput: false based on the model card listing Chat + Reasoning only.
The live deployment returns well-formed tool_calls with finish_reason
"tool_calls", and honours both response_format json_object and
json_schema — matching its together-ai V4 Pro sibling, which already
declares all three. Under-declaring routed tool and JSON traffic away
from the provider and hid those paths from e2e entirely.

Also restore the WHY comments on both trimmed reasoningEfforts lists,
which were copied from their siblings without the explanations.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GNFpeYxUh39cCdbp7Ttjud
Copilot AI lite review requested due to automatic review settings August 8, 2026 13:57
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bbaba349-c896-43c8-9fb4-49e4214321e0

📥 Commits

Reviewing files that changed from the base of the PR and between ed39fc9 and ed7c8f9.

📒 Files selected for processing (1)
  • packages/models/src/models/deepseek.ts

Walkthrough

The model definitions add Fireworks support for DeepSeek V4 Pro and Together AI support for DeepSeek V4 Flash, including provider-specific pricing, context limits, reasoning controls, and structured output capabilities.

Changes

DeepSeek V4 provider integrations

Layer / File(s) Summary
Provider configurations
packages/models/src/models/deepseek.ts
Adds Fireworks pricing and capability settings for DeepSeek V4 Pro. Adds Together AI pricing, context, reasoning, disabled-thinking, and structured output settings for DeepSeek V4 Flash.

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

Possibly related PRs

Suggested reviewers: smakosh

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding Fireworks and Together AI provider mappings for DeepSeek V4.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/pr-3431-mappings-e2e-nzjuct

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.

@steebchen
steebchen merged commit a92e3fd into main Aug 8, 2026
12 checks passed
@steebchen
steebchen deleted the claude/pr-3431-mappings-e2e-nzjuct branch August 8, 2026 14:34
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.

5 participants