Skip to content

fix: add missing fireworks models in cost map - #30564

Closed
mubashir1osmani wants to merge 2 commits into
BerriAI:litellm_internal_stagingfrom
mubashir1osmani:worktree-litellm_cost_map_missing_models
Closed

mubashir1osmani wants to merge 2 commits into
BerriAI:litellm_internal_stagingfrom
mubashir1osmani:worktree-litellm_cost_map_missing_models

Conversation

@mubashir1osmani

@mubashir1osmani mubashir1osmani commented Jun 16, 2026 •

Copy link
Copy Markdown
Contributor

Relevant issues

LIT-3783

added pricing for missing models in cost map for accurate spend tracking
source:

Linear ticket

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Screenshots / Proof of Fix

Type

🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test

Changes


Note

Low Risk
Data-only additions to the model cost map JSON files; no runtime logic changes, though incorrect pricing values would affect spend reporting.

Overview
Adds model pricing and capability metadata to model_prices_and_context_window.json and its backup so LiteLLM can track spend and expose model info for models that were missing from the cost map (LIT-3783).

Fireworks AI: New entries for DeepSeek V4 Pro, Kimi K2.6, and Qwen 3.6 Plus, each under both the full accounts/fireworks/models/... path and shorter fireworks_ai/... aliases. Entries include per-token input/output (and cache-read where applicable), context limits, and flags such as reasoning, tools, and vision where relevant.

Mistral: Adds mistral/voxtral-small-2507 with text pricing, 32K context, and supports_audio_input alongside standard chat/tool capabilities.

Reviewed by Cursor Bugbot for commit f5a9f44. Bugbot is set up for automated code reviews on this repo. Configure here.

@mubashir1osmani mubashir1osmani changed the title pricing: add missing fireworks models in cost map fix: add missing fireworks models in cost map Jun 16, 2026
@greptile-apps

greptile-apps Bot commented Jun 16, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds cost-map entries for four previously-missing Fireworks AI models (deepseek-v4-pro, kimi-k2p6, qwen3p6-plus) and Mistral's voxtral-small-2507, applied consistently to both the primary JSON and the backup file. Each model is registered under both its long (fireworks_ai/accounts/fireworks/models/…) and short (fireworks_ai/…) alias.

  • deepseek-v4-pro entries correctly cap max_output_tokens and max_tokens at 384 000, matching the existing azure_ai/deepseek-v4-pro entry for the same underlying model — this prevents get_modified_max_tokens from treating the full 1 M context window as a combined input+output budget.
  • kimi-k2p6 uses max_output_tokens: 262144 equal to max_input_tokens, consistent with the existing fireworks_ai/…/kimi-k2p5 and moonshot/kimi-k2.6 entries for the same model family.
  • qwen3p6-plus now includes all context-window fields (max_input_tokens: 1 000 000, max_output_tokens: 65 536) that were missing in a prior draft, resolving the previous review thread.

Confidence Score: 5/5

Safe to merge — pure JSON data additions with no code logic changes and both files kept in sync.

All new entries are data-only additions to the cost map. The deepseek-v4-pro output-token cap concern raised in previous review rounds has been addressed by setting max_output_tokens/max_tokens to 384 000 rather than the full context window, matching the existing azure_ai/deepseek-v4-pro entry. The qwen3p6-plus context-window fields that were missing in an earlier draft are now present. The kimi-k2p6 pattern of max_output_tokens == max_input_tokens == 262 144 is consistent with every other kimi-k2p5/k2.6 entry already in the file. Both JSON files are kept perfectly in sync.

No files require special attention.

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds 5 new model pricing entries (2× deepseek-v4-pro, 2× kimi-k2p6, 2× qwen3p6-plus in long/short form, and 1× mistral/voxtral-small-2507); deepseek-v4-pro correctly caps max_output_tokens/max_tokens at 384 000, matching the azure_ai counterpart; all other fields are consistent with existing neighboring entries
litellm/model_prices_and_context_window_backup.json Mirror of the primary price map; all 9 new entries are identical to model_prices_and_context_window.json — no drift detected

Reviews (3): Last reviewed commit: "fix: cap fireworks deepseek-v4-pro max o..." | Re-trigger Greptile

Comment thread model_prices_and_context_window.json Resolved
Comment thread model_prices_and_context_window.json Resolved
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@mubashir1osmani
mubashir1osmani force-pushed the worktree-litellm_cost_map_missing_models branch from 0b8ccc8 to ec3f2a9 Compare June 16, 2026 22:21
@mubashir1osmani

Copy link
Copy Markdown
Contributor Author

@greptile-apps Thanks for the review. Both points addressed.

  • On P1 (qwen3p6-plus context fields): added in the latest commit. One correction on the premise though; the Fireworks model page lists Context Length as N/A, so the window can't be sourced from there. Qwen 3.6 Plus is
    Alibaba's model that Fireworks hosts, and the spec is published on Alibaba's Qwen Cloud, Vercel AI Gateway, and contextwindows.dev as a 1M token context with roughly 64K max output. I set max_input_tokens: 1000000,
    max_output_tokens: 65536, max_tokens: 65536 on both the full-path entry and the short alias, in the root map and the backup

  • On P2 (Voxtral 32K vs 128K): the 32K figure is from Mistral's own model card, not only third-party aggregators. The mistralai/Voxtral-Small-24B-2507 card on Hugging Face states a 32k token context length and notes that
    window covers up to 30 minutes of audio for transcription, so 32000 is the authoritative input limit for the Mistral API model. The 128000 on the existing mistral.voxtral-small-24b-2507 Bedrock entry is the value that
    disagrees with Mistral's published spec; that entry predates this PR and is out of scope here, though I can correct it to 32000 in a follow-up if that's useful

@greptile-apps

greptile-apps Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Both responses are well-sourced — marking these resolved.

P1 (qwen3p6-plus context): The values you chose (max_input_tokens: 1000000, max_output_tokens: 65536, max_tokens: 65536) align with what Alibaba publishes for this model, and the Fireworks N/A listing doesn't contradict that. Good call going upstream to the model owner.

P2 (Voxtral 32K): Deferring to the Mistral HuggingFace model card — that's the canonical source, not a third-party aggregator. The 32K/30-min-audio framing makes sense for an audio model where context window semantics differ from a pure text model. The existing 128K Bedrock entry is out of scope here; a follow-up correction there would be welcome if you have time.

@mubashir1osmani

Copy link
Copy Markdown
Contributor Author

@greptile-apps

The Fireworks model page publishes only a ~1M context length and no
separate generation cap, so the entry set max_output_tokens and max_tokens
to the full 1048576 window. That equals max_input_tokens, which makes
get_modified_max_tokens treat it as a shared input+output budget and lets
callers request output sizes the model cannot actually produce.

Cap output at 384000 to match the azure_ai/deepseek-v4-pro entry for the
same underlying model (identical input/output costs), keeping the Fireworks
1048576 input context. Mirrored in the backup map.
@mateo-berri

Copy link
Copy Markdown
Contributor

Addressed the remaining point on deepseek-v4-pro. The Fireworks model page publishes only the ~1M context length and no separate generation cap, so the entry had set max_output_tokens and max_tokens to the full 1048576 window. Because that equals max_input_tokens, get_modified_max_tokens takes the shared-budget branch (CASE 1) and treats 1048576 as a combined input+output budget, which would let callers request output sizes the model cannot actually produce. I capped output at 384000 to match the existing azure_ai/deepseek-v4-pro entry for the same underlying model (identical input/output costs), keeping the Fireworks 1048576 input context so CASE 2 now clamps oversized max_tokens correctly. Mirrored in the backup map.

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f5a9f44. Configure here.

@shzdehmd

Copy link
Copy Markdown
Contributor

@mubashir1osmani the Qwen 3.6 Plus model on Fireworks AI has a 262K context window limit, this can be verified by making an API request with max_tokens set to 1M or by running a script that tries to push more than 262K tokens.

image

Other than this, the Qwen 3.6 Plus model will be deprecated today and has been replaced by Qwen 3.7 Plus, which has a similar limitation of 262K context window.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Superseded by rolling registry audit #37902, which reverified and absorbed the provider-documented metadata changes at field level

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