Skip to content

Reuse websocket connection#9127

Merged
pakrym-oai merged 3 commits intomainfrom
pakrym/reuse-websocket-connection
Jan 13, 2026
Merged

Reuse websocket connection#9127
pakrym-oai merged 3 commits intomainfrom
pakrym/reuse-websocket-connection

Conversation

@pakrym-oai
Copy link
Collaborator

Reuses the connection but still sends full requests.

Add TODO on websocket idle timeout placement, fix whitespace and line
wrapping in websocket client/session, and allow expect/unwrap in
websocket tests.
- Inline websocket connection into ModelClientSession and drop WebsocketSessionState
- Correct connection reuse condition to only reconnect when closed
- Handle missing connection with explicit ApiError
- Update websocket tests: apply crate-level clippy allow and skip when no network
self.build_responses_websocket_request(&api_provider, &api_prompt, options)?;

let connection = match self
.websocket_connection(
Copy link
Collaborator

Choose a reason for hiding this comment

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

clean

Copy link
Collaborator

@aibrahim-oai aibrahim-oai left a comment

Choose a reason for hiding this comment

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

awesome

@pakrym-oai pakrym-oai enabled auto-merge (squash) January 13, 2026 03:29
@pakrym-oai pakrym-oai merged commit d75626a into main Jan 13, 2026
30 of 32 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/reuse-websocket-connection branch January 13, 2026 03:30
@github-actions github-actions bot locked and limited conversation to collaborators Jan 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants