Skip to content

smithy-http: stream aiohttp response bodies - #779

Open
arandito wants to merge 1 commit into
developfrom
fix-aiohttp-output-streaming
Open

smithy-http: stream aiohttp response bodies#779
arandito wants to merge 1 commit into
developfrom
fix-aiohttp-output-streaming

Conversation

@arandito

Copy link
Copy Markdown
Contributor

Description

This PR updates AIOHTTPClient to stream response bodies instead of buffering the full payload before returning. This enables modeled streaming outputs to be consumed incrementally and aligns aiohttp response handling with the CRT transport.

The response body uses aiohttp’s raw chunk iterator and exposes close() so partially consumed responses can be released. Non-streaming responses continue to be consumed as a complete body during deserialization.

Testing

  • Added unit test coverage for streaming and non-streaming responses, partial consumption cleanup, and response cleanup on marshalling failure.
  • Ran make test-py - 1975 passed, 9 skipped.
  • Generated bedrock runtime client with unreleased changes from Add async client transport cleanup #765 and confirmed that output streams now receive events incrementally for converse_stream operation. Also tested converse to confirm non-streaming operations remain functional.
  • Generated sts and dynamo db clients to confirm query and aws json clients are functional as well.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@arandito
arandito requested a review from a team as a code owner August 21, 2026 14:54

@Alan4506 Alan4506 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @arandito

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants