feat: add GLM-5.3 Flash to Z.AI model list - #7323
Conversation
Add glm-5.3-flash next to glm-5.3 in _PROVIDER_MODELS["zai"] and mirror it in _FALLBACK_MODELS, following the existing glm-4.5 / glm-4.5-flash sibling pattern. Reasoning-effort gating needs no change: the >= 5.2 version gate already classifies the id at the full effort tier. Adds a regression suite asserting catalog presence, label, ordering, fallback entry, and end-to-end propagation through get_available_models().
SummaryReading the complete two-file diff at Code referenceThe two catalog insertions are consistent at {"provider": "Z.AI", "id": "zai/glm-5.3", "label": "GLM-5.3"},
{"provider": "Z.AI", "id": "zai/glm-5.3-flash", "label": "GLM-5.3 Flash"},
{"provider": "Z.AI", "id": "zai/glm-5.2", "label": "GLM-5.2"},The capability path at Diagnosis / recommendationThe implementation is appropriately minimal. Adding consumer-side JavaScript or another reasoning exception would duplicate authority that already exists in One non-blocking test tightening would improve the ordering claim. VerificationThe exact-head test, lint, browser-smoke, and conversation-lifecycle checks are green in the PR metadata. No contributor-authored code was executed during this read-only review. |
Per PR review feedback (nesquena#7323): the provider-catalog ordering test now asserts glm-5.3-flash immediately after glm-5.3 and glm-5.2 immediately after the flash sibling, matching the adjacency the fallback test already pins. The base<flash relative check is subsumed; flash<glm-5.1 is kept to pin 5.1 after the whole 5.3 generation.
|
Thanks for the careful read — addressed in 25d1afb.
Teeth-proof: with the provider catalog mutated in memory to |
nesquena-hermes
left a comment
There was a problem hiding this comment.
Release gate: SAFE TO SHIP (as-is) — catalog add for the direct Z.AI provider
Re-gated at head 25d1afbcca47 (rebased clean; three-dot diff is api/config.py +2 catalog rows + the new cache-isolated test).
- Codex + Fable (both): SHIP. The two catalog rows mirror the existing base-then-flash convention and are correct for the direct Z.AI provider path (the picker reads the static zai catalog as the last fallback; onboarding reads it directly). The
>=5.2reasoning-effort version-gate classifieszai/glm-5.3-flashidentically tozai/glm-5.3— verified by running the classifier directly; the-flashsuffix cannot break version parsing (major/minor are captured before the suffix). The new test fixture is byte-identical to the existing GLM-5.3 fixture and empirically does not poison neighboring test files. - Full suite: 15,222 passed. The only 2 non-passes are the known box/env baseline artifacts (
test_cron_delivery_options,test_model_resolver) that fail identically on cleanorigin/master— this diff touches neither. - GLM-5.3 Flash is confirmed real (Z.ai native multimodal model, released Aug 26 2026).
On the OpenRouter namespace: the gate confirmed that _FALLBACK_MODELS is reused by OpenRouter onboarding where the canonical slug is z-ai/… (so zai/glm-5.3-flash 404s on OpenRouter). This is a pre-existing whole-class issue — every shipped Z.AI fallback row (glm-5.3, glm-5.2, glm-5.1, …) has the same zai/ prefix, and zai/ is correct for the direct provider. #7323 follows the established convention; fixing the OpenRouter namespace belongs class-wide, tracked in #7514. Shipping this as-is is the consistent call.
Thanks @rh-id — shipping to the experimental channel.
|
| Filename | Overview |
|---|---|
| api/config.py | Adds GLM-5.3 Flash consistently to both Z.AI catalog representations without changing routing or capability logic. |
| tests/test_glm_5_3_flash_catalog.py | Covers the new entry’s metadata, ordering, reasoning tier, fallback uniqueness, and propagation through the production catalog builder. |
Reviews (1): Last reviewed commit: "Merge branch 'master' into feat/add-glm-..." | Re-trigger Greptile
|
Shipped in exp-v0.52.294 🚢 — thanks @rh-id. GLM-5.3 Flash is now selectable in the Z.AI list, with the same effort-ladder treatment as GLM-5.3 (Codex + Fable both verified the version-gate classifies it identically, and confirmed the entry is correct for the direct Z.AI provider path). Heads-up: the OpenRouter onboarding namespace mismatch that surfaced during review ( |
* feat: add GLM-5.3 Flash to Z.AI model list Add glm-5.3-flash next to glm-5.3 in _PROVIDER_MODELS["zai"] and mirror it in _FALLBACK_MODELS, following the existing glm-4.5 / glm-4.5-flash sibling pattern. Reasoning-effort gating needs no change: the >= 5.2 version gate already classifies the id at the full effort tier. Adds a regression suite asserting catalog presence, label, ordering, fallback entry, and end-to-end propagation through get_available_models(). * test: pin glm-5.3-flash sibling adjacency in zai provider catalog Per PR review feedback (nesquena#7323): the provider-catalog ordering test now asserts glm-5.3-flash immediately after glm-5.3 and glm-5.2 immediately after the flash sibling, matching the adjacency the fallback test already pins. The base<flash relative check is subsumed; flash<glm-5.1 is kept to pin 5.1 after the whole 5.3 generation. --------- Co-authored-by: nesquena-hermes <nesquena+hermes@gmail.com>
…) (nesquena#7517) Co-authored-by: n <a@n>
Thinking Path
api/config.py(_PROVIDER_MODELS+_FALLBACK_MODELS)glm-5.3entry (feat: add GLM-5.3 to Z.AI model list #7017) plus the olderglm-4.5/glm-4.5-flashsibling pairglm-5.3-flashas a first-class sibling everywhere the base id is curated, reusing the existing base→flash ordering convention instead of adding new mechanismsWhat Changed
api/config.py(+2):_PROVIDER_MODELS["zai"]:{"id": "glm-5.3-flash", "label": "GLM-5.3 Flash"}immediately afterglm-5.3(mirrors theglm-4.5→glm-4.5-flashadjacency)_FALLBACK_MODELSZ.AI block:{"provider": "Z.AI", "id": "zai/glm-5.3-flash", "label": "GLM-5.3 Flash"}directly afterzai/glm-5.3(newest-first order preserved; shared by the OpenRouter fallback list reuse)tests/test_glm_5_3_flash_catalog.py(new, modeled ontest_glm_5_3_catalog.py): asserts catalog presence + exact label, base-then-flash sibling adjacency (glm-5.3-flash directly after glm-5.3, glm-5.2 next) with glm-5.1 after the 5.3 generation, fallback entry uniqueness + position,_zai_glm_classification("glm-5.3-flash", "zai") == "effort"with the publicresolve_model_reasoning_effortsladder, and end-to-end propagation throughget_available_models()_zai_glm_classification(the ≥5.2 version gate already covers anyglm-5.3*id), onboarding default staysglm-5.1per feat: add GLM-5.3 to Z.AI model list #7017's deliberate decision, no CHANGELOG editWhy It Matters
Users on a Z.ai/GLM plan currently have no labeled picker entry for GLM-5.3 Flash even though Z.ai documents it as a live model. Adding it to the two canonical catalogs makes it appear correctly labeled and capability-configured across the model picker, fallback list, onboarding wizard model list (which auto-derives from
_PROVIDER_MODELS), and live-model merging — without touching any consumer code.Verification
5 failed, 1 passed; the passing test is an intentional semantic guard pinning that the existing ≥5.2 classification gate already yields"effort"for the flash id. With the fix applied → all 6 pass..venv, isolated test state):tests/test_glm_5_3_flash_catalog.py,tests/test_glm_5_3_catalog.py,tests/test_zai_reasoning_effort_gating.py,tests/test_custom_providers_in_panel.py,tests/test_model_resolver.py,tests/test_4413_seed_provider_models.py→ 197 passed, 0 failedglm-5.3andglm-4.5-flash. Every literal site outsideconfig.pyis test input, not catalog enumeration; consumers that auto-derive were verified, not assumed: onboarding wizard buildslist(_PROVIDER_MODELS.get("zai", [])),ui.jsdropdown reads/api/models+ live merge with no static zai map, routes.py live-catalog prettifier restores the GLM acronym generically, i18n locales carry no model-name strings.reasoning_effortaccepted,maxrecommended). That is external confirmation; I did not call the API myself./api/modelspayload level —get_available_models()includesglm-5.3-flashunder the zai group, which is what feeds the dropdown — happy to attach a picker screenshot if reviewers want one.max) behave identically on the flash variant — same assumption class already carried by master's glm-5.2/glm-5.3 entries; flagged for maintainers_PROVIDER_MODELS["zai"]may lag; WebUI's static entry stands alone and_seed_provider_models_from_coreonly injects missing ids at startup, so no conflict either wayRisks / Follow-ups
glm-*-flashcarve-out in_zai_glm_classificationwould be needed; the new semantic guard test would catch the drift pointContract Routing
Task type: small provider-catalog addition (one logical change)
Touched areas:
api/config.pycurated zai catalogs; new product-semantics regression suiteRelevant public docs:
AGENTS.md,CONTRIBUTING.md,docs/CONTRACTS.md,docs/GUIDELINES.md; README provider feature bullet unchanged (Z.AI already listed). No contract document is redefined; the new tests extend the existing reasoning-effort gating semantics test family rather than asserting opposite behavior.Scope boundaries: backend data + tests only; no streaming/state layer touched; no UI framework changes.
Evidence needed & shown: fail-before/pass-after proof, neighbor green runs, sibling sweep, payload-level propagation.
Release note
Added the Z.ai GLM-5.3 Flash model (
glm-5.3-flash) to the model picker and fallback lists, with proper labeling and reasoning-effort support inherited from the GLM ≥5.2 capability gate.Model Used
ZCode coding agent powered by Z.ai GLM-5.3-Flash (builtin zai-coding-plan endpoint). Notable tool use: delegated @coder subagent implemented the catalog change + tests after read-only exploration agents mapped the catalogs; delegated @Reviewer subagent performed independent verification including a stash-based fail-before proof; WebFetch used to confirm the Z.ai docs page for glm-5.3-flash. All pytest runs executed locally via the repo runner in an isolated test environment.