Skip to content

fix(provider): stop compaction summaries inheriting reasoning effort / 压缩摘要请求强制无推理,避免思维等级消耗摘要预算 (#9613) - #9778

Open
myipanta wants to merge 1 commit into
esengine:main-v2from
myipanta:fix/9613-compact-no-effort-leak
Open

fix(provider): stop compaction summaries inheriting reasoning effort / 压缩摘要请求强制无推理,避免思维等级消耗摘要预算 (#9613)#9778
myipanta wants to merge 1 commit into
esengine:main-v2from
myipanta:fix/9613-compact-no-effort-leak

Conversation

@myipanta

@myipanta myipanta commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #9613. On long DeepSeek sessions with a reasoning effort configured, manual compaction kept failing; it only succeeded after the user disabled reasoning effort in settings. Root cause: the compaction summary request (which the prompt itself says must be produced directly, without a thinking block) inherited the client-level configured effort, so the thinking model spent the 8192-output summary budget on reasoning and was truncated with an empty result — compaction failed.

internal/provider/responses/responses.go:

  • buildRequestBody now prefers a per-request req.EffortOverride (non-empty), falling back to the configured client c.effort only when no override is set. The EffortOverride wire field was previously never read on the Responses adapter — ordinary conversation requests set no override, so their wire is unchanged; only requests that set one (compaction, ACP) change.

internal/agent/compact.go:

  • summaryRequest sets EffortOverride: "none", forcing compaction summaries to skip reasoning as their prompt already demands. Compaction now works while the user keeps a reasoning effort configured.

Issues

Fixes #9613

Verification

  • New test TestEffortOverrideWinsOverClientEffort (internal/provider/responses): a request with no override inherits the client effort (high → reasoning.effort=high); a request with EffortOverride: "none" serializes reasoning.effort=none even when the client effort is high (or empty).
  • go test ./internal/provider/responses/ ./internal/agent/ — existing effort-alias/alias-to-high/token-default tests and the compaction suite all pass.
  • go vet ./internal/provider/responses/ ./internal/agent/; gofmt clean.

Documentation impact

Documentation-impact: none - behavior fix for summary/compaction only; no user-facing config or docs/*.md change.

Cache impact

Cache-impact: none - compaction summary requests are run-time, turn-tail writes; only a reasoning-effort override leaks there is removed. The stable system-prompt prefix and provider-visible tool schema/list are byte-identical, so the prefix-cache stays warm.

Cache-guard: go test ./internal/provider/responses/ -run TestEffortOverrideWinsOverClientEffort -count=1 + go test ./internal/agent/ (existing compaction suite).

…/ 压缩摘要请求强制无推理,避免思维等级消耗摘要预算 (esengine#9613)
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development agent Core agent loop (internal/agent, internal/control) provider Model providers & selection (internal/provider) labels Sep 4, 2026
@myipanta myipanta changed the title fix(provider): stop compaction summaries inheriting reasoning effort … fix(provider): stop compaction summaries inheriting reasoning effort / 压缩摘要请求强制无推理,避免思维等级消耗摘要预算 (#9613) Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) provider Model providers & selection (internal/provider) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

压缩/摘要请求继承 reasoning.effort(思维等级),导致关闭思考强度后压缩才能成功

2 participants