[FEATURE]: model fallback in specific agents #6906

Open
opened 2026-02-16 18:05:34 -05:00 by yindo · 2 comments
Owner

Originally created by @kobi2187 on GitHub (Jan 20, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

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

Describe the enhancement you want to request

Can you please add a model fallback in the yaml part of the specific_agent.md file?

---
description: ...
mode: primary
model: [ 'anthropic/claude-sonnet-4-5', 'opencode/grok-4' , 'google/gemini-3-pro', 'openai/gpt-5-turbo' ]

expected behaviour: if a model is unavailable or out of tokens, it will use the next one automatically (or ask the user according to pref).

syntax - for example as a yaml list.
should let user know if file has a parsing issue (wrong syntax) or model unavailable (not connected).

Originally created by @kobi2187 on GitHub (Jan 20, 2026). Originally assigned to: @thdxr on GitHub. ### 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 Can you please add a model fallback in the yaml part of the specific_agent.md file? ``` --- description: ... mode: primary model: [ 'anthropic/claude-sonnet-4-5', 'opencode/grok-4' , 'google/gemini-3-pro', 'openai/gpt-5-turbo' ] ``` expected behaviour: if a model is unavailable or out of tokens, it will use the next one automatically (or ask the user according to pref). syntax - for example as a yaml list. should let user know if file has a parsing issue (wrong syntax) or model unavailable (not connected).
yindo added the discussiondocs labels 2026-02-16 18:05:34 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 20, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #7602: [FEATURE]: Native Model Fallback / Failover Support - Directly addresses model fallback between different models with global and agent-level configuration
  • #8687: [FEATURE]: Fallback models in configuration - Requests multiple models in config as an array for fallback (CLOSED)
  • #8673: [FEATURE]: fallback models for (sub) agents - Explicitly requests array of fallback models with automatic switching (CLOSED)
  • #1267: Support per rule model fallbacks for outages and credit depletion - Older request for multiple models per mode in order of preference

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 20, 2026): This issue might be a duplicate of existing issues. Please check: - #7602: [FEATURE]: Native Model Fallback / Failover Support - Directly addresses model fallback between different models with global and agent-level configuration - #8687: [FEATURE]: Fallback models in configuration - Requests multiple models in config as an array for fallback (CLOSED) - #8673: [FEATURE]: fallback models for (sub) agents - Explicitly requests array of fallback models with automatic switching (CLOSED) - #1267: Support per rule model fallbacks for outages and credit depletion - Older request for multiple models per mode in order of preference Feel free to ignore if none of these address your specific case.
Author
Owner

@farukg commented on GitHub (Feb 16, 2026):

Strong +1 for this. My concrete use case: I have subagents pinned to cheap/free models (e.g. opencode/grok-code for shell-exec, opencode/gpt-5-nano for general) to avoid burning expensive tokens on trivial tasks. But free models occasionally hit rate limits or produce weak results for complex subagent work.

A fallback array like model: ['opencode/gpt-5-nano', 'openai/gpt-5-nano', 'google/gemini-2.5-flash-lite'] would let me tier: free → ultra-cheap paid → cheap paid, with automatic failover. Right now the only workaround is running a LiteLLM proxy as a custom provider, which adds unnecessary infrastructure for what should be a native config option.

@farukg commented on GitHub (Feb 16, 2026): Strong +1 for this. My concrete use case: I have subagents pinned to cheap/free models (e.g. `opencode/grok-code` for shell-exec, `opencode/gpt-5-nano` for general) to avoid burning expensive tokens on trivial tasks. But free models occasionally hit rate limits or produce weak results for complex subagent work. A fallback array like `model: ['opencode/gpt-5-nano', 'openai/gpt-5-nano', 'google/gemini-2.5-flash-lite']` would let me tier: free → ultra-cheap paid → cheap paid, with automatic failover. Right now the only workaround is running a LiteLLM proxy as a custom provider, which adds unnecessary infrastructure for what should be a native config option.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6906