Skip to content

feat(settings): support configurable LLM reasoning effort - #91

Merged
AnnaSuSu merged 2 commits into
AnnaSuSu:mainfrom
KimQ1:feat/configurable-reasoning-effort-20261018t123610
Oct 19, 2026
Merged

AnnaSuSu merged 2 commits into
AnnaSuSu:mainfrom
KimQ1:feat/configurable-reasoning-effort-20261018t123610

Conversation

@KimQ1

@KimQ1 KimQ1 commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

变更说明

  • 在 LLM 设置页新增推理强度选择,当前选择同时用于连接测试和保存后的请求;切换兼容模式时清除旧档位及测试结果。
  • 将可选的 reasoning_effort 贯通设置契约、持久化、解析和普通/流式请求,并重新生成 OpenAPI 与前端类型。
  • 通用模式显式启用推理时省略不兼容的 Temperature,使用 max_completion_tokens;未选择时保留上游默认行为。
  • DeepSeek 未显式选择时保留原有场景默认值;显式选择优先,不对提供商不支持的档位静默降级。
  • 连接配置或来源变化后使旧连接测试失效,防止迟到的成功/失败覆盖当前档位的结果。
  • 补充设置、HTTP 契约、提供商及真实组件回归测试和设置说明。

范围与兼容性

本 PR 独立基于上游 main,不依赖 Markdown 修复 PR。不包含 Docker 配置、本地部署文件、Windows 安装包、其他索引/Embedding 改动或模型提示词调整。

新字段可选,旧配置继续兼容;档位是否可用仍取决于实际模型和网关支持。

实际验证

  • bun --no-env-file run gen:api:生成件一致性检查通过。
  • bun --no-env-file run check --publish never:最终退出码 0;后端 556 项、前端 Node 22 项及 Bun 33 项测试通过;类型、架构边界、ESLint、API/Web/Electron 构建和 Windows 未安装目录打包通过。
  • 浏览器挂载本分支真实 Settings 组件并使用离线合成 API:选择 high,测试和保存请求均携带该值;刷新后仍为 high,Temperature 禁用,未出现未知业务请求。
  • 浏览器延迟旧档位探针响应,确认旧成功不能覆盖新失败、旧失败不能覆盖新成功;11 项真实组件测试涵盖相关竞态。
  • git diff --check 通过。

验证未使用真实用户资料或付费模型;既有非阻塞 ESLint 警告和 Vite 分块体积警告不在本 PR 范围。

界面截图

截图使用合成配置,不含真实凭据。

推理强度选择

KimQ1 and others added 2 commits October 18, 2026 20:58
Give streaming requests at least 8192 total output tokens when reasoning is enabled, while preserving disabled reasoning budgets. Report a provider error if the budget is exhausted before visible output and retain usage accounting. Cover real Copilot-to-provider requests for generic and DeepSeek configurations, empty truncation, and partial answers.
@AnnaSuSu
AnnaSuSu merged commit b3ccb74 into AnnaSuSu:main Oct 19, 2026
3 checks passed
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.

2 participants