Feature hasn't been suggested before.
Describe the enhancement you want to request
feat(provider): expose low/high/max reasoning effort for z-ai/glm-5.3(-flash)
Context
z-ai/glm-5.3 and glm-5.3-flash support reasoning_effort: low / high / max (default max, thinking.type=disabled returns 400). This is documented in docs.z.ai/guides/llm/glm-5.3.md and zai-org/GLM-5.3-Flash on Hugging Face. glm-5.2 already exposes variants in OpenCode, so 5.3 is the natural follow-up. This would bring it in line with the recent xAI fix for grok-3-mini (#42160), but with its own value set.
Current behavior
packages/opencode/src/provider/transform.ts:730-790 (v1 1.18.25) defines variants for glm-5.2 (high/xhigh via @openrouter, high/max via openai-compatible):
const glm52 = ["glm-5.2", ...].some(...)
if (glm52 && npm === "@openrouter/ai-sdk-provider") return {high, xhigh}
...
if (id.includes("glm") && !glm52) return {}
As a result z-ai/glm-5.3(-flash) via any provider (openrouter, openai-compatible, ...) currently has no variants — the TUI shows no options and agent.options.reasoningEffort has no effect. The model always runs at the default max.
Expected
Expose the three levels for glm-5.3(-flash) on the same providers as 5.2, for example:
const glm53 = ["glm-5.3", "glm-5-3", "glm-5p3", "glm-5.3-flash"].some(...)
if (glm53 && npm === "@openrouter/ai-sdk-provider")
return { low: { reasoning: { effort: "low" } }, high: { reasoning: { effort: "high" } }, max: { reasoning: { effort: "max" } } }
if (glm53 && npm === "@ai-sdk/openai-compatible")
return { low: { reasoningEffort: "low" }, high: { reasoningEffort: "high" }, max: { reasoningEffort: "max" } }
if (glm53 && npm === "@ai-sdk/anthropic")
return { low: { effort: "low" }, high: { effort: "high" }, max: { effort: "max" } }
This matches the Z.ai spec (low lightweight, high enhanced, max deep) and allows mid-session changes to affect the next turn, similar to how muse-spark (minimal→xhigh) already works. It would also keep v2 in sync, where the same early return currently covers all glm models.
Repro
- Configure
provider.openrouter.models["z-ai/glm-5.3-flash"] in opencode.jsonc.
- Open the model picker — variants are listed but changing them has no real effect.
- Setting
reasoningEffort: "low" (or any level) still runs at max; usage.completion_tokens_details.reasoning_tokens stays at the max level.
References
docs.z.ai/guides/llm/glm-5.3.md — table reasoning_effort: low/high/max, default max
zai-org/GLM-5.3-Flash on Hugging Face — reasoning_effort defaults to max if not passed
1120d070 stats alias ox-alpha → glm-5.3-flash (shows the model is already recognized)
fix(xai): pass through reasoning effort (#42160) — prior art for exposing reasoning effort
Happy to adjust the value mapping if you prefer a different naming (e.g. high/xhigh alias for max). Thanks for considering it!
Feature hasn't been suggested before.
Describe the enhancement you want to request
feat(provider): expose low/high/max reasoning effort for z-ai/glm-5.3(-flash)
Context
z-ai/glm-5.3andglm-5.3-flashsupportreasoning_effort: low / high / max(defaultmax,thinking.type=disabledreturns 400). This is documented indocs.z.ai/guides/llm/glm-5.3.mdandzai-org/GLM-5.3-Flashon Hugging Face.glm-5.2already exposes variants in OpenCode, so5.3is the natural follow-up. This would bring it in line with the recentxAIfix forgrok-3-mini(#42160), but with its own value set.Current behavior
packages/opencode/src/provider/transform.ts:730-790(v1 1.18.25) defines variants forglm-5.2(high/xhighvia@openrouter,high/maxviaopenai-compatible):As a result
z-ai/glm-5.3(-flash)via any provider (openrouter,openai-compatible,...) currently has no variants — the TUI shows no options andagent.options.reasoningEfforthas no effect. The model always runs at the defaultmax.Expected
Expose the three levels for
glm-5.3(-flash)on the same providers as5.2, for example:This matches the Z.ai spec (
lowlightweight,highenhanced,maxdeep) and allows mid-session changes to affect the next turn, similar to howmuse-spark(minimal→xhigh) already works. It would also keepv2in sync, where the same early return currently covers allglmmodels.Repro
provider.openrouter.models["z-ai/glm-5.3-flash"]inopencode.jsonc.reasoningEffort: "low"(or any level) still runs atmax;usage.completion_tokens_details.reasoning_tokensstays at themaxlevel.References
docs.z.ai/guides/llm/glm-5.3.md— tablereasoning_effort: low/high/max, default maxzai-org/GLM-5.3-Flashon Hugging Face — reasoning_effort defaults to max if not passed1120d070stats aliasox-alpha → glm-5.3-flash(shows the model is already recognized)fix(xai): pass through reasoning effort (#42160)— prior art for exposing reasoning effortHappy to adjust the value mapping if you prefer a different naming (e.g.
high/xhighalias formax). Thanks for considering it!