Skip to content

API: allow switching models mid-session #2781

@dgageot

Description

@dgageot

In the TUI, you can swap the model for the current agent at any time through the model picker. Over docker agent serve api that's not possible — there's no endpoint for it.

The plumbing already exists on the runtime side (runtime.SetAgentModel, SupportsModelSwitching, AvailableModels), and App.SetCurrentAgentModel shows how to apply + persist the override. It would just need to be exposed, e.g.:

  • GET /api/sessions/:id/models to list available models
  • PATCH /api/sessions/:id/model to set/clear the override for the current agent

Pairs naturally with #2780.

Metadata

Metadata

Assignees

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