Skip to content

Add glm-5.3 model family entry - #54

Open
jatmn wants to merge 10 commits into
mainfrom
fix/add-glm-5-3-model-family
Open

Add glm-5.3 model family entry#54
jatmn wants to merge 10 commits into
mainfrom
fix/add-glm-5-3-model-family

Conversation

@jatmn

@jatmn jatmn commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

Adds an exact model-family entry for Z.ai's GLM-5.3 model, which was previously only matched by the broad glm-5* pattern.

Changes

  • configs/model-families/z-ai.toml: Added z_ai_glm_5_3 entry with:
    • 1M context window (same as GLM-5.2)
    • Text-only input modality
    • auto_review_model_override = "glm-5.3"
    • Proper reasoning_effort forwarding alongside thinking.type (like GLM-5.2)
  • src/config_tests.rs: Added assertions that the entry loads and applies the correct reasoning_effort transform
  • README.md and docs/model-family-catalogs.md: Updated model coverage table

Why needed

Previously, glm-5.3 was only matched by the broad glm-5* pattern which:

  • Used the wrong context window (200k from glm-5/5.1 base)
  • Did not forward reasoning_effort natively
  • Had incorrect auto_review_model_override

This caused issues with network escalation requests being auto-denied due to incorrect or missing model metadata.

Validation

  • cargo test --locked (647 passed, 0 failed)
  • cargo build --locked
  • cargo clippy --locked --all-targets --all-features -- -D warnings (clean)
  • git diff --check (clean)

Review in cubic

Summary by Sourcery

Add first-class GLM-5.3 support with accurate metadata and provider-compatible reasoning transformations.

New Features:

  • Add an exact GLM-5.3 model-family configuration with its metadata, reasoning capabilities, and provider override.

Bug Fixes:

  • Correct GLM-5.3 context, model override, and reasoning behavior that was previously inherited from the broader GLM-5 family configuration.

Enhancements:

  • Support reasoning-effort aliases and native Responses request normalization for provider-specific effort levels.
  • Add typed static boolean request morphs with configuration validation.

Documentation:

  • Document GLM-5.3 model coverage and its reasoning transformation behavior.
  • Document reasoning-effort aliases and static boolean morphs.

Tests:

  • Add coverage for GLM-5.3 metadata, reasoning transformations, native requests, and tool-continuation history.
  • Add validation and runtime tests for typed static morph values and reasoning-effort aliases.

- Add exact glm-5.3 entry to z-ai.toml model-family catalog with
  proper 1M context window and auto_review_model_override
- Update tests to verify glm-5.3 family loads with correct transforms
- Update README and model-family-catalogs.md to list glm-5.3

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The new GLM-5.3 reasoning_effort assertions in first_class_reasoning_and_tool_translation_for_target_models are nearly identical to the GLM-5.2 ones; consider extracting a small helper that validates a family’s append_chat_request_morphs to avoid duplication and keep future additions cheaper.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new GLM-5.3 reasoning_effort assertions in `first_class_reasoning_and_tool_translation_for_target_models` are nearly identical to the GLM-5.2 ones; consider extracting a small helper that validates a family’s `append_chat_request_morphs` to avoid duplication and keep future additions cheaper.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@jatmn
jatmn marked this pull request as draft August 18, 2026 21:31
Codex Fix-Issue added 2 commits August 18, 2026 14:37
…y assertions

Following review feedback, extract a shared helper for validating
append_chat_request_morphs so the GLM-5.2 and GLM-5.3 assertions are
concise instead of nearly identical blocks. Future GLM-5.x additions
become one-liners.
CI source checks flagged formatting issues. Running rustfmt cleans up
the file's assert macro formatting, including our new code.
@jatmn jatmn self-assigned this Aug 18, 2026
@jatmn
jatmn marked this pull request as ready for review August 18, 2026 21:50

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • In assert_has_append_morph, the panic message "{label} family exists" reads like a successful condition; consider changing it to something like "{label} family should exist" or using expect for a clearer failure message.
  • The helper name assert_has_append_morph is a bit generic given it specifically checks for the reasoning.effort -> reasoning_effort rename; renaming it to something like assert_has_reasoning_effort_append_morph would make the intent clearer at the call sites.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `assert_has_append_morph`, the panic message `"{label} family exists"` reads like a successful condition; consider changing it to something like `"{label} family should exist"` or using `expect` for a clearer failure message.
- The helper name `assert_has_append_morph` is a bit generic given it specifically checks for the `reasoning.effort -> reasoning_effort` rename; renaming it to something like `assert_has_reasoning_effort_append_morph` would make the intent clearer at the call sites.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

1 participant