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(proxy): log the model cost map reload failure lazily (#35750)

tin-berri956d5177d1d9
diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py
index e8299be8f07..1aeb8814585 100644
--- a/litellm/proxy/proxy_server.py
+++ b/litellm/proxy/proxy_server.py
@@ -6546,7 +6546,8 @@ class ProxyConfig:
reload_result = await refetch_model_cost_map(url=model_cost_map_url)
if isinstance(reload_result, ModelCostMapReloadUnavailable):
verbose_proxy_logger.warning(
- f"Model cost map reload failed ({reload_result.reason}); keeping current pricing data, will retry on the next config poll"
+ "Model cost map reload failed (%s); keeping current pricing data, will retry on the next config poll",
+ reload_result.reason,
)
return
new_model_cost_map = reload_result.model_cost_map