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 RerankResponse make meta optional (#6248)

Ishaan Jaffc390b07e295c
diff --git a/litellm/types/rerank.py b/litellm/types/rerank.py
index b4765c0e6a4..d016021fb82 100644
--- a/litellm/types/rerank.py
+++ b/litellm/types/rerank.py
@@ -22,7 +22,7 @@ class RerankRequest(BaseModel):
class RerankResponse(BaseModel):
id: str
results: List[dict] # Contains index and relevance_score
- meta: dict # Contains api_version and billed_units
+ meta: Optional[dict] = None # Contains api_version and billed_units
# Define private attributes using PrivateAttr
_hidden_params: dict = PrivateAttr(default_factory=dict)