Merge pull request #21479 from BerriAI/fix/prisma-json-create-many

fix(proxy): use prisma.Json for JSON fields in _rotate_master_key create_many()
This commit is contained in:
jquinter 2026-02-18 11:45:36 -03:00 • committed by GitHub
commit 2395734a84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3096,8 +3096,8 @@ async def _rotate_master_key( # noqa: PLR0915
)
if new_model:
_dumped = new_model.model_dump(exclude_none=True)
_dumped["litellm_params"] = safe_dumps(_dumped["litellm_params"])
_dumped["model_info"] = safe_dumps(_dumped["model_info"])
_dumped["litellm_params"] = prisma.Json(_dumped["litellm_params"]) # type: ignore[attr-defined]
_dumped["model_info"] = prisma.Json(_dumped["model_info"]) # type: ignore[attr-defined]
new_models.append(_dumped)
verbose_proxy_logger.debug("Resetting proxy model table")
async with prisma_client.db.tx() as tx: