BerriAI/litellm · error · HTTPException
Model '{model_id}' not found in model_list. Please check you
Error message
Model '{model_id}' not found in model_list. Please check your config.yaml. What it means
HTTPException(400) from the model-credential resolver: the router is initialized but get_deployment_credentials_with_provider returned no deployment for the requested model_id — the model is absent from config.yaml's model_list (or the id was mistyped), so no upstream credentials exist to use.
Source
Thrown at litellm/proxy/openai_files_endpoints/common_utils.py:318
Returns:
Dictionary with credentials (api_key, api_base, custom_llm_provider, etc.)
Raises:
HTTPException: If router not initialized or model not found
"""
from fastapi import HTTPException
if llm_router is None:
raise HTTPException(
status_code=500,
detail={"error": "Router not initialized. Cannot use model-based routing."},
)
credentials: Final = llm_router.get_deployment_credentials_with_provider(model_id=model_id)
if credentials is None:
raise HTTPException(
status_code=400,
detail={"error": f"Model '{model_id}' not found in model_list. Please check your config.yaml."},
)
return credentials
def get_team_provider_credentials(
llm_router: Optional["Router"],
user_api_key_dict: "UserAPIKeyAuth",
custom_llm_provider: str,
) -> dict | None:
"""
Resolve upstream credentials for a provider-scoped file operation
(e.g. GET /v1/files), which doesn't pin a model.
Priority:
1. The team's own (BYOK) deployment for this provider — a deployment whoseView on GitHub (pinned to 77b7c6c40c)
Solutions
- Add the model to model_list in config.yaml, or use an existing model alias.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/openai_files_endpoints/common_utils.py:318 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/108f1d6835951b28.
Report an issue: GitHub.