Skip to content

fix: preserve reasoning_content for every assistant message (incl. cancelled/partial turns) - #68

Open
dimassfeb-09 wants to merge 2 commits into
MAXeaglet:masterfrom
dimassfeb-09:fix/reasoning-content-backfill-all-assistant
Open

dimassfeb-09 wants to merge 2 commits into
MAXeaglet:masterfrom
dimassfeb-09:fix/reasoning-content-backfill-all-assistant

Conversation

@dimassfeb-09

Copy link
Copy Markdown

Summary

  • Stop injecting empty reasoning blocks for assistant history messages that lack reasoning_content. Fabricating reasoning changes semantics and can be rejected by upstream.
  • Track missing reasoning across assistant messages.
  • When the client enables thinking mode but any assistant history message is missing reasoning, omit reasoning_effort as an effective fallback instead of fabricating reasoning.
  • Adjust content-array reasoning dedup so an existing reasoning part is not duplicated only when no reasoning_content field was present.

Testing

  • node --check proxy.mjs passes.
  • No test changes included in this PR.

Notes

  • config.json is intentionally excluded.

@dimassfeb-09
dimassfeb-09 force-pushed the fix/reasoning-content-backfill-all-assistant branch from a1422ad to 0d63913 Compare October 20, 2026 04:46
@dimassfeb-09 dimassfeb-09 changed the title fix: don't fabricate reasoning_content; disable thinking mode as fallback fix: preserve reasoning_content for every assistant message (incl. cancelled/partial turns) Oct 20, 2026
qingdeng888 added a commit to qingdeng888/commandcode-proxy that referenced this pull request Oct 27, 2026
qingdeng888 added a commit to qingdeng888/commandcode-proxy that referenced this pull request Oct 27, 2026
把 PR MAXeaglet#53 与 MAXeaglet#46 的开关真正接进本 fork 的配置体系,并补上验证与文档:

- config.json.example 补上 useProviderModels / useProviderModelsWithPlanFilter / webSearch
  三个字段(模板里此前完全没有它们,用户从模板起步就看不到这两个新开关)。
- 后台「设置」页展示这两个开关的当前状态(describeConfig 早就返回了,
  前端此前没有渲染,等于新开关在面板上不可见)。
- docs/admin-api.md 的 GET /admin/api/config 示例补上两个字段,并修正两处
  还停在 1.1.0 的 version 示例(实际已是 1.3.0)。
- docs/design-notes.md 新增 5.1:记录这次从上游挑着合并的完整取舍表 ——
  哪些合、哪些不合、为什么,以及两处与既有实现的语义交叉
  (MAXeaglet#68 的 reasoning_effort 扣留 vs 占位符回填;MAXeaglet#46 的搜索循环 vs issue MAXeaglet#20 的对象树回收)。
- test/admin.test.mjs 新增 3 条:两个新开关走通配置分层(可读 / 可热改 / 可落盘且只写改动字段)、
  CC_WEB_SEARCH 锁定后后台改不动、CC_USE_PROVIDER_MODELS_WITH_PLAN_FILTER 的来源标记为 env。

全量 238 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.

1 participant