Describe the bug
When an agent is configured with a model fallback array whose first entry includes a variant, the variant is not propagated to the active OpenCode agent configuration.
For example:
{
"librarian": {
"model": [
{ "id": "openai/gpt-5.6-luna", "variant": "max" },
{ "id": "openrouter/deepseek/deepseek-v4-flash", "variant": "max" }
]
}
}
Directly selecting openai/gpt-5.6-luna with the max variant works. However, when the same model is selected through the agent model array, the active request can omit the variant and OpenCode then uses its default (observed as medium). The same issue affects explorer.
Expected behavior
The first model entry's variant should be applied to the active agent/request:
{
"model": "openai/gpt-5.6-luna",
"variant": "max"
}
Fallback entries should also preserve their configured variant when activated.
Additional context
The model array appears to retain the variant in the internal fallback chain, but the normal initialization path only writes the first model ID to the active agent configuration. This makes the configured variant dependent on whether the model was selected directly or through a fallback array.
Environment
- oh-my-opencode-slim: 2.2.14
- OpenCode: current release
- Provider: OpenAI-compatible endpoint
Describe the bug
When an agent is configured with a model fallback array whose first entry includes a
variant, the variant is not propagated to the active OpenCode agent configuration.For example:
{ "librarian": { "model": [ { "id": "openai/gpt-5.6-luna", "variant": "max" }, { "id": "openrouter/deepseek/deepseek-v4-flash", "variant": "max" } ] } }Directly selecting
openai/gpt-5.6-lunawith themaxvariant works. However, when the same model is selected through the agent model array, the active request can omit the variant and OpenCode then uses its default (observed asmedium). The same issue affectsexplorer.Expected behavior
The first model entry's variant should be applied to the active agent/request:
{ "model": "openai/gpt-5.6-luna", "variant": "max" }Fallback entries should also preserve their configured variant when activated.
Additional context
The model array appears to retain the variant in the internal fallback chain, but the normal initialization path only writes the first model ID to the active agent configuration. This makes the configured variant dependent on whether the model was selected directly or through a fallback array.
Environment