Add read-only views API (/api/v1/views/*) and inferencex-skills package / 新增只读视图 API 与 inferencex-skills 技能包 - #901
Open
functionstackx wants to merge 5 commits into
Open
Add read-only views API (/api/v1/views/*) and inferencex-skills package / 新增只读视图 API 与 inferencex-skills 技能包#901functionstackx wants to merge 5 commits into
functionstackx wants to merge 5 commits into
Conversation
Expose every dashboard view as GET /api/v1/views/* — options, inference, historical, calculator, fleet, reliability, evaluation, gpu-specs, overview, rankings, compare — with CSV support, dashboard-parity legend labels, base-GPU-key expansion, and full docs/catalog integration. Pure chart logic is extracted from client hooks into shared core modules so routes and dashboard consume identical math. Adds the @semianalysisai/inferencex-skills package (api / matplotlib / react / html skills) with validated example scripts. 中文:新增只读视图 API(/api/v1/views/*),以数据形式开放仪表盘全部视图与 选项,支持 CSV、与仪表盘一致的图例标签、GPU 基础键展开,并同步 API 文档与 路由目录。图表纯逻辑从客户端 Hook 抽取为共享核心模块,确保 API 与仪表盘 使用同一套计算。同时新增 @semianalysisai/inferencex-skills 技能包 (API 使用、matplotlib、React、HTML 可视化),示例脚本均经实测验证。
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Bugbot: inference left gpus in caller case and exact-matched lowercase hwKeys, so gpus=B200 silently returned empty series; historical echoed raw case in params while filtering lowercase. Both now lower-case at parse like calculator and fleet, with a regression test. 中文:修复 inference 与 historical 视图 gpus 参数未做大小写归一的问题 (如 gpus=B200 会静默返回空序列),现与 calculator、fleet 一致在解析时 转为小写,并补充回归测试。
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit aef7710. Configure here.
Bugbot follow-up: lowering after the parser's dedup/sort left mixed-case lists unsorted or duplicated and produced non-canonical cache keys. parseFreeListParam now lower-cases before dedup/sort; the four view routes drop their per-call maps. 中文:跟进 Bugbot 意见,将小写归一移入 parseFreeListParam(在去重排序之前 执行),避免混合大小写列表产生重复项、乱序及非规范缓存键;四个视图路由删除 各自的重复转换。
CI runs bun install --frozen-lockfile, which rejects the new packages/skills workspace package until the lockfile records it. 中文:CI 使用 --frozen-lockfile 安装依赖,需在 bun.lock 中登记新增的 packages/skills 工作区包。
|
Found 1 test failure on Blacksmith runners: Failure
|
The AgentX ledger's lazy /logos/models/*.svg marks sit near Firefox's lazy-load distance on the 823px mobile viewport, so the ledger nondeterministically prefetches them and the carousel-logo count assertion flaked (reproduced 2/3 locally on master-equivalent code; Chrome unaffected). Exclude the ledger's sub-KB model marks — visible mobile content, not decorative weight — and surface offending URLs in the failure message. 中文:AgentX 结果列表的懒加载模型标志在 Firefox 移动视口下处于懒加载 预取距离边缘,导致该断言在 CI 中不稳定(在与 master 等价的代码上本地 复现 2/3 失败;Chrome 不受影响)。现将列表中不足 1KB 的模型标志排除 在轮播标志计数之外,并在断言失败信息中列出具体 URL。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light.png)
Summary
Read-only views API exposing every dashboard view as data, plus a downloadable skills package for API consumers.
API —
GET /api/v1/views/*(11 endpoints)/options/inference/historicalsynthetic:trueextensions)/calculator/fleet/reliability/evaluation/gpu-specs/overview/rankings/compare{view, apiVersion, params(resolved), ...payload}; structured 400s{error, param, allowed}; CSV viaformat=csv.GB300 NVL72 (Dynamo SGLang, MTP)); GPU filters accept base keys (b200) and full hwKeys (b200_trt).useChartData→chart-data-core, etc.) so API and dashboard share identical math; hooks re-export unchanged./api-documentation+ route catalog with sha256 guard; bilingual (EN/中文) doc strings.Skills package —
packages/skills(@semianalysisai/inferencex-skills)4 skills with SKILL.md guides + validated examples:
inferencex-api(endpoint reference),inferencex-matplotlib(5 runnable scripts — pareto frontier, calculator bars, historical trends, fleet margins, eval scores),inferencex-react,inferencex-html(Chart.js). Installer CLI (bin/install.mjs) copies skills into agent skill dirs.Testing
中文说明
新增只读视图 API(
GET /api/v1/views/*,共 11 个端点),以数据形式开放仪表盘全部视图与选项:选项枚举、主图表、历史趋势、吞吐计算器、集群利润周期、可靠性、评测分数、GPU 规格、总览、排名与双卡对比。统一响应信封与结构化 400 错误,支持 CSV 输出;序列图例标签与仪表盘完全一致,GPU 筛选同时接受基础键(b200)与完整硬件键(b200_trt)。图表纯逻辑从客户端 Hook 抽取为共享核心模块,确保 API 与仪表盘使用同一套计算;文档已并入/api-documentation与路由目录(含 sha256 守护测试),中英双语。同时新增
@semianalysisai/inferencex-skills技能包:API 使用、matplotlib(5 个已实测脚本)、React、HTML/Chart.js 四个技能,附安装 CLI。实测矩阵 58/58 通过,全部单元测试、类型检查、lint、格式检查均通过。Note
Medium Risk
Large new public API surface that mirrors production benchmark/eval data and must stay numerically aligned with dashboards; mistakes in shared extraction or param canonicalization could mislead API consumers, though auth paths are unchanged.
Overview
Adds a read-only views API under
GET /api/v1/views/*(11 endpoints: options, inference, historical, calculator, fleet, reliability, evaluation, gpu-specs, overview, rankings, compare) with a shared envelope (view,apiVersion, resolvedparams), structured 400 responses (param+allowed), optional CSV viaformat=csv, and caching aligned with existing benchmark/eval routes.Each handler runs the same pipelines as the dashboards (not reimplemented math): e.g.
buildInferenceSeries, interpolated historical trends, calculator interpolation/fleet sizing, overview/rankings/compare projections, and eval chart aggregation. Pure logic is extracted from client hooks into importable modules—throughput-data.ts(fromuseThroughputData),resolveEvaluationDateindate-resolution—so server routes and the UI stay in parity; route tests assert that parity explicitly.Also ships
@semianalysisai/inferencex-skills(packages/skills) with aninferencex-skillsinstall CLI and bundled agent skills (API reference, matplotlib examples, React/HTML charting). Cypress landing-performance test excludes/logos/models/from the mobile logo carousel count to fix Firefox/CI flakiness.Reviewed by Cursor Bugbot for commit 7fd8281. Bugbot is set up for automated code reviews on this repo. Configure here.