Version
1.18.18 (Linux, x86_64)
What happens
Picking the xhigh effort variant for xai/grok-4.6 (offered in the picker, present in GET /config/providers) makes every prompt in that session fail instantly with:
AI_InvalidArgumentError: invalid xai provider options
AI_TypeValidationError: Invalid option: expected one of "none"|"low"|"medium"|"high" at path reasoningEffort
Payload opencode built: {"store":false,"promptCacheKey":"...","reasoningEffort":"xhigh"}
Why
Two of opencode's own halves disagree:
- The catalog advertises
variants: { "xhigh": { "reasoningEffort": "xhigh" } } for grok-4.6 (and other post-2025-12 xAI models) — correctly, since xAI's API does support reasoning_effort: "xhigh" on grok-4.6 (docs.x.ai/docs/guides/reasoning).
- The bundled
@ai-sdk/xai provider's zod schema accepts only none|low|medium|high for reasoningEffort, so the request dies at local type validation before any network call.
Expected
Either the schema accepts xhigh (xAI supports it on grok-4.6+) or the catalog stops advertising it. As shipped, the picker offers an option that can never run.
Repro
- opencode 1.18.18, xAI connected.
/models → xai/grok-4.6, effort xhigh.
- Send any prompt → "invalid xai provider options".
Version
1.18.18 (Linux, x86_64)
What happens
Picking the
xhigheffort variant forxai/grok-4.6(offered in the picker, present inGET /config/providers) makes every prompt in that session fail instantly with:Payload opencode built:
{"store":false,"promptCacheKey":"...","reasoningEffort":"xhigh"}Why
Two of opencode's own halves disagree:
variants: { "xhigh": { "reasoningEffort": "xhigh" } }for grok-4.6 (and other post-2025-12 xAI models) — correctly, since xAI's API does supportreasoning_effort: "xhigh"on grok-4.6 (docs.x.ai/docs/guides/reasoning).@ai-sdk/xaiprovider's zod schema accepts onlynone|low|medium|highforreasoningEffort, so the request dies at local type validation before any network call.Expected
Either the schema accepts
xhigh(xAI supports it on grok-4.6+) or the catalog stops advertising it. As shipped, the picker offers an option that can never run.Repro
/models→ xai/grok-4.6, effortxhigh.