BerriAI/litellm · error · ValueError

Container provider config not found for provider: {custom_ll

Error message

Container provider config not found for provider: {custom_llm_provider}

What it means

Raised while listing containers when no container provider config exists for custom_llm_provider. Same gate as container creation: ProviderConfigManager.get_provider_container_config supports only OpenAI and Azure, returning None otherwise, and the list call aborts with this ValueError before building the request.

Source

Thrown at litellm/containers/main.py:435

            response: Final = ContainerListResponse(**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 provider config not found for provider: {custom_llm_provider}")

        # Get container list request parameters
        container_list_optional_params: Final[ContainerListOptionalRequestParams] = (
            ContainerRequestUtils.get_requested_container_list_optional_param(local_vars)
        )

        # Pre Call logging
        litellm_logging_obj.update_from_kwargs(
            kwargs=kwargs,
            model="",
            optional_params=dict(container_list_optional_params),
            litellm_params={
                "litellm_call_id": litellm_call_id,
                **container_list_optional_params,
            },
            custom_llm_provider=custom_llm_provider,
        )

View on GitHub (pinned to 6c2dcb801b)

Solutions

  1. Pass custom_llm_provider='openai' or 'azure' explicitly to the list-containers call.
  2. If containers were created on Azure, list them with the Azure provider and matching api_base/api_version credentials.
  3. Guard the call by checking ProviderConfigManager.get_provider_container_config(LlmProviders(provider)) is not None first.
  4. Add a provider config (BaseContainerConfig subclass) if you are extending LiteLLM to a new provider.

Example fix

# before
containers = await litellm.acreate_list_containers(custom_llm_provider="bedrock")

# after
containers = await litellm.acreate_list_containers(custom_llm_provider="openai")
Defensive patterns

Strategy: validation

Validate before calling

import litellm
from litellm.litellm_core_utils.core_helpers import ProviderConfigManager

if ProviderConfigManager.get_provider_container_config(
    litellm.LlmProviders(custom_llm_provider)
) is None:
    raise ValueError(f"cannot list containers on {custom_llm_provider}; supported: openai, azure")

Type guard

def can_list_containers(provider: str) -> bool:
    try:
        return ProviderConfigManager.get_provider_container_config(
            litellm.LlmProviders(provider)
        ) is not None
    except Exception:
        return False

Try / catch

try:
    result = await litellm.acreate_list_containers(custom_llm_provider=provider)
except ValueError as e:
    if "provider config not found" in str(e).lower():
        return []  # provider has no containers feature
    raise

Prevention

When it happens

Trigger: Calling acontainer_list_containers / list containers with custom_llm_provider not in {'openai','azure','azure_text'}, or omitting it so it defaults/infers to an unsupported provider.

Common situations: Copy-pasting a create-container example but changing the provider; listing containers through a generic helper that passes the deployment's provider regardless of feature support; misspelled provider names.

Related errors


AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15). Data as JSON: /api/errors/3187f32bb5fb9144. Report an issue: GitHub.