Skip to content

fix(glm): preserve and compose OpenAI recovery requests - #16135

Merged
diegosouzapw merged 1 commit into
release/v3.8.52from
fix/14629-glm-recovery-1010
Oct 10, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.52from
fix/14629-glm-recovery-1010

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

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:

  • Returned body: 1 failure and 1 control, then 2/2 passed.
  • Known-field 400 and reasoning-to-field chain: 2 failures and 2 controls, then 4/4 passed.
  • Learned limits across all three reasoning carriers: 3 failures and 4 controls, then 7/7 passed.

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.

@github-actions

Copy link
Copy Markdown
Contributor

CI Coverage Report

  • Coverage job: skipped
  • PR test policy: success

Coverage artifact was not available for this run.

@diegosouzapw
diegosouzapw merged commit e56318f into release/v3.8.52 Oct 10, 2026
26 of 51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant