Skip to content

Conversation

@lanazhang
Copy link

Description

Update BidiAgent to support Nova Sonic both v1 and v2 models

Documentation PR

  1. BidiNovaSonicModel support both Nova Sonic 1 and 2 model_ids
  2. Support v2 turn_taking parameter
  3. Support v2 text input (with event parameter value update required by v2)
  4. Tested the async tool call functioning well in the current version

Type of Change

New feature

Testing

How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli

  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

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

1. Model Id support both v1 and v2. Default to V2.
2. Support input parameter turn_taking via provider_config
3. Text input update the contentStart event interactive value need to be true
4. Async tool call verified working in the current version
@lanazhang
Copy link
Author

Addressed feedbacks in new commits. Please take a look.

@strands-agent
Copy link
Contributor

In src/strands/experimental/bidi/models/nova_sonic.py at line 855, import copy is inside _truncate_audio_bytes_for_logging(), which will be called frequently during streaming. Move it to the top-level imports:

import asyncio
import base64
import copy
import json
import logging
import uuid

Then remove line 855 from the method body. This avoids repeated import overhead during event processing.


🤖 This is an experimental AI agent response from the Strands team, powered by Strands Agents. We're exploring how AI agents can help with community support and development. Your feedback helps us improve! If you'd prefer human assistance, please let us know.

self.restart_config = restart_config



Copy link
Member

Choose a reason for hiding this comment

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

For bidi, you can run hatch run bidi:prepare to help with lint checks.

Copy link
Author

Choose a reason for hiding this comment

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

Removed empty lines. Passed test suite.

@github-actions github-actions bot removed the size/m label Jan 15, 2026
@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

mkmeral
mkmeral previously approved these changes Jan 20, 2026
@github-actions github-actions bot added size/m and removed size/m labels Jan 20, 2026
@lanazhang lanazhang deployed to manual-approval January 20, 2026 22:42 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants