Problem
When runtime_fallback switches to a fallback model after an error, the fallback model runs without any variant or reasoningEffort settings from the agent config.
In autoRetryWithFallback() (line ~51399), the retry request sends only a bare model object:
model: {
providerID: "chutes",
modelID: "kimi-k2.5"
}
// No variant, no reasoningEffort
This means GPT and Chutes fallback models run without reasoning/thinking settings, producing lower quality responses than they would with proper configuration.
Why this matters
Real example: Sisyphus runs with variant: "max" and reasoningEffort: "xhigh" on Claude Opus 4.6. When it falls back to chutes/kimi-k2.5 or openai/gpt-5.4, those models run in their default (non-reasoning) mode instead of using the thinking capabilities the agent was configured for.
- Anthropic/Gemini fallbacks partially work because OpenCode applies default thinking settings per model
- OpenAI-compatible fallbacks (Chutes, OpenRouter, xAI) get NO reasoning settings at all
What should happen
autoRetryWithFallback should read the agent's configured variant and reasoningEffort from the OmO config and apply appropriate values to the fallback model. Since different providers support different settings, it should map intelligently:
@ai-sdk/anthropic fallback → apply variant (high/max) + reasoningEffort
@ai-sdk/google fallback → apply variant (high/max)
@ai-sdk/openai-compatible fallback → apply variant (low/medium/high) + reasoningEffort
Suggested fix
In autoRetryWithFallback, after building fallbackModelObj, also pass the variant:
await ctx.client.session.promptAsync({
path: { id: sessionID },
body: {
...retryAgent ? { agent: retryAgent } : {},
model: {
...fallbackModelObj,
variant: resolveVariantForProvider(fallbackModelObj.providerID, agentConfig.variant)
},
parts: retryParts
},
query: { directory: ctx.directory }
});
Note: the model-fallback hook already does this correctly — it passes fallback.variant in the output message. The runtime-fallback hook should do the same.
Environment
- OmO version: latest (March 2026)
- Provider setup: anthropic/ (@ai-sdk/anthropic), google/ (@ai-sdk/google), openai/ (@ai-sdk/openai-compatible) — all via CLIProxyAPI/Quotio
Problem
When
runtime_fallbackswitches to a fallback model after an error, the fallback model runs without anyvariantorreasoningEffortsettings from the agent config.In
autoRetryWithFallback()(line ~51399), the retry request sends only a bare model object:This means GPT and Chutes fallback models run without reasoning/thinking settings, producing lower quality responses than they would with proper configuration.
Why this matters
Real example: Sisyphus runs with
variant: "max"andreasoningEffort: "xhigh"on Claude Opus 4.6. When it falls back tochutes/kimi-k2.5oropenai/gpt-5.4, those models run in their default (non-reasoning) mode instead of using the thinking capabilities the agent was configured for.What should happen
autoRetryWithFallbackshould read the agent's configuredvariantandreasoningEffortfrom the OmO config and apply appropriate values to the fallback model. Since different providers support different settings, it should map intelligently:@ai-sdk/anthropicfallback → apply variant (high/max) + reasoningEffort@ai-sdk/googlefallback → apply variant (high/max)@ai-sdk/openai-compatiblefallback → apply variant (low/medium/high) + reasoningEffortSuggested fix
In
autoRetryWithFallback, after buildingfallbackModelObj, also pass the variant:Note: the
model-fallbackhook already does this correctly — it passesfallback.variantin the output message. Theruntime-fallbackhook should do the same.Environment