feat(llm): 支持渠道级 Chat Completions、Responses 和 Messages - #1042
Merged
H-Chris233 merged 3 commits intoSep 8, 2026
Conversation
…pr1042-review-fixes # Conflicts: # openless-all/app/src-tauri/src/commands/settings.rs
H-Chris233
added a commit
that referenced
this pull request
Sep 8, 2026
#1023) * feat(llm): add OpenCode Zen polish provider, default deepseek-v4-flash Dictation polish uses OpenAI-compatible chat/completions. For OpenCode Go, change the Base URL to /zen/go/v1. * fix(macos): 避免 Fn 长按与功能键误触发听写 (#1008) Auto 和 Toggle 模式只在 Fn 短按松开且未叠加功能层操作时触发听写;长按及亮度、音量等 systemDefined 事件留给 macOS。 保留显式 Hold 模式的按住说话语义,并跳过 Fn 短按释放后的冗余仲裁延迟。 Co-authored-by: Chris233 <h-chris233@outlook.com> * fix(asr): 百炼 WebSocket 优先走 IPv4,避开本机 IPv6 黑洞 (#1036) * fix(asr): 百炼 WebSocket 优先走 IPv4,避开本机 IPv6 黑洞 dashscope 的 AAAA 在部分 Windows 双栈网上 TCP 443 会挂死,connect_async 先试 IPv6 会卡满 5 秒超时,听写进不了 Listening。 Co-authored-by: Cursor <cursoragent@cursor.com> * fix(asr): preserve websocket ports and retry handshake addresses --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Chris233 <h-chris233@outlook.com> * fix(updater): Beta 构建默认跟随 Beta 渠道 (#1041) * fix(updater): default beta builds to beta channel (#1034) * fix(updater): persist channel switches atomically * feat(llm): 支持渠道级 Chat Completions、Responses 和 Messages (#1042) * feat(llm): add channel request formats and compatibility presets * fix(llm): harden channel protocol handling * feat(llm): integrate OpenCode Zen with shared request formats --------- Co-authored-by: Mark <shawninjuly@gmail.com> Co-authored-by: Chris233 <h-chris233@outlook.com> Co-authored-by: 浩彬(^-^) <146098469+HKLHaoBin@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更
普通 LLM 渠道此前固定使用 Chat Completions,无法连接要求 Responses 或 Messages 的模型。本 PR 增加渠道级请求格式选择,由 Core 统一构造请求、鉴权并解析非流式与 SSE 正文;润色、重润色、问答、翻译及连接测试使用同一协议配置。
custom,新增 Responses、Messages 两个兼容预设。普通 API Key 渠道均可切换三种格式,Gemini 原生与 Codex OAuth 保留专用链路。验证
cargo test --locked -p openless-core --quietnpm.cmd run buildnode scripts/frontend-test-runner.mjsgit diff --check upstream/beta...HEAD未使用真实服务商凭据执行联网验证。Host 与浏览器检查在实现阶段完成;Core、前端构建和前端测试在移到最新 beta 后重新运行。
Closes #1039
#1023 留待后续接入本 PR 的通用能力;本 PR 不包含 OpenCode Zen 供应商专用改动。