{"record":{"id":"10723314a6c85bb5","repo":"BerriAI/litellm","slug":"unsupported-vertex-ai-request-route-request-rout","errorCode":null,"errorMessage":"Unsupported Vertex AI request route: {request_route}","messagePattern":"Unsupported Vertex AI request route: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/vertex_ai/fine_tuning/handler.py","lineNumber":329,"sourceCode":"        elif \"/tuningJobs/\" in request_route and \"cancel\" in request_route:\n            url = f\"{base_url}/v1/projects/{vertex_project}/locations/{vertex_location}/tuningJobs{request_route}\"\n        elif (\n            \"generateContent\" in request_route\n            or \"predict\" in request_route\n            or \"/batchPredictionJobs\" in request_route\n            or \"countTokens\" in request_route\n        ):\n            url = f\"{base_url}/v1/projects/{vertex_project}/locations/{vertex_location}{request_route}\"\n        elif \"cachedContents\" in request_route:\n            _model: Final = request_data.get(\"model\")\n            if _model is not None and \"/publishers/google/models/\" not in _model:\n                request_data[\"model\"] = (\n                    f\"projects/{vertex_project}/locations/{vertex_location}/publishers/google/models/{_model}\"\n                )\n\n            url = f\"{base_url}/v1beta1/projects/{vertex_project}/locations/{vertex_location}{request_route}\"\n        else:\n            raise ValueError(f\"Unsupported Vertex AI request route: {request_route}\")\n        if self.async_handler is None:\n            raise ValueError(\"VertexAI Fine Tuning - async_handler is not initialized\")\n\n        response: Final = await self.async_handler.post(\n            headers=headers,\n            url=url,\n            json=request_data,\n        )\n\n        if response.status_code != 200:\n            raise Exception(\n                f\"Error creating fine tuning job. Status code: {response.status_code}. Response: {response.text}\"\n            )\n\n        response_json: Final = response.json()\n        return response_json\n","sourceCodeStart":311,"sourceCodeEnd":346,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/vertex_ai/fine_tuning/handler.py#L311-L346","documentation":"Vertex AI fine-tuning URL router sentinel: the caller-supplied request_route does not match any known route pattern (tuningJobs, generateContent, predict, batchPredictionJobs, countTokens, cachedContents), so no URL can be built.","triggerScenarios":"Triggered when an unsupported request route is passed to the Vertex AI fine tuning handler.","commonSituations":"See trigger scenarios.","solutions":["Use a supported fine-tuning request route for Vertex AI.","Check the job operation (create/cancel/get/list) against supported routes."],"exampleFix":"# verify the fine_tuning call maps to a supported route.","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"}