{"record":{"id":"ad58e3323e646e93","repo":"BerriAI/litellm","slug":"container-api-not-supported-for-provider-custom","errorCode":null,"errorMessage":"Container API not supported for provider: {custom_llm_provider}","messagePattern":"Container API not supported for provider: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/container_endpoints/handler_factory.py","lineNumber":51,"sourceCode":"\n\ndef get_all_route_types() -> list[str]:\n    \"\"\"Get all async route types for registration in route_llm_request.py\"\"\"\n    config: Final = _load_endpoints_config()\n    return [endpoint[\"async_name\"] for endpoint in config[\"endpoints\"]]\n\n\ndef _get_container_provider_config(custom_llm_provider: str):\n    \"\"\"Get the container provider config for the given provider.\"\"\"\n    if custom_llm_provider == \"openai\":\n        from litellm.llms.openai.containers.transformation import OpenAIContainerConfig\n\n        return OpenAIContainerConfig()\n    elif custom_llm_provider in (\"azure\", \"azure_text\"):\n        from litellm.llms.azure.containers.transformation import AzureContainerConfig\n\n        return AzureContainerConfig()\n    raise ValueError(f\"Container API not supported for provider: {custom_llm_provider}\")\n\n\ndef _create_handler_for_path_params(\n    path_params: list[str],\n    route_type: str,\n    returns_binary: bool = False,\n    is_multipart: bool = False,\n):\n    \"\"\"\n    Dynamically create a handler with the correct path parameter signature.\n    \"\"\"\n    # For binary content endpoints, use a different handler\n    if returns_binary and path_params == [\"container_id\", \"file_id\"]:\n\n        async def handler_binary_content(\n            request: Request,\n            container_id: str,\n            file_id: str,","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/container_endpoints/handler_factory.py#L33-L69","documentation":"ValueError from _get_container_provider_config in litellm/proxy/container_endpoints/handler_factory.py when the Container API route is invoked with a custom_llm_provider other than 'openai', 'azure', or 'azure_text'. The container handler factory only has transformation configs for OpenAI and Azure; any other provider string reaches the unconditional raise. This surfaces to the caller as a 500-backed error from the /v1/containers routes.","triggerScenarios":"POST /v1/containers (or files/collections sub-routes) with header x-litellm-provider: bedforge/anthropic/vertex_ai/gemini; a model deployment whose metadata routes containers to an unsupported provider; passing provider= in the query string for a provider with no Container implementation.","commonSituations":"Assuming the OpenAI-compatible Containers API works across all LiteLLM providers; wiring a generic passthrough client that always sends a provider header; upgrading LiteLLM and trying containers on a provider that was never implemented.","solutions":["Use provider 'openai' or 'azure'/'azure_text' for container operations — these are the only implemented Container configs.","Remove the x-litellm-provider header so the default 'openai' is used against an OpenAI deployment.","For other providers, call their native API directly instead of the /v1/containers proxy routes."],"exampleFix":"# before\ncurl -X POST $PROXY/v1/containers -H 'x-litellm-provider: bedrock'\n\n# after\ncurl -X POST $PROXY/v1/containers -H 'x-litellm-provider: azure'","handlingStrategy":"validation","validationCode":"SUPPORTED_CONTAINER_PROVIDERS = {\"openai\", \"azure\", \"azure_text\"}\n\nprovider = request.headers.get(\"x-litellm-provider\", \"openai\")\nif provider not in SUPPORTED_CONTAINER_PROVIDERS:\n    raise UnsupportedProvider(f\"containers not available for {provider}; use openai or azure\")","typeGuard":"def supports_container_api(provider: object) -> bool:\n    return isinstance(provider, str) and provider in {\"openai\", \"azure\", \"azure_text\"}","tryCatchPattern":"try:\n    resp = await proxy_client.post(\"/v1/containers\", ...)\nexcept ValueError as e:\n    if \"Container API not supported\" in str(e):\n        fall_back_to_native_provider_api(provider)\n    else:\n        raise","preventionTips":["Gate container features in your client behind a provider-capability map.","Default the provider header to openai rather than echoing the caller's model provider.","Track LiteLLM release notes for newly supported container providers and update the capability map."],"tags":["litellm-proxy","containers","unsupported-provider","provider-routing"],"backgroundTag":"unsupported-provider","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}