Repository navigation
[PR] fix: preserve Google thinking budgets after tool errors - #7185
Merged
ranxianglei merged 1 commit intoNov 20, 2026
Merged
ranxianglei merged 1 commit into
ranxianglei merged 1 commit into
Conversation
…7183) Carry explicit function-response errors into the existing structural classifier. Keep clean-result effort routing and the requested error-recovery budget distinct.
This was referenced Nov 18, 2026
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.
Fixes #7183.
Problem
With output steering enabled, a Google function response containing an explicit error is classified as a clean mechanical continuation. The actual HTTP forwarder reduces
thinkingBudget: 8000to128even after a permission failure or partial tool failure, instead of preserving the budget requested for recovery.Change
Carry the presence of an own top-level
functionResponse.response.errorfield into the existing structuralisErrorflag. The kernel already keeps effort unchanged for that flag. This follows the Google FunctionResponse error carrier.An explicit error carrier preserves the requested budget, including
null/falsevalues; this is a conservative clean-result rule. Anerrorkey nested in ordinaryoutputdata remains ordinary output. A successful parallel result cannot conceal another tool's error.The production change is confined to the Google adapter. Existing configuration, kernel code, and verbosity directives are unchanged.
Validation
3f0c1d21, with this worktree's rebuiltacp-kernel0.0.199 and pi-subagents 0.2.4.npm run typecheck,npm run build,npm run check:test-import-graph, andgit diff --checkpass.Audited 267 fork heads and 22 upstream file-history commits. All three historical file versions retain the same Google normalizer; the older #1096 classifier and #1257 normalizer also omit this error signal.