{"record":{"id":"94f0c3502eeca258","repo":"BerriAI/litellm","slug":"exception-provider-message-this-error-occu","errorCode":null,"errorMessage":"{exception_provider} - {message}\n\n This error occurs when load balancing Responses API across deployments with different API keys.\n   Encrypted content is tied to the organization that created it and cannot be decrypted by other organizations.\n\n   Solution: Enable 'encrypted_content_affinity' to route follow-up requests to the correct deployment:\n\n   router_settings:\n     enable_pre_call_checks: true\n     optional_pre_call_checks:\n       - encrypted_content_affinity\n\n   Learn more: https://docs.litellm.ai/docs/response_api#encrypted-content-affinity-multi-region-load-balancing","messagePattern":"\\{exception_provider\\} - \\{message\\}\n\n This error occurs when load balancing Responses API across deployments with different API keys\\.\n   Encrypted content is tied to the organization that created it and cannot be decrypted by other organizations\\.\n\n   Solution: Enable 'encrypted_content_affinity' to route follow-up requests to the correct deployment:\n\n   router_settings:\n     enable_pre_call_checks: true\n     optional_pre_call_checks:\n       - encrypted_content_affinity\n\n   Learn more: https://docs\\.litellm\\.ai/docs/response_api#encrypted-content-affinity-multi-region-load-balancing","errorType":"exception","errorClass":"BadRequestError","httpStatus":400,"severity":"error","filePath":"litellm/litellm_core_utils/exception_mapping_utils.py","lineNumber":344,"sourceCode":"            message=f\"ContentPolicyViolationError: {exception_provider} - {message}\",\n            llm_provider=custom_llm_provider,\n            model=model,\n            response=getattr(original_exception, \"response\", None),\n            litellm_debug_info=extra_information,\n        )\n    elif \"invalid_encrypted_content\" in error_str or \"could not be verified\" in error_str:\n        helpful_message: Final = (\n            f\"{exception_provider} - {message}\\n\\n\"\n            \" This error occurs when load balancing Responses API across deployments with different API keys.\\n\"\n            \"   Encrypted content is tied to the organization that created it and cannot be decrypted by other organizations.\\n\\n\"\n            \"   Solution: Enable 'encrypted_content_affinity' to route follow-up requests to the correct deployment:\\n\\n\"\n            \"   router_settings:\\n\"\n            \"     enable_pre_call_checks: true\\n\"\n            \"     optional_pre_call_checks:\\n\"\n            \"       - encrypted_content_affinity\\n\\n\"\n            \"   Learn more: https://docs.litellm.ai/docs/response_api#encrypted-content-affinity-multi-region-load-balancing\"\n        )\n        raise BadRequestError(\n            message=helpful_message,\n            llm_provider=custom_llm_provider,\n            model=model,\n            response=getattr(original_exception, \"response\", None),\n            litellm_debug_info=extra_information,\n            body=getattr(original_exception, \"body\", None),\n        )\n    elif \"invalid_request_error\" in error_str and \"Incorrect API key provided\" not in error_str:\n        raise BadRequestError(\n            message=f\"{exception_provider} - {message}\",\n            llm_provider=custom_llm_provider,\n            model=model,\n            response=getattr(original_exception, \"response\", None),\n            litellm_debug_info=extra_information,\n            body=getattr(original_exception, \"body\", None),\n        )\n    elif (\n        \"Web server is returning an unknown error\" in error_str","sourceCodeStart":326,"sourceCodeEnd":362,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/litellm_core_utils/exception_mapping_utils.py#L326-L362","documentation":"Error \"{exception_provider} - {message}\n\n This error occurs when load balancing Responses API across deployments with different API keys.\n   Encrypted content is tied to the organization that created it and cannot be decrypted by other organizations.\n\n   Solution: Enable 'encrypted_content_affinity' to route follow-up requests to the correct deployment:\n\n   router_settings:\n     enable_pre_call_checks: true\n     optional_pre_call_checks:\n       - encrypted_content_affinity\n\n   Learn more: https://docs.litellm.ai/docs/response_api#encrypted-content-affinity-multi-region-load-balancing\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/litellm_core_utils/exception_mapping_utils.py:344 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable 'encrypted_content_affinity' as an optional pre-call check so follow-up requests route to the deployment that created the encrypted content.","Alternatively use a single deployment/API key for the whole Responses API conversation."],"exampleFix":null,"handlingStrategy":"fallback","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-23T08:17:48.524Z"}