{"record":{"id":"340ac69066352be9","repo":"BerriAI/litellm","slug":"path-is-required-for-pass-through-endpoint","errorCode":null,"errorMessage":"Path is required for pass-through endpoint","messagePattern":"Path is required for pass-through endpoint","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/pass_through_endpoints/pass_through_endpoints.py","lineNumber":2798,"sourceCode":"    app: FastAPI,\n    premium_user: bool,\n    visited_endpoints: set[str],\n    config_file_path: str | None = None,\n) -> None:\n    endpoint_data: dict[str, Any]\n    if isinstance(endpoint, PassThroughGenericEndpoint):\n        endpoint_data = endpoint.model_dump()\n    else:\n        endpoint_data = endpoint\n\n    if endpoint_data.get(\"id\") is None:\n        endpoint_data[\"id\"] = str(uuid.uuid4())\n    endpoint_id: Final = cast(str, endpoint_data[\"id\"])\n\n    target: Final[str | None] = endpoint_data.get(\"target\")\n    path: Final[str | None] = endpoint_data.get(\"path\")\n    if path is None:\n        raise ValueError(\"Path is required for pass-through endpoint\")\n\n    custom_headers: Final = await set_env_variables_in_header(custom_headers=endpoint_data.get(\"headers\"))\n    forward_headers: Final = endpoint_data.get(\"forward_headers\")\n    merge_query_params: Final = endpoint_data.get(\"merge_query_params\")\n    default_query_params: Final = endpoint_data.get(\"default_query_params\")\n    auth: Final[bool | str | None] = endpoint_data.get(\"auth\")\n    dependencies = None\n    auth_enforced: Final = auth is not None and str(auth).lower() == \"true\"\n\n    if auth_enforced:\n        # Authentication on a pass-through endpoint used to be enterprise-only.\n        # That left OSS with no safe configuration: auth=True raised at startup\n        # unless the operator had a license. The safe option must always be free,\n        # and unauthenticated forwarding should require explicit opt-in.\n        dependencies = [Depends(user_api_key_auth)]\n        if path not in LiteLLMRoutes.openai_routes.value:\n            LiteLLMRoutes.openai_routes.value.append(path)\n","sourceCodeStart":2780,"sourceCodeEnd":2816,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py#L2780-L2816","documentation":"Config validation while registering a pass-through endpoint: the endpoint entry has no 'path', so the proxy cannot bind a route for it. The target alone is not enough — an incoming path to match is required.","triggerScenarios":"Thrown at litellm/proxy/pass_through_endpoints/pass_through_endpoints.py:2798 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include the path field in the pass-through endpoint creation request body."],"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-14T00:17:10.932Z"}