BerriAI/litellm · error · ValueError
Provider config not found for model
Error message
Provider config not found for model: {model} and provider: {custom_llm_provider} What it means
Anthropic pass-through handler guard: ProviderConfigManager.get_provider_chat_config returned no config for the given model/provider combination, so the request cannot be transformed; typically means the model name or custom_llm_provider is wrong or unsupported.
Solutions
- Use a model string with a valid provider prefix (e.g. 'anthropic/claude-3-5-sonnet') or pass custom_llm_provider explicitly.
- Verify the model is registered in litellm's model list.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/llms/anthropic/chat/handler.py:362 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/a34b10d01e8cb360.
Report an issue: GitHub.
Appendix: source
Thrown at litellm/llms/anthropic/chat/handler.py:362
optional_params.pop("vertex_count_tokens_location", None)
_is_function_call: Final = False
messages = copy.deepcopy(messages)
headers = AnthropicConfig().validate_environment(
api_key=api_key,
headers=headers,
model=model,
messages=messages,
optional_params={**optional_params, "is_vertex_request": is_vertex_request},
litellm_params=litellm_params,
api_base=api_base,
)
config: Final = ProviderConfigManager.get_provider_chat_config(
model=model,
provider=LlmProviders(custom_llm_provider),
)
if config is None:
raise ValueError(f"Provider config not found for model: {model} and provider: {custom_llm_provider}")
data = config.transform_request(
model=model,
messages=messages,
optional_params={**optional_params, "is_vertex_request": is_vertex_request},
litellm_params=litellm_params,
headers=headers,
)
headers, data = update_request_with_filtered_beta(
headers=headers,
request_data=data,
provider=custom_llm_provider,
)
## LOGGING
logging_obj.pre_call(
input=messages,View on GitHub (pinned to 77b7c6c40c)