Skip to content

Conversation

@seratch
Copy link
Member

@seratch seratch commented Jan 31, 2026

This pull request resolves #2370 by fixing a bug in #2374

context: #2370 (comment)

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b906c24cf6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d56b511778

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if audio_limits is not None:
_, max_audio_ms = audio_limits
truncated_ms = max(int(round(effective_elapsed_ms)), 0)
if max_audio_ms is not None:
Copy link

@nbondoux nbondoux Feb 2, 2026

Choose a reason for hiding this comment

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

these two lines can be removed

if audio_limits is not None:
_, max_audio_ms = audio_limits
truncated_ms = max(int(elapsed_ms), 0)
if max_audio_ms is not None:
Copy link

Choose a reason for hiding this comment

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

I would suggest this:

-                if max_audio_ms is not None:                                                                                                                                                                        
-                    truncated_ms = min(truncated_ms, max_audio_ms)                                                                                                                                                  
-                converted = _ConversionHelper.convert_interrupt(                                                                                                                                                    
-                    current_item_id,                                                                                                                                                                                
-                    current_item_content_index,                                                                                                                                                                     
-                    truncated_ms,                                                                                                                                                                                   
-                )                                                                                                                                                                                                   
-                await self._send_raw_message(converted)                                                                                                                                                             
+                if self._ongoing_response or max_audio_ms is None or truncated_ms < max_audio_ms:                                                                                                                   
+                    converted = _ConversionHelper.convert_interrupt(                                                                                                                                                
+                        current_item_id,                                                                                                                                                                            
+                        current_item_content_index,                                                                                                                                                                 
+                        truncated_ms,                                                                                                                                                                               
+                    )                                                                                                                                                                                               
+                    await self._send_raw_message(converted)          

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working feature:realtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When using realtime agent with websocket, truncate events are sent even when no interruption

3 participants