Skip to content

feat(models): add DeepSeek V4 Flash on Fireworks - #3350

Merged
smakosh merged 2 commits into
mainfrom
feat/fireworks-deepseek-v4-flash
Aug 1, 2026
Merged

smakosh merged 2 commits into
mainfrom
feat/fireworks-deepseek-v4-flash

Conversation

@steebchen

@steebchen steebchen commented Aug 1, 2026 •

Copy link
Copy Markdown
Member

Summary

There was no Fireworks provider mapping for deepseek-v4-flash at all — the model was only served by deepseek, runware, novita, alibaba, deepinfra and bytedance. This adds one, pinned to the dated snapshot.

Fireworks exposes both ids:

  • accounts/fireworks/models/deepseek-v4-flash — the undated alias, still resolving to the launch snapshot
  • accounts/fireworks/models/deepseek-v4-flash-0731 — the current deployment

The mapping uses -0731. Verified live against the Fireworks API: the two ids return different prompt-template token counts for the same request, confirming they are distinct deployments.

Mapping details (all verified live)

  • Pricing matches Fireworks' published serverless rate card: $0.14 input / $0.028 cached / $0.28 output per million.
  • Priority tier is supported, but Fireworks prices DeepSeek's Priority tier at 1.5x standard — not the 1.25x that applies to the rest of its catalogue — so the mapping carries a serviceTierMultipliers override to avoid under-billing.
  • Reasoning efforts: none, low, medium, high, xhigh, max. minimal is rejected with a 400 (Input should be 'low', 'medium', 'high', 'xhigh', 'max', 'none' or 'adaptive'), so it is excluded.
  • Reasoning output is returned separately in reasoning_content.
  • Tools, json_object and json_schema all work.
  • Vision is false (Fireworks' model list reports supports_image_input: false).
  • Context 1048576 per Fireworks' model list; maxOutput 393216 matching the other V4 Flash mappings.

Testing

TEST_MODELS="fireworks/deepseek-v4-flash" pnpm test:e2e — 29 files passed, 2 skipped. Confirmed with the verbose reporter that the new mapping actually ran:

  • basic, /v1/chat/completions streaming
  • basic reasoning
  • tool calls, streaming tool calls
  • JSON output, JSON output streaming
  • service_tier 'priority', streaming service_tier 'priority'

Also pnpm test:unit (3577 passed), pnpm format, pnpm build.

Summary by CodeRabbit

  • New Features
    • Added Fireworks support for the DeepSeek V4 Flash model.
    • Supports streaming, reasoning, tool use, JSON output, and configurable reasoning effort.
    • Supports up to 1,048,576 input tokens and 393,216 output tokens.
    • Added standard and priority service-tier pricing.
    • Enables structured output through schema-based responses.

Copilot AI review requested due to automatic review settings August 1, 2026 02:16
@coderabbitai

coderabbitai Bot commented Aug 1, 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: 627c53f5-2d57-41c9-bb19-caa8c3bc0ef9

📥 Commits

Reviewing files that changed from the base of the PR and between c09f941 and 3e9e087.

📒 Files selected for processing (1)
  • packages/models/src/models/deepseek.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/models/src/models/deepseek.ts

Walkthrough

The model registry now includes Fireworks support for deepseek-v4-flash-0731, with pricing, priority-tier pricing, token limits, streaming, reasoning, tools, JSON output, schema output, and accepted reasoning-effort values.

Changes

DeepSeek provider configuration

Layer / File(s) Summary
Fireworks model configuration
packages/models/src/models/deepseek.ts
Adds the Fireworks deployment, pricing, priority-tier multiplier, context and output limits, capabilities, schema output support, and supported reasoning-effort values for deepseek-v4-flash.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 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 addition of DeepSeek V4 Flash on the Fireworks provider.
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 feat/fireworks-deepseek-v4-flash

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.

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.

Pull request overview

Adds a new Fireworks provider mapping for the existing deepseek-v4-flash model definition in packages/models, using Fireworks’ dated deployment ID and capturing pricing + capability metadata so the gateway can route and bill correctly.

Changes:

  • Added a fireworks provider mapping for deepseek-v4-flash, pinned to deepseek-v4-flash-0731.
  • Set Fireworks pricing (including cached input) and capability flags (reasoning efforts, tools, JSON output, no vision).
  • Declared Fireworks priority service tier support with a per-mapping multiplier override (1.5x) to avoid under-billing vs Fireworks’ default tier multiplier.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/models/src/models/deepseek.ts`:
- Around line 556-563: Update the Fireworks DeepSeek mapping’s parameter
declaration near reasoningEfforts to add supportedParameters for every forwarded
capability, including reasoning_effort, response_format, and tools, so the
gateway preserves these OpenAI-format fields when constructing requests.
- Line 563: Add the missing jsonOutputSchema capability flag alongside
jsonOutput in the Fireworks model mapping, then extend the provider request test
to assert that json_schema structured output is supported while preserving the
existing json_object capability.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dfa540f3-b055-421d-9f1d-40e45569146d

📥 Commits

Reviewing files that changed from the base of the PR and between 580336c and c09f941.

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

Comment thread packages/models/src/models/deepseek.ts
Comment thread packages/models/src/models/deepseek.ts
The PR already verified response_format json_schema works live on
this deployment, but without the flag the gateway filters the
fireworks mapping out of json_schema requests. Also enables the
JSON schema e2e cases for this mapping.

Claude-Session: https://claude.ai/code/session_01SmxEcpunGEhCUBQFiqqbS7
@theopenco theopenco deleted a comment from chatgpt-codex-connector Bot Aug 1, 2026
@smakosh
smakosh enabled auto-merge August 1, 2026 10:58
@smakosh
smakosh added this pull request to the merge queue Aug 1, 2026
Merged via the queue into main with commit f679569 Aug 1, 2026
12 checks passed
@smakosh
smakosh deleted the feat/fireworks-deepseek-v4-flash branch August 1, 2026 11:21
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