{"record":{"id":"ad8c6d0510b39394","repo":"BerriAI/litellm","slug":"no-model-id-found-after-model-keyword-expected","errorCode":null,"errorMessage":"No model ID found after 'model' keyword. Expected format: /model/{modelId}/{action}. Got: {endpoint}","messagePattern":"No model ID found after 'model' keyword\\. Expected format: /model/(.+?)/(.+?)\\. Got: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":400,"severity":"error","filePath":"litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py","lineNumber":700,"sourceCode":"            )\n\n        # Find the index of the action in the endpoint parts\n        action_index = None\n        for idx, part in enumerate(endpoint_parts):\n            if part in BEDROCK_ENDPOINT_ACTIONS:\n                action_index = idx\n                break\n\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,","sourceCodeStart":682,"sourceCodeEnd":718,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py#L682-L718","documentation":"Bedrock model-ID extraction fallback: a 'model' keyword segment was found in the endpoint path, but there are no non-empty path segments after it (and no action segment delimiting the ID), so the model ID portion of /model/{modelId}/{action} is empty. Thrown as ValueError during endpoint parsing.","triggerScenarios":"Thrown at litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py:700 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a model ID after the 'model' segment: /model/{modelId}/{action}.","Check the endpoint path for an empty model segment or missing action."],"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"}