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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
linting
yuneng-jiang33ac5dae2b41
diff --git a/litellm/proxy/management_endpoints/key_management_endpoints.py b/litellm/proxy/management_endpoints/key_management_endpoints.pyindex 666de0745c6..39b6774a61c 100644--- a/litellm/proxy/management_endpoints/key_management_endpoints.py+++ b/litellm/proxy/management_endpoints/key_management_endpoints.py@@ -2234,7 +2234,7 @@ async def generate_key_helper_fn( # noqa: PLR0915saved_token["model_max_budget"] = json.loads(saved_token["model_max_budget"])- router_settings = saved_token.get("router_settings")+ router_settings = cast(Optional[dict], saved_token.get("router_settings"))if router_settings is not None and isinstance(router_settings, str):try:saved_token["router_settings"] = yaml.safe_load(router_settings)