Repository navigation
fix(cliproxyapi): preserve recovery bodies and tool identity - #16137
Merged
diegosouzapw merged 1 commit intoOct 10, 2026
Merged
Conversation
Contributor
CI Coverage Report
Coverage artifact was not available for this run. |
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.
CLIProxyAPI could return the rejected original request body after a successful retry, lose private tool identity metadata while copying request bodies, and bypass known-field HTTP 400 recovery or repeat already learned reasoning rejections.
The executor now adopts the effective recovery body, composes the existing bounded field-downgrade helper, and applies observed reasoning limits on later requests. Body copies preserve tool-map descriptors; cloaking copies aliases without mutating the caller, and both private metadata channels remain excluded from every HTTP attempt. Shared recovery helpers remain unchanged.
Refs #14629
This is the CLIProxyAPI portion of the umbrella. NineRouter #16133, GLM #16135 and CommandCode #16136 are separate deliveries. Override-contract documentation and the preventive guard remain tracked; this PR does not automatically close the umbrella.
Validation
Three TDD stages on base
122b43b35dbacab03ea67d0f0b46e713280ccd86, each with an identical fixture hash within its failing/passing pair:The final focused matrix passed 28/28. It exercises both CPA transports, real Responses translation into CPA and restoration of tool aliases/namespaces, caller immutability, retry bounds, provider/model separation, SSE, signal, headers and credential attribution.
All 37 importer/related files passed: 506/506 tests, with zero failures, skipped or cancelled cases. The 28 focused cases are included in this count. No full-repository suite or live CPA instance is claimed.
Core/dashboard typechecks, both complexity gates, focused ESLint/Prettier, file-size, changelog integrity and test discovery passed. Independent SPEC/Standards review found no blockers and verified excluded dependencies unchanged. Tests use synthetic state and intercepted transport.
Normal automatic commit hooks passed with all three hashes unchanged. Source/test, anti-masking and PR-evidence policies passed against the actual committed diff before publication. Hosted CI and merge remain pending.
The anti-masking gate emits one report-only similarity advisory for
descriptor?.value instanceof Map. Review confirmed this is a positive shape assertion on the real executor/translator result, followed by descriptor, alias and round-trip assertions; it does not reimplement the copy helper. No suppression or policy change was added.