Restore Ask workspace reads and output paging without granting write access, and let programming Subagents reuse their parent's browser page. Allocate browser resources only when used, keep Agent pages aligned with workbar tabs, recover released bindings, and remove unused automatic screenshot work. Preserve inherited Runtime selections during remote usage persistence and manual compression. Keep viable channel model fallbacks, display the actual scheduled-task mode and Harness model source, and avoid rediscovery delays when calling healthy MCP tools. Fix directory/history refresh, case-only renames, rename-aware commit diffs, and FastGPT probe success reporting. Add regression coverage and align feature documentation. The Agent-side connection timeout fix requires deploying an updated Agent; existing Ask read-only and Execute authorization boundaries remain unchanged. Final validation: 3839 tests passed, 66 skipped; typecheck, lint, development build, and diff checks passed. Isolated Electron UI/MCP workflows passed with a loopback model fixture. Current-source Linux x64 Host checks passed with three successful real model requests. Chromium loadURL rejection was not reproduced in the UI; released-binding recovery has automated coverage. Release note: 修复 Ask 读取项目文件、浏览器页面显示与恢复、文件管理及模型配置跟随中的不一致,并减少无用截图和 MCP 等待。定时任务显示实际工作模式,远程会话可正常保存继承 Runtime 的用量;远端连接超时修复需更新 Agent 后生效。
2.8 KiB
2.8 KiB
模型连接请求定制
本功能负责 LLM 模型连接的自定义请求头和自定义请求体。用户可以在同一个连接中保存 Provider 要求的附加元数据;GoodBuddy 只在直连链路或 Runtime 明确原生支持的链路中应用 这些值,不为不支持的 Runtime 伪造透传能力。
文档导航
| 文档 | 权威职责 |
|---|---|
| UI 设计 | 编辑入口、校验反馈、兼容性说明和无障碍行为 |
| 技术设计 | 契约、持久化、合并优先级、Runtime 支持矩阵和验证 |
| 功能进度 | 已验证实现、剩余工作和验证证据 |
模型连接选择准确性也在本目录维护:技术设计第 8 节定义通道直连回退修复, UI 设计末节定义 Harness 来源标签和公开设置展示;Harness 的实际解析顺序由其 技术设计唯一维护。
本次改动是现有模型连接的有界扩展,不新增独立业务对象或工作流,因此不单独建立 PRD、 User Stories 和逻辑设计;本页定义产品边界,技术设计定义唯一的请求合并规则。
术语
| 术语 | 定义 |
|---|---|
| 自定义请求头 | 用户为一个 LLM 模型连接保存的附加 HTTP Header 字符串映射 |
| 自定义请求体 | 用户为一个 LLM 模型连接保存的附加 JSON 顶层字段 |
| Runtime 字段 | GoodBuddy 或 Runtime 为模型、消息、工具、流式、认证和协议生成的字段 |
| 直连 | GoodBuddy Main 直接向模型 Provider 发出请求 |
| 受管远程 OpenCode | 模型请求通过 GoodBuddy Agent 的可信模型网关发出的远程 OpenCode |
产品边界
- 两项设置都位于“设置 → 模型连接 → LLM → 连接详情”底部,以 JSON 对象编辑。
- 直连模型支持请求头和请求体,包括连接测试、文本、工具、摘要和图像生成请求。
- Continue 原生支持请求头和请求体。
- 本地 OpenCode 原生支持请求头,不使用自定义请求体。
- DeepSeek Harness 的 Pi-AI Provider 原生支持请求头,不使用自定义请求体。
- 受管远程 OpenCode 的可信模型网关支持请求头和请求体。
- 使用 Runtime 自有配置时不引用 GoodBuddy 模型连接,因此不会应用连接级请求定制。
- Runtime、协议和认证字段始终优先。用户不能用请求定制替换模型、消息、工具、流式或 认证信息。
- 自定义值作为普通连接设置保存。API Key 和其他密钥必须使用专用凭据字段,不应写入 自定义请求头或请求体。