BerriAI/litellm · error · Exception
model not found
Error message
model not found
What it means
Guard in the model update endpoint raised after the DB lookup (ModelRepository.table.find_unique) found no LiteLLM_BrandedDeleteModelTable row for the supplied model_info.id and the in-memory llm_router also has no deployment with that model_id. It means the caller is trying to update a model that does not exist anywhere — a stale or fabricated model id, not a transport or auth problem. Re-check the model id or create the model first via /model/new.
Source
Thrown at litellm/proxy/management_endpoints/model_management_endpoints.py:1934
_model_id: str | None = None
_model_info: Final = getattr(model_params, "model_info", None)
if _model_info is None:
raise Exception("model_info not provided")
_model_id = _model_info.id
if _model_id is None:
raise Exception("model_info.id not provided")
_existing_litellm_params = await ModelRepository(prisma_client).table.find_unique(where={"model_id": _model_id})
if _existing_litellm_params is None:
if llm_router is not None and llm_router.get_deployment(model_id=_model_id) is not None:
raise HTTPException(
status_code=400,
detail={"error": "Can't edit model. Model in config. Store model in db via `/model/new`. to edit."},
)
else:
raise Exception("model not found")
deployment: Final = Deployment(**_existing_litellm_params.model_dump())
await ModelManagementAuthChecks.can_user_make_model_call(
model_params=deployment,
user_api_key_dict=user_api_key_dict,
prisma_client=prisma_client,
premium_user=premium_user,
)
_raise_on_strategy_router_write_violation(
incoming_params=model_params.litellm_params,
existing_params=deployment.litellm_params,
)
# update DB
if store_model_in_db is True:
_existing_litellm_params_dict: Final = dict(_existing_litellm_params.litellm_params)
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Verify the model id exists via /model/info.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/model_management_endpoints.py:1934 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/fb2a4b653e7e5b90.
Report an issue: GitHub.