Skip to content

[Feature] Support Cockpit Responses WebSocket mode #35

Closed

Description

@g95809080-cmyk

Submission checks

  • I searched this repository's Issues and found no duplicate request.
  • I checked upstream New API documentation and Issues and confirmed the existing functionality does not meet this need.
  • I explained why this feature should be implemented or maintained by the LMM API fork.

Problem to solve

Cockpit Tools can be configured manually to use api.lmm.best as an OpenAI Responses provider, but the provider cannot be used when Cockpit/Codex selects Responses WebSocket mode. This prevents native Cockpit compatibility and forces users to use a different client or disable WebSocket mode manually.

The existing HTTP Responses path works, including POST /v1/responses with streaming over SSE. However, when Cockpit opens the Responses WebSocket, the connection is rejected with:

wss://api.lmm.best/v1/responses
Invalid URL (GET /v1/responses)

CC Switch does not reproduce the problem because its local proxy uses the HTTP/SSE path rather than the Codex Responses WebSocket path.

Proposed solution

Please add native compatibility for Cockpit/Codex Responses WebSocket mode while preserving the existing HTTP + SSE endpoint.

Preferred option:

  1. Implement GET /v1/responses as an OpenAI Responses WebSocket endpoint.
  2. Accept response.create messages and stream Responses events such as response.output_text.delta and response.completed.
  3. Support response.cancel, previous_response_id, and connection reuse where applicable.
  4. Continue supporting POST /v1/responses over HTTP + SSE.

Fallback option if WebSocket support is not planned:
Expose or document a reliable capability flag/setting such as supportsWebsockets=false so Cockpit/Codex can automatically fall back to HTTP + SSE instead of attempting wss://api.lmm.best/v1/responses.

Relationship to upstream New API

Related protocol documentation: https://developers.openai.com/api/docs/guides/websocket-mode

Current behavior observed in this repository:

  • POST /v1/responses is routed as the normal HTTP Responses API and can stream over SSE.
  • GET /v1/realtime is the separate OpenAI Realtime audio protocol; it is not a substitute for Responses WebSocket mode.
  • There is no GET /v1/responses Responses WebSocket route in the current routing behavior.

I searched this repository's Issues for Cockpit and found no matching issue. I also searched upstream New API Issues for Cockpit and found no matching issue.

This request belongs here because users configure the hosted/forked api.lmm.best endpoint directly in Cockpit. The project can either implement the missing protocol bridge or explicitly advertise that this deployment only supports HTTP + SSE, allowing clients to choose a compatible transport.

Alternatives considered

Current workarounds are:

  • Use CC Switch or another proxy that stays on HTTP + SSE.
  • Manually disable/prevent Responses WebSocket mode in the client, when that option is available.
  • Add a separate external WebSocket-to-SSE bridge, which adds operational complexity and is not a native project solution.

These workarounds do not provide native Cockpit compatibility.

Additional context

Reproduction details (no API key or credentials included):

  1. Configure Cockpit Tools manually with API base URL https://api.lmm.best/v1 and the OpenAI Responses wire API.
  2. Enable Responses WebSocket mode, or use a model configuration that prefers WebSockets.
  3. Start a Codex/Cockpit request.
  4. The client performs a WebSocket handshake to GET /v1/responses and sends a response.create JSON message.
  5. The server returns Invalid URL (GET /v1/responses).

A representative client message is:
{ type: response.create, model: , input: [] }

The client may also send the header OpenAI-Beta: responses_websockets=2026-02-06.

The /v1/realtime endpoint cannot be used as a replacement because Cockpit uses the Responses WebSocket protocol, not the Realtime audio protocol.

Activity

  1. LIghtJUNction commented on Aug 5, 2026

    @LIghtJUNction
    Member

    可以在站内接收bug修复挑战

  2. LIghtJUNction commented on Aug 5, 2026

    @LIghtJUNction
    Member

    Implemented in merged PR #37 (Responses WebSocket support; commit 942a252).

  3. LIghtJUNction commented on Aug 5, 2026

    @LIghtJUNction
    Member

    Bounty audit note: this Issue does not qualify for challenge #6 under the “功能完善” bounty project.\n\nThat bounty is specifically scoped to improvements to the open-source bounty feature. This Issue requests Cockpit Responses WebSocket support, which is outside that published scope. It also contains no contributor pull request or completion note; the later implementation in PR #37 was authored by the repository owner.\n\nThe Issue itself remains recorded as a product request already implemented by PR #37, but it is not evidence of a contributor-delivered fix for this bounty.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions