Skip to main content
This feature is under active development and more default routers will be available in future releases.
This example is available on GitHub: examples/01_standalone_sdk/19_llm_routing.py
Automatically route requests to different LLMs based on task characteristics to optimize cost and performance:
examples/01_standalone_sdk/19_llm_routing.py
Running the Example

Using the built-in MultimodalRouter

Define the built-in rule-based MultimodalRouter that will route text-only requests to a secondary LLM and multimodal requests (with images) to the primary, multimodal-capable LLM:
You may define your own router by extending the Router class. See the base class for details.

Next Steps