opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[FEATURE]: fallback models for (sub) agents

Open imqqmi opened this issue 17 hours ago • 1 comments

Feature hasn't been suggested before.

  • [x] I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem: some models/providers may have issues, ie service is temporarily offline or you've hit rate limits. Solution: instead of having one model, use an array so that multiple models can be given as a fallback, when one model fails, the second or third can be attempted (and remember using the second for 15 minutes, then retry primary model). This avoids manual switching between models, and subagents that don't offer the option to switch models/providers can try other models/providers. A message can be flashed to the user that opencode is switching to a different model so the user knows what's going on.

This is not the same as the feature request for dynamic model switching where the agent takes initiative, this is a configuration setting where fallback models/providers can be given and opencode decides when to use them (running into issues > fallback).

imqqmi avatar Jan 15 '26 13:01 imqqmi