Repository navigation
test(api): lock the filtered models response against a stale content-length - #15369
Merged
diegosouzapw merged 1 commit intoOct 6, 2026
Merged
diegosouzapw merged 1 commit into
diegosouzapw merged 1 commit into
Conversation
…length The provider models route rewrites the catalog body down to one provider, so the upstream content-length must not ride along. That was fixed before, but nothing kept it fixed. This plants a catalog response whose content-length is the full catalog and asserts the filtered response drops it, while a body that is passed through unchanged keeps its own length. The route exposes the catalog loader as a field so the test can plant that response. The field points at the real loader in production. Signed-off-by: Minxi Hou <houminxi@gmail.com>
diegosouzapw
merged commit Oct 6, 2026
e8b1a98
into
diegosouzapw:release/v3.8.52
43 of 51 checks passed
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
content-lengthbelongs to the full catalog, and forwarding it makes the client wait for bytes that never arrive. That was fixed earlier, but nothing kept it fixed.content-lengthis the full catalog and asserts the filtered response drops it, while a body passed through unchanged keeps its own length.Related Issues
Validation
node --import tsx/esm --test tests/unit/provider-models-content-length-15212.test.ts(2 pass)eslinton the changed files, with the repo suppression filerelease/v3.8.52@23a1148486stripStaleEncodingHeaderswith a raw header copy makes the stale-length assertion fail, and the change was restoredTests Added Or Updated
tests/unit/provider-models-content-length-15212.test.ts(added)Coverage Notes
Reviewer Notes
unifiedModelsfield, which exists so the test can reach the handler with a planted response.