zai-org / zai-org/feedback

连接状态误报:辅助接口 usage-stats 轮询失败导致 UI 显示「重新连接」,模型链路实际健康(Connection status falsely shows Reconnecting when only usage-stats polling fails)

Open
#511 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: P2
Dominant language
No language data
Stars
22
Forks
1
PR merge metrics
No merged PRs in 30d

Description

连接状态误报——辅助接口 usage-stats 轮询失败导致 UI 显示「重新连接」,但模型链路实际健康

环境
  • ZCode Desktop 3.10.2-6414(deb)/ Linux amd64 / GLM Coding Plan(open.bigmodel.cn)
  • 网络:直连(无系统代理劫持场景下也复现);无 IPv6(仅 IPv4 出口)
现象

模型会话正常工作期间,UI 持续显示「重新连接」。日志显示 BigModelUsageQuotaProvider.getCodingPlanResetStatus 每 60 秒整点轮询 coding-plan/reset-status 失败(read ECONNRESET / Client network socket disconnected before secure TLS connection was established,63–115ms 快速失败),而同一时间窗内模型 API 请求成功、/goal 会话正常推进(工作产出持续落盘)。

对照证据
  • 对同域同路径直接 curl(GET / POST / HTTP2)均正常返回 401(未带 key 的正常响应),持续 10/10 稳定
  • 仅 ZCode 进程内的 usage-stats 轮询失败;chat/completions 主链路同域同 TLS 栈零报错
  • 断连为间歇性:同环境一段时间后自动恢复(期间无任何进程/配置变更),疑似出口链路对长会话辅助流量的间歇性干扰
影响
  1. 用户误判断连:状态灯显示断连,实际模型可用——本次排查中被误导一整轮(先查代理、连接池,最后才发现模型一直在正常干活)
  2. 受限网络环境下状态灯可能永久性显示异常,失去指示价值
  3. 掩盖真正的模型链路故障:真断连与辅助轮询失败在 UI 上无法区分
期望
  1. 连接状态指示区分「模型 API 通道」与「辅助服务通道」:usage/遥测类轮询失败不应驱动全局「重新连接」状态
  2. usage-stats 失败建议静默降级(记录日志即可),或仅作独立的小标识
  3. 连接类报错附目标域名与通道分类,便于用户自查是哪条链路断了
备注

辅助接口在部分网络环境下不可达是常态(防火墙策略、代理拦截等),把它的失败映射为面向用户的「断连」状态,会让这些环境下的连接指示永久失真。模型 API 与辅助通道分离指示后,本问题自然消解。


Evidence available on request: full log excerpts with timestamps (usage-stats FAIL cadence vs concurrent /goal work), curl comparisons.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing BigModelUsageQuotaProvider.getCodingPlanResetStatus and the usage-stats polling path, then inspect how failures from coding-plan/reset-status update the global connection indicator while /goal requests remain healthy. Done means usage-stats failures no longer show the model as reconnecting, while genuine model API failures still do and the affected channel is identifiable in logs or the UI.

Written by the indexing model from the issue text.

Assessment

Domain
desktop, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.