Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[nova-sonic-2] TypeError: string indices must be integers, not 'str' in agent_turn when tool is called under concurrent load #607

Copy link
Copy link

Description

@sebastianaqi
Issue body actions

Bug Report

Environment

  • livekit-agents: 1.5.2 - livekit-plugins-aws: 1.5.2
  • Python: 3.12
  • Model: Nova Sonic 2.0 (amazon.nova-sonic-v1:0)
  • Region: us-east-1

Description

When running multiple concurrent rooms with Nova Sonic 2 and registered @function_tools, some rooms fail to execute tools and the following error appears
in the logs:

agent_turn: TypeError: string indices must be integers, not 'str'

The error is intermittent — it only affects some rooms under concurrent load, not all.

Steps to Reproduce

  1. Set up an AgentSession with Nova Sonic 2 and at least one @function_tool that takes a string argument.
  2. Simulate 10+ concurrent rooms where participants speak and trigger the tool.
  3. Observe that some rooms fail with the TypeError above instead of executing the tool.
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.