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]

fix(utils.py): fix updating hidden params

Krrish Dholakia5fbcdd8b11fd
diff --git a/litellm/utils.py b/litellm/utils.py
index b1f5a25ba27..23d2738187a 100644
--- a/litellm/utils.py
+++ b/litellm/utils.py
@@ -5911,7 +5911,9 @@ def convert_to_model_response_object(
).total_seconds() * 1000
if hidden_params is not None:
- model_response_object._hidden_params = hidden_params
+ if model_response_object._hidden_params is None:
+ model_response_object._hidden_params = {}
+ model_response_object._hidden_params.update(hidden_params)
if _response_headers is not None:
model_response_object._response_headers = _response_headers