feat: Add GLM-5 model support #9105

Closed
opened 2026-02-16 18:11:39 -05:00 by yindo · 1 comment
Owner

Originally created by @SnoozeScript on GitHub (Feb 11, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Description

GLM-5 was recently released (2026-02-11) and is already supported in models.dev.
OpenCode needs updates to support this new model.

models.dev Reference

GLM-5 is defined in:

  • providers/zai/models/glm-5.toml
  • providers/zhipuai/models/glm-5.toml

Expected Changes

  1. Update packages/opencode/src/provider/transform.ts:

    • Add temperature handling for glm-5 (similar to glm-4.6/glm-4.7)
    • Update provider options if needed for reasoning support
  2. Update test fixtures in packages/opencode/test/tool/fixtures/models-api.json

Verification

  • GLM-5 appears in model list when using zai/zhipuai providers
  • Temperature defaults correctly for GLM-5
  • Reasoning/thinking works correctly

Additional Context

See models.dev GLM-5 definition:

  • family: "glm"
  • reasoning: true
  • tool_call: true
  • interleaved: { field: "reasoning_content" }
Originally created by @SnoozeScript on GitHub (Feb 11, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request ### Description GLM-5 was recently released (2026-02-11) and is already supported in models.dev. OpenCode needs updates to support this new model. ### models.dev Reference GLM-5 is defined in: - providers/zai/models/glm-5.toml - providers/zhipuai/models/glm-5.toml ### Expected Changes 1. Update `packages/opencode/src/provider/transform.ts`: - Add temperature handling for `glm-5` (similar to glm-4.6/glm-4.7) - Update provider options if needed for reasoning support 2. Update test fixtures in `packages/opencode/test/tool/fixtures/models-api.json` ### Verification - [ ] GLM-5 appears in model list when using zai/zhipuai providers - [ ] Temperature defaults correctly for GLM-5 - [ ] Reasoning/thinking works correctly ### Additional Context See models.dev GLM-5 definition: - family: "glm" - reasoning: true - tool_call: true - interleaved: { field: "reasoning_content" }
yindo added the discussion label 2026-02-16 18:11:39 -05:00
yindo closed this issue 2026-02-16 18:11:39 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 11, 2026):

This issue appears related to the recently closed #13169 which asked about GLM-5 support. Make sure to review that issue for any context or discussion about implementation.

@github-actions[bot] commented on GitHub (Feb 11, 2026): This issue appears related to the recently closed #13169 which asked about GLM-5 support. Make sure to review that issue for any context or discussion about implementation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9105