Repository navigation
feat(models): add missing openrouter Claude entries (sonnet-5, opus-4.8/-fast, opus-4.7-fast, fable-5) - #33069
Conversation
….8/-fast, opus-4.7-fast, fable-5) OpenRouter serves these five models but the catalog had no openrouter/* entries for them, so litellm resolved no pricing or token limits. Entries mirror the existing openrouter/anthropic/claude-opus-4.7 schema with limits and pricing from OpenRouter's /api/v1/models (which match the catalog's first-party anthropic entries for the same models). Backup catalog updated identically. Fixes BerriAI#33068
Greptile SummaryThis PR adds five missing
Confidence Score: 4/5Safe to merge; purely additive catalog data with no code changes and both JSON files kept in sync. The change is a straightforward data addition. Prices for all five models match what OpenRouter's live API returns, schemas mirror existing entries, and both catalog files are identical. The only item worth a second look before merging is the claude-opus-4.7-fast price being 6× the non-fast version — unusual enough to warrant a quick recheck against OpenRouter to confirm no temporary mis-listing. The claude-opus-4.7-fast entry in both catalog files deserves a spot-check to confirm the $30/M input price is stable on OpenRouter before merging.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds 5 new openrouter/anthropic Claude catalog entries (claude-sonnet-5, claude-opus-4.8, claude-opus-4.8-fast, claude-opus-4.7-fast, claude-fable-5) with pricing verified from OpenRouter's live API; the insertion positions are not strictly alphabetical despite the PR's claim. |
| litellm/model_prices_and_context_window_backup.json | Identical 5 new catalog entries as model_prices_and_context_window.json; both files are kept in sync correctly. |
Reviews (1): Last reviewed commit: "feat(models): add missing openrouter Cla..." | Re-trigger Greptile
| "supports_vision": true, | ||
| "supports_xhigh_reasoning_effort": true | ||
| }, | ||
| "openrouter/anthropic/claude-opus-4.7-fast": { | ||
| "supports_adaptive_thinking": true, | ||
| "cache_creation_input_token_cost": 3.75e-05, | ||
| "cache_read_input_token_cost": 3e-06, | ||
| "input_cost_per_token": 3e-05, | ||
| "litellm_provider": "openrouter", | ||
| "max_input_tokens": 1000000, | ||
| "max_output_tokens": 128000, | ||
| "max_tokens": 128000, | ||
| "mode": "chat", | ||
| "output_cost_per_token": 0.00015, | ||
| "source": "https://openrouter.ai/anthropic/claude-opus-4.7-fast", | ||
| "supports_assistant_prefill": false, | ||
| "supports_computer_use": true, | ||
| "supports_function_calling": true, | ||
| "supports_pdf_input": true, | ||
| "supports_prompt_caching": true, | ||
| "supports_reasoning": true, | ||
| "supports_response_schema": true, | ||
| "supports_max_reasoning_effort": true, | ||
| "supports_tool_choice": true, | ||
| "supports_vision": true, | ||
| "supports_xhigh_reasoning_effort": true | ||
| }, | ||
| "openrouter/anthropic/claude-opus-4.8": { | ||
| "supports_adaptive_thinking": true, | ||
| "cache_creation_input_token_cost": 6.25e-06, |
There was a problem hiding this comment.
claude-opus-4.7-fast pricing is 6× higher than the non-fast counterpart
openrouter/anthropic/claude-opus-4.7 is priced at input_cost_per_token: 5e-06 ($5/M), while claude-opus-4.7-fast is 3e-05 ($30/M) — six times more expensive. For reference, claude-opus-4.8-fast is only 2× its non-fast sibling. The PR's curl output confirms this is what OpenRouter reports today, but given how unusual the pattern is (a "fast" variant costing 6× the base), it's worth double-checking that OpenRouter hasn't temporarily mis-listed these prices, to avoid users being silently overcharged on cost tracking.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Greptile SummaryThis PR fills in five missing OpenRouter catalog entries so that
Confidence Score: 5/5Pure catalog addition — no logic changes, no regressions possible. All five new entries carry pricing values that match OpenRouter's live API output (as reproduced in the PR description), capability flags that follow the established openrouter/anthropic pattern, and both the primary and backup JSON files are kept in sync. There are no code changes, no test modifications, and no schema violations. No files require special attention.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds 5 new openrouter/anthropic entries (claude-fable-5, claude-sonnet-5, claude-opus-4.7-fast, claude-opus-4.8, claude-opus-4.8-fast) with pricing verified against OpenRouter's live API and capability flags consistent with the existing claude-opus-4.7 openrouter template. |
| litellm/model_prices_and_context_window_backup.json | Backup copy of the catalog; identical additions to the primary file — all 5 new entries present and fully in sync. |
Reviews (2): Last reviewed commit: "feat(models): add missing openrouter Cla..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Superseded by rolling registry audit #37902, which reverified and absorbed the provider-documented metadata changes at field level |
Relevant issues
Fixes #33068
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewScreenshots / Proof of Fix
OpenRouter serves five Claude models that had no
openrouter/*catalog entry, so litellm resolved no pricing or token limits for them (cost tracking silently empty;get_model_info()raises). This PR adds them.Live OpenRouter data (source of every value in the new entries):
Cross-check: the non-fast prices match this catalog's existing first-party
claude-sonnet-5,claude-opus-4-8, andclaude-fable-5entries exactly (OpenRouter passes Anthropic pricing through 1:1).Before/after:
Entry schema mirrors the existing
openrouter/anthropic/claude-opus-4.7entry (same capability flags;supports_assistant_prefill: falsesince prefill is removed on the 4.7+/5 family), each with asourcelink to its OpenRouter model page. Pure additions: +120/−0 in each ofmodel_prices_and_context_window.jsonandlitellm/model_prices_and_context_window_backup.json, inserted in alphabetical key order; both files parse as valid JSON.Type
🆕 New Feature (model catalog addition)
Changes
New catalog entries (root + backup, identical):
openrouter/anthropic/claude-sonnet-5openrouter/anthropic/claude-opus-4.8openrouter/anthropic/claude-opus-4.8-fastopenrouter/anthropic/claude-opus-4.7-fastopenrouter/anthropic/claude-fable-5