Add Z.ai GLM-5.3 and GLM-5.3-Flash to the model registry - #156
adambalogh wants to merge 1 commit into
Conversation
GLM-5.3 (2026-08-14) and its multimodal GLM-5.3-Flash sibling (2026-08-26) supersede GLM-5.2 but have no BytePlus ModelArk deployment endpoint yet, so they're registered directly against Z.ai's own API (provider="zai") instead. Pricing confirmed against Z.ai's own docs: $1.40/$4.40 per MTok for 5.3, $0.15/$0.50 for 5.3-Flash. Both accept `temperature` (default 1.0); thinking is mandatory but that needs no registry flag. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qon6s5f24upx8znGandm1w
|
Scheduled model-catalog check (2026-09-14): re-scanned OpenAI, Anthropic, Google, xAI, ByteDance/ModelArk, OpenRouter and Z.ai for releases not yet in the registry. The only gap found is GLM-5.3 / GLM-5.3-Flash — already covered by this PR and its companion, chat-api#289. No other new models to add this run. Flagging a blocker before either merges: this PR directly conflicts with #157 ("Remove the Z.ai provider"). #157 removes the Generated by Claude Code |
Summary
Z.ai shipped two new models since the registry was last updated:
refresh of GLM-5.2 (same base model, no new pretraining run), with sharply
better coding/agent numbers. Same per-token sticker as GLM-5.2: $1.40/$4.40
per MTok.
multimodal (vision) sibling. $0.15/$0.50 per MTok.
Both are registered directly against Z.ai's own OpenAI-compatible Model API
(
provider="zai"), using thezai_http_client/ZAI_BASE_URLwiring alreadyin place for
glm-image. This is a deliberate deviation from how GLM-5.2 isserved: GLM-5.2 routes through a BytePlus ModelArk deployment endpoint
(
ep-…), but provisioning one of those requires manual, console-only setup inthe BytePlus Ark Console (no creation API — see chat-api#261's "Still blocked
on" section for the same limitation) that I have no way to do here. Z.ai's own
API already serves both models directly, needs no new provisioning, and is an
already-integrated provider, so that's what these route through.
Pricing / parameter citations
docs.z.ai/guides/overview/pricing),cross-checked against aggregator pages (Together AI, OpenRouter, requesty.ai).
docs.z.ai/guides/llm/glm-5.3) — thinkingis now mandatory (
thinking.type: "disabled"no longer works,reasoning_effortmust be
low/high/max), buttemperatureis still accepted (Z.ai'sdocumented default is
temperature=1.0,top_p=0.95), so nosupports_temperature=False/force_temperatureflag is needed on eithermodel.
Changes
tee_gateway/model_registry.py:GLM_5_3andGLM_5_3_FLASHenum entriesunder the Z.ai section, plus
_MODEL_LOOKUPaliases (glm-5.3,glm-5.3-flash).GLM_5_2is untouched — it keeps routing throughModelArk.
tests/test_pricing.py: resolve + cost tests for both models, mirroring theexisting GLM-5.2/HY3 tests.
CLAUDE.md/README.md: updated the Z.ai provider row.Testing
uv run python -m pytest tests/test_pricing.py -q— 146 passed (was 144).make lint— ruff format/check + mypy clean.tests/+tee_gateway/test/, excludingtests/test_server.pywhich needs real provider keys in
.env): 457 passed, 6 skipped. Onepre-existing, unrelated failure
(
test_hash_dict_preserves_multimodal_user_content) reproduces identicallyon
mainbefore this change.Companion PR
chat-api PR adding these to the served catalog:
OpenGradient/chat-api#289
🤖 Generated with Claude Code
https://claude.ai/code/session_01Qon6s5f24upx8znGandm1w