Routing with Virtual Model
Manage routing strategies easily in LangDB AI Gateway’s UI to boost efficiency, speed, and reliability in AI workflows.
Last updated
Was this helpful?
Manage routing strategies easily in LangDB AI Gateway’s UI to boost efficiency, speed, and reliability in AI workflows.
Last updated
Was this helpful?
In LangDB AI Gatewau, any virtual model can act as a router. Just define a strategy and list of target models—it’ll route requests based on metrics like cost, latency, percentage, er or custom rules.
Setting up routing in a virtual model is straightforward:
Open any virtual model in the Chat Playground and click Show Config
Choose a routing strategy (like fallback
, optimized
, percentage
, etc.)
Add your target models—each one can be configured just like the virtual models you set up in the previous section
Each target defines:
Which model to use
Prompt
MCP Servers
Guardrails
Response Format
Custom parameters like temperature, max_tokens, penalties, etc.
All routing options are available directly in the virtual model config panel.
Check more about the Routing Strategies.