docs: add integration tests and documentation for config override system

This commit is contained in:
2025-11-01 17:21:54 -04:00
parent 2d47bd7a3a
commit 80b22232ad
3 changed files with 178 additions and 5 deletions

View File

@@ -729,6 +729,29 @@ Server loads model definitions from configuration file (default: `configs/defaul
- `openai_base_url` - Optional custom API endpoint
- `openai_api_key` - Optional model-specific API key
### Configuration Override System
**Default config:** `/app/configs/default_config.json` (baked into image)
**Custom config:** `/app/user-configs/config.json` (optional, via volume mount)
**Merge behavior:**
- Custom config sections completely replace default sections (root-level merge)
- If no custom config exists, defaults are used
- Validation occurs at container startup (before API starts)
- Invalid config causes immediate exit with detailed error message
**Example custom config** (overrides models only):
```json
{
"models": [
{"name": "gpt-5", "basemodel": "openai/gpt-5", "signature": "gpt-5", "enabled": true}
]
}
```
All other sections (`agent_config`, `log_config`, etc.) inherited from default.
---
## OpenAPI / Swagger Documentation