Chat Pipeline
Last updated 14 Jun 2026The four stages
- Mode — what surface you are on (Chat, Code, Canvas, Realtime, etc.). The Mode declares which capabilities it needs.
- Capability set — derived from Mode (e.g., Chat needs text + vision + tools). You can override per message via the model picker.
- AiModel filter — we list all models in our catalog that support every required capability under your subscription tier and any BYOK constraints you have set.
- Price rank — among eligible models the cheapest by current AiModelPricing snapshot wins. You can override to Quality-first if your plan supports it.
What this means for routing
You never pick a model by name unless you want to — the system picks for you based on what your conversation requires. When provider prices change, your routing changes automatically; you do not need to update anything. The BillingRecord captures which model actually served the call so audit remains correct.
Capabilities at a glance
text generation, vision (image input), tool use (function calling), structured output, code execution (sandbox), image generation, audio in (STT), audio out (TTS), video generation, embeddings, reranking, search, reasoning, batch, fine-tuning, realtime, voice cloning.
See /docs/doc-api-reference#capabilities for the full enum.