From 358c2fd033231c31ebc2416943c240999e80aaab Mon Sep 17 00:00:00 2001 From: Harshit28j Date: Wed, 11 Mar 2026 17:41:23 +0530 Subject: [PATCH] Add empty-string credential validator to VantageSettingsUpdate Matches the existing validator on VantageInitRequest so that empty or whitespace-only api_key/integration_token values are rejected at update time rather than silently persisted and failing at the next export. Co-Authored-By: Claude Opus 4.6 --- litellm/types/proxy/vantage_endpoints.py | 7 +++++++ 1 file changed, 7 insertions(+) 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