Files
Andrey Kumanyaev fe0a815e2d fix(savings): price Zhipu GLM models instead of reporting $0 avoided
GLM ids never appear in gortex's own LLM provider config — they arrive as
client models, from a coding agent pointed at Zhipu's Anthropic-compatible
endpoint or at Ollama Cloud. findPrice had no row to resolve them against,
so `gortex savings` and cumulative_savings.per_model_actual rendered $0.00
cost avoided next to millions of real tokens saved.

Add the GLM line at Zhipu's published input rates. Every tier gets its own
row rather than leaning on findPrice's substring fallback: without a
glm-4.5-air row that id resolves against glm-4.5 and bills 3x its real
price, and glm-4.7-flashx would bill nearly 9x. The two free Flash tiers
carry an explicit 0.00 for the same reason — they render as "unpriced",
which is the closest the table can come to "free" and beats overcharging.

The tokenizer path is deliberately untouched: specForModel has no GLM
branch, so GLM counts fall back to cl100k with no correction. Inventing a
calibration ratio without measuring against Zhipu's tokenizer would be a
guess dressed as precision.
2026-08-05 01:45:28 +02:00
..
2026-06-20 17:18:27 +02:00
2026-06-20 17:18:27 +02:00