Skip to content

Conversation

@Abishek10
Copy link
Contributor

Add session_id parameter to both generate_ws_connection and generate_presigned_url methods in AgentCoreRuntimeClient to enable proper session tracking in WebSocket connections.

Changes:

  • generate_ws_connection: Add X-Amzn-Bedrock-AgentCore-Runtime-Session-Id header
  • generate_ws_connection: Update User-Agent to AgentCoreRuntimeClient/1.0
  • generate_presigned_url: Add session_id as query parameter via custom_headers
  • Update unit tests to verify session_id in headers and URL params
  • Update integration tests to verify session_id end-to-end

All tests passing (32 unit tests, 4 integration tests)

Issue #, if available:

Description of changes:

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

Add session_id parameter to both generate_ws_connection and generate_presigned_url
methods in AgentCoreRuntimeClient to enable proper session tracking in WebSocket
connections.

Changes:
- generate_ws_connection: Add X-Amzn-Bedrock-AgentCore-Runtime-Session-Id header
- generate_ws_connection: Update User-Agent to AgentCoreRuntimeClient/1.0
- generate_presigned_url: Add session_id as query parameter via custom_headers
- Update unit tests to verify session_id in headers and URL params
- Update integration tests to verify session_id end-to-end

All tests passing (32 unit tests, 4 integration tests)
@codecov-commenter
Copy link

codecov-commenter commented Dec 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@92272e7). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #186   +/-   ##
=======================================
  Coverage        ?   90.94%           
=======================================
  Files           ?       34           
  Lines           ?     3224           
  Branches        ?      459           
=======================================
  Hits            ?     2932           
  Misses          ?      166           
  Partials        ?      126           
Flag Coverage Δ
unittests 90.94% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sundargthb
Copy link
Contributor

Minor: Can we also update all the docstring examples where we have listed "AgentRuntimeClient' instead of 'AgentCoreRuntimeClient". - there are 3 docstring updates.

@Abishek10
Copy link
Contributor Author

Minor: Can we also update all the docstring examples where we have listed "AgentRuntimeClient' instead of 'AgentCoreRuntimeClient". - there are 3 docstring updates.

Done

@Abishek10 Abishek10 merged commit 62d297d into aws:main Dec 4, 2025
18 checks passed
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.

3 participants