[FEATURE]: model fallback in specific agents
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).
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.
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.
A much needed feature so that no human intervention is needed to switch models, also can be useful in opencode github agent (We can set 2-3 models and automatic fallback handles whichever is possible) @rekram1-node
Extremely useful for me as well. I have a sub agent set to Claude Models, would be great to switch to Gemini when I run out of tokens. Right noew the subagent just get stuck and I don't even notice it
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.