fix(models): preserve preset rename compatibility

This commit is contained in:
Xubin Ren
2026-08-16 11:50:56 +08:00
parent a956fe1d60
commit 0a6ee1c539
20 changed files with 307 additions and 46 deletions
+5 -7
View File
@@ -32,16 +32,14 @@ with ones you control:
```json
{
"modelPresets": {
"fast": {
"label": "Fast",
"Fast": {
"provider": "primary-provider",
"model": "primary-model-id",
"maxTokens": 4096,
"contextWindowTokens": 65536,
"temperature": 0.1
},
"deep": {
"label": "Deep",
"Deep": {
"provider": "fallback-provider",
"model": "fallback-model-id",
"maxTokens": 4096,
@@ -51,8 +49,8 @@ with ones you control:
},
"agents": {
"defaults": {
"modelPreset": "fast",
"fallbackModels": ["deep"]
"modelPreset": "Fast",
"fallbackModels": ["Deep"]
}
}
}
@@ -69,7 +67,7 @@ for common providers.
how much context can fit.
- Put cheaper or faster fallbacks before expensive ones when acceptable.
- Use `/model <preset>` for runtime switching without editing config.
- Keep labels human-readable for WebUI model lists.
- Keep preset names human-readable; the same name appears in the WebUI and `/model`.
## Security notes
+2 -3
View File
@@ -179,8 +179,7 @@ Merge this preset into `~/.nanobot/config.json` and select it:
}
},
"modelPresets": {
"ollamaPrefixStable": {
"label": "Ollama Llama 3.1 prefix-stable",
"Ollama Llama 3.1 prefix-stable": {
"provider": "ollama",
"model": "llama3.1:8b-prefix-stable-v1",
"maxTokens": 2048,
@@ -190,7 +189,7 @@ Merge this preset into `~/.nanobot/config.json` and select it:
},
"agents": {
"defaults": {
"modelPreset": "ollamaPrefixStable"
"modelPreset": "Ollama Llama 3.1 prefix-stable"
}
}
}
@@ -41,8 +41,7 @@ Merge this into `~/.nanobot/config.json`:
}
},
"modelPresets": {
"primary": {
"label": "Custom",
"Custom": {
"provider": "custom",
"model": "provider-model-name",
"maxTokens": 4096,
@@ -52,7 +51,7 @@ Merge this into `~/.nanobot/config.json`:
},
"agents": {
"defaults": {
"modelPreset": "primary"
"modelPreset": "Custom"
}
}
}