qwen-code/packages/cli
jinye acb0275ecd
fix(serve): Add prompt queue backpressure (#5033)
* fix(serve): add prompt queue backpressure

Add per-session prompt admission limits across the bridge, REST and ACP entrypoints, and SDK clients. The server now rejects full prompt queues before returning accepted semantics, advertises the active limit through capabilities, and documents the behavior with focused tests and design artifacts.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* test(sdk): stabilize pending prompt cleanup

Close the mocked SSE stream explicitly in the pending prompt cap test so cleanup does not rely on abort-driven stream cancellation timing in CI.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* test(sdk): stabilize subscription prompt race

Reject accepted subscription prompts if the event stream has already ended, and make the prompt-cap tests wait for the pending registration before closing or injecting SSE frames.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(sdk): map prompt queue full responses

Map server-side prompt_queue_full responses to DaemonPendingPromptLimitError for both blocking and non-blocking prompt calls, include the session id in the local limit error, and cross-reference the duplicated default prompt cap constants.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* test: keep qwen planning docs ignored

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(serve): address prompt backpressure review

Log synchronous prompt queue rejections, document the sync admission contract, clean up SDK prompt-slot release, and cover the reviewed backpressure edge cases.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(sdk): restore daemon bundle budget headroom

Reduce the generated daemon client bundle slightly and raise the browser daemon SDK bundle budget to 116 KiB so the PR merge ref has practical headroom.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
2026-06-13 18:46:01 +08:00
..
src fix(serve): Add prompt queue backpressure (#5033) 2026-06-13 18:46:01 +08:00
index.ts feat(cli): add CPU profiling support for Chrome DevTools analysis (#4620) 2026-06-03 03:01:29 +00:00
package.json chore(release): v0.18.0 [skip ci] 2026-06-12 22:59:56 +08:00
test-setup.ts perf(cli): code-split lowlight to cut startup V8 parse cost (#4070) 2026-05-15 17:26:18 +08:00
tsconfig.json fix(cli): fix vim mode Esc leak, Enter submit, render lag and implement missing VIM commands (#4677) 2026-06-08 14:38:06 +08:00
vitest.config.ts feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00