Skip to content

feat(app): add DeepSeek V4 Pro to the profit estimators with DeepSeek list-price defaults / 利润估算器新增 DeepSeek V4 Pro 并默认采用 DeepSeek 官方定价 - #1007

Open
functionstackx wants to merge 1 commit into
masterfrom
feat/profit-estimator-deepseek-v4-pro
Open

feat(app): add DeepSeek V4 Pro to the profit estimators with DeepSeek list-price defaults / 利润估算器新增 DeepSeek V4 Pro 并默认采用 DeepSeek 官方定价#1007
functionstackx wants to merge 1 commit into
masterfrom
feat/profit-estimator-deepseek-v4-pro

Conversation

@functionstackx

@functionstackx functionstackx commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds DeepSeek V4 Pro (DeepSeek V4 Pro 0813 1.6T) to /profit-estimator and /profit-estimator-per-gigawatt, plus the /zh mirrors, following the pattern from #1001 (GLM 5.2/5.3) and #1002 (MiniMax M3).

  • Routes: /profit-estimator/deepseek-v4 and /profit-estimator-per-gigawatt/deepseek-v4 (PROFIT_ESTIMATOR_MODELS in model-routes.ts; the slug is the site-wide deepseek-v4 from the compare registry). Kimi K3 stays the bare-path default, so DeepSeek V4 Pro gets its own slugged, indexable page here even though it is the app-wide default elsewhere. Models outside the allow-list still 404 and stay out of the sitemap.
  • Per-model defaults (profitModelDefaults(Model.DeepSeek_V4_Pro)):
    • 24 tok/s/user, the speed DeepSeek's own API serves at.
    • DeepSeek list price $1.32 input / $0.044 cached / $3.96 output per M tok, the peak-hour rate for deepseek-v4-pro-0813 on the DeepSeek pricing page (off-peak is 50% of that: $0.66 / $0.022 / $1.98). Pinned as a list price for the same reason as GLM and MiniMax: the OpenRouter aggregate for deepseek/deepseek-v4-pro-0813 sits below even the off-peak rate (about $0.58 / $0.019 / $1.74 at time of writing), so the catalog would understate what the lab charges. OpenRouter and Custom remain one click away; the caption links the DeepSeek pricing page when the list price is in force.
    • 30% model license fee, the DEFAULT_LAB_CUT_PCT.
  • Coverage at 24 tok/s/user (checked against the live agentic rows, P90): B200 (SGLang min 16.8, vLLM min 19.9), B300 (SGLang 22.4, vLLM 8.3), and MI355X (ATOM 10.8, SGLang 12.0, vLLM 4.3, MORI-SGLang disagg 23.5) all have a measured point on both sides of 24, so they are priced. GB200 Dynamo-vLLM (min 40.1), GB300 (Dynamo-SGLang disagg 29.6, Dynamo-TRT disagg 37.2, Dynamo-vLLM disagg 38.8), and H200 Dynamo-SGLang (min 26.5) bottom out above 24 and list under Not priced. This is the existing clamp-skip behaviour, not new logic; a lower-interactivity run on those SKUs will price them without a code change.
  • Model switch re-seeds the interactivity target, price source, and license fee in every direction (45/OpenRouter/30% for Kimi, 100/list/30% for GLM, 83/list/20% for MiniMax, 24/list/30% for DeepSeek).
  • Docs: docs/tco-calculator.md profit-estimator section.

Tests

  • Unit (vitest): profitModelDefaults(Model.DeepSeek_V4_Pro) and its list to revenue-pricing conversion; the fallback case now uses Model.DeepSeek_R1 since DeepSeek V4 Pro has an entry. modelRoutesForTab expects [DeepSeek V4 Pro, Kimi K3, MiniMax M3, GLM 5.2] in MODEL_ROUTES (selector) order, the deepseek-v4 slug, and Kimi K3 as the tab default. bun run typecheck, bun run lint, bun run fmt, the typography check, and the full vitest suite pass locally (the one pre-existing benchmark-transform.test.ts failure reproduces on master in my sandbox and is unrelated).
  • E2E (Cypress): fixtures now emit dsv4 agentic rows keyed by ?model=DeepSeek-V4-Pro. Both fixture curves start below 24 tok/s/user, so the new spec asserts all five SKUs (H200 included) are priced there, unlike the 45/83/100 defaults where H200 is skipped. New specs cover the /deepseek-v4 route defaults, caption, and pricing-source link; the 3-option price selector (OpenRouter reads the DeepSeek row at $0.66 / $1.98, not Kimi's); Custom seeding from the list price; Kimi to DeepSeek to Kimi model-switch re-seeding with the expected pathnames; and the /zh mirror label (DeepSeek 官方定价). The Kimi selector assertion now expects four models, and the "404s models the estimator does not serve" checks use deepseek-r1 instead of the never-valid deepseek-v4-pro slug. I could not run Cypress in my sandbox, so please rely on CI for the e2e run.

中文说明

/profit-estimator/profit-estimator-per-gigawatt(含 /zh 镜像)新增 DeepSeek V4 Pro(DeepSeek V4 Pro 0813 1.6T),路径为 /deepseek-v4,沿用 #1001(GLM 5.2/5.3)与 #1002(MiniMax M3)的模式。Kimi K3 仍为默认模型,其他模型继续返回 404。

  • 按模型的默认值:DeepSeek V4 Pro 默认 24 tok/s/user(DeepSeek 官方 API 的实际服务速度),并采用 DeepSeek 官方定价:输入 $1.32 / 缓存输入 $0.044 / 输出 $3.96(每百万 token),即官方定价页deepseek-v4-pro-0813 的高峰时段价格(非高峰为 5 折:$0.66 / $0.022 / $1.98)。不直接读取 OpenRouter 的原因与 GLM、MiniMax 相同:其聚合价(约 $0.58 / $0.019 / $1.74)低于官方价(甚至低于非高峰价),会低估实验室的实际收入;OpenRouter 与自定义仍可一键切换,使用官方定价时图表说明会链接 DeepSeek 定价页。模型许可费保持默认 30%。
  • 24 tok/s/user 处的覆盖(对照线上 agentic 数据,P90):B200、B300、MI355X 均有实测点覆盖,可计价;GB200 Dynamo-vLLM(最低约 40)、GB300(最低约 30)、H200 Dynamo-SGLang(最低约 27)曲线下限高于该点,按现有逻辑列为"未计价",待更低交互性的运行数据落地后无需改代码即可计价。
  • 切换模型时会重置交互性目标、价格来源与许可费。
  • 同步更新 docs/tco-calculator.md

测试:新增 vitest 单元测试(默认值、官方定价换算、路由白名单与 slug);Cypress fixture 新增 dsv4 agentic 数据并按 ?model= 参数返回,新增 DeepSeek 路由默认值(含 H200 在 24 tok/s/user 下可计价)、价格来源选择器、自定义价格初始化、Kimi → DeepSeek → Kimi 切换重置与中文镜像的 e2e 用例。本地已通过 typecheck / lint / fmt / typography 与完整单元测试;沙箱中无法运行 Cypress,请以 CI 结果为准。


Note

Low Risk
Scoped feature addition to profit estimator routing and defaults, with tests and docs; no auth or critical infrastructure changes.

Overview
Adds DeepSeek V4 Pro to both profit estimator tabs (/profit-estimator and /profit-estimator-per-gigawatt, including /zh), via the existing deepseek-v4 slug. Kimi K3 stays the bare-path default; DeepSeek gets its own indexable route even though it is the app-wide default elsewhere.

Per-model behavior follows GLM/MiniMax: profitModelDefaults seeds 24 tok/s/user, DeepSeek peak list pricing ($1.32 / $0.044 cached / $3.96 per M tok with a link to DeepSeek’s pricing docs), and the standard 30% model license fee. Model switches re-seed interactivity, price source, and license fee like the other supported models.

Routing & discovery: PROFIT_ESTIMATOR_MODELS in model-routes.ts now includes DeepSeek V4 Pro; unsupported models still 404. Docs in tco-calculator.md describe coverage notes at 24 tok/s/user (some SKUs may show as not priced until lower-interactivity data exists).

Tests: Vitest covers defaults and route allow-list; Cypress fixtures add dsv4 agentic rows and a dedicated DeepSeek spec (defaults, OpenRouter/custom price flows, Kimi ↔ DeepSeek switching, Chinese labels). Selector expectations move to four models; 404 checks use deepseek-r1 instead of the formerly invalid slug.

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

… list-price defaults

Adds DeepSeek V4 Pro 0813 1.6T to /profit-estimator and
/profit-estimator-per-gigawatt (and the /zh mirrors) at /deepseek-v4. It
opens on 24 tok/s/user, the speed DeepSeek's own API serves at, and
DeepSeek's peak-hour list price for deepseek-v4-pro-0813 ($1.32 input /
$0.044 cached / $3.96 output per M tok); OpenRouter stays one click away.
Kimi K3 remains the bare-path default and the license fee stays at 30%.
@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
inferencemax-app Ready Ready Preview Sep 5, 2026 12:51am UTC

Request Review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4dac848. Configure here.


cy.get('[data-testid="profit-model-selector"]').click();
cy.contains('[role="option"]', 'Kimi K3').click();
cy.location('pathname').should('eq', '/profit-estimator-per-gigawatt');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong Kimi switch pathname assertion

Medium Severity

Switching from DeepSeek back to Kimi K3 asserts the bare /profit-estimator-per-gigawatt path. modelRoutePathnameRewrite keeps the slugged /kimi-k3 URL on an in-page switch; only a fresh visit canonicalizes the default model to the bare path. This new spec will fail in Cypress.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4dac848. Configure here.

@blacksmith-sh

blacksmith-sh Bot commented Sep 5, 2026

Copy link
Copy Markdown

Found 4 test failures on Blacksmith runners:

Failures

Test View Logs
Profit Estimator — DeepSeek V4 Pro/
re-seeds the operating point and price source when switching from Kimi K3
View Logs
Profit Estimator — DeepSeek V4 Pro/
re-seeds the operating point and price source when switching from Kimi K3
View Logs
Profit Estimator — MiniMax M3/
re-seeds the operating point and price source when switching from GLM
View Logs
Profit Estimator — MiniMax M3/
re-seeds the operating point and price source when switching from GLM
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

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