Skip to content

Conversation

@toubatbrian
Copy link
Contributor

Problem

When generateReply() was called and the AI returned a function call (non-message item), handleResponseOutputItemAdded called resolveGeneration(responseId). This method tried to look up responseCreatedFutures[responseId], but futures were stored with eventId (client-generated), causing the lookup to fail.

The future was already correctly resolved in handleResponseCreated using client_event_id from response metadata, making resolveGeneration both redundant and buggy.

@changeset-bot
Copy link

changeset-bot bot commented Jan 14, 2026

🦋 Changeset detected

Latest commit: efdeacf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 17 packages
Name Type
@livekit/agents-plugin-openai Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-cartesia Patch
@livekit/agents-plugin-elevenlabs Patch
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-inworld Patch
@livekit/agents-plugin-neuphonic Patch
@livekit/agents-plugin-resemble Patch
@livekit/agents-plugin-rime Patch
@livekit/agents-plugin-xai Patch
@livekit/agents Patch
@livekit/agents-plugin-baseten Patch
@livekit/agents-plugin-bey Patch
@livekit/agents-plugin-deepgram Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-silero Patch
@livekit/agents-plugins-test Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@toubatbrian toubatbrian merged commit 19e558a into main Jan 15, 2026
8 checks passed
@toubatbrian toubatbrian deleted the brian/fix-realtime-resolve-generation branch January 15, 2026 17:22
@github-actions github-actions bot mentioned this pull request Jan 15, 2026
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.

[Detail Bug] Realtime: resolveGeneration looks up by server responseId instead of client eventId, causing generateReply() to hang on function calls

3 participants