{"record":{"id":"00c9f0937dc797a4","repo":"BerriAI/litellm","slug":"endpoint-with-id-endpoint-id-was-not-found-in","errorCode":null,"errorMessage":"Endpoint with ID '{endpoint_id}' was not found in pass-through endpoint list.","messagePattern":"Endpoint with ID '(.+?)' was not found in pass-through endpoint list\\.","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/pass_through_endpoints/pass_through_endpoints.py","lineNumber":3395,"sourceCode":"        response: ConfigFieldInfo = await get_config_general_settings(\n            field_name=\"pass_through_endpoints\", user_api_key_dict=user_api_key_dict\n        )\n    except Exception:\n        response = ConfigFieldInfo(field_name=\"pass_through_endpoints\", field_value=None)\n\n    ## Update field by removing endpoint\n    pass_through_endpoint_data: Final[list | None] = response.field_value\n    if response.field_value is None or pass_through_endpoint_data is None:\n        raise HTTPException(\n            status_code=400,\n            detail={\"error\": \"There are no pass-through endpoints setup.\"},\n        )\n\n    # Find the endpoint to delete\n    found_endpoint: Final = _find_endpoint_by_id(pass_through_endpoint_data, endpoint_id)\n\n    if found_endpoint is None:\n        raise HTTPException(\n            status_code=400,\n            detail={\"error\": f\"Endpoint with ID '{endpoint_id}' was not found in pass-through endpoint list.\"},\n        )\n\n    # Find the index for deleting from the list\n    endpoint_index = None\n    for idx, endpoint in enumerate(pass_through_endpoint_data):\n        _endpoint = PassThroughGenericEndpoint(**endpoint) if isinstance(endpoint, dict) else endpoint\n        if _endpoint.id == endpoint_id:\n            endpoint_index = idx\n            break\n\n    if endpoint_index is None:\n        raise HTTPException(\n            status_code=400,\n            detail={\"error\": f\"Could not find index for endpoint with ID '{endpoint_id}'\"},\n        )\n","sourceCodeStart":3377,"sourceCodeEnd":3413,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py#L3377-L3413","documentation":"While removing a pass-through endpoint, the config's pass_through_endpoints list was loaded successfully but contains no entry whose ID matches the supplied endpoint_id — the endpoint was already removed or the ID is invalid.","triggerScenarios":"Thrown at litellm/proxy/pass_through_endpoints/pass_through_endpoints.py:3395 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fetch the current pass-through endpoint list and use an ID present in it.","Recreate the endpoint if it was removed from the configuration."],"exampleFix":null,"handlingStrategy":"type-guard","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"}