Skip to content

fix(async-toolset): use underscore in synthetic call_id#5656

Merged
longcw merged 1 commit into
mainfrom
longc/fix-async-toolset-call-id
May 6, 2026
Merged

fix(async-toolset): use underscore in synthetic call_id#5656
longcw merged 1 commit into
mainfrom
longc/fix-async-toolset-call-id

Conversation

@longcw
Copy link
Copy Markdown
Contributor

@longcw longcw commented May 6, 2026

Summary

  • Replace / with _ in the synthetic call_ids generated for ctx.update(...) and the final return in AsyncToolset.
  • The previous format violated the ^[a-zA-Z0-9_-]+$ pattern enforced by some realtime backends, causing tool outputs to be rejected and never delivered back to the agent.

Closes #5652

The synthetic call_ids for intermediate updates and the final result
contained '/', which is not allowed by some realtime backends and caused
tool outputs to be rejected.

Closes #5652
@chenghao-mou chenghao-mou requested a review from a team May 6, 2026 00:46
Copy link
Copy Markdown
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: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@longcw longcw merged commit 56d90d3 into main May 6, 2026
26 checks passed
@longcw longcw deleted the longc/fix-async-toolset-call-id branch May 6, 2026 08:56
Copy link
Copy Markdown
Contributor

This is an automated Claude Code Routine created by @toubatbrian. Right now it is in experimentation stage. The automation will start porting this PR into agents-js automatically.


Port status notice

This PR is a core runtime fix (synthetic call_id format compliance with the ^[a-zA-Z0-9_-]+$ pattern enforced by realtime backends) and would normally be ported to agents-js. However, the AsyncToolset feature itself has not yet landed in agents-js main — it is currently being introduced via the open PR livekit/agents-js#1397 ("Add non-blocking tool calls").

Because there is no async_toolset.ts on agents-js main to patch, a standalone port PR cannot be opened today. Instead, the routine will leave a note on livekit/agents-js#1397 so the equivalent _ (underscore) call_id format is incorporated into that branch before it merges, avoiding the same realtime-backend rejection on the JS side.

cc @toubatbrian @livekit/agent-devs


Generated by Claude Code

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.

[Bug] AsyncToolset generates invalid OpenAI Realtime call_ids by using /update_* and /finished

3 participants