Skip to content

fix(openresponses): support Codex WebSocket warm-up - #11608

Open
aim9sour wants to merge 1 commit into
mudler:masterfrom
aim9sour:fix/openresponses-codex-compat-master
Open

fix(openresponses): support Codex WebSocket warm-up#11608
aim9sour wants to merge 1 commit into
mudler:masterfrom
aim9sour:fix/openresponses-codex-compat-master

Conversation

@aim9sour

@aim9sour aim9sour commented Aug 19, 2026

Copy link
Copy Markdown

Description

This follows up on #8644 and #8676 and fixes remaining Responses WebSocket compatibility gaps exposed by Codex:

  • supports generate:false warm-up without inference and keeps store:false responses in a connection-local store
  • resolves multi-hop previous_response_id chains across connection-local and global stores
  • keeps native Responses tools such as web_search and namespace from being coerced into function tools
  • preserves the requested store flag in WebSocket response resources
  • atomically releases the one-in-flight guard at the terminal-event boundary so immediate sequential requests do not get a false response is already in progress error

Regression coverage includes connection isolation, warm-up continuation, mixed-store ancestry, native tool filtering, and immediate sequential turns.

Notes for Reviewers

Verified on the final commit:

  • go test ./core/http/endpoints/openresponses ./core/schema --count=1
  • go test -race ./core/http/endpoints/openresponses --count=1
  • go vet ./core/http/endpoints/openresponses ./core/schema
  • Codex WebSocket warm-up E2E repeated four total runs (--repeat=3)
  • all 8 WebSocket Responses E2E specs
  • make lint with the CI toolchain (Go 1.26.1 + golangci-lint 2.11.4): 0 issues
  • make build with Go 1.26.1

A broader make test was also attempted in the earlier reproduction worktree. It reached unrelated container-backed tests and failed because this environment has no Docker/rootless Docker provider (docker is not installed and no Docker socket/runtime is present). The targeted, race, lint, E2E, vet, and build checks above are green.

Per the repository AI contribution policy, the commit includes an Assisted-by trailer and is DCO-signed by the author.

[Signed commits]

  • Yes, I signed my commits.
  • Documentation updated or not applicable

Assisted-by: ChatGPT:GPT-5.6-Sol golangci-lint
Signed-off-by: Abdullah Mansour <abdullahmansour.marketing@gmail.com>
@aim9sour
aim9sour force-pushed the fix/openresponses-codex-compat-master branch from 8a58e6d to d7d249b Compare August 19, 2026 23:34

@localai-org-maint-bot localai-org-maint-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The WebSocket changes look well covered, but this PR changes user-facing Responses API behavior without updating the corresponding guide. LocalAI's docs-with-code rule requires that update in the same change.

Please add a short WebSocket Responses section to docs/content/features/text-generation.md that documents:

  • connecting to /v1/responses over WebSocket and waiting for a terminal event before sending the next response.create;
  • generate: false returning response.created and response.completed without inference, and using its ID as previous_response_id;
  • store: false response IDs being scoped to the current WebSocket connection; and
  • multi-hop previous_response_id chains replaying the complete conversation.

I did not push this minor docs fix because a bot-authored commit would fail DCO, and I cannot preserve your sign-off on content you did not commit.

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.

2 participants