litellm/litellm/router_strategy
Mateo Wang d1640ef64b
refactor(types): type the kwargs reads in the usage-based router strategies, rag, batch completion and the completion bridges (#54679)
* refactor(types): read kwargs through typed narrowing in router strategies, batch completion, rag and bridge handlers

Types the bare kwargs of eight modules as object and narrows each read with the existing core_helpers readers, with no change for valid values, absent keys or wrong-typed values (base and tip probed)

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* refactor(types): keep the sync anthropic messages handler's kwargs untyped

Its forwarded keys reach typed adapter parameters that cannot be narrowed without changing wrong-typed values, so the type-erasing forwarding wrapper is removed and that handler is left as on main

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-26 09:30:07 +00:00
..
adaptive_router fix(anthropic): log the safeguards classifier and compaction summary calls in the parent request's session (#53405) 2026-11-24 01:31:04 -08:00
auto_router refactor(types): annotate repeated bare-container parameters across method families (#54268) 2026-11-24 14:13:19 -08:00
complexity_router fix(router): count pre-call context-window tokens with each deployment's tokenizer (#49764) 2026-11-25 03:04:19 +00:00
quality_router refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
switchyard_router fix(anthropic): log the safeguards classifier and compaction summary calls in the parent request's session (#53405) 2026-11-24 01:31:04 -08:00
base_routing_strategy.py refactor(router): count the whole router_usage family on the native store (#50862) 2026-11-13 03:22:28 +00:00
budget_limiter.py fix(gemini): return an error instead of an empty 200 when a Gemini image request gets no image (#29125) 2026-11-25 20:55:23 +00:00
lar1_routing.py refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00
least_busy.py fix(proxy): reserve least-busy picks on Vertex pass-through calls (#53588) 2026-11-23 04:21:20 +00:00
lowest_cost.py refactor(types): type the kwargs reads in the usage-based router strategies, rag, batch completion and the completion bridges (#54679) 2026-11-26 09:30:07 +00:00
lowest_latency.py refactor(types): type the kwargs reads in the usage-based router strategies, rag, batch completion and the completion bridges (#54679) 2026-11-26 09:30:07 +00:00
lowest_tpm_rpm.py refactor(types): type the kwargs reads in the usage-based router strategies, rag, batch completion and the completion bridges (#54679) 2026-11-26 09:30:07 +00:00
lowest_tpm_rpm_v2.py fix(gemini): return an error instead of an empty 200 when a Gemini image request gets no image (#29125) 2026-11-25 20:55:23 +00:00
savings_baseline.py fix(router): register a model_id Bedrock deployment after an ARN deployment for the same profile (#53461) 2026-11-22 22:27:56 +00:00
simple_shuffle.py refactor(types): replace Unknown with proven types in 245 files (#53774) 2026-11-23 10:05:26 -08:00
tag_based_routing.py refactor(types): replace Unknown with proven types in 390 files (#53715) 2026-11-24 03:33:11 +00:00