Appearance
Model gateway
Every model request on the platform goes through a single gateway, LiteLLM. Agents and chat interfaces speak one interface; the gateway decides which model serves the request. That decision can favour local inference for private or latency-sensitive work and a hosted model when the task needs its capability, and it can change without touching the code that asks.
Routing targets
| Route | Models | When it is used |
|---|---|---|
| Local AI server | Qwen models and llama.cpp serving | Private, local-first and high-volume work |
| OpenRouter | Broad catalogue behind one API | Access to models not served locally |
| OpenAI | Reasoning and language models | Tasks that benefit from those models |
| Gemini | Multimodal and language models | Multimodal input and related tasks |
| Anthropic | Language models for careful agent work | Agent interactions that need a steady, cautious style |
Local helpers, including a self-hosted extraction service, sit beside the model route where they serve the same private-first goal.
Why a gateway
- Callers use one interface, so a provider change is a configuration change.
- Provider credentials live in the gateway, not in each agent or front end.
- Routing and usage can be observed in one place, which supports cost and quality review.
- Fallback between routes becomes possible without changing application logic.
Routing policy
- Local inference is the default for private material and for high-volume, low-stakes steps.
- Hosted models are chosen when quality, modality or availability requires them.
- Model choice is a deployment setting reviewed in the same plan as the rest of the runtime.
Related pages
Design decisions
- Local first, hosted by exception. This keeps sensitive content on owned hardware and controls per-request cost.
- Gateway over SDK sprawl. One client surface beats a separate integration for each provider.
- Model as configuration. Swapping a model should never require a new release of the agent.
- Explicit route names. Naming the provider and model in configuration makes behaviour auditable.
- Trade-off accepted. The gateway is an extra hop and a critical dependency, so it is monitored and kept simple.