BerriAI/litellm · error · ValueError
Container provider config not found for: {resolved_custom_ll
Error message
Container provider config not found for: {resolved_custom_llm_provider} What it means
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.
Source
Thrown at litellm/containers/endpoint_factory.py:99
litellm_params = GenericLiteLLMParams(**kwargs)
# Strip LiteLLM-managed container IDs before calling the provider API
# (OpenAI enforces max length 64 on container_id).
if "container_id" in kwargs and isinstance(kwargs["container_id"], str):
(
kwargs["container_id"],
resolved_custom_llm_provider,
litellm_params,
) = decode_managed_container_id_for_request(
container_id=kwargs["container_id"],
custom_llm_provider=resolved_custom_llm_provider,
litellm_params=litellm_params,
)
container_provider_config: BaseContainerConfig | None = ProviderConfigManager.get_provider_container_config(
provider=litellm.LlmProviders(resolved_custom_llm_provider),
)
if container_provider_config is None:
raise ValueError(f"Container provider config not found for: {resolved_custom_llm_provider}")
# Build optional params for logging
optional_params: Final = {k: kwargs.get(k) for k in path_params if k in kwargs}
# Pre-call logging
litellm_logging_obj.update_from_kwargs(
kwargs=kwargs,
model="",
optional_params=optional_params,
litellm_params={"litellm_call_id": litellm_call_id},
custom_llm_provider=resolved_custom_llm_provider,
)
# Use generic handler
return generic_container_handler.handle(
endpoint_name=endpoint_name,
container_provider_config=container_provider_config,
litellm_params=litellm_params,View on GitHub (pinned to 6c2dcb801b)
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).
Example fix
# before
litellm.acontainer_create_container(
custom_llm_provider="anthropic", # ValueError: no container config
)
# after
litellm.acontainer_create_container(
custom_llm_provider="openai",
api_key=os.environ["OPENAI_API_KEY"],
) Defensive patterns
Strategy: validation
Validate before calling
from litellm import LlmProviders
from litellm.litellm_core_utils.core_helpers import ProviderConfigManager
SUPPORTED = {LlmProviders.OPENAI, LlmProviders.AZURE, LlmProviders.AZURE_TEXT}
def containers_supported(provider: str) -> bool:
try:
return ProviderConfigManager.get_provider_container_config(
LlmProviders(provider)
) is not None
except Exception:
return False
if not containers_supported(resolved_provider):
raise SkipContainerOp(f"no container support for {resolved_provider}") Type guard
def is_container_provider(provider: str) -> bool:
"""True when LiteLLM has a container config for this provider."""
try:
return ProviderConfigManager.get_provider_container_config(
litellm.LlmProviders(provider)
) is not None
except Exception:
return False Try / catch
try:
await litellm.acreate_get_container(container_id=cid, custom_llm_provider=provider)
except ValueError as e:
if "Container provider config not found" in str(e):
logger.warning("container op skipped, unsupported provider %s", provider)
else:
raise Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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').
Related errors
- container operations are not supported for {custom_llm_provi
- 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/750be2e59d76417d.
Report an issue: GitHub.