{"record":{"id":"e6b54d9746e7e076","repo":"BerriAI/litellm","slug":"redis-cache-not-configured-polling-requires-redis","errorCode":null,"errorMessage":"Redis cache not configured. Polling requires Redis.","messagePattern":"Redis cache not configured\\. Polling requires Redis\\.","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"litellm/proxy/response_api_endpoints/endpoints.py","lineNumber":712,"sourceCode":"        llm_router,\n        proxy_config,\n        proxy_logging_obj,\n        redis_usage_cache,\n        select_data_generator,\n        user_api_base,\n        user_max_tokens,\n        user_model,\n        user_request_timeout,\n        user_temperature,\n        version,\n    )\n    from litellm.proxy.response_polling.polling_handler import ResponsePollingHandler\n\n    # Check if this is a polling ID\n    if ResponsePollingHandler.is_polling_id(response_id):\n        # Handle polling response\n        if not redis_usage_cache:\n            raise HTTPException(\n                status_code=500,\n                detail=\"Redis cache not configured. Polling requires Redis.\",\n            )\n\n        polling_handler: Final = ResponsePollingHandler(redis_cache=redis_usage_cache)\n\n        # Get current state from cache\n        state: Final = await polling_handler.get_state(response_id)\n\n        if not state:\n            raise HTTPException(\n                status_code=404,\n                detail=f\"Polling response {response_id} not found or expired\",\n            )\n\n        # Return the whole state directly (OpenAI Response object format)\n        # https://platform.openai.com/docs/api-reference/responses/object\n        return state","sourceCodeStart":694,"sourceCodeEnd":730,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/response_api_endpoints/endpoints.py#L694-L730","documentation":"Polling guard on the response retrieval endpoint: the response_id is a polling ID, but redis_usage_cache is None on the proxy server — asynchronous response polling stores state in Redis, so without Redis configured the polling feature cannot work; surfaced as a 500 configuration error.","triggerScenarios":"Thrown at litellm/proxy/response_api_endpoints/endpoints.py:712 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure Redis (redis_host/redis_port/redis_password or REDIS_URL) in the proxy config to enable response polling."],"exampleFix":null,"handlingStrategy":"validation","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"}