{"record":{"id":"e2cb58af82269a91","repo":"BerriAI/litellm","slug":"no-provider-config-found-for-model-model","errorCode":null,"errorMessage":"No provider config found for model: {model}","messagePattern":"No provider config found for model: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/bedrock/passthrough/transformation.py","lineNumber":140,"sourceCode":"    ) -> Optional[\"CostResponseTypes\"]:\n        from litellm import encoding\n        from litellm.types.utils import LlmProviders, ModelResponse\n        from litellm.utils import ProviderConfigManager\n\n        if \"invoke\" in endpoint:\n            chat_config_model = \"invoke/\" + model\n        elif \"converse\" in endpoint:\n            chat_config_model = \"converse/\" + model\n        else:\n            return None\n\n        provider_chat_config: Final = ProviderConfigManager.get_provider_chat_config(\n            provider=LlmProviders(custom_llm_provider),\n            model=chat_config_model,\n        )\n\n        if provider_chat_config is None:\n            raise ValueError(f\"No provider config found for model: {model}\")\n\n        litellm_model_response: Final[ModelResponse] = provider_chat_config.transform_response(\n            model=model,\n            messages=[{\"role\": \"user\", \"content\": \"no-message-pass-through-endpoint\"}],\n            raw_response=httpx_response,\n            model_response=ModelResponse(),\n            logging_obj=logging_obj,\n            optional_params={},\n            litellm_params={},\n            api_key=\"\",\n            request_data=request_data,\n            encoding=encoding,\n        )\n\n        return litellm_model_response\n\n    def _convert_raw_bytes_to_str_lines(self, raw_bytes: list[bytes]) -> list[str]:\n        from botocore.eventstream import EventStreamBuffer","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/bedrock/passthrough/transformation.py#L122-L158","documentation":"In the Bedrock passthrough/response transformer, the model is resolved to an 'invoke/<model>' or 'converse/<model>' chat config key and looked up via ProviderConfigManager.get_provider_chat_config. If no registered provider config matches the provider/model combination, a ValueError is raised stating no provider config was found for the model.","triggerScenarios":"Using bedrock passthrough endpoints (/bedrock/invoke or /bedrock/converse) with a model whose provider prefix (e.g. meta., anthropic., amazon., ai21., mistral., cohere.) litellm cannot map to a chat config — for example a brand-new or misspelled provider prefix, or a vendor whose invoke transformation is not registered.","commonSituations":"New Bedrock provider launched but the installed litellm predates its invoke transformation; model string typos ('antrhopic.claude-...'); using passthrough for an unsupported modality (embedding/image models routed through the chat config path).","solutions":["Verify the model ID's provider prefix is spelled correctly and is a supported Bedrock provider.","Upgrade litellm — provider configs for new Bedrock models are added frequently.","For chat models, prefer the standard bedrock/ path (litellm.completion(model='bedrock/<model>')) which handles providers more generically.","If the model is not chat-oriented, use the dedicated route (embeddings/rerank/image) instead of invoke/converse passthrough."],"exampleFix":"# before\nresponse = litellm.completion(model='bedrock/converse/antrhopic.claude-3-sonnet-20240229-v1:0', messages=msgs)\n\n# after\nresponse = litellm.completion(model='bedrock/anthropic.claude-3-sonnet-20240229-v1:0', messages=msgs)","handlingStrategy":"type-guard","validationCode":"KNOWN_BEDROCK_PREFIXES = (\"amazon.\", \"anthropic.\", \"ai21.\", \"cohere.\", \"meta.\", \"mistral.\", \"stability.\", \"deepseek.\", \"writer.\")\n\ndef model_has_known_provider_prefix(model: str) -> bool:\n    return model.startswith(KNOWN_BEDROCK_PREFIXES) or model.startswith(\"apply/\")","typeGuard":"def is_known_bedrock_model(model: str) -> bool:\n    base = model.split(\"/\")[-1]\n    return any(base.startswith(p.rstrip('.')) for p in KNOWN_BEDROCK_PREFIXES)","tryCatchPattern":"try:\n    litellm.completion(model=f\"bedrock/converse/{model}\", messages=msgs)\nexcept ValueError as e:\n    if \"No provider config found\" in str(e):\n        raise UnsupportedModelError(f\"{model}: use standard bedrock/ route or upgrade litellm\") from e\n    raise","preventionTips":["Prefer model='bedrock/<provider.model>' over passthrough invoke/converse strings for chat models.","Keep litellm current when AWS adds providers.","Maintain a curated model list validated at app startup."],"tags":["bedrock","passthrough","provider-config","model-resolution"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}