{"record":{"id":"b60c81f612c5c6de","repo":"BerriAI/litellm","slug":"container-provider-config-not-found-for-provider-b60c81","errorCode":null,"errorMessage":"Container provider config not found for provider: {resolved_custom_llm_provider}","messagePattern":"Container provider config not found for provider: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/containers/main.py","lineNumber":636,"sourceCode":"            **kwargs,\n        )\n\n        # Decode container ID and extract provider info\n        original_container_id, resolved_custom_llm_provider, litellm_params = decode_managed_container_id_for_request(\n            container_id=container_id,\n            custom_llm_provider=custom_llm_provider,\n            litellm_params=litellm_params,\n        )\n        # True when input was a LiteLLM-managed ID (any length); needed to re-encode output for routing affinity\n        was_encoded: Final = original_container_id != container_id\n\n        # get provider config\n        container_provider_config: BaseContainerConfig | None = ProviderConfigManager.get_provider_container_config(\n            provider=litellm.LlmProviders(resolved_custom_llm_provider),\n        )\n\n        if container_provider_config is None:\n            raise ValueError(f\"Container provider config not found for provider: {resolved_custom_llm_provider}\")\n\n        # Pre Call logging\n        litellm_logging_obj.update_from_kwargs(\n            kwargs=kwargs,\n            model=\"\",\n            optional_params={},\n            litellm_params={\n                \"litellm_call_id\": litellm_call_id,\n            },\n            custom_llm_provider=resolved_custom_llm_provider,\n        )\n\n        # Set the correct call type\n        litellm_logging_obj.call_type = CallTypes.retrieve_container.value\n\n        container_obj = base_llm_http_handler.container_retrieve_handler(\n            container_id=original_container_id,  # Use decoded original ID\n            container_provider_config=container_provider_config,","sourceCodeStart":618,"sourceCodeEnd":654,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/containers/main.py#L618-L654","documentation":"Raised in the container-retrieval path (get container by id) after decode_managed_container_id_for_request resolves the effective provider. If the caller-supplied provider is 'openai' and the container_id is a LiteLLM-managed encoded ID, the provider embedded in the ID wins; when that resolved provider has no container config (only openai/azure do), this ValueError is raised.","triggerScenarios":"Calling a get-container endpoint with a LiteLLM-managed encoded container_id whose embedded custom_llm_provider is not openai/azure, or with an explicit unsupported custom_llm_provider.","commonSituations":"Persisting container IDs from an older gateway or different provider mapping and replaying them later; mixing an anthropic/vertex deployment label with an OpenAI-issued container ID; corrupted or truncated encoded IDs that decode to garbage provider strings.","solutions":["Use the container_id exactly as returned by the create call on the same provider (openai or azure).","Pass the matching custom_llm_provider explicitly instead of relying on the default 'openai' + embedded-ID decoding.","If the ID is LiteLLM-managed and stale, create a new container rather than reusing an ID from another provider/mapping.","Add a BaseContainerConfig for the target provider in ProviderConfigManager."],"exampleFix":"# before\ncontainer = await litellm.acreate_get_container(\n    container_id=stale_id_from_other_provider,\n)\n\n# after\ncreated = await litellm.acreate_container(custom_llm_provider=\"openai\")\ncontainer = await litellm.acreate_get_container(\n    container_id=created.id,\n    custom_llm_provider=\"openai\",\n)","handlingStrategy":"try-catch","validationCode":"from litellm.containers.utils import decode_managed_container_id_for_request\nfrom litellm.litellm_core_utils.core_helpers import ProviderConfigManager\nimport litellm\n\n_, resolved, _ = decode_managed_container_id_for_request(container_id, custom_llm_provider or \"openai\", params)\nif ProviderConfigManager.get_provider_container_config(litellm.LlmProviders(resolved)) is None:\n    raise StaleContainerId(container_id)","typeGuard":"def container_id_resolves_to_supported_provider(cid: str, fallback: str = \"openai\") -> bool:\n    try:\n        _, provider, _ = decode_managed_container_id_for_request(cid, fallback, GenericLiteLLMParams())\n        return ProviderConfigManager.get_provider_container_config(\n            litellm.LlmProviders(provider)\n        ) is not None\n    except Exception:\n        return False","tryCatchPattern":"try:\n    c = await litellm.acreate_get_container(container_id=cid)\nexcept ValueError as e:\n    if \"provider config not found\" in str(e):\n        mark_stale(cid)  # stop retrying this stored id\n    raise","preventionTips":["Persist the provider alongside every container_id at creation time.","Treat decoded-provider mismatches as stale IDs — recreate rather than retry.","Wrap stored-ID replay paths in try/except that quarantines failing IDs."],"tags":["litellm","containers","provider-support","id-decoding"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}