Repository navigation
feat(models): add DeepSeek V4 Flash on Fireworks - #3350
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe model registry now includes Fireworks support for ChangesDeepSeek provider configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
fireworksprovider mapping fordeepseek-v4-flash, pinned todeepseek-v4-flash-0731. - Set Fireworks pricing (including cached input) and capability flags (reasoning efforts, tools, JSON output, no vision).
- Declared Fireworks
priorityservice 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.
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
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
Summary
There was no Fireworks provider mapping for
deepseek-v4-flashat 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 snapshotaccounts/fireworks/models/deepseek-v4-flash-0731— the current deploymentThe 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)
$0.14input /$0.028cached /$0.28output per million.serviceTierMultipliersoverride to avoid under-billing.none,low,medium,high,xhigh,max.minimalis rejected with a 400 (Input should be 'low', 'medium', 'high', 'xhigh', 'max', 'none' or 'adaptive'), so it is excluded.reasoning_content.json_objectandjson_schemaall work.false(Fireworks' model list reportssupports_image_input: false).1048576per Fireworks' model list;maxOutput393216matching 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 streamingbasic reasoningtool calls,streaming tool callsJSON output,JSON output streamingservice_tier 'priority',streaming service_tier 'priority'Also
pnpm test:unit(3577 passed),pnpm format,pnpm build.Summary by CodeRabbit