Repository navigation
fix(backend): add structure-aware chat admission - #8296
diegosouzapw merged 1 commit into
Conversation
69b428e to
797c952
Compare
Co-Authored-By: Claude <noreply@anthropic.com>
797c952 to
00af177
Compare
|
Rebased the branch onto the latest The diff contains only the focused #8276 implementation/tests/docs. Also incorporated review hardening: bounded object iteration, fail-heavy inspection exhaustion, schema-key accounting, and conservative non-ASCII token estimation. Focused suite: 26 passed. |
|
CI note: the failing fast-path shards include repository-wide baseline failures outside this PR’s changed files (for example DashScope video assertions appear on multiple unrelated PRs). The focused tests listed in this PR body pass locally. I am still checking for any failure attributable to this patch. |
|
Thanks, @RaviTharuma! 🙏 Merged — structure-aware chat admission middleware (validates request body shape before dispatch). Rebased onto the current release tip; 22/22 admission tests green. |
08a21bc
into
cheaper-inference:release/v3.8.49
Summary
413Scope
This is the smallest native structure-aware admission slice for the release branch. It deliberately reuses the existing immediate retryable
503behavior rather than retaining parsed requests in a new in-process queue. Queueing, cgroup recovery gating, and metrics remain follow-up scheduler work.Tests
node --import tsx/esm --import ./open-sse/utils/setupPolyfill.ts --test tests/unit/chat-body-admission.test.ts tests/unit/chat-completions-parse-once-7847.test.ts— 23 passedgit diff --check— passednpm run test:coverage— blocked before tests by the shared Node 26 dependency install (yargsCommonJS entry throwsrequire is not defined)npm run typecheck:core— blocked by missing installed modules (safe-regex,@toon-format/toon,omniglyph,sql.js,ioredis,js-tiktoken)npm run check:docs-all— changed env vars are synchronized; repository baseline still reports unrelated missingGROK_AUTH_PATH/OMNIROUTE_VNC_CONTAINER_VNC_PORTentriesChanged test file:
tests/unit/chat-body-admission.test.ts.Coverage result: unavailable because the coverage runner fails during
c8startup under the current Node 26/shared dependency environment, before test execution.Closes #8276