Skip to content

Multiple models

List alternative models under models in settings.json and switch between them mid-session with /model, without restarting.

{
"provider": "openai-compatible",
"model": "qwen2.5-coder",
"baseURL": "http://localhost:11434/v1",
"models": [
{ "provider": "openai-compatible", "model": "qwen3-coder", "label": "Qwen 3 Coder" },
{ "provider": "anthropic", "model": "claude-sonnet-4-5", "label": "Claude Sonnet" }
]
}

Each entry is a complete, independent engine config - its own provider, baseURL, apiKey, and structuredOutput, not just a different model name on the same connection. So the list can mix local Ollama models with a hosted Claude model.

  • label is optional and falls back to the model id.
  • apiKey is optional too: if omitted, it’s resolved from the same environment variable Polyglot would use for that entry’s own provider (ANTHROPIC_API_KEY or POLYGLOT_API_KEY), independent of whichever provider is active at startup.
  • /model - opens an ↑↓ picker of every available model (the current one marked, cursor starting there), including whatever you started the session with even if it isn’t in models[]. Enter switches, Esc cancels.
  • /model <name> - switches directly, no picker. Matches an exact model id first, then a case-insensitive substring of the id or label.

Switching is session-local only - it never rewrites settings.json. Resuming a session later with --resume always starts back on whichever model that session originally began with.

Plan with a strong model, execute with a cheap or local one:

  1. Shift+Tab to plan mode, ask Claude to research and propose a plan.
  2. Approve the plan.
  3. /model qwen to switch to a local model for the mechanical edits.