{"record":{"id":"3746281968fc94bc","repo":"BerriAI/litellm","slug":"litellm-error-prediction-not-succeeded-raw-re","errorCode":null,"errorMessage":"LiteLLM Error - prediction not succeeded - {raw_response_json}","messagePattern":"LiteLLM Error - prediction not succeeded - (.+?)","errorType":"exception","errorClass":"ReplicateError","httpStatus":422,"severity":"error","filePath":"litellm/llms/replicate/chat/transformation.py","lineNumber":250,"sourceCode":"        model_response: ModelResponse,\n        logging_obj: LoggingClass,\n        request_data: dict,\n        messages: list[AllMessageValues],\n        optional_params: dict,\n        litellm_params: dict,\n        encoding: Any,\n        api_key: str | None = None,\n        json_mode: bool | None = None,\n    ) -> ModelResponse:\n        logging_obj.post_call(\n            input=messages,\n            api_key=api_key,\n            original_response=raw_response.text,\n            additional_args={\"complete_input_dict\": request_data},\n        )\n        raw_response_json: Final = raw_response.json()\n        if raw_response_json.get(\"status\") != \"succeeded\":\n            raise ReplicateError(\n                status_code=422,\n                message=f\"LiteLLM Error - prediction not succeeded - {raw_response_json}\",\n                headers=raw_response.headers,\n            )\n        outputs: Final = raw_response_json.get(\"output\", [])\n        response_str = \"\".join(outputs)\n        if len(response_str) == 0:  # edge case, where result from replicate is empty\n            response_str = \" \"\n\n        ## Building RESPONSE OBJECT\n        if len(response_str) >= 1:\n            model_response.choices[0].message.content = response_str\n\n        # Calculate usage\n        prompt_tokens: Final = token_counter(model=model, messages=messages)\n        completion_tokens: Final = token_counter(\n            model=model,\n            text=response_str,","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/replicate/chat/transformation.py#L232-L268","documentation":"Terminal-state guard in the Replicate response transformation: the prediction JSON's status is not 'succeeded', so there is no output to map into a ModelResponse; the entire prediction payload is attached for diagnosis.","triggerScenarios":"Triggered when a Replicate prediction completes with a status other than 'succeeded'.","commonSituations":"See trigger scenarios.","solutions":["The prediction status is not 'succeeded'; inspect raw_response_json for the failure reason.","Check model inputs and Replicate logs for the failed prediction."],"exampleFix":"# check prediction status/logs in the Replicate dashboard.","handlingStrategy":"type-guard","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"}