AI coding glossary
Model Router
Also known as: llm router, ai model router
In one sentence
A layer that picks the right LLM for each request, cheap model for simple tasks, frontier model for hard ones, based on prompt complexity, latency budget, or cost target.
Full definition
A model router is the layer that decides which LLM to call for a given request. Simple routers: heuristic rules (short prompt → cheap model). Sophisticated routers: a small classifier model that predicts whether the task needs a frontier model. The practical wins in 2026: routing inline-completion to Gemini 3.5 Flash or Codex completion models (sub-300ms), routing agentic tasks to Opus 4.7 / GPT-5.5 (highest quality), and falling back to cheap models on rate-limit errors. Tools that ship model routing: Cursor (default model selector + fallback), OpenRouter (cross-provider router), Continue.dev's request types, and Antigravity 2.0's Gemini 3.5 Flash / Pro split for inline vs agent.