Prerequisites
Problem Description
Problem Description
Currently, each Agent in oh-my-opencode is bound to a single specific model configuration.
I often encounter situations where the primary high-performance model (e.g., Claude-3.5-Opus) hits rate limits (429) or runs out of quota/credits during a task. When this happens, the Agent stops working, and I have to manually edit the configuration file to switch to a cheaper or available model, which interrupts the workflow.
Use Case Example:
I want to configure my Agent "Sisyphus" with a primary model and a backup model.
- Primary:
Claude-Opus-4.5 (for high-quality reasoning).
- Backup:
Gemini-3-Pro (for fallback).
If the primary model fails (due to insufficient quota or rate limits), I want the system to handle it gracefully.
Proposed Solution
I suggest adding support for Multiple Models or a Fallback Mechanism for a single Agent.
Feature details:
- Configuration: Allow the
model field to accept an array of models, or add a new fallback_models field.
- Auto-Switching: If the current model returns a specific error (e.g., Quota Exceeded, Rate Limit, or API Error), automatically retry the request using the next model in the list.
- Manual Switching: Alternatively, allow users to quickly toggle between pre-configured models for the current Agent in the UI without modifying the config file.
Mockup of potential config:
{
"agent": "Sisyphus",
"models": [
{
"name": "claude-opus-4.5",
"priority": 1
},
{
"name": "gemini-3-pro",
"priority": 2
}
],
"strategy": "fallback" // or "manual"
}
Alternatives Considered
Manually changing the config file every time a model runs out of credits.
Additional Context
This feature would be extremely useful for users managing costs or relying on unstable API providers.
### Proposed Solution
I suggest adding support for **Multiple Models** or a **Fallback Mechanism** for a single Agent.
**Feature details:**
1. **Configuration:** Allow the `model` field to accept an array of models, or add a new `fallback_models` field.
2. **Auto-Switching:** If the primary model returns a specific error (e.g., Quota Exceeded, Rate Limit, or API Error), automatically retry the request using the next model in the list.
3. **Manual Switching:** Alternatively, allow users to quickly toggle between pre-configured models for the current Agent in the UI without modifying the config file.
**Mockup of potential config:**
```json
{
"agent": "Sisyphus",
"models": [
{
"name": "claude-opus-4.5",
"priority": 1
},
{
"name": "gemini-3-pro",
"priority": 2
}
],
"strategy": "fallback" // or "manual"
}
### Alternatives Considered
_No response_
### Doctor Output (Optional)
```shell
Additional Context
No response
Feature Type
New Agent
Contribution
Prerequisites
Problem Description
Problem Description
Currently, each Agent in
oh-my-opencodeis bound to a single specific model configuration.I often encounter situations where the primary high-performance model (e.g., Claude-3.5-Opus) hits rate limits (429) or runs out of quota/credits during a task. When this happens, the Agent stops working, and I have to manually edit the configuration file to switch to a cheaper or available model, which interrupts the workflow.
Use Case Example:
I want to configure my Agent "Sisyphus" with a primary model and a backup model.
Claude-Opus-4.5(for high-quality reasoning).Gemini-3-Pro(for fallback).If the primary model fails (due to insufficient quota or rate limits), I want the system to handle it gracefully.
Proposed Solution
I suggest adding support for Multiple Models or a Fallback Mechanism for a single Agent.
Feature details:
modelfield to accept an array of models, or add a newfallback_modelsfield.Mockup of potential config:
{ "agent": "Sisyphus", "models": [ { "name": "claude-opus-4.5", "priority": 1 }, { "name": "gemini-3-pro", "priority": 2 } ], "strategy": "fallback" // or "manual" } Alternatives Considered Manually changing the config file every time a model runs out of credits. Additional Context This feature would be extremely useful for users managing costs or relying on unstable API providers. ### Proposed Solution I suggest adding support for **Multiple Models** or a **Fallback Mechanism** for a single Agent. **Feature details:** 1. **Configuration:** Allow the `model` field to accept an array of models, or add a new `fallback_models` field. 2. **Auto-Switching:** If the primary model returns a specific error (e.g., Quota Exceeded, Rate Limit, or API Error), automatically retry the request using the next model in the list. 3. **Manual Switching:** Alternatively, allow users to quickly toggle between pre-configured models for the current Agent in the UI without modifying the config file. **Mockup of potential config:** ```json { "agent": "Sisyphus", "models": [ { "name": "claude-opus-4.5", "priority": 1 }, { "name": "gemini-3-pro", "priority": 2 } ], "strategy": "fallback" // or "manual" } ### Alternatives Considered _No response_ ### Doctor Output (Optional) ```shellAdditional Context
No response
Feature Type
New Agent
Contribution