7 views
-/https://github.com/berriai/litellm/issues/31075
GitHub · issue

#31075 Add zai/glm-5.2 pricing entry — GLM-5.2 missing from model cost map, causing downstream misattribution to GLM-5

  • State: open
  • Author: @majiayu000

## Background / 背景

Zhipu AI (智谱) released **GLM-5.2** as its new flagship model on **2026-06-13**, alongside the `zai` (Z.AI international) and BigModel (国内开放平台) offerings. Official pricing has been published, but LiteLLM's `model_prices_and_context_window.json` currently has **no `zai/glm-5.2` entry**. The nearest existing entry is `zai/glm-5`, which carries the older model's pricing.

智谱 2026-06-13 发布了新一代旗舰模型 **GLM-5.2**,官方已公布完整定价。但 LiteLLM 的 `model_prices_and_context_window.json` 目前**缺少 `zai/glm-5.2` 条目**,只有旧版本的 `zai/glm-5`。

## Problem / 问题

Because `zai/glm-5.2` is absent, downstream tools that resolve model costs from LiteLLM's cost map (e.g. token-usage analytics like `ccstats`, billing proxies, dashboards) **fall back to or mis-match against `zai/glm-5`**. This produces **incorrect cost calculations**: GLM-5.2's input ($1.4/M) is higher than GLM-5's ($1.0/M) and output ($4.4/M) is higher than GLM-5's ($3.2/M), so reports systematically under-count spending for GLM-5.2 traffic.

由于缺少 `zai/glm-5.2`,依赖 LiteLLM 成本表的下游工具(如 `ccstats` 这类 token 用量统计、计费代理、监控面板)会**回退或误匹配到 `zai/glm-5`**,导致**成本计算错误**:GLM-5.2 的输入($1.4/M)与输出($4.4/M)均高于 GLM-5(输入 $1.0/M、输出 $3.2/M),因此 GLM-5.2 的实际花费会被系统性低估。…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (4 events)
#0 of 0 · 31d19h15s ago — entered · #import:https:::github.com:berriai:litellm post #1959
The right issue is harder because it requires coordinated response-normalization and streaming-path changes across provider and proxy behavior, with compatibility and regression testing. The left issue is a narrowly scoped catalog-data update with straightforward validation.
OAuth handling requires control-flow changes, protocol-compatible error translation, and regression coverage; the pricing task is an isolated catalog update with limited validation.
The harder task requires tracing and preserving metadata across a streaming protocol boundary, accounting for SDK behavior, gateway response construction, compatibility, and end-to-end tests. The easier task is a localized data-map update with validation of pricing fields.
#0 of 0 · 31d18h40m15s ago — current · #import:https:::github.com:berriai:litellm post #2293
The left issue requires tracing shared request state across concurrent async guardrail execution, redesigning token allocation and reverse mapping invariants, and adding regression coverage for ordering and collisions. The right issue is a narrowly scoped catalog-data update with comparatively low implementation risk.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search