BerriAI/litellm · error · ValueError
Provider config not found for model: {model} and provider: {
Error message
Provider config not found for model: {model} and provider: {custom_llm_provider} What it means
Error "Provider config not found for model: {model} and provider: {custom_llm_provider}" thrown in BerriAI/litellm.
Source
Thrown at litellm/llms/custom_httpx/aiohttp_handler.py:315
custom_llm_provider: str,
model_response: ModelResponse,
encoding,
logging_obj: LiteLLMLoggingObj,
optional_params: dict,
timeout: float | httpx.Timeout,
litellm_params: dict,
acompletion: bool,
stream: bool | None = False,
fake_stream: bool = False,
api_key: str | None = None,
headers: dict | None = {},
client: HTTPHandler | AsyncHTTPHandler | ClientSession | None = None,
):
provider_config: Final = ProviderConfigManager.get_provider_chat_config(
model=model, provider=litellm.LlmProviders(custom_llm_provider)
)
if provider_config is None:
raise ValueError(f"Provider config not found for model: {model} and provider: {custom_llm_provider}")
# get config from model, custom llm provider
headers = provider_config.validate_environment(
api_key=api_key,
headers=headers or {},
model=model,
messages=messages,
optional_params=optional_params,
litellm_params=litellm_params,
api_base=api_base,
)
api_base = provider_config.get_complete_url(
api_base=api_base,
api_key=api_key,
model=model,
optional_params=optional_params,
litellm_params=litellm_params,
stream=stream,View on GitHub (pinned to 6c2dcb801b)
Solutions
- Use a supported model/provider combination or register a provider config.
When it happens
Trigger: Thrown at litellm/llms/custom_httpx/aiohttp_handler.py:315 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/208649f88af16cbb.
Report an issue: GitHub.