Skip to content

Add Z.ai GLM-5.3 and GLM-5.3-Flash to the model registry - #156

Closed
adambalogh wants to merge 1 commit into
mainfrom
og/compassionate-thompson-iujsyi
Closed

adambalogh wants to merge 1 commit into
mainfrom
og/compassionate-thompson-iujsyi

Conversation

@adambalogh

@adambalogh adambalogh commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Z.ai shipped two new models since the registry was last updated:

  • GLM-5.3 (released 2026-08-14) — Z.ai describes it as a post-training-only
    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.
  • GLM-5.3-Flash (released 2026-08-26) — a new low-cost, natively
    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 the zai_http_client / ZAI_BASE_URL wiring already
in place for glm-image. This is a deliberate deviation from how GLM-5.2 is
served: GLM-5.2 routes through a BytePlus ModelArk deployment endpoint
(ep-…), but provisioning one of those requires manual, console-only setup in
the 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

  • Pricing (both models): Z.ai's own pricing docs (docs.z.ai/guides/overview/pricing),
    cross-checked against aggregator pages (Together AI, OpenRouter, requesty.ai).
  • Parameters: Z.ai's GLM-5.3 guide (docs.z.ai/guides/llm/glm-5.3) — thinking
    is now mandatory (thinking.type: "disabled" no longer works, reasoning_effort
    must be low/high/max), but temperature is still accepted (Z.ai's
    documented default is temperature=1.0, top_p=0.95), so no
    supports_temperature=False / force_temperature flag is needed on either
    model.

Changes

  • tee_gateway/model_registry.py: GLM_5_3 and GLM_5_3_FLASH enum entries
    under the Z.ai section, plus _MODEL_LOOKUP aliases (glm-5.3,
    glm-5.3-flash). GLM_5_2 is untouched — it keeps routing through
    ModelArk.
  • tests/test_pricing.py: resolve + cost tests for both models, mirroring the
    existing 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.
  • Full suite (tests/ + tee_gateway/test/, excluding tests/test_server.py
    which needs real provider keys in .env): 457 passed, 6 skipped. One
    pre-existing, unrelated failure
    (test_hash_dict_preserves_multimodal_user_content) reproduces identically
    on main before 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

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

Copy link
Copy Markdown
Contributor Author

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 zai provider, zai_http_client, ZAI_BASE_URL and ZAI_API_KEY wiring entirely on the premise that "Z.ai is no longer used"; this PR re-establishes direct Z.ai routing for two new chat models on that same wiring. Whichever merges first will break the other's premise. Leaving this for a human call on whether Z.ai is being kept or dropped — not resolving it automatically.


Generated by Claude Code

@adambalogh adambalogh closed this Sep 14, 2026
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