Skip to content

Can't use Amazon Nova Sonic. I get ImportError: cannot import name 'BedrockRuntimeClient' from 'aws_sdk_bedrock_runtime.client' #7042

Description

@Kamal-Moha

Bug Description

I'm trying to run Amazon Nova Sonic realtime model. I get this error

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/dist-packages/livekit/plugins/aws/__init__.py", line 32, in __getattr__
    from .experimental import realtime
  File "/usr/local/lib/python3.13/dist-packages/livekit/plugins/aws/experimental/realtime/__init__.py", line 1, in <module>
    from .realtime_model import RealtimeModel, RealtimeSession
  File "/usr/local/lib/python3.13/dist-packages/livekit/plugins/aws/experimental/realtime/realtime_model.py", line 18, in <module>
    from aws_sdk_bedrock_runtime.client import (
    ...<2 lines>...
    )

ImportError: cannot import name 'BedrockRuntimeClient' from 'aws_sdk_bedrock_runtime.client' (/usr/local/lib/python3.13/dist-packages/aws_sdk_bedrock_runtime/client.py)

ImportError: The 'realtime' module requires optional dependencies. Please install them with: pip install 'livekit-plugins-aws[realtime]'

Yet I have already installed 'livekit-plugins-aws[realtime]'

Expected Behavior

The nova sonic model should work with this error and the agent should start speaking. All the other realtime models work fine.

Reproduction Steps

Steps to reproduce the behavior:
1. Run the Voice AI Quickstart using Amazon Nova Sonic Realtime model
2. You will get the above error

Operating System

macOs

Models Used

Amazon Nova Sonic RealtimeModel

Package Versions

- Python 3.14
- livekit 1.1.15
- livekit-agents  1.7.1
- livekit-plugins-aws 1.7.1

Session/Room/Call IDs

No response

Proposed Solution

Additional Context

No response

Screenshots and Recordings

Here is a screenshot of my pyproject.toml file

Image

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions