{"record":{"id":"471e49e3d40a3c9a","repo":"BerriAI/litellm","slug":"model-missing-from-endpoint-expected-format-mod","errorCode":null,"errorMessage":"Model missing from endpoint. Expected format: /model/{modelId}/{action}. Got: {endpoint}","messagePattern":"Model missing from endpoint\\. Expected format: /model/(.+?)/(.+?)\\. Got: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":400,"severity":"error","filePath":"litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py","lineNumber":708,"sourceCode":"\n        if action_index is not None and action_index > model_index + 1:\n            # Join all parts between \"model\" and the action (excluding \"model\" itself)\n            return \"/\".join(endpoint_parts[model_index + 1 : action_index])\n\n        # Fallback to taking everything after \"model\" if no action found\n        model_parts = [p for p in endpoint_parts[model_index + 1 :] if p]\n        if model_parts:\n            return \"/\".join(model_parts)\n\n        raise ValueError(\n            f\"No model ID found after 'model' keyword. Expected format: /model/{{modelId}}/{{action}}. Got: {endpoint}\"\n        )\n\n    except ValueError:\n        # Re-raise ValueError as-is\n        raise\n    except Exception as e:\n        raise ValueError(\n            f\"Model missing from endpoint. Expected format: /model/{{modelId}}/{{action}}. Got: {endpoint}\"\n        ) from e\n\n\nasync def handle_bedrock_passthrough_router_model(\n    model: str,\n    endpoint: str,\n    request: Request,\n    request_body: dict,\n    llm_router: litellm.Router,\n    user_api_key_dict: UserAPIKeyAuth,\n    proxy_logging_obj,\n    general_settings: dict,\n    proxy_config,\n    select_data_generator,\n    user_model: str | None,\n    user_temperature: float | None,\n    user_request_timeout: float | None,","sourceCodeStart":690,"sourceCodeEnd":726,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py#L690-L726","documentation":"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.","triggerScenarios":"Thrown at litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py:708 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"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-14T05:17:10.506Z"}