Feature Request: Smart Model Fallback System
Summary
Implement automatic model fallback when rate limits are hit, with intelligent model selection based on capability requirements.
Problem Statement
Users with multiple LLM providers (Anthropic, OpenAI, Google, DeepSeek, LM Studio) experience workflow interruptions when one provider hits rate limits (429 errors). Currently, manual intervention is required to switch providers.
Proposed Solution
Core Feature: Auto Model Fallback
{
"model": {
"primary": "anthropic/claude-sonnet-4-20250514",
"fallback": [
"openai/gpt-5",
"google/gemini-2-flash",
"deepseek/deepseek-coder"
],
"onRateLimit": "auto-switch",
"retryAttempts": 3
}
}
Smart Model Selection
Models have varying capabilities. The system should match requirements:
| Capability |
Description |
tools |
Function calling / tool use |
image |
Vision / image analysis |
reasoning |
Chain-of-thought / reasoning |
thinking |
Extended thinking (like o1, Claude extended) |
uncensored |
Full capability (no content filtering) |
context |
Max context window |
speed |
Response latency |
cost |
Cost tier |
Use Cases
- Developer with rate limits: Auto-switch from Claude to GPT-5
- Image analysis needed: Fall back to model with vision
- Heavy reasoning task: Switch to model with thinking capability
- Budget optimization: Use cheap models first, expensive only when needed
- Local models: Use LM Studio when cloud is unavailable
Suggested Implementation
1. Built-in Config
Add model.fallback array to config schema
2. Capability Database
Maintain model capability registry (similar to models.dev)
3. Auto-detection
- Detect 429, 503, rate limit errors
- Query fallback chain in priority order
- Match capability requirements
4. User Tools
smart_model_select(requirements) - programmatic selection
/models - show all with capabilities
- Status bar indicator of current provider
Benefits
- Zero-interruption workflow
- Better reliability for production
- Cost optimization
- Differentiates from competitors
Priority
Medium-High
Alternative: Plugin Approach (Current)
A reference implementation exists as an OpenCode plugin:
- Detection of rate limit errors
- Smart fallback based on capability matching
- Tools for programmatic model selection
References
Feature request by: Community
Feature Request: Smart Model Fallback System
Summary
Implement automatic model fallback when rate limits are hit, with intelligent model selection based on capability requirements.
Problem Statement
Users with multiple LLM providers (Anthropic, OpenAI, Google, DeepSeek, LM Studio) experience workflow interruptions when one provider hits rate limits (429 errors). Currently, manual intervention is required to switch providers.
Proposed Solution
Core Feature: Auto Model Fallback
{ "model": { "primary": "anthropic/claude-sonnet-4-20250514", "fallback": [ "openai/gpt-5", "google/gemini-2-flash", "deepseek/deepseek-coder" ], "onRateLimit": "auto-switch", "retryAttempts": 3 } }Smart Model Selection
Models have varying capabilities. The system should match requirements:
toolsimagereasoningthinkinguncensoredcontextspeedcostUse Cases
Suggested Implementation
1. Built-in Config
Add
model.fallbackarray to config schema2. Capability Database
Maintain model capability registry (similar to models.dev)
3. Auto-detection
4. User Tools
smart_model_select(requirements)- programmatic selection/models- show all with capabilitiesBenefits
Priority
Medium-High
Alternative: Plugin Approach (Current)
A reference implementation exists as an OpenCode plugin:
References
Feature request by: Community