Fix/realtime turn detection fixes (only Gemini and Openai)#470
Fix/realtime turn detection fixes (only Gemini and Openai)#470
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughRealtime audio flow now supports explicit interruption signaling: a new Changes
Sequence Diagram(s)sequenceDiagram
participant UserAudio as User Audio
participant Plugin as Realtime Plugin
participant Realtime as Realtime Core
participant Events as EventEmitter/Subscribers
UserAudio->>Plugin: audio frame / speech start
Plugin->>Realtime: detect interruption (speech_started or server_content.interrupted)
Realtime->>Realtime: call interrupt()
Realtime->>Events: _emit_audio_output_done_event(response_id, interrupted=true)
Events->>Subscribers: deliver RealtimeAudioOutputDoneEvent(interrupted=true)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
plugins/openai/vision_agents/plugins/openai/openai_realtime.py (1)
311-312: Optional: include response/session identifiers in cancellation log.Adding IDs here would make interruption/cancellation traces easier to correlate across providers.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@plugins/openai/vision_agents/plugins/openai/openai_realtime.py` around lines 311 - 312, The cancellation log at the response_done_event.status branch lacks identifiers; update the logger.debug call in the response handling (where response_done_event.response.status == "cancelled") to include the response and session identifiers (e.g., response_done_event.response.id and any session id available on response_done_event such as response_done_event.session_id or response_done_event.session.id) so traces can be correlated across providers, ensuring you handle missing attributes safely when formatting the log message.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@plugins/openai/vision_agents/plugins/openai/openai_realtime.py`:
- Around line 311-312: The cancellation log at the response_done_event.status
branch lacks identifiers; update the logger.debug call in the response handling
(where response_done_event.response.status == "cancelled") to include the
response and session identifiers (e.g., response_done_event.response.id and any
session id available on response_done_event such as
response_done_event.session_id or response_done_event.session.id) so traces can
be correlated across providers, ensuring you handle missing attributes safely
when formatting the log message.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ee505b35-51d9-49c7-aa09-833a52d625db
📒 Files selected for processing (4)
agents-core/vision_agents/core/llm/events.pyagents-core/vision_agents/core/llm/realtime.pyplugins/gemini/vision_agents/plugins/gemini/gemini_realtime.pyplugins/openai/vision_agents/plugins/openai/openai_realtime.py
Realtimemodels were not emitting interruption events for other plugins to react to.In this PR:
RealtimeimplementationsSummary by CodeRabbit
New Features
Bug Fixes
Chores