{"record":{"id":"1fb0990d68f9be5f","repo":"BerriAI/litellm","slug":"replicateexception-error-str","errorCode":null,"errorMessage":"ReplicateException - {error_str}","messagePattern":"ReplicateException - (.+?)","errorType":"exception","errorClass":"AuthenticationError","httpStatus":401,"severity":"error","filePath":"litellm/litellm_core_utils/exception_mapping_utils.py","lineNumber":618,"sourceCode":"                message=f\"AnthropicException Timeout - {error_str}\",\n                model=model,\n                llm_provider=\"anthropic\",\n                exception_status_code=original_exception.status_code,\n            )\n\n\ndef _map_replicate_exception(\n    *,\n    model: str,\n    original_exception: _ProviderHTTPException,\n    custom_llm_provider: str,\n    error_str: str,\n    exception_type: str,\n    exception_provider: str,\n    extra_information: str,\n) -> None:\n    if \"Incorrect authentication token\" in error_str:\n        raise AuthenticationError(\n            message=f\"ReplicateException - {error_str}\",\n            llm_provider=\"replicate\",\n            model=model,\n            response=getattr(original_exception, \"response\", None),\n        )\n    elif \"input is too long\" in error_str:\n        raise ContextWindowExceededError(\n            message=f\"ReplicateException - {error_str}\",\n            model=model,\n            llm_provider=\"replicate\",\n            response=getattr(original_exception, \"response\", None),\n        )\n    elif exception_type == \"ModelError\":\n        raise BadRequestError(\n            message=f\"ReplicateException - {error_str}\",\n            model=model,\n            llm_provider=\"replicate\",\n            response=getattr(original_exception, \"response\", None),","sourceCodeStart":600,"sourceCodeEnd":636,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/litellm_core_utils/exception_mapping_utils.py#L600-L636","documentation":"Error \"ReplicateException - {error_str}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/litellm_core_utils/exception_mapping_utils.py:618 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the Replicate error message; check model version and inputs."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}