From 901252fb784b7ef1d0e87ae29c6ba30f089ea32a Mon Sep 17 00:00:00 2001 From: Xianzong Xie Date: Wed, 3 Dec 2025 21:39:49 -0800 Subject: [PATCH] chore: remove unused imports and variables - Remove unused typing imports (Any, Dict) - Remove unused output_index variable - Fix comment to reflect actual key structure (item_id, content_index) Committed-By-Agent: cursor --- litellm/proxy/response_api_endpoints/endpoints.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/litellm/proxy/response_api_endpoints/endpoints.py b/litellm/proxy/response_api_endpoints/endpoints.py index 6517b5ddc70..8ca8c5e9d65 100644 --- a/litellm/proxy/response_api_endpoints/endpoints.py +++ b/litellm/proxy/response_api_endpoints/endpoints.py @@ -1,6 +1,5 @@ import asyncio import json -from typing import Any, Dict from fastapi import APIRouter, Depends, HTTPException, Request, Response @@ -80,7 +79,7 @@ async def _background_streaming_task( # Process streaming response following OpenAI events format # https://platform.openai.com/docs/api-reference/responses-streaming output_items = {} # Track output items by ID - accumulated_text = {} # Track accumulated text deltas by (output_index, content_index) + accumulated_text = {} # Track accumulated text deltas by (item_id, content_index) usage_data = None reasoning_data = None tool_choice_data = None @@ -145,7 +144,6 @@ async def _background_streaming_task( # Text delta - accumulate text content # https://platform.openai.com/docs/api-reference/responses-streaming/response-text-delta item_id = event.get("item_id") - output_index = event.get("output_index", 0) content_index = event.get("content_index", 0) delta = event.get("delta", "")