Repository navigation
fix: lower the client request-body budget so the size checks can trigger - #462
Closed
hetaoBackend wants to merge 1 commit into
Closed
hetaoBackend wants to merge 1 commit into
hetaoBackend wants to merge 1 commit into
Conversation
The 64 MiB request-body budget was above every MiniMax delivery channel (direct ~28 MB, Bedrock ~16-18 MB), so the pre-send check and the byte-based automatic compaction never fired before the provider returned 413. - Default and MiniMax catalog budget: 16 MiB (strictest channel; the managed client cannot tell which channel serves it). - MiniMax API-key path (minimax_api, a direct channel): 28 MiB. - Custom providers keep their declared max_request_body_bytes, defaulting to 16 MiB. - Automatic compaction now starts at 90% of the budget, leaving headroom between the estimate and the final serialized body. max_image_bytes_inline is unchanged.
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.
Problem
max_request_body_bytesdefaulted to 64 MiB, both as the client fallback and in the bundled MiniMax catalog. Real MiniMax channels reject much smaller bodies: about 28 MB direct and 16–18 MB on Bedrock. As a result, the pre-send body check (assertRequestBodyFits) and byte-based automatic compaction (serializedBytes > maxSerializedInputBytes) never fired before the provider answered 413.Fix
DEFAULT_MAX_REQUEST_BODY_BYTES) and MiniMax catalog M3/M3.1 budget: 16 MiB. This is the strictest channel; the managed client cannot tell which channel serves a request. A remote model snapshot that declares its own value still wins.minimax_api, a known direct channel): 28 MiB, viaresolveMaxRequestBodyBytes.max_request_body_bytesand default to 16 MiB.automaticCompactionByteTrigger). This leaves headroom between the footprint estimate and the final serialized body; the hard pre-send check stays at 100%.max_image_bytes_inlineis unchanged.Tests
local-model-resolver.test.ts:minimax_api, andminimax+ API-key source, resolve to 28 MiB;context-compaction.test.ts: the 90% trigger values.model-ref.test.tsandconfig/test/builtin-model-fallback.test.ts.pnpm typecheck, the capability suite (214 files, 5391 passed) andcheck:sourcepass.Open questions
max_request_body_bytesso the managed path can use more than 16 MiB?Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.