docs/guides/configure-model-fallback.md
Model fallback lets nanobot try a primary model first, then fall back to one or more named presets when the primary provider fails or rate-limits.
modelPresetsagents.defaults.modelPresetagents.defaults.fallbackModels chainUse fallback when you want better reliability across rate limits, provider outages, local model downtime, or cost-sensitive routing.
python -m pip install nanobot-ai
nanobot onboard --wizard
nanobot agent -m "Hello!"
Verify each provider works before adding it as a fallback.
Merge this shape into ~/.nanobot/config.json and replace provider/model names
with ones you control:
{
"modelPresets": {
"fast": {
"label": "Fast",
"provider": "primary-provider",
"model": "primary-model-id",
"maxTokens": 4096,
"contextWindowTokens": 65536,
"temperature": 0.1
},
"deep": {
"label": "Deep",
"provider": "fallback-provider",
"model": "fallback-model-id",
"maxTokens": 4096,
"contextWindowTokens": 200000,
"temperature": 0.1
}
},
"agents": {
"defaults": {
"modelPreset": "fast",
"fallbackModels": ["deep"]
}
}
}
String entries in fallbackModels are preset names, not raw model IDs.
Replace the placeholder model IDs with currently supported model IDs from your
provider. The Provider Cookbook has concrete recipes
for common providers.
/model <preset> for runtime switching without editing config.modelPresets.maxTokens and
contextWindowTokens.