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(litellm_logging.py): add stricter check for special param being non none

Krrish Dholakiaa7578e9f2cf0
diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py
index c81b1b123d3..7e7cb506feb 100644
--- a/litellm/litellm_core_utils/litellm_logging.py
+++ b/litellm/litellm_core_utils/litellm_logging.py
@@ -2157,7 +2157,7 @@ def use_custom_pricing_for_model(litellm_params: Optional[dict]) -> bool:
if litellm_params is None:
return False
for k, v in litellm_params.items():
- if k in SPECIAL_MODEL_INFO_PARAMS:
+ if k in SPECIAL_MODEL_INFO_PARAMS and v is not None:
return True
metadata: Optional[dict] = litellm_params.get("metadata", {})
if metadata is None: