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
fix(utils.py): fix types
Krrish Dholakia834b437eb4fc
diff --git a/litellm/proxy/_new_secret_config.yaml b/litellm/proxy/_new_secret_config.yamlindex eff98ae672e..6df2e0825c2 100644--- a/litellm/proxy/_new_secret_config.yaml+++ b/litellm/proxy/_new_secret_config.yaml@@ -1,4 +1,10 @@model_list:- model_name: "*"litellm_params:- model: "*"\ No newline at end of file+ model: "*"++litellm_settings:+ guardrails:+ - prompt_injection: # your custom name for guardrail+ callbacks: [lakera_prompt_injection] # litellm callbacks to use+ default_on: true # will run on all llm requests when true\ No newline at end of filediff --git a/litellm/types/utils.py b/litellm/types/utils.pyindex 7f734482cf7..1a05c1d2a0f 100644--- a/litellm/types/utils.py+++ b/litellm/types/utils.py@@ -2,7 +2,7 @@ import jsonimport timeimport uuidfrom enum import Enum-from typing import Dict, List, Literal, Optional, Tuple, Union+from typing import Any, Dict, List, Literal, Optional, Tuple, Unionfrom openai._models import BaseModel as OpenAIObjectfrom pydantic import ConfigDict, Field, PrivateAttr@@ -219,7 +219,7 @@ class ChatCompletionDeltaToolCall(OpenAIObject):class HiddenParams(OpenAIObject):- original_response: Optional[str] = None+ original_response: Optional[Union[str, Any]] = Nonemodel_id: Optional[str] = None # used in Router for individual deploymentsapi_base: Optional[str] = None # returns api base used for making completion call