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]

Add empty-string credential validator to VantageSettingsUpdate

Harshit28j358c2fd03323
diff --git a/litellm/types/proxy/vantage_endpoints.py b/litellm/types/proxy/vantage_endpoints.py
index 86b5a26dbca..cf4f0a6685f 100644
--- a/litellm/types/proxy/vantage_endpoints.py
+++ b/litellm/types/proxy/vantage_endpoints.py
@@ -95,3 +95,10 @@ class VantageSettingsUpdate(BaseModel):
None, description="New Vantage integration token"
)
base_url: Optional[str] = Field(None, description="New Vantage API base URL")
+
+ @field_validator("api_key", "integration_token")
+ @classmethod
+ def must_be_non_empty(cls, v: Optional[str]) -> Optional[str]:
+ if v is not None and not v.strip():
+ raise ValueError("must be a non-empty string")
+ return v