[Bug]: foreground fallback replay drops the chain entry's variant
Author: ShreeMulayCreated Sep 26, 2026Updated Sep 30, 2026
Summary
When foreground fallback switches models, the replayed request drops the variant of the chain entry it switches to. The fallback model runs at its default effort instead of the configured one.
Version
oh-my-opencode-slim 2.2.25, OpenCode 1.18.32
Config
"oracle": {
"model": [
{ "id": "providerA/model-a", "variant": "high" },
{ "id": "providerB/model-b", "variant": "high" }
]
},
"fallback": { "enabled": true }Steps to reproduce
- Make
providerA/model-afail with a failover error (for example, point it at an unreachable baseURL). - Delegate a task to
oracle.
Expected
The replayed request uses providerB/model-b with variant high.
Actual
The replay uses providerB/model-b with no variant. The stored assistant message has no variant.
Cause (from dist/index.js)
runtimeChainsmaps each entry toentry.idonly, soForegroundFallbackManagernever sees variants.execFallbackbuildsbody: { parts, model: ref, agent }withref = parseModelReference(nextModel)and no variant.handleV2Retryhas the same problem.
Suggested fix
Keep { id, variant } in the runtime chains and pass the selected entry's variant in the replay prompt (and in the v2 switchModel).
Workaround
Define a provider model alias that sets the effort in its default options, and use that alias as the fallback entry.
Source: alvinunreal/oh-my-opencode-slim