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(router): add warning log and cleanup for credential resolution

Milan83c88d5ab102
diff --git a/litellm/router.py b/litellm/router.py
index 52ada36abf8..865e0606488 100644
--- a/litellm/router.py
+++ b/litellm/router.py
@@ -6755,7 +6755,13 @@ class Router:
credential_values = CredentialAccessor.get_credential_values(
deployment.litellm_params.litellm_credential_name
)
+ if not credential_values:
+ verbose_router_logger.warning(
+ f"Credential '{deployment.litellm_params.litellm_credential_name}' not found in credential_list"
+ )
credentials.update(credential_values)
+ # Remove the credential name since we've resolved it
+ credentials.pop("litellm_credential_name", None)
# Add custom_llm_provider
if deployment.litellm_params.custom_llm_provider: