BerriAI/litellm · error · HTTPException
prisma_client is required for service account keys. Please s
Error message
prisma_client is required for service account keys. Please specify `prisma_client` in the request body.
What it means
Error "prisma_client is required for service account keys. Please specify `prisma_client` in the request body." thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/management_endpoints/key_management_endpoints.py:762
},
)
async def validate_team_id_used_in_service_account_request(
team_id: str | None,
prisma_client: PrismaClient | None,
):
"""
Validate team_id is used in the request body for generating a service account key
"""
if team_id is None:
raise HTTPException(
status_code=400,
detail="team_id is required for service account keys. Please specify `team_id` in the request body.",
)
if prisma_client is None:
raise HTTPException(
status_code=400,
detail="prisma_client is required for service account keys. Please specify `prisma_client` in the request body.",
)
# check if team_id exists in the database
team: Final = await _prisma_table(TeamRepository(prisma_client)).find_unique(
where={"team_id": team_id},
)
if team is None:
raise HTTPException(
status_code=400,
detail="team_id does not exist in the database. Please specify a valid `team_id` in the request body.",
)
return True
_BUDGET_NUMERIC_KEYS = frozenset(["max_budget", "soft_budget", "max_parallel_requests", "tpm_limit", "rpm_limit"])
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Ensure the proxy is connected to a database (set DATABASE_URL) before creating service account keys.
- Restart the proxy after configuring the database connection.
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/key_management_endpoints.py:762 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/4e7a4f73f8f87280.
Report an issue: GitHub.