fix(provider): stop compaction summaries inheriting reasoning effort / 压缩摘要请求强制无推理,避免思维等级消耗摘要预算 (#9613) - #9778
Open
myipanta wants to merge 1 commit into
Open
Conversation
…/ 压缩摘要请求强制无推理,避免思维等级消耗摘要预算 (esengine#9613)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:buildRequestBodynow prefers a per-requestreq.EffortOverride(non-empty), falling back to the configured clientc.effortonly when no override is set. TheEffortOverridewire 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:summaryRequestsetsEffortOverride: "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
TestEffortOverrideWinsOverClientEffort(internal/provider/responses): a request with no override inherits the client effort (high →reasoning.effort=high); a request withEffortOverride: "none"serializesreasoning.effort=noneeven 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/;gofmtclean.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).