fix: add created_at/updated_at fields to LiteLLM_ProxyModelTable (#18937)

The Pydantic model was missing these timestamp fields that exist in the
Prisma schema. This caused the UI to display "Unknown date" for models
added via the dashboard, even though the data was being stored in the DB.

The fields were being read in get_model_info_with_id() using getattr(),
but since they weren't defined in the Pydantic model, getattr() always
returned None.

Fixes #15487
This commit is contained in:
Rayan Pal 2026-01-12 02:51:35 -08:00 committed by GitHub
parent dd299c93c2
commit ec25e16784
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -993,7 +993,9 @@ class LiteLLM_ProxyModelTable(LiteLLMPydanticObjectBase):
model_name: str
litellm_params: dict
model_info: dict
created_at: Optional[datetime] = None
created_by: str
updated_at: Optional[datetime] = None
updated_by: str
@model_validator(mode="before")