@openhoo/hoopilot 0.5.4 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -124,9 +124,10 @@ $env:HOOPILOT_API_KEY = "local-key"
124
124
  npx --package @openhoo/hoopilot codexx -m gpt-5.5
125
125
  ```
126
126
 
127
- `codexx` does not start Hoopilot and does not change your shell environment. It only
128
- runs `codex` with `openai_base_url` pointed at `http://127.0.0.1:4141/v1`, maps
129
- `HOOPILOT_API_KEY` to `OPENAI_API_KEY` for that child process, passes
127
+ `codexx` does not start Hoopilot and does not change your shell environment. It runs
128
+ `codex` with a temporary `hoopilot` model provider pointed at
129
+ `http://127.0.0.1:4141/v1`, disables Codex Responses WebSockets for that provider,
130
+ maps `HOOPILOT_API_KEY` to `OPENAI_API_KEY` for that child process, passes
130
131
  `--disable network_proxy` to Codex, and removes standard proxy variables from the
131
132
  spawned Codex process so Codex talks directly to the local server. Override the local
132
133
  URL with `CODEXX_BASE_URL`, the local key with `CODEXX_API_KEY`, or the Codex
package/dist/cli.js CHANGED
@@ -946,6 +946,13 @@ function createHoopilotHandler(options = {}) {
946
946
  { logger: requestLogger, requestId, startedAt }
947
947
  );
948
948
  }
949
+ if (request.method === "GET" && apiPath === "/v1/responses") {
950
+ return finishResponse(websocketUnsupportedResponse(), {
951
+ logger: requestLogger,
952
+ requestId,
953
+ startedAt
954
+ });
955
+ }
949
956
  if (request.method === "GET" && apiPath === "/v1/models") {
950
957
  return finishResponse(await handleModels(client, request.signal, requestLogger), {
951
958
  logger: requestLogger,
@@ -1157,6 +1164,15 @@ function jsonError(status, code, message) {
1157
1164
  status
1158
1165
  );
1159
1166
  }
1167
+ function websocketUnsupportedResponse() {
1168
+ const response = jsonError(
1169
+ 426,
1170
+ "websocket_not_supported",
1171
+ "Hoopilot does not support Responses WebSocket transport; retry with HTTP Responses API."
1172
+ );
1173
+ response.headers.set("upgrade", "websocket");
1174
+ return response;
1175
+ }
1160
1176
  function corsHeaders() {
1161
1177
  return {
1162
1178
  "access-control-allow-headers": "authorization, content-type, x-api-key",
@@ -1266,6 +1282,9 @@ function routeFor(method, path) {
1266
1282
  if (method === "POST" && path === "/v1/responses") {
1267
1283
  return "responses";
1268
1284
  }
1285
+ if (method === "GET" && path === "/v1/responses") {
1286
+ return "responses_websocket";
1287
+ }
1269
1288
  return "not_found";
1270
1289
  }
1271
1290
  function isStreamingResponse(response) {