Note
Grok responding on behalf of Julius.
Triage
Thanks for tracking this down, @alhammadialihameed. Including the OpenCode log lines and the stored session records made the cause easy to confirm.
What I found
This bug is on main. It comes from how OpenCode reasoning defaults are chosen, not from OpenCode Go auth or the model list.
inferDefaultVariantinapps/server/src/provider/Layers/OpenCodeProvider.tshas special cases foranthropic/google*(high) and foropenai/opencode(medium, otherwisehigh). Nothing matchesopencode-go. On the OpenCode 2 path (openCode2ModelCapabilities), the Reasoning options are exactly the variants OpenCode advertises. Foropencode-go/deepseek-v4.1-flashandopencode-go/glm-5.3-flashthat'slow/high/max, so the descriptor ends up with no default and no current value.- OpenCode 2.0.20 doesn't add
mediumon its own when no variant is sent.VariantUnavailableErroris only thrown when the session model carries an explicit variant that isn't in the model's list (withVariantin OpenCode'smodel-resolver.ts). So the"variant":"medium"or"xhigh"in your session records was on the model ref T3 sent. - T3 gets that value from the thread's saved model selection. The fallback OpenCode capability set is
low/medium/high/xhigh, withmediumas the current value. The web composer drops a variant the loaded model doesn't list, but if the model isn't in the catalog yet it forwards the saved options unchanged. Orchestrator workers copy the parent's selection when they don't pass their own options, which would explain why workers fail immediately. - One open question:
models.devcurrently listsmuse-spark-1.3-contributorwithminimal/low/medium/high/xhigh, which is a different set from the DeepSeek and GLM Flash models. It's worth checking what OpenCode actually advertises for that one.
Workaround for now: set Reasoning to High or Max before sending, including on the thread that spawns workers.
Likely fix area
inferDefaultVariantforopencode-go. One thing to watch: adding it to theopenai/opencodebranch and preferringmaxwould also change the default for OpenAI andopencode/*models that advertisemax. A narrower option is to choose a variant these models actually list, such ashigh.- Model selection on send, in the web composer and when workers inherit options. One option is to drop or remap a saved variant that isn't in the model's advertised list instead of forwarding it.
A maintainer will decide on the fix direction.