Skip to content

fix(aws): import AsyncBedrockRuntimeClient for bedrock-runtime 0.10+ - #7002

Open
libaojiang wants to merge 1 commit into
livekit:mainfrom
libaojiang:fix/aws-bedrock-runtime-0.11-imports-6994
Open

fix(aws): import AsyncBedrockRuntimeClient for bedrock-runtime 0.10+#7002
libaojiang wants to merge 1 commit into
livekit:mainfrom
libaojiang:fix/aws-bedrock-runtime-0.11-imports-6994

Conversation

@libaojiang

Copy link
Copy Markdown

Summary

  • livekit-plugins-aws[realtime] imported BedrockRuntimeClient and Config at module load. aws-sdk-bedrock-runtime 0.10 renamed those to AsyncBedrockRuntimeClient / AsyncBedrockRuntimeConfig (construct via await resolve()), and 0.11 dropped the old names, so from livekit.plugins.aws.experimental.realtime import RealtimeModel raises ImportError on a fresh pip install.
  • Prefer the 0.10+ async types when present; fall back to the old constructor (including explicit SigV4 kwargs) so the workspace-locked 0.7 extra still imports.
  • Add a regression test that imports RealtimeModel the way the issue reproduces.

Fixes #6994

Test plan

  • python -c "from livekit.plugins.aws.experimental.realtime import RealtimeModel" against aws-sdk-bedrock-runtime==0.11.0
  • pytest livekit-plugins/livekit-plugins-aws/tests/test_realtime_validation_errors.py

aws-sdk-bedrock-runtime 0.10 renamed Config/BedrockRuntimeClient to the
async types and requires await resolve(); 0.11 dropped the old names, so
`from livekit.plugins.aws.experimental.realtime import RealtimeModel`
fails on a fresh pip install. Keep a fallback for the locked 0.7 extra.

Co-authored-by: Cursor <cursoragent@cursor.com>
@libaojiang
libaojiang requested a review from a team as a code owner August 27, 2026 02:33
@CLAassistant

CLAassistant commented Aug 27, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@devin-ai-integration devin-ai-integration Bot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@longcw

longcw commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

thanks for the pr! could you sign the CLA before merging?

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.

ImportError: livekit-plugins-aws 1.7.0 realtime module incompatible with aws-sdk-bedrock-runtime 0.10.0 and 0.11.0

3 participants