Repository navigation
Conversation
This branch has not been deployed
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 and behavior
Large request bodies can legitimately sit silent well past the flat 30s direct response-start window: prefill scales with input size, and a plain large-context request carries no
reasoning_effortselector for the existing reasoning ceiling (REASONING_READINESS_CEILING_MS) to key on — so the fetch-layer guard cut healthy slow-prefill upstreams at exactly the floor and surfaced 504s the stream-readiness layer would have permitted.Changes
resolveFlatDirectHeadersFloorMsraises the flat floor by payload tier: ≤512 KB unchanged (a small body overrunning the probe still smells like a dead connection, per fix(network): direct dispatcher stalls opencode-go and command-code until service restart #10214), >512 KB ×2, >2 MB ×3, capped at 180 s — composing with the existing effort/local raises via raise-only semantics.OMNIROUTE_DIRECT_HEADERS_VOLUME_ADAPTIVE(0/false/offpins the flat behavior), registered in.env.exampleanddocs/reference/ENVIRONMENT.md.Validation
TDD —
tests/unit/direct-response-start-timeout-volume-tier.test.tsfailed before the fix on 4/7 (the resolver returned the flat 30000 for every tier), passes 7/7 after:direct-response-start-timeout-reasoning-504.test.ts+direct-response-start-timeout-settled-guard-12861.test.ts— 17 pass.npm run check:env-doc-syncin sync · eslint clean on the touched module.Notes
max(base, min(base * factor, 180s)), composes order-independently with the effort and local/LAN raises, and can never pull the window below an operator override or the local floor (test 4 pins the cap, test 5 pins the never-lower rule).TextEncoderon the already-serialized body string the resolver binds once per request (same binding the reasoning-effort regex uses) — no extra serialization on the request path.OMNIROUTE_DIRECT_HEADERS_VOLUME_ADAPTIVEunset) = enabled tiering as described; the kill switch restores today's flat behavior exactly.release/v3.8.53(active release branch); aware of the 3.8.55v4-featureretarget policy.