feat(agentx): display physical cache-tier token sources - #944
Open
cquil11 wants to merge 5 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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). |
Contributor
Author
|
Added in commit
Verified on the deployed English and Chinese pages. All PR checks are green. |
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.
Summary
vllm:prompt_tokens_cached_by_sourcefrom AgentX server-metric artifactsValidation
bun run typecheckbun run lintbun run fmtbun --cwd packages/db vitest run src/etl/compute-chart-series.test.tsbun --cwd packages/app vitest run src/components/inference/agentic-point/time-series-math.test.ts src/lib/api-route-catalog.test.tsbun --cwd packages/app vitest run src/lib/zh-copy.test.tsbun run --cwd packages/app test:e2e:component --spec cypress/component/agentic-token-source-chart.cy.tsxLive validation
Both official DeepSeek-V4 AgentX sweeps are green and have been backfilled into the PR-specific child DB: B200 offloading and GB300 1P/1D. Production is untouched.
Preview points, checked in the deployed browser and API:
All four stored Prometheus CSVs match the authoritative artifacts byte-for-byte. Raw JSON, request traces, server logs, and version-17 chart payloads are linked. P2P covers all 20 engines / five endpoints; its chart separates P2P and external-cache hits. The child branch
br-mute-band-ainhq3njexpires October 8, 2026. Its compute was temporarily increased to 2 CU for the 307 MB compressed P2P blob import. Cold-cache verification found that the original 0.25 CU also cannot serve the uncached P2P chart query; the preview child now uses 1 CU with five-minute auto-suspend. The uncached request passed at that size.Known display caveat: the pre-existing
CPU cache hitsummary badge can still show aggregate external hits for NVMe/Mooncake configurations. Use the new cumulative source-breakdown chart for physical tier attribution. The P2P run also canceled 435 outstanding requests at its timed drain deadline; zero request errors and 1,740 completed requests do not mean every submitted request completed.Compatibility
No relational migration is required. The existing JSONB
chart_seriespayload is versioned from v15 to v17. Historical rows without the new vLLM metric keep their current source breakdown.Note
Medium Risk
Changes versioned chart-series aggregation (affects stored metrics display after backfill) and extends benchmark-siblings payload/caching; UI and query changes are additive with logical fallbacks for older vLLM rows.
Overview
Adds physical vLLM KV-cache tier attribution to the AgentX prompt-token source pipeline and surfaces it in the UI and sibling navigator.
Data / ETL: Chart-series extraction (v16–v17) reads
vllm:prompt_tokens_cached_by_sourcewhen present, keeps only fresh prefill (local_compute/miss) from the logicalprompt_tokens_by_sourcemetric, and maps device/CPU/host/disk/connector labels into stacked buckets (HBM, CPU offload, NVMe, custom tiers) so cached tokens are not double-counted. Older blobs without the new metric keep the logical breakdown; SGLang behavior is unchanged.CHART_SERIES_VERSIONbumps to 17 for backfill.AgentX UI: The stacked prompt-token chart gets tier-specific colors and English / Simplified Chinese labels (plus a localized card title). Cypress covers tier rendering on
/zhroutes.Sibling navigator: The benchmark-siblings API/cache (v4) adds
kv_offloading,p90_intvty, andp90_ttft. Chips show physical offload tiers (e.g. DRAM, NVMe) instead ofoff=ON, and points on both P90 interactivity and TTFT Pareto frontiers get a ring + legend (shared genericparetoFront*helpers).Smaller fixes: Agentic eval ETL treats
isl/oslof0as unspecified (null). API docs anddata-pipeline.mddocument the new breakdown behavior.Reviewed by Cursor Bugbot for commit aaa6784. Bugbot is set up for automated code reviews on this repo. Configure here.
Canonical host source compatibility
Recognizes the current vLLM
hostsource as the existing CPU/DRAM cache-hit bucket, while retainingcpufor earlier artifacts. Chart-series version 17 enables recomputation of previously ingested rows. Tests cover both labels and preserve prompt-token totals without double counting.Validation: 5,163 local unit tests passed; fixture-backed Cypress component and integration smoke suites passed; typecheck, lint, formatting, and pre-commit checks passed. The preview deployment now serves both successful DeepSeek-V4 SWA sweeps from the child DB; metric artifacts and all four point pages were checked.