mirror of
https://github.com/tiennm99/litellm.git
synced 2026-06-27 13:05:45 +00:00
3f4a9d8d08
Invalid routing_strategy values (e.g., "simple" instead of "simple-shuffle") previously failed silently, causing confusing "No deployments available" errors downstream. This change adds upfront validation in routing_strategy_init() to: - Check if the provided strategy matches valid string values or RoutingStrategy enum - Raise a clear ValueError listing valid options if invalid - Fail fast at startup instead of at request time Fixes behavior reported in #11330 where users had to debug cryptic errors. Valid strategies: simple-shuffle, least-busy, usage-based-routing, latency-based-routing, cost-based-routing, usage-based-routing-v2 Co-authored-by: Flibbert E. Gibbitz <flibbertygibbitz@runelabs.ai>
Router component unit tests.
Please name all files with the word 'router' in them.
This is used to ensure all functions in the router are tested.