A ready-to-run example is available here!
Using the built-in MultimodalRouter
Define the built-in rule-basedMultimodalRouter that will route text-only requests to a secondary LLM and multimodal requests (with images) to the primary, multimodal-capable LLM:
Router class. See the base class for details.
Ready-to-run Example
This example is available on GitHub: examples/01_standalone_sdk/19_llm_routing.py
examples/01_standalone_sdk/19_llm_routing.py
The model name should follow the LiteLLM convention:
provider/model_name (e.g., anthropic/claude-sonnet-4-5-20250929, openai/gpt-4o).
The LLM_API_KEY should be the API key for your chosen provider.Next Steps
- LLM Registry - Manage multiple LLM configurations
- LLM Metrics - Track token usage and costs

