Skip to content

Model Routing

Yohn Gutierrez edited this page Jun 17, 2026 · 1 revision

Model Routing

Jarvis routes each role to a backend:model, and exposes only the controls that model actually supports. One resolver (jarvis/adapters/llm.py) is the source of truth for both the dashboard chips and what gets sent to the provider, so the UI never shows a knob the backend can't honor.

Backends

Backend Kind How it's reached
claude CLI claude -p --model … (subscription or API key)
codex CLI codex exec --model …
ollama CLI local ollama
OpenAI-compatible HTTP {http: ".../chat/completions", api_key_env: …} (Ollama Cloud, OpenAI, OpenRouter, …)
Anthropic HTTP {http: "https://api.anthropic.com/v1/messages", format: anthropic, api_key_env: ANTHROPIC_API_KEY}

A backend is either a CLI template (a list, with {model}/{prompt}) or an HTTP endpoint (a dict).

Reasoning control (effort vs thinking)

The control and its valid options depend on the backend:

Backend Control Options
Claude CLI --effort low, medium, high, xhigh, max
Codex CLI / OpenAI HTTP reasoning_effort minimal, low, medium, high
Ollama (thinking-capable models) reasoning_effort low, medium, high
Anthropic HTTP thinking budget low, medium, high, max

Set it per role under llm.params.<role> (e.g. {effort: high}) or from the chatbox chip / Settings → Brain & Models. Ollama models that don't advertise a thinking capability simply show no control.

Context window

Most models have a single fixed window (shown as a badge). Two are selectable:

  • Claude sonnet / opus / fable200K or 1M. 1M routes to the model's [1m] variant (e.g. claude-sonnet-4-6[1m]) and requires usage credits on the account. The default stays 200K; if 1M is selected without credits, the turn gracefully falls back to standard 200K instead of erroring. (haiku has no 1M variant.)
  • Ollama → any size up to the model's max, applied as options.num_ctx.

Pick it from the chatbox ctx chip (orchestrator) or per role in Settings; store it as llm.params.<role>.context: <int>. Autocompaction sizes long conversations to the chosen window.

Example

llm:
  routing:
    orchestrator: claude:claude-sonnet-4-6
    triage:       ollama_cloud:deepseek-v4-pro
    fixer:        codex:gpt-5.5
  params:
    orchestrator: {effort: high, context: 1000000}   # Claude 1M (needs usage credits)
    triage:       {effort: low,  context: 131072}     # Ollama num_ctx 128K
    fixer:        {effort: high}

No API key needed for the CLI backends (they use your subscription); only the HTTP backends read a key from .env. See Configuration and MCP.

Clone this wiki locally