Skip to content

feat(summary): allow thinking depth on summary function models - #1152

Open
3316891527 wants to merge 2 commits into
AAswordman:devfrom
3316891527:feat/summary-thinking-option
Open

feat(summary): allow thinking depth on summary function models#1152
3316891527 wants to merge 2 commits into
AAswordman:devfrom
3316891527:feat/summary-thinking-option

Conversation

@3316891527

@3316891527 3316891527 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

变更说明 / Description

订阅套餐强制开启思考时,总结请求一直以 enableThinking=false 发出去,会被后端拒绝。这次让总结功能可以独立配思考开关和档位,不和聊天全局开关抢同一份状态。

背景与动机 / Context and motivation

Fixes #1148. 聊天走全局 enableThinkingMode + 模型配置上的 thinkingOptionId;总结 ConversationService.generateSummaryFromPromptTurnssendMessage 时不传 enableThinking,默认 false。协议已有 ThinkingQualityMapping / ThinkingConfigurationApplier,不把聊天滑条搬进设置。

改动范围 / Changes

  • FunctionConfigMapping 增加 enableThinking / thinkingOptionId;换模型时保留这两个字段
  • AIService.sendMessage 增加可选 thinkingOptionId,Provider 请求体优先用这一次传入的档位
  • 总结请求从功能映射读开关和档位后传入 sendMessageLEVELS 且为空时回退到绑定模型配置的档或第一档
  • 在「功能模型与配置」的总结卡片下加 32.dp 小按钮/下拉;TOGGLE_ONLY 只显示开关,UNSUPPORTED 隐藏,reasoningRequired 锁开
  • 不改聊天滑条、不改上下文总结设置页、不新写思考协议;标题生成本次不做

兼容性与风险 / Compatibility and risks

旧功能映射 JSON 缺字段时默认关闭思考,行为与改前一致。只有用户在总结项下打开思考后,请求才会带档位。

关联 Issue / Related issue

Fixes #1148

验证方式 / Verification

检查或命令:
- FunctionalConfigMappingRepairTest
- ThinkingQualityMappingTest
- ColdStreamCancellationTest
- fork 上触发 android-tests.yml、android-build.yml (assembleDebug)

环境与变体:
- 本地 Ubuntu 环境没有 Android SDK,未跑 Gradle
- 未用订阅套餐模型真机跑总结
结果:
- 签名已对齐;总结请求带 enableThinking / thinkingOptionId
- 真机订阅套餐总结:未跑

检查清单 / Checklist

  • 已记录可复现验证和未运行项原因
  • 目标分支为 dev
  • 工作流已在工作分支上触发
  • diff 无无关/临时/敏感内容

Fixes AAswordman#1148. Summary requests used sendMessage without enableThinking, so subscription models that require reasoning failed. Store thinking on FunctionConfigMapping, pass it through sendMessage, and add a small toggle/menu under the summary card in functional config.
@3316891527
3316891527 marked this pull request as ready for review September 8, 2026 16:39
Make getThinkingRequestForFunction internal so it can return FunctionThinkingRequest. Pass Gemini testConnection sendMessage args by name after thinkingOptionId was added.
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.

1 participant