mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-16 23:41:43 +00:00
managed agents: add pfp_url to AgentCreate/Out and AgentUpdate
AgentCreate accepts an optional pfp_url; AgentOut surfaces it on read.
New AgentUpdate model is the body shape for PATCH /agents/{id} —
extra='forbid' so unknown fields 422 instead of being silently
ignored. Both 'name' and 'pfp_url' use empty-string-as-clear semantics
(null/absent = no-op).
This commit is contained in:
parent
8855bb7da4
commit
7ec15bd008
1 changed files with 13 additions and 0 deletions
|
|
@ -80,6 +80,18 @@ class AgentCreate(BaseModel):
|
|||
branch: Optional[str] = None
|
||||
litellm_api_key: Optional[str] = None
|
||||
litellm_api_base: Optional[str] = None
|
||||
pfp_url: Optional[str] = None
|
||||
|
||||
|
||||
class AgentUpdate(BaseModel):
|
||||
"""Partial update — every field is optional. Only provided fields are
|
||||
written. Setting a string field to "" clears it; null is treated as
|
||||
no-op (field absent in the request)."""
|
||||
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
|
||||
name: Optional[str] = None
|
||||
pfp_url: Optional[str] = None
|
||||
|
||||
|
||||
class AgentOut(BaseModel):
|
||||
|
|
@ -90,6 +102,7 @@ class AgentOut(BaseModel):
|
|||
model: str
|
||||
template_id: str
|
||||
branch: str
|
||||
pfp_url: Optional[str] = None
|
||||
created_at: Optional[datetime] = None
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue