{"record":{"id":"97523e6d240e6879","repo":"BerriAI/litellm","slug":"error-creating-fine-tuning-job-status-code-resp","errorCode":null,"errorMessage":"Error creating fine tuning job. Status code: {response.status_code}. Response: {response.text}","messagePattern":"Error creating fine tuning job\\. Status code: (.+?)\\. Response: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/llms/vertex_ai/fine_tuning/handler.py","lineNumber":179,"sourceCode":"        headers: dict,\n        request_data: FineTuneJobCreate,\n    ):\n        try:\n            verbose_logger.debug(\n                \"about to create fine tuning job: %s, request_data: %s\",\n                fine_tuning_url,\n                json.dumps(request_data, indent=4),\n            )\n            if self.async_handler is None:\n                raise ValueError(\"VertexAI Fine Tuning - async_handler is not initialized\")\n            response: Final = await self.async_handler.post(\n                headers=headers,\n                url=fine_tuning_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            verbose_logger.debug(\"got response from creating fine tuning job: %s\", response.json())\n\n            vertex_response: Final = ResponseTuningJob(\n                **response.json(),\n            )\n\n            verbose_logger.debug(\"vertex_response %s\", vertex_response)\n            open_ai_response: Final = self.convert_vertex_response_to_open_ai_response(vertex_response)\n            return open_ai_response\n\n        except Exception as e:\n            verbose_logger.error(\"asyncerror creating fine tuning job %s\", e)\n            trace_back_str: Final = traceback.format_exc()\n            verbose_logger.error(trace_back_str)\n            raise e","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/vertex_ai/fine_tuning/handler.py#L161-L197","documentation":"Raised after POSTing a fine-tuning job creation request to Vertex AI when the response status is not success; the status code and body are embedded. Fires on invalid tuning config, unsupported model, quota, or auth errors.","triggerScenarios":"Triggered when creating a Vertex AI fine tuning job returns a non-success status code.","commonSituations":"See trigger scenarios.","solutions":["Inspect the status code and response body for the fine-tuning job creation failure.","Verify training/validation file URIs, model, and project permissions."],"exampleFix":"# log response.text and fix per the Vertex AI error message.","handlingStrategy":"try-catch","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"}