Skip to content

Move GLM-5.3 onto the live API, add Claude Opus 5, align the model lists - #180

Merged
hiyouga merged 14 commits into
devfrom
glm-5.3-ga-and-model-list
Aug 20, 2026
Merged

Move GLM-5.3 onto the live API, add Claude Opus 5, align the model lists#180
hiyouga merged 14 commits into
devfrom
glm-5.3-ga-and-model-list

Conversation

@hiyouga

@hiyouga hiyouga commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

GLM-5.3's API launched, so the model moves off the pre-launch footing it shipped on in 0.4.2. Bundles two smaller model-list fixes that were in the same files.

GLM-5.3 general availability

llmsdk_docs/glm5_3/ was re-snapshotted as raw markdown from docs.z.ai, replacing the hand-written summary taken from the Chinese pre-launch pages at docs.bigmodel.cn. The snapshot grew from 2 pages to 7 — chat-completion.md, concept-param.md, migrate-to-glm-new.md, stream-tool.md, and thinking-mode.md all changed for 5.3 upstream, so the folder is now self-contained rather than deferring to glm5_2/. stream-tool.md came back byte-identical to the 5.2 copy but is included so the snapshot stands alone.

No client change was needed. The launched docs confirm the contract the client was already written against: forced thinking, reasoning_effort restricted to low/high/max, default max. concept-param.md adds one fact the pre-launch snapshot lacked — max_tokens defaults to 65536 with a 131072 maximum.

Pricing is now published, so glm-5.3 gets $1.4 input / $0.26 cached / $4.4 output per MTok — the same rates as 5.2 and 5.1.

Claude Opus 5 and gpt-5.6-sol

claude-opus-5 was missing from the registry entirely; added for both the official API and OpenRouter at $5 / $0.50 / $25, from Anthropic's pricing page (the $0.50 is the cache-hit rate, matching how the other Claude entries store cached_tokens). Routes through the existing claude-5 client.

The official GPT-5.6 entry was the bare gpt-5.6 alias; it now names gpt-5.6-sol, matching the OpenRouter entry and its terra/luna siblings. Pure rename — OpenAI's published pricing confirms sol is $5 / $0.50 / $30, exactly what the entry already carried. The bare gpt-5.6 spelling still routes.

Playground model list (closes #178)

The dropdown listed models from several generations back (gpt-5.5, gemini-3.5-flash, claude-opus-4-7, kimi-k2.6, glm-5.1, …). It now lists exactly the 11 official-provider AVAILABLE_MODELS entries, verified programmatically: same model set, and each dropdown entry constructs the same client class the E2E entry does.

text-embedding-3-large was the one model whose id cannot route on its own, so options can now declare data-client-type, read by a new getSelectedClientType(). Default model moves gpt-5.5gpt-5.6-luna, in both the rendered dropdown and the server-side fallback.

Verification

Live GLM-5.3 capture under api_captures/glm5_3/ (git-ignored): a streaming tool-call round plus the replay round that re-sends the assistant turn. Round 2 was accepted with content + reasoning_content + tool_calls and the tool result — exactly the shape the client emits and replays — and reported cached_tokens: 128. clear_thinking: false is still accepted on 5.3, which was the open question from the pre-launch implementation.

  • Python E2E -k glm-5.3: 8 passed, 6 skipped
  • TypeScript E2E -t glm-5.3: 14 passed
  • Offline suites, ruff, eslint, tsc: green in both languages

Z.AI throttled this key hard during testing (429 code 1302; the capture needed ~15 min of backoff before its first request landed). Four Python E2E tests failed on 429 in one run and all four passed on retry — no assertion failures at any point.

One protocol mode stays on glm-5.2

Probing the three Z.AI protocol-client modes turned up a real incompatibility:

mode glm-5.3
openai-chat works
openai-responses works
ant-messages 400, code 1210

Z.AI's Anthropic-compatible gateway defaults to thinking-disabled when a request carries no thinking config, and glm-5.3 rejects that: "This model always engages in thinking and cannot be disabled; please use low, high, or max". Confirmed it is specific to 5.3 and to the missing config — glm-5.2 works there with no thinking level, and glm-5.3 works there with thinking_level LOW/HIGH/MAX; only NONE and "unset" fail.

The generic ant_messages client is model-agnostic by design and correctly omits the thinking config when the caller asks for nothing, so teaching it about GLM-5.3 would be the wrong fix. That E2E entry stays on glm-5.2 instead, with the reason in a comment.

Live E2E rate-limit retry

CI failed twice on Z.AI 429s (code 1302) against glm-5.3 — real, not noise: no other rate-limit failure appears in the last 25 Python runs, and the one prior failure was a genuine UnboundLocalError. It is not a concurrency bug either; conftest.py already pins each model's tests to one xdist worker. The heavy E2E bodies simply cross a throttling window that a plain sequential probe does not (24/24 clean locally against both 5.2 and 5.3).

Both suites now retry only rate-limited responses:

  • Pythonpytest-rerunfailures added to the dev extra; the workflow gained --reruns 5 --reruns-delay 30 --only-rerun RateLimitError --only-rerun 429. test_client.py is untouched; the policy sits beside the existing -n 16 --dist loadgroup.
  • TypeScript — the retry lives in the single modelTest wrapper every model test already funnels through, on the same 5 × 30s policy. No test body, assertion, prompt, or helper changed, and nothing branches on a model name. Each test's jest deadline is widened to cover the retry budget.

Verified it does not mask real bugs: a throwaway pair of tests — one raising RateLimitError, one a plain assert 1 == 2 — showed the rate-limit case running 3 times and passing while the assertion case ran once and failed.

Green runs since then report 296 passed, 113 skipped, 2 rerun and 296 passed, 113 skipped, 6 rerun, so the retry demonstrably fires and clears rather than the throttle merely being absent.

This masks sustained throttling rather than curing it. If secrets.ZAI_API_KEY is a lower-tier key than a normal dev key, raising its quota remains the better root-cause fix.

OpenRouter moves to the OpenAI Responses protocol

Third-party gateways now prefer openai-responses. All 17 OpenRouter entries that used the generic openai-chat client were switched, each verified against the live endpoint one model at a time rather than assumed:

anthropic/claude-fable-5, anthropic/claude-opus-5, anthropic/claude-opus-4.8, anthropic/claude-opus-4.7, anthropic/claude-sonnet-5, google/gemini-3.5-flash, minimax/minimax-m3, nvidia/nemotron-3-ultra-550b-a55b:free, openai/gpt-5.6-sol, openai/gpt-5.6-terra, openai/gpt-5.6-luna, openai/gpt-5.5, qwen/qwen3.6-35b-a3b, stepfun/step-3.7-flash, tencent/hy3, x-ai/grok-4.5, xiaomi/mimo-v2.517/17 served.

OpenRouter's docs don't state Responses coverage and an unauthenticated probe 401s before validating the model, so this was worth checking: the long tail (nvidia, stepfun, tencent, x-ai, xiaomi, qwen) was the risk, and it all works. The probe re-ran any failure over openai-chat as a control so a temporarily-down model could not be misread as an unsupported protocol; that path never had to fire.

Left alone deliberately:

  • SiliconFlow's 3 entries stay on openai-chat — it serves Chat Completions only.
  • OpenRouter entries with a dedicated client (glm-5.3, kimi-k3, kimi-k2.6, deepseek-v4, openai-embedding) keep it. The preference is about which generic protocol to reach for, not about giving up model-specific handling.

README.md and both skills/*/reference/models.md previously told readers to use openai-chat for OpenRouter, which would now contradict the registry; they state the preference instead. The OpenRouter qwen3.6 E2E entry moved to openai-responses so the suite exercises what the registry recommends, while the SiliconFlow one stays on chat.

README examples follow the registry

section was now
Supported-models table claude-sonnet-5 claude-opus-5
Anthropic example + heading Claude Sonnet 5 Claude Opus 5
OpenRouter example + heading GLM-5.1 GLM-5.3

OpenRouter GPT-5.6 repricing

The three OpenRouter GPT-5.6 entries were stale against GET https://openrouter.ai/api/v1/models and are now corrected:

entry was now
openai/gpt-5.6-sol $5 / $0.50 / $30 $2.5 / $0.25 / $15
openai/gpt-5.6-terra $1 / $0.10 / $6 $2 / $0.20 / $12
openai/gpt-5.6-luna $0.1 / $0.01 / $0.6 $0.2 / $0.02 / $1.2

sol had been carrying OpenAI's list price rather than OpenRouter's; terra and luna had been carrying their :batch rates. The official entries were already correct and are unchanged — note that gpt-5.6-sol (official, $5/$30) and openai/gpt-5.6-sol (OpenRouter, $2.5/$15) genuinely differ. openai/gpt-5.5 was checked and already matches.

🤖 Generated with Claude Code

hiyouga and others added 10 commits April 29, 2026 02:20
GLM-5.3 launched, so its documentation snapshot, registry pricing, and
env-gated E2E model move off the pre-launch footing they shipped on in 0.4.2.
Adds claude-opus-5 to the registry, names the official GPT-5.6 entry
gpt-5.6-sol, and points the playground model dropdown at the E2E model list.

Closes #178

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 19, 2026 15:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Alice and others added 4 commits August 19, 2026 08:43
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
openai/gpt-5.6-sol carried OpenAI's list price rather than OpenRouter's, and
terra and luna carried their :batch rates.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Z.AI throttles the CI key on glm-5.3, failing runs that a retry clears. The
pytest job reruns only RateLimitError/429 failures, and the TypeScript suite
retries inside the shared modelTest wrapper on the same policy; every other
failure, assertion failures included, still fails on the first attempt.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…EADME examples

All 17 OpenRouter entries on the generic openai-chat client move to
openai-responses, verified against the live endpoint one model at a time.
SiliconFlow keeps openai-chat, which is the only protocol it serves. README
examples follow the registry: Claude Opus 5 and OpenRouter GLM-5.3.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@hiyouga
hiyouga merged commit e2bcccc into dev Aug 20, 2026
2 checks passed
@hiyouga
hiyouga deleted the glm-5.3-ga-and-model-list branch August 20, 2026 08:05
This was referenced Aug 20, 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