{"record":{"id":"d51438e63e89e0aa","repo":"BerriAI/litellm","slug":"no-response-received-from-replicate-api-after-max","errorCode":null,"errorMessage":"No response received from Replicate API after max retries","messagePattern":"No response received from Replicate API after max retries","errorType":"exception","errorClass":"ReplicateError","httpStatus":500,"severity":"error","filePath":"litellm/llms/replicate/chat/handler.py","lineNumber":232,"sourceCode":"            if response.status_code == 200 and response.json().get(\"status\") in [\n                \"processing\",\n                \"starting\",\n            ]:\n                continue\n            return litellm.ReplicateConfig().transform_response(\n                model=model,\n                raw_response=response,\n                model_response=model_response,\n                logging_obj=logging_obj,\n                api_key=api_key,\n                request_data=input_data,\n                messages=messages,\n                optional_params=optional_params,\n                litellm_params=litellm_params,\n                encoding=encoding,\n            )\n\n    raise ReplicateError(\n        status_code=500,\n        message=\"No response received from Replicate API after max retries\",\n        headers=None,\n    )\n\n\nasync def async_completion(\n    model_response: ModelResponse,\n    model: str,\n    messages: list[AllMessageValues],\n    encoding,\n    optional_params: dict,\n    litellm_params: dict,\n    version_id,\n    input_data,\n    api_key,\n    api_base,\n    logging_obj: LiteLLMLoggingObj,","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/replicate/chat/handler.py#L214-L250","documentation":"Poll-loop exhaustion in the Replicate completion handler: every retry returned a non-200 or non-terminal status (never succeeded/failed/canceled), so after max retries there is no usable response and the call gives up.","triggerScenarios":"Triggered when polling the Replicate API exhausts max retries without receiving a completed response.","commonSituations":"See trigger scenarios.","solutions":["Increase the polling timeout/max retries for long-running Replicate predictions.","Check Replicate service status and your network connectivity."],"exampleFix":"litellm.completion(..., timeout=600)  # allow longer prediction time","handlingStrategy":"retry","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"}