mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-07-09 17:19:02 +00:00
* fix(core): treat request timeout of 0 as disabled instead of aborting immediately A provider `generationConfig.timeout` of `0` (and `QWEN_CODE_API_TIMEOUT_MS=0`) now disables the request timeout, matching the existing `QWEN_STREAM_IDLE_TIMEOUT_MS=0` convention, instead of being coerced to the 120s default (Anthropic `||`) or passed to the OpenAI SDK as `timeout: 0` (which the SDK treats as an immediate abort). - add `resolveRequestTimeout()` + `DISABLED_REQUEST_TIMEOUT_MS`, mapping a disabled timeout to the JS timer ceiling (2^31-1 ms), reusing the same ceiling already used for `MAX_STREAM_IDLE_TIMEOUT_MS` - use it in the OpenAI default/dashscope providers and the Anthropic provider - accept `0` in the `QWEN_CODE_API_TIMEOUT_MS` env override without weakening the shared `parsePositiveIntegerEnv` (relied on by ~15 other callers to reject 0) - document the timeout unit and 0-disables semantics in settings.md Fixes #6049 * Update packages/core/src/core/openaiContentGenerator/provider/dashscope.test.ts Co-authored-by: qwen-code-ci-bot <qwen-code-ci@service.alibaba.com> * test(core): fix broken constants mock merge in dashscope.test Commit 0f5aa0c interleaved two vi.mock('../constants.js') blocks, leaving orphaned fragments that produced TS syntax errors and stopped the dashscope suite from loading. Replace with a single importOriginal-based mock that overrides only DASHSCOPE_PROXY_BASE_URL and delegates every other constant (timeouts, DISABLED_REQUEST_TIMEOUT_MS, resolveRequestTimeout) to the real module, so the mock cannot drift from the implementation. --------- Co-authored-by: qwen-code-ci-bot <qwen-code-ci@service.alibaba.com> |
||
|---|---|---|
| .. | ||
| design | ||
| developers | ||
| e2e-tests | ||
| plans | ||
| superpowers | ||
| users | ||
| verification/abort-controller-refactor | ||
| _meta.ts | ||
| declarative-agents-port.md | ||
| index.md | ||
| yaml-parser-replacement.md | ||