mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
parent
212cd0e4aa
commit
358c2fd033
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue