BerriAI/litellm · error · HTTPException

Endpoint with ID '{endpoint_id}' was not found in pass-throu

Error message

Endpoint with ID '{endpoint_id}' was not found in pass-through endpoint list.

What it means

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.

Source

Thrown at litellm/proxy/pass_through_endpoints/pass_through_endpoints.py:3395

        response: ConfigFieldInfo = await get_config_general_settings(
            field_name="pass_through_endpoints", user_api_key_dict=user_api_key_dict
        )
    except Exception:
        response = ConfigFieldInfo(field_name="pass_through_endpoints", field_value=None)

    ## Update field by removing endpoint
    pass_through_endpoint_data: Final[list | None] = response.field_value
    if response.field_value is None or pass_through_endpoint_data is None:
        raise HTTPException(
            status_code=400,
            detail={"error": "There are no pass-through endpoints setup."},
        )

    # Find the endpoint to delete
    found_endpoint: Final = _find_endpoint_by_id(pass_through_endpoint_data, endpoint_id)

    if found_endpoint is None:
        raise HTTPException(
            status_code=400,
            detail={"error": f"Endpoint with ID '{endpoint_id}' was not found in pass-through endpoint list."},
        )

    # Find the index for deleting from the list
    endpoint_index = None
    for idx, endpoint in enumerate(pass_through_endpoint_data):
        _endpoint = PassThroughGenericEndpoint(**endpoint) if isinstance(endpoint, dict) else endpoint
        if _endpoint.id == endpoint_id:
            endpoint_index = idx
            break

    if endpoint_index is None:
        raise HTTPException(
            status_code=400,
            detail={"error": f"Could not find index for endpoint with ID '{endpoint_id}'"},
        )

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Fetch the current pass-through endpoint list and use an ID present in it.
  2. Recreate the endpoint if it was removed from the configuration.
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at litellm/proxy/pass_through_endpoints/pass_through_endpoints.py:3395 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/00c9f0937dc797a4. Report an issue: GitHub.