Skip to content

fix(opencode): expose High/Max thinking variants for GLM-5.2#32446

Open
imranshaiedi-byte wants to merge 1 commit into
anomalyco:devfrom
imranshaiedi-byte:glm-52-variants
Open

fix(opencode): expose High/Max thinking variants for GLM-5.2#32446
imranshaiedi-byte wants to merge 1 commit into
anomalyco:devfrom
imranshaiedi-byte:glm-52-variants

Conversation

@imranshaiedi-byte

@imranshaiedi-byte imranshaiedi-byte commented Jun 15, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #32444
Related: #18598

Type of change

  • Bug fix

What does this PR do?

GLM-5.2 supports two thinking-effort levels (High and Max), but ProviderTransform.variants() in packages/opencode/src/provider/transform.ts returns {} for any model whose ID contains "glm". This blanket exclusion was added for older GLM models that only have a binary thinking toggle, but it also suppresses GLM-5.2 which is different — Z.AI docs confirm it exposes High and Max effort levels.

The fix carves out GLM-5.2 before the blanket exclusion so it returns high/max variants. Earlier GLM models (5.1, 5, 4.x) still hit the id.includes("glm") check and correctly get {} since they only support a thinking toggle.

Ref: https://docs.z.ai/devpack/latest-model

How did you verify your code works?

  • Ran bun typecheck in packages/opencode — passes clean
  • Ran oxlint on the edited file — 0 errors (4 pre-existing warnings in untouched code)
  • Confirmed GLM-5.2 returns { high: { reasoningEffort: "high" }, max: { reasoningEffort: "max" } } while GLM-5.1 and earlier still return {} via the existing exclusion

Screenshots / recordings

Non-UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Jun 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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 thinking-effort variants (High/Max) not exposed — blanket 'glm' exclusion in variants()

1 participant