Build a custom router¶
This workflow is about turning an idea into a router that works with the CLI.
Start from the notebook¶
The most complete, hands-on guide lives in the notebook: - Custom routers (notebook + plugin)
Minimal steps (plugin)¶
- Create a plugin folder:
-
Implement
route_singleandroute_batch(see Routing output contract). -
Verify discovery:
- Run routing:
llmrouter infer --router my_router --config configs/model_config_test/smallest_llm.yaml --query "Hello" --route-only
Next¶
- Plugin discovery rules: Plugin system