BerriAI/litellm · error · ValueError
container operations are not supported for {custom_llm_provi
Error message
container operations are not supported for {custom_llm_provider} What it means
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.
Source
Thrown at litellm/containers/main.py:217
response: Final = ContainerObject(**mock_response)
return response
# get llm provider logic
# Pass credential params explicitly since they're named args, not in kwargs
litellm_params: Final = GenericLiteLLMParams(
api_key=api_key,
api_base=api_base,
api_version=api_version,
**kwargs,
)
# get provider config
container_provider_config: BaseContainerConfig | None = ProviderConfigManager.get_provider_container_config(
provider=litellm.LlmProviders(custom_llm_provider),
)
if container_provider_config is None:
raise ValueError(f"container operations are not supported for {custom_llm_provider}")
local_vars.update(kwargs)
# Get ContainerCreateOptionalRequestParams with only valid parameters
container_create_optional_params: Final[ContainerCreateOptionalRequestParams] = (
ContainerRequestUtils.get_requested_container_create_optional_param(local_vars)
)
# Get optional parameters for the container API
container_create_request_params: Final[dict] = ContainerRequestUtils.get_optional_params_container_create(
container_provider_config=container_provider_config,
container_create_optional_params=container_create_optional_params,
)
# Pre Call logging
litellm_logging_obj.update_from_kwargs(
kwargs=kwargs,
model="",
optional_params=dict(container_create_request_params),View on GitHub (pinned to 6c2dcb801b)
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.
Example fix
# before
await litellm.acreate_container(
custom_llm_provider="vertex_ai",
)
# after
await litellm.acreate_container(
custom_llm_provider="openai",
expires_after=60 * 10,
) Defensive patterns
Strategy: validation
Validate before calling
import litellm
from litellm.litellm_core_utils.core_helpers import ProviderConfigManager
assert ProviderConfigManager.get_provider_container_config(
litellm.LlmProviders(custom_llm_provider)
) is not None, f"{custom_llm_provider} does not support containers; use 'openai' or 'azure'" Type guard
def supports_container_create(provider: str) -> bool:
try:
cfg = ProviderConfigManager.get_provider_container_config(
litellm.LlmProviders(provider)
)
except Exception:
return False
return cfg is not None Try / catch
try:
container = await litellm.acreate_container(custom_llm_provider=provider)
except ValueError as e:
if "not supported" in str(e):
raise UnsupportedContainerProvider(provider) from e
raise Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Container provider config not found for: {resolved_custom_ll
- Container provider config not found for provider: {custom_ll
- Container provider config not found for provider: {resolved_
- Failed to transform Braintrust response: {str(e)}
- soft_budget cannot be negative. Received: {data.soft_budget}
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/87c5ad84826f19b2.
Report an issue: GitHub.