Repository navigation
fix(admission): reserve Responses and Messages bodies before clone - #10814
diegosouzapw merged 3 commits into
Conversation
|
Follow-up commit also wraps remaining handleChat aliases from #10790 (antigravity, /v1/api/chat, /v1/completions, provider-scoped chat, relay) with the same withChatAdmission composer. |
5f0be19 to
31ff7d7
Compare
|
Rebased onto current release/v3.8.50 via #10828 (f5be5dd). Conflict in src/app/api/v1/responses/route.ts: kept the keepalive rewrite's inline admitChatRequest + createInjectionGuard (wrapping withChatAdmission would double-admit). withChatAdmission still wraps /v1/messages, responses catch-all, and remaining handleChat aliases. Merge is MERGEABLE. Does not merge. |
|
Admission-local CI on Pushed Not dummy-fixing the sibling FQG trio ( |
efaf2ba to
4c54ca3
Compare
4c54ca3 to
0781ec4
Compare
|
Removed the shared #10828 drain commits from this branch so the diff is feature-only again (it had been ~100 files of i18n/catalog/CI dump stacked under the real change). Rebased onto current |
|
Docs Gates on This PR is admission-only. Not restacking the drain. Does not merge. |
…iegosouzapw#10814) Merged — validated together with a batch of related RaviTharuma PRs in one combined worktree (typecheck:core clean, complexity/file-size/changelog gates green, focused tests passing). Thanks for the contribution!
Rebased onto current
release/v3.8.50with no fork-CI commits and no rewrite ofchatBodyAdmission.ts.This closes the gap in #10786:
POST /v1/responses,POST /v1/responses/*, andPOST /v1/messagesstill ranwithInjectionGuard(unconditionalrequest.clone()+.json()) without the process-wide budget that Chat Completions already uses.withChatAdmissionis a thin composer around the shipped APIs:admitChatRequest(process-wide budget + per-session fairness, fix(admission): preserve process-wide bounds across byte-level connection lanes #10110/feat(backend): Per-connection virtual admission lanes for agentic workloads #9654)releaseChatAdmissionAfterHandler(lease held through SSE / released on handler failure)It does not add a second admission controller. Composition is
withChatAdmission(withInjectionGuard(postHandler))so reservation happens before clone.Tests call the shipped
admitChatRequest/ChatAdmissionController/withChatAdmission(second large body -> 503chat_admission_busy, handler not invoked).Supersedes closed #10789 (that branch was cut from an older
chatBodyAdmissionand carried unrelated fork CI). Remaining handleChat aliases are still tracked in #10790.Refs #10786 #7847