Skip to content

Update default chat model from sonnet to a configurable default #77

@vybe

Description

@vybe

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

  1. Add a platform-level setting for the default chat model (e.g., in Settings or a config file)
  2. Update get_default_model() to read from that setting, falling back to a sensible default
  3. Align the frontend ModelSelector "Default" label with the actual backend default

Current Model Selection Priority

  1. Per-request model field in chat payload
  2. Session-level state (set via PUT /api/agents/{name}/model)
  3. Environment variable (AGENT_RUNTIME_MODEL or CLAUDE_MODEL)
  4. Hardcoded default (sonnet)

Files Involved

  • docker/base-image/agent_server/services/claude_code.pyget_default_model()
  • src/frontend/src/components/ModelSelector.vue — preset list and "Default" label
  • docker/base-image/agent_server/state.pycurrent_model initialization

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions