BerriAI/litellm · error · ValueError
Model missing from endpoint. Expected format: /model/{modelI
Error message
Model missing from endpoint. Expected format: /model/{modelId}/{action}. Got: {endpoint} What it means
Terminal ValueError from the Bedrock endpoint model extractor: neither the 'model' keyword lookup nor the action-based inference nor the trailing-segments fallback yielded a model ID from the endpoint path, so the path is structurally unusable for routing.
Source
Thrown at litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py:708
if action_index is not None and action_index > model_index + 1:
# Join all parts between "model" and the action (excluding "model" itself)
return "/".join(endpoint_parts[model_index + 1 : action_index])
# Fallback to taking everything after "model" if no action found
model_parts = [p for p in endpoint_parts[model_index + 1 :] if p]
if model_parts:
return "/".join(model_parts)
raise ValueError(
f"No model ID found after 'model' keyword. Expected format: /model/{{modelId}}/{{action}}. Got: {endpoint}"
)
except ValueError:
# Re-raise ValueError as-is
raise
except Exception as e:
raise ValueError(
f"Model missing from endpoint. Expected format: /model/{{modelId}}/{{action}}. Got: {endpoint}"
) from e
async def handle_bedrock_passthrough_router_model(
model: str,
endpoint: str,
request: Request,
request_body: dict,
llm_router: litellm.Router,
user_api_key_dict: UserAPIKeyAuth,
proxy_logging_obj,
general_settings: dict,
proxy_config,
select_data_generator,
user_model: str | None,
user_temperature: float | None,
user_request_timeout: float | None,View on GitHub (pinned to 77b7c6c40c)
Solutions
- Include the model in the endpoint path using the format /model/{modelId}/{action}.
- If the model is in the request body instead, ensure the route supports body-based model resolution.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py:708 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/471e49e3d40a3c9a.
Report an issue: GitHub.