Problem
The default chat model is hardcoded to sonnet (Sonnet 4.5) in docker/base-image/agent_server/services/claude_code.py:59:
def get_default_model(self) -> str:
"""Get default Claude model."""
return "sonnet" # Claude Sonnet 4.5
Meanwhile, the frontend ModelSelector.vue labels Opus 4.5 as "Default — most capable", creating a mismatch between what the UI suggests is the default and what actually runs.
Expected Behavior
- The backend default model should match what the UI advertises as default, or
- The default should be configurable at the platform level (not just per-agent)
Suggested Fix
- Add a platform-level setting for the default chat model (e.g., in Settings or a config file)
- Update
get_default_model() to read from that setting, falling back to a sensible default
- Align the frontend
ModelSelector "Default" label with the actual backend default
Current Model Selection Priority
- Per-request
model field in chat payload
- Session-level state (set via
PUT /api/agents/{name}/model)
- Environment variable (
AGENT_RUNTIME_MODEL or CLAUDE_MODEL)
- Hardcoded default (
sonnet)
Files Involved
docker/base-image/agent_server/services/claude_code.py — get_default_model()
src/frontend/src/components/ModelSelector.vue — preset list and "Default" label
docker/base-image/agent_server/state.py — current_model initialization
Problem
The default chat model is hardcoded to
sonnet(Sonnet 4.5) indocker/base-image/agent_server/services/claude_code.py:59:Meanwhile, the frontend
ModelSelector.vuelabels Opus 4.5 as"Default — most capable", creating a mismatch between what the UI suggests is the default and what actually runs.Expected Behavior
Suggested Fix
get_default_model()to read from that setting, falling back to a sensible defaultModelSelector"Default" label with the actual backend defaultCurrent Model Selection Priority
modelfield in chat payloadPUT /api/agents/{name}/model)AGENT_RUNTIME_MODELorCLAUDE_MODEL)sonnet)Files Involved
docker/base-image/agent_server/services/claude_code.py—get_default_model()src/frontend/src/components/ModelSelector.vue— preset list and "Default" labeldocker/base-image/agent_server/state.py—current_modelinitialization