Skip to content

Bug: Nova sonic example throwing error #52

@hjain5164

Description

@hjain5164

When running the nova-sonic example using the following command:

python form_agent.py console

It gives following error. I was able to solve this error by manually updating the livekit sdk and the package version for aws bedrock runtime. But wanted this to be stable as I want to build a POC using livekit and nova sonic.

Any help/suggestion would be really helpful.

2025-10-07 11:01:59,774 - ERROR aws_sdk_bedrock_runtime.client - Exception occurred while handling: AsyncSigV4Signer.sign() got an unexpected keyword argument 'http_request' 
Traceback (most recent call last):
  File "/home/harsh/Desktop/nova-sonic-livekit-demo/venv/lib/python3.12/site-packages/aws_sdk_bedrock_runtime/client.py", line 843, in _handle_execution
    retry_token = retry_strategy.refresh_retry_token_for_retry(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/harsh/Desktop/nova-sonic-livekit-demo/venv/lib/python3.12/site-packages/smithy_core/retries.py", line 240, in refresh_retry_token_for_retry
    raise SmithyRetryException(
smithy_core.exceptions.SmithyRetryException: Reached maximum number of allowed attempts: 5

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/harsh/Desktop/nova-sonic-livekit-demo/venv/lib/python3.12/site-packages/aws_sdk_bedrock_runtime/client.py", line 851, in _handle_execution
    raise output_context.response
  File "/home/harsh/Desktop/nova-sonic-livekit-demo/venv/lib/python3.12/site-packages/aws_sdk_bedrock_runtime/client.py", line 978, in _handle_attempt
    transport_request=await signer.sign(
                            ^^^^^^^^^^^^
TypeError: AsyncSigV4Signer.sign() got an unexpected keyword argument 'http_request'
2025-10-07 11:01:59,777 - ERROR livekit.plugins.aws - Error in initialize_streams 
Traceback (most recent call last):
  File "/home/harsh/Desktop/nova-sonic-livekit-demo/venv/lib/python3.12/site-packages/livekit/agents/utils/log.py", line 16, in async_fn_logs
    return await fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/harsh/Desktop/nova-sonic-livekit-demo/venv/lib/python3.12/site-packages/livekit/plugins/aws/experimental/realtime/realtime_model.py", line 485, in initialize_streams
    await self._bedrock_client.invoke_model_with_bidirectional_stream(
  File "/home/harsh/Desktop/nova-sonic-livekit-demo/venv/lib/python3.12/site-packages/aws_sdk_bedrock_runtime/client.py", line 403, in invoke_model_with_bidirectional_stream
    return await self._duplex_stream(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/harsh/Desktop/nova-sonic-livekit-demo/venv/lib/python3.12/site-packages/aws_sdk_bedrock_runtime/client.py", line 659, in _duplex_stream
    request_context = await request_future
                      ^^^^^^^^^^^^^^^^^^^^
aws_sdk_bedrock_runtime.models.ServiceError: AsyncSigV4Signer.sign() got an unexpected keyword argument 'http_request'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions