Skip to content

Conversation

@naomi-lgbt
Copy link
Contributor

@naomi-lgbt naomi-lgbt commented Oct 10, 2025

Summary by CodeRabbit

  • Breaking Changes
    • WebSocket keep-alive is no longer automatic/config-based; send explicit control messages via the API to maintain connections.
    • Async connections now use extra_headers (renamed from additional_headers); sync connections remain unchanged.
  • Documentation
    • Migration guide updated with a new WebSocket Keep Alive section, examples for control-message-based keep-alives, a checklist item, and updated breaking changes.
  • Chores
    • Upgraded underlying WebSocket library, which may affect connection handling behavior.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 10, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Documents migration to explicit WebSocket keep-alive via control messages (sent with send_control) and adds two public control-message types for ListenV1 and AgentV1 in deepgram.extensions.types.sockets; updates migration guide and breaking changes accordingly.

Changes

Cohort / File(s) Summary of Changes
Migration guide (WebSocket keep-alive)
docs/Migrating-v3-to-v5.md
Added WebSocket Keep Alive section describing shift from config-based keep-alive to explicit control messages; updated breaking changes, header parameter names, examples for ListenV1/AgentV1, migration checklist, and table of contents.
Public control-message types
deepgram/extensions/types/sockets.py, deepgram.extensions.types.sockets.ListenV1ControlMessage, deepgram.extensions.types.sockets.AgentV1ControlMessage
Added and exported ListenV1ControlMessage and AgentV1ControlMessage types to represent control messages used for explicit keep-alive via send_control().

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant Conn as ListenV1 / AgentV1 Connection
  participant WS as WebSocket Server

  Note over Client,Conn: Client controls keep-alive explicitly via control messages

  Client->>Conn: open_connection(headers: additional_headers / extra_headers)
  Conn->>WS: WebSocket handshake
  WS-->>Conn: connection established

  loop periodic keep-alive
    Client->>Conn: send_control(KeepAlive: ListenV1ControlMessage / AgentV1ControlMessage)
    Conn->>WS: ControlMessage: KeepAlive
    WS-->>Conn: ack / keep-alive response (optional)
  end

  Client->>Conn: close()
  Conn->>WS: close frame
  WS-->>Conn: closed
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “feat: mention keep alive in migration guide” directly reflects the addition of the WebSocket keep-alive section to the migration documentation, clearly summarizing the primary purpose of this changeset. It is concise, uses conventional commit phrasing, and gives a reviewer enough context to understand the main update without extraneous detail. The title aligns with the PR objectives by highlighting the documentation enhancement.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 49c6e26 and e01d5a2.

📒 Files selected for processing (1)
  • docs/Migrating-v3-to-v5.md (3 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 09550c7 and 49c6e26.

📒 Files selected for processing (1)
  • docs/Migrating-v3-to-v5.md (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test (3.9)

@lukeocodes lukeocodes merged commit 5a8c79e into main Oct 10, 2025
12 of 13 checks passed
@lukeocodes lukeocodes deleted the fix/keep-alive branch October 10, 2025 18:46
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.

3 participants