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
Warning fix for Pydantic 2.0 (#5679) (#5707)
Ishaan Jaff3a5039e284ad
diff --git a/litellm/rerank_api/types.py b/litellm/rerank_api/types.pyindex dae79f87533..b4765c0e6a4 100644--- a/litellm/rerank_api/types.py+++ b/litellm/rerank_api/types.py@@ -6,7 +6,7 @@ https://docs.cohere.com/reference/rerankfrom typing import List, Optional, Union-from pydantic import BaseModel+from pydantic import BaseModel, PrivateAttrclass RerankRequest(BaseModel):@@ -23,7 +23,9 @@ class RerankResponse(BaseModel):id: strresults: List[dict] # Contains index and relevance_scoremeta: dict # Contains api_version and billed_units- _hidden_params: dict = {}++ # Define private attributes using PrivateAttr+ _hidden_params: dict = PrivateAttr(default_factory=dict)def __getitem__(self, key):return self.__dict__[key]