BerriAI/litellm · error · HTTPException
Deployment with model_id '{model_id}' not found in Database.
Error message
Deployment with model_id '{model_id}' not found in Database. What it means
Lookup guard in _find_deployment_or_400: no DB row matches the given model_id, so the specific deployment cannot be tagged with the access group. Fired when model_ids targeting references a deleted or mistyped deployment.
Source
Thrown at litellm/proxy/management_endpoints/model_access_group_management_endpoints.py:252
deployment actually written.
"""
verbose_proxy_logger.debug("Updating specific deployment model_ids: %s", model_ids)
tagged: Final = [
await _tag_deployment_with_access_group(
model_id=model_id,
model_info=(await _find_deployment_or_400(model_id=model_id, prisma_client=prisma_client)),
access_group=access_group,
prisma_client=prisma_client,
)
for model_id in model_ids
]
return tuple(pair for pair in tagged if pair is not None)
async def _find_deployment_or_400(model_id: str, prisma_client: PrismaClient) -> object:
deployment: Final = await _model_table(prisma_client).find_unique(where={"model_id": model_id})
if deployment is None:
raise HTTPException(
status_code=400,
detail={"error": f"Deployment with model_id '{model_id}' not found in Database."},
)
return deployment.model_info
def remove_access_group_from_deployment(model_info: dict[str, Any], access_group: str) -> tuple[dict[str, Any], bool]:
"""
Remove an access group from a deployment's model_info.
Args:
model_info: The model_info dictionary from the deployment
access_group: The access group name to remove
Returns:
Tuple[Dict[str, Any], bool]: (updated_model_info, was_modified)
"""
access_groups: Final = model_info.get("access_groups", [])View on GitHub (pinned to 77b7c6c40c)
Solutions
- Verify the model_id exists in the database via /model/info.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/model_access_group_management_endpoints.py:252 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/96c307b6bf40c683.
Report an issue: GitHub.