Skip to content

fix(relay): 允许 Azure 渠道启用 Responses WebSocket - #147

Merged
woncc merged 1 commit into
mainfrom
cursor/upstream-issue-136-26c488c44-20261105
Nov 5, 2026
Merged

woncc merged 1 commit into
mainfrom
cursor/upstream-issue-136-26c488c44-20261105

Conversation

@woncc

@woncc woncc commented Nov 4, 2026

Copy link
Copy Markdown

🔗 关联任务 / Related Issue

Closes #136

上游提交:26c488c4476aa7d8f7e8afc33421b70ee8e9f617

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix)

📝 变更描述 / Description

隔离 cherry-pick 上游修复:允许显式开启 Responses WebSocket 的 Azure 渠道通过筛选,并展示已有设置开关。复用现有 ResponsesWebSocketSetting,不改变 URL、鉴权、计费或数据库实现。仅修改授权的四个文件,patch-id 与上游一致。

由 AI 辅助移植与验证。已检查 git 身份 woncc(当前邮箱与主要历史邮箱不同);正文已经精炼,作者负责本次提交内容,人工审阅项留待维护者确认。

📸 运行证明 / Proof of Work

  • 根目录:GOMAXPROCS=2 GOWORK=off go test -p=2 ./relay/ ./model/ -count=1 -run 'Responses|WebSocket|Azure':通过;relay 覆盖 Azure 选择及三种 URL/api-version/api-key 握手;model 无匹配测试。
  • web:bun run test src/features/channels/components/__tests__/responses-websocket-setting.test.tsx:27 项通过。用基线准入文件配合新增测试复现 2 项失败,随后恢复候选文件且工作树干净。
  • web:GOMAXPROCS=2 bun run typecheck:通过。首次未限制并行度运行被 SIGKILL 终止;缺少依赖的首次检查经 bun install --frozen-lockfile 恢复,锁文件未变。
  • web:bun x --no-install oxlint -c .oxlintrc.json src/features/channels/lib/responses-websocket.ts src/features/channels/components/__tests__/responses-websocket-setting.test.tsx:退出 0。
  • git diff HEAD^ HEAD --check、修改 Go 文件 gofmt 检查通过。
  • 未执行真实 Azure 请求、浏览器截图、全量测试或部署;无数据库行为变更,不涉及独立子模块。

✅ 提交前检查项 / Checklist

  • 人工确认: 待维护者审阅
  • 非重复提交: 已查 fork 当前分支 PR,无已有 PR;按上游 SHA 关联 [上游/现在能解] 26c488c44 Azure 渠道可选 Responses WebSocket #136
  • 功能范围: 聚焦 Azure Responses WebSocket 准入
  • 非透传: 未更改透传行为
  • 范围聚焦: 仅四个授权文件
  • 本地验证: 实际命令和结果如上
  • 安全合规: 无真实凭据,握手测试仅使用本地 fixture

…antumNous#8047) (QuantumNous#8075)

Azure channels with responses_websocket_enabled were rejected by
FilterResponsesWebSocket, and the channel form hid the toggle for type 3.
The OpenAI adaptor already builds the Azure /openai/v1/responses URL with
api-version and sets the api-key header, and DoWssRequest reuses both, so
no relay URL change is needed.

(cherry picked from commit 26c488c)
@woncc
woncc merged commit b3549c2 into main Nov 5, 2026
@woncc
woncc deleted the cursor/upstream-issue-136-26c488c44-20261105 branch December 2, 2026 15:32
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.

[上游/现在能解] 26c488c44 Azure 渠道可选 Responses WebSocket

2 participants