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: exclude team_id from Prisma create payload in _prepare_mcp_server_data

yuneng-jiangf4e5fb2b4ae4
diff --git a/litellm/proxy/_experimental/mcp_server/db.py b/litellm/proxy/_experimental/mcp_server/db.py
index fbef33c32ed..0bc102889bc 100644
--- a/litellm/proxy/_experimental/mcp_server/db.py
+++ b/litellm/proxy/_experimental/mcp_server/db.py
@@ -40,8 +40,8 @@ def _prepare_mcp_server_data(
"""
from litellm.litellm_core_utils.safe_json_dumps import safe_dumps
- # Convert model to dict
- data_dict = data.model_dump(exclude_none=True)
+ # Convert model to dict, excluding fields not in the DB schema
+ data_dict = data.model_dump(exclude_none=True, exclude={"team_id"})
# Ensure alias is always present in the dict (even if None)
if "alias" not in data_dict:
data_dict["alias"] = getattr(data, "alias", None)