{"record":{"id":"750be2e59d76417d","repo":"BerriAI/litellm","slug":"container-provider-config-not-found-for-resolved","errorCode":null,"errorMessage":"Container provider config not found for: {resolved_custom_llm_provider}","messagePattern":"Container provider config not found for: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/containers/endpoint_factory.py","lineNumber":99,"sourceCode":"            litellm_params = GenericLiteLLMParams(**kwargs)\n            # Strip LiteLLM-managed container IDs before calling the provider API\n            # (OpenAI enforces max length 64 on container_id).\n            if \"container_id\" in kwargs and isinstance(kwargs[\"container_id\"], str):\n                (\n                    kwargs[\"container_id\"],\n                    resolved_custom_llm_provider,\n                    litellm_params,\n                ) = decode_managed_container_id_for_request(\n                    container_id=kwargs[\"container_id\"],\n                    custom_llm_provider=resolved_custom_llm_provider,\n                    litellm_params=litellm_params,\n                )\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: {resolved_custom_llm_provider}\")\n\n            # Build optional params for logging\n            optional_params: Final = {k: kwargs.get(k) for k in path_params if k in kwargs}\n\n            # Pre-call logging\n            litellm_logging_obj.update_from_kwargs(\n                kwargs=kwargs,\n                model=\"\",\n                optional_params=optional_params,\n                litellm_params={\"litellm_call_id\": litellm_call_id},\n                custom_llm_provider=resolved_custom_llm_provider,\n            )\n\n            # Use generic handler\n            return generic_container_handler.handle(\n                endpoint_name=endpoint_name,\n                container_provider_config=container_provider_config,\n                litellm_params=litellm_params,","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/containers/endpoint_factory.py#L81-L117","documentation":"Raised by the container-endpoint factory when LiteLLM cannot find a container (code-execution sandbox) provider config for the resolved provider. ProviderConfigManager.get_provider_container_config only knows OpenAI and Azure; every other LlmProviders value returns None and this ValueError fires. The provider may come from your custom_llm_provider argument or from decoding a LiteLLM-managed container ID.","triggerScenarios":"Calling a container API (create/get/list/delete/files of a code-execution container) with custom_llm_provider set to anything except 'openai' or 'azure' (e.g. 'anthropic', 'bedrock'), or passing a LiteLLM-encoded container_id whose embedded custom_llm_provider decodes to an unsupported provider.","commonSituations":"Assuming the Responses-API container feature works for all providers because the API shape is generic; routing a container_id that was created on one gateway through a deployment labeled with another provider; typos in the provider string ('open_ai', 'azure-openai').","solutions":["Set custom_llm_provider='openai' (or 'azure' with api_base/api_version pointing at your Azure OpenAI resource) for container operations.","If you passed a LiteLLM-managed container_id, verify it was issued for an OpenAI/Azure container and was not re-encoded with a different provider.","Check the provider string for typos against litellm.LlmProviders members; only OPENAI, AZURE and AZURE_TEXT have container configs.","If you need containers on another provider, contribute a BaseContainerConfig subclass and register it in ProviderConfigManager.get_provider_container_config (litellm/utils.py)."],"exampleFix":"# before\nlitellm.acontainer_create_container(\n    custom_llm_provider=\"anthropic\",  # ValueError: no container config\n)\n\n# after\nlitellm.acontainer_create_container(\n    custom_llm_provider=\"openai\",\n    api_key=os.environ[\"OPENAI_API_KEY\"],\n)","handlingStrategy":"validation","validationCode":"from litellm import LlmProviders\nfrom litellm.litellm_core_utils.core_helpers import ProviderConfigManager\n\nSUPPORTED = {LlmProviders.OPENAI, LlmProviders.AZURE, LlmProviders.AZURE_TEXT}\n\ndef containers_supported(provider: str) -> bool:\n    try:\n        return ProviderConfigManager.get_provider_container_config(\n            LlmProviders(provider)\n        ) is not None\n    except Exception:\n        return False\n\nif not containers_supported(resolved_provider):\n    raise SkipContainerOp(f\"no container support for {resolved_provider}\")","typeGuard":"def is_container_provider(provider: str) -> bool:\n    \"\"\"True when LiteLLM has a container config for this provider.\"\"\"\n    try:\n        return ProviderConfigManager.get_provider_container_config(\n            litellm.LlmProviders(provider)\n        ) is not None\n    except Exception:\n        return False","tryCatchPattern":"try:\n    await litellm.acreate_get_container(container_id=cid, custom_llm_provider=provider)\nexcept ValueError as e:\n    if \"Container provider config not found\" in str(e):\n        logger.warning(\"container op skipped, unsupported provider %s\", provider)\n    else:\n        raise","preventionTips":["Pin container workflows to openai/azure and validate the provider before any container call.","Store the creating provider next to every persisted container_id.","Add a unit test asserting your configured provider passes get_provider_container_config before shipping."],"tags":["litellm","containers","provider-support","validation"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}