qwen-code/packages/core/src
Shaojin Wen 6254b85cb6
fix(core): detect rate-limit errors from streamed SSE frames (#3246)
DashScope throttling (`Throttling.AllocationQuota`) surfaces as an
SSE `event:error` frame mid-stream with `:HTTP_STATUS/429` as a
comment and a non-numeric `code` in the payload. The existing
detection paths missed it, so subagents failed immediately with
`Failed to run subagent: id:1 event:error ...` instead of retrying.

- `getErrorStatus`: add a final fallback that parses `HTTP_STATUS/NNN`
  out of `error.message`, bounded by `\b` and the 100-599 range, so
  streamed errors where the SDK never sees a real HTTP status can
  still be classified.
- `getErrorCode`: fix three `|| null` early-returns that swallowed
  later fall-through paths when the provider code was non-numeric
  (`isApiError` top-level, `isApiError` JSON-in-message, and
  `isStructuredError`). The branches now fall through on non-numeric
  values so `.status` or the new `HTTP_STATUS/NNN` fallback can
  recover the real code.
2026-04-14 19:58:26 +08:00
..
__mocks__/fs pre-release commit 2025-07-22 23:26:01 +08:00
agents feat(core): implement fork subagent for context sharing (#2936) 2026-04-14 14:27:38 +08:00
config feat(core): add microcompaction for idle context cleanup (#3006) 2026-04-13 18:51:35 +08:00
confirmation-bus test: add tests for confirmation-bus, prompt-registry, and cli/core modules (#2272) 2026-04-09 13:54:59 +08:00
core feat(core): add microcompaction for idle context cleanup (#3006) 2026-04-13 18:51:35 +08:00
extension feat(subagents): propagate approval mode to sub-agents (#3066) 2026-04-13 17:50:26 +08:00
followup fix(followup): fix follow-up suggestions not working on OpenAI-compatible providers (#3151) 2026-04-12 16:07:00 +08:00
hooks feat: add stopFailure and postCompact (#2825) 2026-04-13 12:54:44 +08:00
ide refactor(ide): optimize connection config lookup and remove time-based lock cleanup 2026-03-10 14:54:37 +08:00
lsp fix(lsp): improve C++/Java/Python language server support 2026-03-21 01:27:00 +08:00
mcp fix(mcp): clear OAuth callback timeout on all completion paths 2026-04-04 14:50:02 -07:00
mocks chore(usage telemetry): Freshen up Clearcut logging (#6013) 2025-08-12 18:31:59 +00:00
models feat: add Qwen3.6-Plus model support 2026-04-02 12:09:17 +08:00
output Headless enhancement: add stream-json as input-format/output-format to support programmatically use (#926) 2025-11-21 09:26:05 +08:00
permissions feat(subagents): add disallowedTools field to agent definitions (#3064) 2026-04-13 18:24:02 +08:00
prompts test: add tests for confirmation-bus, prompt-registry, and cli/core modules (#2272) 2026-04-09 13:54:59 +08:00
qwen fix(core): handle empty OAuth refresh response body (#3123) 2026-04-12 11:08:23 +08:00
services feat(core): add microcompaction for idle context cleanup (#3006) 2026-04-13 18:51:35 +08:00
skills feat(skills): add model override support via skill frontmatter (#2949) 2026-04-13 17:57:41 +08:00
subagents fix(core): allow Unicode characters in agent names (#3194) 2026-04-13 18:24:13 +08:00
telemetry feat(plan): add "Yes, restore previous mode" option when exiting plan mode (#3008) 2026-04-09 14:25:38 +08:00
test-utils refactor: merge test-utils package into core (#3200) 2026-04-13 17:11:03 +08:00
tools feat(core): implement fork subagent for context sharing (#2936) 2026-04-14 14:27:38 +08:00
utils fix(core): detect rate-limit errors from streamed SSE frames (#3246) 2026-04-14 19:58:26 +08:00
index.test.ts pre-release commit 2025-07-22 23:26:01 +08:00
index.ts feat(ui): rewrite customizable status line 2026-04-06 08:04:20 +08:00