Skip to content

fix(admission): queue heavyweight chat requests before 503 busy - #10023

Closed
herjarsa wants to merge 6 commits into
diegosouzapw:release/v3.8.50from
herjarsa:rebase/9816-chat-admission-queue
Closed

herjarsa wants to merge 6 commits into
diegosouzapw:release/v3.8.50from
herjarsa:rebase/9816-chat-admission-queue

Conversation

@herjarsa

Copy link
Copy Markdown
Contributor

Cherry-pick of #9816 (3 commits) onto current main. Original PR was authored against an older snapshot of main and couldn't auto-merge.

Resolutions applied (all took the PR version via --theirs):

  • docs/guides/TROUBLESHOOTING.md — took the PR version (the new admission-queue troubleshooting entries)
  • src/shared/middleware/chatBodyAdmission.ts — took the PR version (the file was new on the PR side; conflict came from unrelated edits to other shared middleware on main)
  • tests/unit/chat-body-admission.test.ts — took the PR version (same reasoning)
  • src/i18n/messages/vi.json — took the PR version (Vietnamese locale parity additions)

The docs(env): register OMNIROUTE_CHAT_ADMISSION_QUEUE_MS in .env.example commit merged cleanly.

Closes the original intent of #9816.

diegosouzapw and others added 6 commits August 8, 2026 00:08
…ouzapw#189, diegosouzapw#190)

Bumps: nanoid ^3.3.17 (was transitive, now overridden), dompurify ^3.4.13
(with monaco-editor scoped override). Closes Dependabot diegosouzapw#189, diegosouzapw#190.

Remaining diegosouzapw#182-diegosouzapw#188 (js-yaml + mermaid) already closed by diegosouzapw#9651 merge —
awaiting Dependabot re-scan.

npm audit → 0 vulnerabilities.
…egosouzapw#190

Closes Dependabot diegosouzapw#189 (dompurify 3.4.13) and diegosouzapw#190 (nanoid 3.3.17). npm audit → 0.
_tasks is a SEPARATE nested git repo (gitignored). The pattern _tasks/ (trailing
slash) ignores only a directory, not a SYMLINK named _tasks. A self-referential
_tasks symlink can slip in via git add -A and, once pulled, checkout materializes
it over the real _tasks repo (destroying plans/specs/hands-off). Anchored /_tasks
ignores the symlink too, preventing re-capture.
Agent clients (OpenCode, Claude Code, Cursor) fan out heavy sub-requests
that land on the admission gate together. With the single heavyweight
slot, concurrent heavy requests were rejected immediately with a
retryable 503; clients burn their retry budget in seconds and the agent
dies mid-task.

Heavy requests now wait up to OMNIROUTE_CHAT_ADMISSION_QUEUE_MS (default
5000ms) for a slot before the 503, served FIFO; 0 restores the legacy
immediate-reject behaviour. Applied to both the byte-based path
(admitChatRequest) and the structure-based path (admitChatStructure, now
async).

# Conflicts:
#	docs/guides/TROUBLESHOOTING.md
#	src/shared/middleware/chatBodyAdmission.ts
#	tests/unit/chat-body-admission.test.ts
Keeps the env/docs contract (check-env-doc-sync, diegosouzapw#7793) in sync with the
new admission queue budget introduced in this PR.
The base's diegosouzapw#9697 (radar referral links) and the New-API aggregator work
added keys to en.json and 42 locales but left vi.json behind: 23 missing
radarPage/providers/miniPlayground keys plus 8 providers.* entries still
carrying __MISSING__ markers. That broke i18n-vi-completeness and the
radar page-tab/key-input tests for every PR against release/v3.8.50.

Adds the missing translations and replaces the __MISSING__ placeholders,
restoring exact en<->vi key parity (11391/11391).

# Conflicts:
#	src/i18n/messages/vi.json
@diegosouzapw

Copy link
Copy Markdown
Owner

This is a stale re-port — the queue-heavyweight feature (#9816) was already cherry-picked into release/v3.8.50 as #9845 (merged). This PR on main duplicates it and adds an i18n regression. Suggest closing in favor of the already-merged feature; if there's a specific gap, let's open a targeted fix against the release branch.

@diegosouzapw

Copy link
Copy Markdown
Owner

Obrigado, @herjarsa! Após verificação esta mudança já está coberta na release: a release release/v3.8.50 já contém a fila de admissão e o OMNIROUTE_CHAT_ADMISSION_QUEUE_MS via #9845 (que entrou por cherry-pick do #9816) — mesmo arquivo (chatBodyAdmission.ts) e mesmo comportamento (admitChatRequest(req, {...})). Mergear de novo reaplicaria código já presente e reintroduziria a regressão i18n em vi.json. Portanto fechando como subsumed (#9845). Se restar um gap específico não coberto, reabra apontando o cenário.

@diegosouzapw

Copy link
Copy Markdown
Owner

Closed as subsumed — coberto pelo #9845 (ver comentário acima).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants