Skip to content

feat(pricing): add openrouter/z-ai/glm-5.2 and sakana/fugu-ultra to cost map - #32101

Closed
blakeaa827 wants to merge 1 commit into
BerriAI:litellm_internal_stagingfrom
blakeaa827:costmap-add-glm-5.2-and-fugu-ultra
Closed

feat(pricing): add openrouter/z-ai/glm-5.2 and sakana/fugu-ultra to cost map#32101
blakeaa827 wants to merge 1 commit into
BerriAI:litellm_internal_stagingfrom
blakeaa827:costmap-add-glm-5.2-and-fugu-ultra

Conversation

@blakeaa827

Copy link
Copy Markdown

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 caching
  • openrouter/sakana/fugu-ultra — $5.00 / $30.00 per 1M in/out, cache-read $0.50/1M, reasoning + tools + prompt caching + vision

Why

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 existing openrouter/z-ai/glm-5.1 shape. Only model_prices_and_context_window.json is edited, matching how glm-5.1 was added (the packaged backup is synced by maintainers at release time).

Pre-submission checklist

  • Data-only change (new cost-map entries); no code paths touched. No unit test, consistent with prior model-pricing additions.
  • JSON validated.

🤖 Generated with Claude Code

…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>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps

greptile-apps Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds cost-map entries for two previously unmapped OpenRouter models — openrouter/z-ai/glm-5.2 and openrouter/sakana/fugu-ultra — so LiteLLM can price these models instead of reporting $0 on streaming calls that lack provider-returned cost data.

  • openrouter/z-ai/glm-5.2: $0.91/$2.86 per 1M in/out, cache-read $0.169/1M, 1,048,576 token context; structure and field set mirror the existing glm-5.1 entry.
  • openrouter/sakana/fugu-ultra: $5.00/$30.00 per 1M in/out, cache-read $0.50/1M, 1,000,000 token context; adds supports_vision: true matching the model's multimodal capability.

Confidence Score: 5/5

Pure 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.

Important Files Changed

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

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

2 participants