Skip to content

fix: recover from canceled cascade panel transport - #64

Merged
dwgx merged 1 commit into
dwgx:masterfrom
baily-zhang:fix/cascade-transport-cancel
Apr 25, 2026
Merged

fix: recover from canceled cascade panel transport#64
dwgx merged 1 commit into
dwgx:masterfrom
baily-zhang:fix/cascade-transport-cancel

Conversation

@baily-zhang

Copy link
Copy Markdown
Contributor

背景

在 Claude Code / OpenCode 这类重客户端场景下,部分请求会在 InitializeCascadePanelState 阶段收到 The pending stream has been canceled,随后代理持续返回 502。此时账号本身通常仍然健康,问题不在 token、额度或模型权限,而在 Cascade/本地语言服务器的 HTTP/2 transport 会话已经进入坏状态。

这次修复了什么

  • 识别 pending stream has been canceled、ERR_HTTP2、session closed、ECONNRESET 等 Cascade transport 异常。
  • 一旦 warmup 或聊天阶段命中这类异常,主动清理复用中的 HTTP/2 session、workspaceInit 和 sessionId,避免后续请求继续复用坏会话。
  • 不再吞掉 warmupCascade() 的 transport 失败,避免日志显示初始化成功、实际会话已坏的误导状态。
  • 将这类错误统一归类为 upstream_transient_error,并在多账号重试链路中按瞬态上游错误退避处理,而不是误判成限流或模型不可用。
  • 补充回归测试,验证流式错误能够保留 upstream_transient_error。

验证

  • npm test
  • 本地 /health 检查通过

@dwgx
dwgx merged commit 8a3a9ca into dwgx:master Apr 25, 2026
2 checks passed
huanchen pushed a commit to huanchen/WindsurfAPI that referenced this pull request May 3, 2026
识别并清理 Cascade transport 异常(pending stream canceled / ECONNRESET / ERR_HTTP2 / session closed),命中后主动 closeSessionForPort + 清 lsEntry workspaceInit/sessionId 强制重建会话。warmup 不再吞 transport 错误避免日志误导,统一归类为 upstream_transient_error 在多账号链路退避,附回归测试。

感谢 @baily-zhang
dwgx pushed a commit that referenced this pull request May 9, 2026
识别并清理 Cascade transport 异常(pending stream canceled / ECONNRESET / ERR_HTTP2 / session closed),命中后主动 closeSessionForPort + 清 lsEntry workspaceInit/sessionId 强制重建会话。warmup 不再吞 transport 错误避免日志误导,统一归类为 upstream_transient_error 在多账号链路退避,附回归测试。

感谢 @baily-zhang
dwgx pushed a commit that referenced this pull request Jun 4, 2026
识别并清理 Cascade transport 异常(pending stream canceled / ECONNRESET / ERR_HTTP2 / session closed),命中后主动 closeSessionForPort + 清 lsEntry workspaceInit/sessionId 强制重建会话。warmup 不再吞 transport 错误避免日志误导,统一归类为 upstream_transient_error 在多账号链路退避,附回归测试。

感谢 @baily-zhang
dwgx added a commit that referenced this pull request Jun 29, 2026
Backfill contributors who were merged but never added to the thanks
page, with weight tiers calibrated against existing entries:

- #64  baily-zhang (S)  — cascade transport canceled-session recovery
- #163 you922 (A)       — LS crash self-heal: exponential-backoff restart
- #204 lovivi (B+)      — glm-5.2 gpt_native tool dialect fix
- #90  smeinecke (B+)   — inline proxy on add-account form
- #88  smeinecke (B+)   — ALLOW_PRIVATE_PROXY_HOSTS opt-in for local proxy
- #89  smeinecke (B)    — login-flow i18n + error-code standardization

Synced src -> docs via sync:contributors. Also gitignore .workflow-results/
(local audit artifacts, not source). dashboard tests 17/17.
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