Skip to content

feat(agentx): display physical cache-tier token sources - #944

Open
cquil11 wants to merge 3 commits into
masterfrom
feat/cache-tier-token-sources
Open

feat(agentx): display physical cache-tier token sources#944
cquil11 wants to merge 3 commits into
masterfrom
feat/cache-tier-token-sources

Conversation

@cquil11

@cquil11 cquil11 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • ingest vllm:prompt_tokens_cached_by_source from AgentX server-metric artifacts
  • combine fresh prefill with physical HBM, CPU, NVMe, and connector-defined cache-hit tiers without double counting
  • retain the existing logical vLLM fallback and SGLang source mapping for older runs
  • display tier-specific colors and English/Simplified Chinese labels on the point-detail chart
  • bump the derived chart-series version so existing rows can be recomputed

Validation

  • bun run typecheck
  • bun run lint
  • bun run fmt
  • bun --cwd packages/db vitest run src/etl/compute-chart-series.test.ts
  • bun --cwd packages/app vitest run src/components/inference/agentic-point/time-series-math.test.ts src/lib/api-route-catalog.test.ts
  • bun --cwd packages/app vitest run src/lib/zh-copy.test.ts
  • bun run --cwd packages/app test:e2e:component --spec cypress/component/agentic-token-source-chart.cy.tsx

Live-data plan

Run InferenceX AgentX sweep 33169766010 will be ingested into an isolated Neon branch cloned from production. This PR's Vercel preview will be scoped to that database and verified against its DRAM, NVMe, and tiered DRAM+NVMe points.

Compatibility

No relational migration is required. The existing JSONB chart_series payload is versioned from v15 to v16. Historical rows without the new vLLM metric keep their current source breakdown.


Note

Medium Risk
Changes derived chart-series aggregation (versioned JSONB) and extends the published benchmark-siblings response; incorrect tier merging would skew prompt-token charts until backfill completes.

Overview
AgentX prompt-token source handling now uses vLLM’s physical prompt_tokens_cached_by_source metric when present: fresh prefill still comes from the logical prompt_tokens_by_source buckets (local_compute / miss), while HBM, CPU, NVMe, and connector-defined cache tiers replace the old logical hit buckets so stacked totals do not double-count. Chart series bumps from v15 to v16 so stored rows can be recomputed; older vLLM and SGLang runs keep their existing breakdown paths.

The stacked area chart and related cards add tier-specific colors, English/Simplified Chinese labels, and a Cypress component test. Sibling navigation extends the benchmark-siblings API with kv_offloading, p90_intvty, and p90_ttft (cache namespace v4), shows physical offload tiers on chips (e.g. DRAM+NVMe instead of off=ON), and highlights points on both P90 interactivity and TTFT Pareto frontiers using generalized chart-utils Pareto helpers.

Public API docs and data-pipeline.md document the new prompt-token semantics; no relational migration.

Reviewed by Cursor Bugbot for commit 68a8d4f. Bugbot is set up for automated code reviews on this repo. Configure here.

@cquil11
cquil11 requested a review from adibarra as a code owner August 28, 2026 17:51
@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
inferencemax-app Ready Ready Preview Aug 28, 2026 7:44pm

Request Review

@cquil11

cquil11 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Preview test environment is ready.

Representative points:

Verified the deployed API response, English and Chinese page routes, browser rendering, and deployment runtime logs (zero 5xx responses during verification).

@cquil11

cquil11 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Added in commit 68a8d4fd:

  • Sibling chips now use physical KV tiers: DRAM, NVMe, or DRAM+NVMe; no-offload points have no suffix and the legacy off=ON text is gone.
  • Points on both the P90 interactivity/throughput and P90 TTFT/throughput Pareto frontiers receive a double orange outline, with a legend below the selector.
  • The deployed 25-point run marks three intersection points: NVMe c=12, DRAM c=9, and DRAM+NVMe c=7.

Verified on the deployed English and Chinese pages. All PR checks are green.

Preview: https://inferencemax-app-git-feat-cache-tier-toke-788211-semianalysisai.vercel.app/inference/agentic/440549

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.

1 participant