address greptile review feedback (greploop iteration 3)

Close httpx streaming response on error to prevent connection pool exhaustion
This commit is contained in:
Ishaan Jaffer 2026-03-05 09:12:23 -08:00
parent 5d52247353
commit 758f83642f

View file

@ -410,8 +410,8 @@ async def _async_streaming(
litellm_logging_obj: "LiteLLMLoggingObj",
provider_config: "BasePassthroughConfig",
):
iter_response = await response
try:
iter_response = await response
iter_response.raise_for_status()
raw_bytes: List[bytes] = []
@ -427,4 +427,5 @@ async def _async_streaming(
)
)
except Exception:
await iter_response.aclose()
raise