{"record":{"id":"87c5ad84826f19b2","repo":"BerriAI/litellm","slug":"container-operations-are-not-supported-for-custom","errorCode":null,"errorMessage":"container operations are not supported for {custom_llm_provider}","messagePattern":"container operations are not supported for (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/containers/main.py","lineNumber":217,"sourceCode":"\n            response: Final = ContainerObject(**mock_response)\n            return response\n\n        # get llm provider logic\n        # Pass credential params explicitly since they're named args, not in kwargs\n        litellm_params: Final = GenericLiteLLMParams(\n            api_key=api_key,\n            api_base=api_base,\n            api_version=api_version,\n            **kwargs,\n        )\n        # get provider config\n        container_provider_config: BaseContainerConfig | None = ProviderConfigManager.get_provider_container_config(\n            provider=litellm.LlmProviders(custom_llm_provider),\n        )\n\n        if container_provider_config is None:\n            raise ValueError(f\"container operations are not supported for {custom_llm_provider}\")\n\n        local_vars.update(kwargs)\n        # Get ContainerCreateOptionalRequestParams with only valid parameters\n        container_create_optional_params: Final[ContainerCreateOptionalRequestParams] = (\n            ContainerRequestUtils.get_requested_container_create_optional_param(local_vars)\n        )\n\n        # Get optional parameters for the container API\n        container_create_request_params: Final[dict] = ContainerRequestUtils.get_optional_params_container_create(\n            container_provider_config=container_provider_config,\n            container_create_optional_params=container_create_optional_params,\n        )\n\n        # Pre Call logging\n        litellm_logging_obj.update_from_kwargs(\n            kwargs=kwargs,\n            model=\"\",\n            optional_params=dict(container_create_request_params),","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/containers/main.py#L199-L235","documentation":"Thrown by litellm/containers/main.py container creation when ProviderConfigManager.get_provider_container_config returns None for the given custom_llm_provider. LiteLLM's container API (code-execution sandboxes for the Responses API) is implemented only for OpenAI and Azure; requesting any other provider is rejected before any HTTP call is made.","triggerScenarios":"Calling acreate_container (or the synchronous wrapper) with custom_llm_provider='vertex_ai', 'anthropic', 'bedrock', 'gemini', or any value outside {'openai','azure','azure_text'} — including misspelled strings that still parse as an LlmProviders member.","commonSituations":"Porting OpenAI container examples to another cloud; using a router deployment whose model string maps to a provider without container support; upgrading LiteLLM versions where container support coverage changed.","solutions":["Use custom_llm_provider='openai' or 'azure' — the only providers with a registered BaseContainerConfig.","For Azure, also supply api_base (your resource endpoint) and api_version so the Azure container config can build the URL.","Verify the provider string exactly matches a litellm.LlmProviders value; log litellm.LlmProviders(custom_llm_provider) to confirm it parses.","Request or implement a provider config by subclassing BaseContainerConfig and adding it to get_provider_container_config."],"exampleFix":"# before\nawait litellm.acreate_container(\n    custom_llm_provider=\"vertex_ai\",\n)\n\n# after\nawait litellm.acreate_container(\n    custom_llm_provider=\"openai\",\n    expires_after=60 * 10,\n)","handlingStrategy":"validation","validationCode":"import litellm\nfrom litellm.litellm_core_utils.core_helpers import ProviderConfigManager\n\nassert ProviderConfigManager.get_provider_container_config(\n    litellm.LlmProviders(custom_llm_provider)\n) is not None, f\"{custom_llm_provider} does not support containers; use 'openai' or 'azure'\"","typeGuard":"def supports_container_create(provider: str) -> bool:\n    try:\n        cfg = ProviderConfigManager.get_provider_container_config(\n            litellm.LlmProviders(provider)\n        )\n    except Exception:\n        return False\n    return cfg is not None","tryCatchPattern":"try:\n    container = await litellm.acreate_container(custom_llm_provider=provider)\nexcept ValueError as e:\n    if \"not supported\" in str(e):\n        raise UnsupportedContainerProvider(provider) from e\n    raise","preventionTips":["Hard-code the provider for container flows ('openai' or 'azure') instead of inferring it from deployments.","Fail fast at startup: verify the container provider config exists during app boot.","Keep provider strings in one constant to avoid typo drift."],"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"}