Skip to content

fix(catalog): add GLM-5.2 to ZAI provider - #580

Open
LineZore wants to merge 1 commit into
huggingface:mainfrom
LineZore:fix/zai-glm-5.2
Open

fix(catalog): add GLM-5.2 to ZAI provider#580
LineZore wants to merge 1 commit into
huggingface:mainfrom
LineZore:fix/zai-glm-5.2

Conversation

@LineZore

Copy link
Copy Markdown

What

GLM-5.2 was missing from the ZAI provider model list, so users authenticated with a ZAI API key could not see or select it.

Closes #542.

Root cause

The ZAI provider in src/tau_coding/data/catalog.toml had a hand-maintained models list that stopped at glm-5.1. GLM-5.2 (Z.ai coding plan) was never added, so it did not appear after /login.

Note: the catalog is static — there is no remote /models discovery — so new models must be added here explicitly.

Verified model specs (from Z.ai docs)

Cross-checked against Z.ai documentation, not copied from sibling entries:

  • model id: glm-5.2 — confirmed to exist
  • context window: 1,000,000 — Z.ai advertises GLM-5.2 as "supporting up to 1M context". This is a GLM-5.2-specific claim; the other GLM-5 models (e.g. glm-5.1) are not advertised as 1M, which is why they remain at 200000.
  • max output tokens: 131072 (128K) — matches GLM-5.1
  • reasoning: true (supports reasoning_effort)
  • input: text only (the *-turbo vision variant is separate)
  • cost: all zero — ZAI uses a coding-plan credit model, consistent with the existing GLM-5 entries
  • compat: supportsDeveloperRole = false, thinkingFormat = "zai", zaiToolStream = true — same as glm-5.1 / glm-5-turbo (same protocol)

Changes

Three additions to the zai provider block in src/tau_coding/data/catalog.toml:

  1. models list: add "glm-5.2" (between glm-5.1 and glm-5v-turbo)
  2. context_windows: add "glm-5.2" = 1000000
  3. new [providers.model_metadata."glm-5.2"] block

default_model is intentionally left as glm-5.1 — this PR only makes GLM-5.2 selectable; changing the default is a separate behavioral decision for maintainers.

Verification

  • uv run pytest tests/test_provider_catalog.py tests/test_provider_config.py107 passed
  • Runtime smoke test: catalog loads, glm-5.2 appears in zai.models, context_windows, and model_metadata with consistent values; default_model validation passes
  • uv run ruff check → clean

@LineZore
LineZore requested a review from alejandro-ao as a code owner August 13, 2026 02:27
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.

GLM-5.2 its not showed for ZAI with API KEY

1 participant