AI

AI Router

DirectRouter scores every task for complexity, picks the cheapest model that clears the bar, and falls back in order when a provider degrades.


How auto-routing works

With Model: auto, the router runs four pure, unit-tested steps:

  1. Classify complexity from the prompt — length plus “hard task” vocabulary (analyze, refactor, prove, trade-offs…) — unless you set the complexity hint explicitly.
  2. Map complexity to a required tier: low → 1, medium → 2, high → 3.
  3. Apply your constraints: privacy: local keeps only Ollama; a budget cap drops models above the given $/MTok output price.
  4. Pick the cheapest model that meets the required tier, and queue the rest of the pool as fallbacks, strongest first.

chat() walks that chain on provider errors and returns the text, token usage and the computed USD cost — the costUsd you see on every AI node output and in the Operations Center.

Cost within a tier, not brand prestige

The consequence to understand: auto mode optimizes cost within a capability tier. With DeepSeek configured, most high-complexity traffic routes to DeepSeek Reasoner at roughly 2% of Claude Opus pricing, with the Western flagships as fallbacks.

Fallbacks are free insurance

Configure at least two providers. When one rate-limits or has an outage, the router silently retries down the chain instead of failing the workflow — an execution degrades to a slightly different model rather than to an error. Fallback events surface in the Operations Center.

Supported providers

Anthropic, OpenAI, Google Gemini, DeepSeek, xAI Grok, OpenRouter, Azure OpenAI, AWS Bedrock (Anthropic models), self-hosted vLLM and local Ollama. A provider takes part in routing once the workspace has a key for it — see the Model guide for every model, its tier and its price.