Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix(proxy): use prisma.Json for JSON fields in _rotate_master_key create_many

Julio Quinteros Pro392bbf35b70e
diff --git a/litellm/proxy/management_endpoints/key_management_endpoints.py b/litellm/proxy/management_endpoints/key_management_endpoints.py
index 942a4f98a64..007e558cffc 100644
--- a/litellm/proxy/management_endpoints/key_management_endpoints.py
+++ b/litellm/proxy/management_endpoints/key_management_endpoints.py
@@ -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: