Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

_update_kwargs_with_default_litellm_params

Ishaan Jaffbcf8ecc9fc6e
diff --git a/litellm/router.py b/litellm/router.py
index aeaabac60dc..54f51e760a9 100644
--- a/litellm/router.py
+++ b/litellm/router.py
@@ -1093,7 +1093,7 @@ class Router:
Adds default litellm params to kwargs, if set.
"""
self.default_litellm_params[metadata_variable_name] = (
- self.default_litellm_params.pop("metadata")
+ self.default_litellm_params.pop("metadata", {})
)
for k, v in self.default_litellm_params.items():
if (