Repository navigation
fix(glm): preserve and compose OpenAI recovery requests - #16135
Merged
Merged
Conversation
This was referenced Oct 10, 2026
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.
GLM OpenAI requests could retry with a corrected reasoning body but return the rejected original body to the caller. Known-field HTTP 400s also bypassed recovery, and later calls repeated an already learned reasoning rejection.
The executor now adopts the body sent by recovery, composes the existing bounded field-downgrade helper, and applies only previously learned reasoning limits before sending the next OpenAI request. The caller input, model/provider identity, headers, abort signal, and Anthropic transport contract are preserved. No shared recovery helper is changed.
Refs #14629
This is the GLM/OpenAI portion of the umbrella issue. NineRouter is covered separately by #16133; CLIProxyAPI and CommandCode residuals are still being handled.
Validation
Three TDD stages on exact base
122b43b35dbacab03ea67d0f0b46e713280ccd86, with an identical fixture hash within each failing/passing pair:The final focused matrix passed 18/18, including retry bounds, explicit reasoning 422 versus generic field 422, model/provider separation, Anthropic controls before and after learning, and useful SSE output.
The 36-file importer/related selection initially produced 343 tests: 339 passed and 4 failed because the temporary deny-all network guard blocked real process-owned loopback servers in one existing redirect fixture. That file was rerun with only its own bound loopback ports admitted: 14/14 passed. Both runs are retained; no test or production code was changed to fix the harness, and the initial run is not reported as a fully green run or a base defect. External traffic remains blocked.
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 remained unchanged. Tests use synthetic state and intercepted transport; no live GLM account or release deployment was exercised.
Normal automatic commit hooks passed with all three file hashes unchanged. PR source/test, anti-masking, and evidence policies passed against the actual committed diff before publication. Hosted CI and merge are pending.