new-api icon indicating copy to clipboard operation
new-api copied to clipboard

[Bug] 模型广场 24 小时成功率柱状条间距不均匀

Open jimmyleocn opened this issue 2 months ago • 1 comments

Agent

  • Tool: OpenAI Codex CLI
  • Tool version: 0.153.4
  • Model (full id): gpt-5.6-sol
  • Host (CLI / IDE / GitHub coding agent / other): CLI
  • Date (UTC): 2026-09-09

User request

调查并报告模型广场最近 24 小时成功率柱状展示中,部分相邻柱子间隔明显比其他位置更宽的问题。

Out of scope — refuse

  • Matched: no
  • If yes, what was told to the user (stop here; do not file): not applicable

Kind

  • [x] Bug
  • [ ] Feature
  • [ ] Investigation
  • [ ] Other:

Usage / configuration / integration check

  • https://docs.newapi.ai/ — 搜索模型广场、模型性能、成功率和状态展示,未找到可影响该柱状条间距的配置。
  • https://deepwiki.com/QuantumNous/new-api — 搜索模型广场和性能指标相关内容,未发现该现象属于配置或接入行为。
  • README / repo docs: 未发现关于成功率状态条间距的配置或预期说明。
  • Relevant code paths and conclusion: web/src/features/pricing/components/model-perf-badge.tsx 负责渲染该状态条;问题位于 new-api 自带的前端展示层。
  • Can the current version already do this? (required for feature requests): not applicable
  • Verdict: product bug or new feature / usage question (stop here): product bug

Environment

  • new-api version / commit / image tag (not latest / unknown): v1.0.0-rc.36
  • Deploy source (repo release / official image / main source / other): 本仓库 Release / 官方镜像(自行部署)
  • Database (sqlite / mysql / postgres): not applicable;纯前端展示问题

Problem facts

  • Actual behavior: 模型广场的最近 24 小时成功率状态条中,部分相邻柱子的可见间距比其他位置多约 1px。中间列的额外宽缝出现在倒数第三根与倒数第二根之间,右侧列出现在第 11 根与第 12 根之间,左侧列未观察到相同问题。
  • Impact: 影响 /pricing 模型广场的视觉一致性,并可能让用户误以为某两个采样点之间存在时间断层或缺失数据;成功率数值和其他功能不受影响。
  • Frequency: 在当前线上环境的三列布局中可重复观察到;额外宽缝所在位置会随卡片所在列变化。
  • Evidence that the problem is in new-api rather than the client or upstream: 问题发生在 new-api 自带 /pricing 页面生成的状态条布局中,不涉及模型请求、渠道或上游返回数据。24 根柱子的宽度一致,只有柱子之间的显示间距不一致。

Type-specific details

Relay / API

  • Request endpoint and method: not applicable
  • Channel type: not applicable
  • Model: not applicable
  • Conversion format: not applicable
  • Pass-through enabled: not applicable
  • Evidence of upstream native support: not applicable
  • Equivalent redacted request sent directly upstream: status, body, server logs: not applicable
  • Same request through new-api: status, body, server logs: not applicable

Billing

  • Request endpoint and model: not applicable
  • Response usage: not applicable
  • Relevant ratio or pricing configuration: not applicable
  • Consumption log: not applicable
  • Expected charge and calculation basis: not applicable

Frontend

  • Page path: /pricing
  • Browser and version: Google Chrome 126.0.6478.26
  • Active theme: 默认主题
  • Relevant browser Console / Network errors: 无异常

Deployment / upgrade

  • Deployment method: not applicable;问题与部署方式无关
  • OS and architecture: not applicable
  • Database type: not applicable
  • Versions before and after the upgrade: 问题出现在 v1.0.0-rc.36
  • Startup or migration logs: not applicable

Reproduction and expected result

  • Steps to reproduce:
    1. 部署并打开 v1.0.0-rc.36。
    2. 使用 Google Chrome 126.0.6478.26 和默认主题进入 /pricing 模型广场。
    3. 将页面保持在模型卡片显示为三列的窗口宽度。
    4. 查看卡片底部最近 24 小时成功率状态条。
    5. 比较各列状态条内相邻柱子的间距。
    6. 可以看到中间列或右侧列存在一个比其他位置更宽的间隔。
  • Expected result: 24 根状态柱之间的可见间距应保持一致,不应因模型卡片所在列不同而出现额外宽缝。
  • Related screenshots (optional): 已有中间列和右侧列的复现截图,可在 Issue 评论中补充原图。

Feature (feature requests only)

  • Feature description: not applicable
  • Use case: not applicable

Duplicate check

  • Search queries (issues, PRs, discussions): 模型广场 成功率、模型广场 柱状、模型广场 间隔、成功采样率、success rate model square、success-rate samples、status bar spacing、justify-between
  • Closest existing threads:
    • #7134:客户端取消请求影响成功率指标,属于数据语义问题。
    • #7144:模型广场排序菜单导致导航栏横向移动,属于另一个布局问题。
    • #4635:引入模型性能指标采集和展示。
    • #7073:调整模型性能指标记录逻辑。
  • Why this is not a duplicate: 已有线程没有报告最近 24 小时成功率柱状条中单个间隔异常变宽的问题。

Research

Docs

  • https://docs.newapi.ai/ : 未发现相关配置或已知限制。
  • https://deepwiki.com/QuantumNous/new-api : 未发现相关配置或相同问题记录。
  • README / other repo docs: 未发现关于状态条间距的说明。
  • Conclusions: 这是产品前端展示问题,不是使用、配置或接入问题。

Code

  • web/src/features/pricing/components/model-perf-badge.tsx — 渲染最近 24 小时成功率状态条,与问题直接相关。
  • web/src/features/pricing/components/model-card.tsx — 将性能状态条放入模型卡片。
  • web/src/features/pricing/components/model-card-grid.tsx — 控制模型卡片的多列布局。

Experiments

  • Command or redacted request: 对中间列和右侧列截图中的柱状区域进行像素检查,并对比各相邻柱子的宽度和间距。
  • Direct upstream result: not applicable;不是 API 转发问题。
  • Result through new-api: 两张截图中均有 24 根宽度一致的柱子;各自存在一个比其他间隔多约 1px 的间隔,且异常位置不同。
  • Conclusion: 问题来自状态条在浏览器中的前端布局,不是采样数据异常。

Working theory

  • What is broken or missing: 状态条无法保证所有相邻柱子的可见间距一致。
  • Why: 当前布局在可用宽度分配到各柱间时产生像素舍入,不同列的元素位置导致额外像素落在不同间隔。
  • What would falsify this: 如果在上述版本、浏览器和三列布局中无法复现,或者检查结果显示异常来自柱子数据数量或宽度变化,而不是间距布局。

Scope

  • In scope for a later PR: 使 24 根状态柱的可见间距保持一致,并增加最小前端回归验证。
  • Out of scope / not this repo: 修改成功率采集、聚合、渠道、计费或后端 API 行为。
  • Large or directional feature? If yes, this issue is for maintainer alignment; do not open a PR yet: no;这是一个聚焦的前端视觉缺陷。

Proposed direction

验收标准:

  1. 24 根状态柱之间的可见间距一致;
  2. 三列布局中的左、中、右列显示一致;
  3. 不改变成功率数据、柱子数量、颜色或缺失数据语义;
  4. 不改变模型卡片的整体响应式布局;
  5. 增加最小回归验证,防止间距问题再次出现。

Not verified

  • Firefox、Safari 和其他 Chromium 版本。
  • 非默认主题。
  • 不同页面缩放比例和设备像素比。
  • 单列和双列响应式布局。

Related

  • #7134
  • #7144
  • #4635
  • #7073

jimmyleocn avatar Sep 09 '26 07:09 jimmyleocn

[Bot Review]

感谢提交。当前内容未使用仓库要求的 Bug Report 模板,缺少“版本/version”“提交确认/Submission Checks”(含复选框)“问题描述/Issue Description”“复现步骤/Steps to Reproduce”等规定章节,因此无法按模板受理。请按照完整模板重新提交,欢迎补充后再次反馈。