BerriAI/litellm · error · HTTPException
The following model(s) do not exist or are not accessible: {
Error message
The following model(s) do not exist or are not accessible: {} What it means
Batch access check on a comma-separated model list: one or more requested model ids are not in the caller's available_models (not deployed on the proxy or not permitted for this key/team). The inaccessible ids are listed in the message so the caller can drop or request access for them.
Source
Thrown at litellm/proxy/utils.py:7079
available_models: list[str],
) -> None:
"""
Validate that a model is accessible to the user.
Supports batch requests with comma-separated model IDs.
Args:
model_id: The model ID to validate (can be comma-separated for batch requests)
available_models: List of models available to the user
Raises:
HTTPException: If the model is not accessible
"""
# Handle batch requests with comma-separated models
if "," in model_id:
models: Final = [m.strip() for m in model_id.split(",")]
inaccessible_models: Final = [m for m in models if m not in available_models]
if inaccessible_models:
raise HTTPException(
status_code=404,
detail="The following model(s) do not exist or are not accessible: {}".format(
", ".join(inaccessible_models)
),
)
else:
# Single model validation
if model_id not in available_models:
raise HTTPException(
status_code=404,
detail=f"The model `{model_id}` does not exist or is not accessible",
)
_PRESERVED_NONE_FIELDS: Final[list[tuple[str, str]]] = [
("message", "content"), # null when tool_calls present (issue #6677)
("message", "role"), # always required by OpenAI spec
("delta", "content"), # null in streaming chunksView on GitHub (pinned to 77b7c6c40c)
Solutions
- Check that the listed models exist in the proxy model_list and that your key/team has access to them.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/utils.py:7079 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/d5d92b686f2d3aa1.
Report an issue: GitHub.