Skip to content

livekit-agents 1.6.0#5059

Open
theomonnom wants to merge 3 commits intomainfrom
theo/1.6.0
Open

livekit-agents 1.6.0#5059
theomonnom wants to merge 3 commits intomainfrom
theo/1.6.0

Conversation

@theomonnom
Copy link
Member

No description provided.

@chenghao-mou chenghao-mou requested a review from a team March 9, 2026 23:47
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

View 5 additional findings in Devin Review.

Open in Devin Review

Comment on lines +434 to +441
pb_outputs = [
agent_pb.FunctionCallOutput(
call_id=fco.call_id,
output=fco.output,
is_error=fco.is_error,
)
for fco in event.function_call_outputs
]
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot Mar 9, 2026

Choose a reason for hiding this comment

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

🔴 AttributeError crash when function_call_outputs contains None

FunctionToolsExecutedEvent.function_call_outputs is typed list[FunctionCallOutput | None] (see livekit-agents/livekit/agents/voice/events.py:162), but the list comprehension at lines 440-447 unconditionally accesses fco.call_id, fco.output, and fco.is_error without filtering out None entries. When any tool execution hasn't completed yet (output is None), this will raise AttributeError: 'NoneType' object has no attribute 'call_id', crashing the event handler and potentially dropping session events.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@theomonnom theomonnom changed the title livekit-agents 1.6.0 (#5054) livekit-agents 1.6.0 Mar 9, 2026
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 11 additional findings in Devin Review.

Open in Devin Review

Comment on lines 306 to +309

async def _worker_run(worker: AgentServer) -> None:
try:
await server.run(devmode=args.devmode, unregistered=jupyter)

await server.run(devmode=devmode, unregistered=False)
Copy link
Contributor

Choose a reason for hiding this comment

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

🔴 Jupyter regression: _run_worker now runs with unregistered=False and devmode=False

The jupyter.py:133 calls cli._run_worker(server, args) where args.reload_addr is None. The new _run_worker at livekit-agents/livekit/agents/cli/cli.py:286 derives devmode = args.reload_addr is not None (evaluates to False) and hard-codes unregistered=False at line 309. The old code used devmode=args.devmode (True for jupyter) and unregistered=jupyter (True). This is a behavioral regression: (1) the worker now attempts to register with the LiveKit server over WebSocket which was not intended for jupyter's simulate_job workflow, and (2) devmode=False causes server.drain() to be called during shutdown (line 337), adding unnecessary delay.

(Refers to lines 286-309)

Prompt for agents
In livekit-agents/livekit/agents/cli/cli.py, the _run_worker function needs to support the jupyter use case again. The old code accepted a `jupyter: bool = False` parameter which: (1) set `unregistered=jupyter` when calling `server.run()` at line 309 so jupyter skipped WS registration, (2) set `devmode=args.devmode` which was True for jupyter instead of deriving it from reload_addr, and (3) skipped installing signal handlers in jupyter mode. Either re-add a parameter to _run_worker to control these, or update jupyter.py to use a different code path. Also update livekit-agents/livekit/agents/jupyter.py:130-133 to pass appropriate arguments.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

1 participant