feat(pricing): add openrouter/z-ai/glm-5.2 and sakana/fugu-ultra to cost map - #32101
Conversation
…ost map These two OpenRouter models were missing from the cost map, so LiteLLM reported $0 for streamed calls (which can't use OpenRouter's per-response cost). Add input/output and cache-read pricing plus context windows, sourced from the OpenRouter model API. fugu-ultra is multimodal (supports_vision); both support prompt caching and reasoning. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
Greptile SummaryAdds cost-map entries for two previously unmapped OpenRouter models —
Confidence Score: 5/5Pure data addition with no logic changes; all numeric values are internally consistent and match the PR description. Both entries follow the established pattern for OpenRouter models (field order, token representation, provider flag), all per-token prices convert correctly to the advertised per-million figures, and only the JSON price file is touched. No files require special attention.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds two new OpenRouter model entries (z-ai/glm-5.2 and sakana/fugu-ultra) with correct pricing, context window, and capability flags; structure mirrors the existing glm-5.1 entry and all numeric values are internally consistent with the PR description. |
Reviews (1): Last reviewed commit: "feat(pricing): add openrouter/z-ai/glm-5..." | 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 |
What
Adds cost-map entries for two OpenRouter models currently missing from the map:
openrouter/z-ai/glm-5.2— $0.91 / $2.86 per 1M in/out, cache-read $0.169/1M, reasoning + tools + prompt cachingopenrouter/sakana/fugu-ultra— $5.00 / $30.00 per 1M in/out, cache-read $0.50/1M, reasoning + tools + prompt caching + visionWhy
Without a cost-map entry LiteLLM can't price these models. It's most visible on streaming OpenRouter calls, where the provider-returned cost isn't currently used (see #11626 / #16162) and LiteLLM falls back to the static map — reporting $0.
Values
Prices, context windows, and capability flags come from the OpenRouter model API (
GET /api/v1/models): glm-5.2 = 1,048,576 ctx; fugu-ultra = 1,000,000 ctx (multimodal text+image). Entries mirror the existingopenrouter/z-ai/glm-5.1shape. Onlymodel_prices_and_context_window.jsonis edited, matching howglm-5.1was added (the packaged backup is synced by maintainers at release time).Pre-submission checklist
🤖 Generated with Claude Code