chore(router): mark in-place kwargs update

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
yassin 2026-10-03 22:43:19 +00:00
parent 1fb883afb5
commit 089770a178

View file

@ -4039,7 +4039,7 @@ class Router:
other_bucket: Final = "metadata" if metadata_variable_name == "litellm_metadata" else "litellm_metadata"
other_bucket_metadata: Final = kwargs.get(other_bucket)
if isinstance(other_bucket_metadata, Mapping) and KUBERNETES_POD_ROUTING_KEY in other_bucket_metadata:
kwargs[other_bucket] = {
kwargs[other_bucket] = { # rebind-ok: this method updates the router's request kwargs in place
**other_bucket_metadata,
KUBERNETES_POD_ROUTING_KEY: routing,
}