{"record":{"id":"133616eaaf6d23cf","repo":"BerriAI/litellm","slug":"provider-custom-llm-provider-api-base-not-found","errorCode":null,"errorMessage":"Provider {custom_llm_provider} api base not found","messagePattern":"Provider (.+?) api base not found","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py","lineNumber":126,"sourceCode":"    user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),\n):\n    \"\"\"\n    Factory function for creating pass-through endpoints for LLM providers.\n    \"\"\"\n    from litellm.types.utils import LlmProviders\n    from litellm.utils import ProviderConfigManager\n\n    provider_config: Final = ProviderConfigManager.get_provider_model_info(\n        provider=LlmProviders(custom_llm_provider),\n        model=None,\n    )\n    if provider_config is None:\n        raise HTTPException(status_code=404, detail=f\"Provider {custom_llm_provider} not found\")\n\n    base_target_url: Final = provider_config.get_api_base()\n\n    if base_target_url is None:\n        raise HTTPException(status_code=404, detail=f\"Provider {custom_llm_provider} api base not found\")\n\n    encoded_endpoint = httpx.URL(endpoint).path\n\n    # Ensure endpoint starts with '/' for proper URL construction\n    if not encoded_endpoint.startswith(\"/\"):\n        encoded_endpoint = \"/\" + encoded_endpoint\n\n    # Construct the full target URL using httpx, preserving any base path\n    # prefix that the operator configured on base_target_url.\n    base_url: Final = httpx.URL(base_target_url)\n    updated_url: Final = base_url.copy_with(\n        path=HttpPassThroughEndpointHelpers.join_base_and_endpoint_path(base_url, encoded_endpoint)\n    )\n\n    # Add or update query parameters\n    provider_api_key: Final = passthrough_endpoint_router.get_credentials(\n        custom_llm_provider=custom_llm_provider,\n        region_name=None,","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py#L108-L144","documentation":"HTTPException raised when the provider config for the pass-through route exists but get_api_base returns no base URL for custom_llm_provider — the provider has no default/known API base and none was configured. The pass-through cannot construct a target URL.","triggerScenarios":"Thrown at litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py:126 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure the api base for the provider in the proxy config (api_base), then retry."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}