{"record":{"id":"05538578333160e4","repo":"BerriAI/litellm","slug":"method-request-method-is-not-allowed-for-pass-th","errorCode":null,"errorMessage":"Method {request.method} is not allowed for pass-through endpoint {path}.","messagePattern":"Method (.+?) is not allowed for pass-through endpoint (.+?)\\.","errorType":"http","errorClass":"HTTPException","httpStatus":405,"severity":"error","filePath":"litellm/proxy/pass_through_endpoints/pass_through_endpoints.py","lineNumber":1735,"sourceCode":"                custom_body_data,\n                file_data,\n                stream,\n            ) = await _parse_request_data_by_content_type(request)\n\n            if not InitPassThroughEndpointHelpers.is_registered_pass_through_route(route=path):\n                raise HTTPException(\n                    status_code=404,\n                    detail=f\"Pass-through endpoint {endpoint} not found. This could have been deleted or not yet added to the proxy.\",\n                )\n\n            passthrough_params: Final = InitPassThroughEndpointHelpers.get_registered_pass_through_route(\n                route=path, method=request.method\n            )\n            if (\n                passthrough_params is None\n                and InitPassThroughEndpointHelpers.get_registered_pass_through_route(route=path) is not None\n            ):\n                raise HTTPException(\n                    status_code=status.HTTP_405_METHOD_NOT_ALLOWED,\n                    detail=f\"Method {request.method} is not allowed for pass-through endpoint {path}.\",\n                )\n            target_params: Final = {\n                \"target\": target,\n                \"custom_headers\": custom_headers,\n                \"forward_headers\": _forward_headers,\n                \"merge_query_params\": _merge_query_params,\n                \"cost_per_request\": cost_per_request,\n                \"guardrails\": None,\n                \"timeout\": timeout,\n            }\n\n            if passthrough_params is not None:\n                target_params.update(passthrough_params.get(\"passthrough_params\", {}))\n\n            # Extract and cast parameters with proper types\n            param_target: Final = target_params.get(\"target\") or target","sourceCodeStart":1717,"sourceCodeEnd":1753,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py#L1717-L1753","documentation":"The HTTP verb used by the caller is not in the methods allowed for the registered pass-through route. The route exists but only accepts the method list configured when it was registered, so FastAPI routing forwards here and the handler rejects the request with 405 semantics.","triggerScenarios":"Thrown at litellm/proxy/pass_through_endpoints/pass_through_endpoints.py:1735 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an HTTP method allowed for this pass-through endpoint (check its configured methods list).","Update the endpoint configuration to allow the desired method if appropriate."],"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"}