Skip to content

[Bug] 新建任务模型下拉框串行等待 provider:慢端点(IPv6 劣化链路实测挂 10~20s)导致整个列表卡 5~20 秒无提示 #827

Description

@mengcal

问题描述

点击「新建任务」打开模型选择下拉框时,界面会卡住数秒到二十秒才显示出模型列表。等待期间无任何加载提示,用户只能干等。

实测数据(Windows 11 24H2 / ZCode 3.14.1 / 2026-09-27)

对已配置 provider 的端点做分层计时(curl,每端点 6 轮):

端点 结果
open.bigmodel.cn(Anthropic 根路径) 0.15~0.23s,稳定 200
zcode.z.ai(start-plan 根路径) 0.1s,快速响应
api.z.ai 纯 IPv4(curl -4) 0.27s ×6 轮,全部稳定
api.z.ai 纯 IPv6(curl -6) 0.93 / 0.76 / 0.98 / 10.80s,双栈默认首轮 19.7s 超时、另一次握手直接失败

api.z.ai 的 DNS 返回 2 个 AAAA 记录排在 2 个 A 记录之前,客户端(Chromium/undici)默认优先 IPv6;在联通 IPv6 出口到该节点间歇丢包的线路下,连接会挂起 5~20 秒。

推断的产品侧问题

  1. 下拉框数据需要等 provider 侧(模型列表 / 套餐状态)就绪才肯渲染,慢端点会拖垮整个列表,而不是先出快的、慢的稍后补。
  2. 没有对单个 provider 探测设置较短的连接级超时(TCP 建连 2~3 秒就该放弃重试或回退 IPv4)。
  3. 无 IPv4 快速回退(Happy Eyeballs 效果不佳时未见降级)。

期望

  • 各 provider 并行拉取,先到先渲染,未就绪项显示骨架/占位而不是阻塞整个下拉框。
  • 单 provider 探测设 2~3s 连接超时,超时即降级显示"暂不可用",不阻塞其余项。
  • 对同时有 A/AAAA 记录的主机启用更激进的 IPv4 回退(或提供网络协议偏好开关)。

影响

模型列表是新建任务的必经入口,5~20 秒的无提示空白直接让用户以为软件卡死。

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions