litellm/litellm/completion_extras
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
..
litellm_responses_transformation 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
__init__.py
README.md

Logic specific for litellm.completion.

Includes:

  • Bridge for transforming completion requests to responses api requests