releases.shpreview

Async streaming now supports async with context manager

v7.16.4

1 fixThis release1 fixBug fixesAI-tallied from the release notes

Patch changes

  • 44e6b14 Fix async streaming responses from the AI wrappers (OpenAI, Anthropic, Gemini) so they support async with as well as async for. Previously, consuming a stream via async with (e.g. with pydantic-ai) raised TypeError: 'async_generator' object does not support the asynchronous context manager protocol. — Thanks @turnipdabeets for your first contribution 🎉!

Fetched June 3, 2026