diff --git a/src/openai/_streaming.py b/src/openai/_streaming.py index 45c13cc11d..d1da393123 100644 --- a/src/openai/_streaming.py +++ b/src/openai/_streaming.py @@ -238,6 +238,14 @@ async def close(self) -> None: """ await self.response.aclose() + async def aclose(self) -> None: + """ + Async close method - alias for close() to support standard async cleanup protocol. + + Used by asyncio, contextlib.aclosing(), httpx, anyio, and instrumentation libraries. + """ + await self.close() + class ServerSentEvent: def __init__(