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
add types for BedrockMessage
Ishaan Jaff14a6ce367d2d
diff --git a/litellm/types/guardrails.py b/litellm/types/guardrails.pyindex 66c2a535ad6..13992beec58 100644--- a/litellm/types/guardrails.py+++ b/litellm/types/guardrails.py@@ -1,5 +1,5 @@from enum import Enum-from typing import Dict, List, Optional, TypedDict+from typing import Dict, List, Literal, Optional, TypedDictfrom pydantic import BaseModel, ConfigDictfrom typing_extensions import Required, TypedDict@@ -76,8 +76,14 @@ class LitellmParams(TypedDict, total=False):mode: strapi_key: strapi_base: Optional[str]++ # Lakera specific paramscategory_thresholds: Optional[LakeraCategoryThresholds]+ # Bedrock specific params+ guardrailIdentifier: Optional[str]+ guardrailVersion: Optional[str]+class Guardrail(TypedDict):guardrail_name: str@@ -92,3 +98,16 @@ class GuardrailEventHooks(str, Enum):pre_call = "pre_call"post_call = "post_call"during_call = "during_call"+++class BedrockTextContent(TypedDict):+ text: str+++class BedrockContentItem(TypedDict):+ text: BedrockTextContent+++class BedrockMessage(TypedDict):+ source: Literal["INPUT", "OUTPUT"]+ content: List[BedrockContentItem]