{"record":{"id":"6bef9a4c0b06b123","repo":"BerriAI/litellm","slug":"invalid-response-response-response-is-none-got","errorCode":null,"errorMessage":"Invalid response - response.response is None - got {response}","messagePattern":"Invalid response - response\\.response is None - got (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":500,"severity":"error","filePath":"litellm/proxy/openai_files_endpoints/files_endpoints.py","lineNumber":846,"sourceCode":"        ### RESPONSE HEADERS ###\n        hidden_params: Final = getattr(response, \"_hidden_params\", {}) or {}\n        model_id: Final = hidden_params.get(\"model_id\", None) or \"\"\n        cache_key: Final = hidden_params.get(\"cache_key\", None) or \"\"\n        api_base: Final = hidden_params.get(\"api_base\", None) or \"\"\n\n        fastapi_response.headers.update(\n            ProxyBaseLLMRequestProcessing.get_custom_headers(\n                user_api_key_dict=user_api_key_dict,\n                model_id=model_id,\n                cache_key=cache_key,\n                api_base=api_base,\n                version=version,\n                model_region=getattr(user_api_key_dict, \"allowed_model_region\", \"\"),\n            )\n        )\n        httpx_response: Final[httpx.Response | None] = getattr(response, \"response\", None)\n        if httpx_response is None:\n            raise ValueError(f\"Invalid response - response.response is None - got {response}\")\n\n        return Response(\n            content=httpx_response.content,\n            status_code=httpx_response.status_code,\n            headers=httpx_response.headers,\n        )\n\n    except Exception as e:\n        await proxy_logging_obj.post_call_failure_hook(\n            user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data\n        )\n        verbose_proxy_logger.exception(\"litellm.proxy.proxy_server.retrieve_file_content(): Exception occured - %s\", e)\n        verbose_proxy_logger.debug(traceback.format_exc())\n        if isinstance(e, HTTPException):\n            raise ProxyException(\n                message=getattr(e, \"message\", str(e.detail)),\n                type=getattr(e, \"type\", \"None\"),\n                param=getattr(e, \"param\", \"None\"),","sourceCodeStart":828,"sourceCodeEnd":864,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/openai_files_endpoints/files_endpoints.py#L828-L864","documentation":"Error signaling a malformed file-list/response payload: the OpenAIFileObject list response object lacks its expected inner 'response' content (response.response is None), so the handler cannot build the proxy response. Indicates an unexpected schema returned by the provider or a transformation bug.","triggerScenarios":"Thrown at litellm/proxy/openai_files_endpoints/files_endpoints.py:846 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the request; if it persists, check proxy logs for the malformed provider response."],"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"}