fix(analytics): treat Claude Code (claude/cc) as a flat-rate subscription provider (#10773) (#10774)

Merged via merge-train (release/v3.8.50, batch1 2026-08-20) — static gates (typecheck/file-size/complexity/cognitive/changelog) green on the combined tree; test:unit reds observed in the boarded run were verified pre-existing on the pure release tip (unrelated flake), not caused by this PR. Thanks for the contribution!
This commit is contained in:
Jorge Delgado
2026-08-20 05:30:01 -04:00
committed by GitHub
parent 6ff83077fd
commit f7cba50cb7
3 changed files with 20 additions and 3 deletions

View File

@@ -31,8 +31,9 @@ import { WEB_COOKIE_PROVIDERS } from "@/shared/constants/providers/web-cookie";
* its analytics cost is intentional, not an artifact), `byteplus` (BytePlus
* ModelArk is a metered inference host, billed per token — zeroing it would hide
* real cost), `minimax-cn` (the metered Minimax China API, distinct from the
* `minimax` "Minimax Coding" plan), and `glm-thinking` (metered tier, distinct
* from the `glm` Coding plan).
* `minimax` "Minimax Coding" plan), `glm-thinking` (metered tier, distinct
* from the `glm` Coding plan), and `anthropic` (the metered Anthropic API,
* distinct from the `claude`/`cc` Claude Code plan below).
*/
const FLAT_RATE_SUBSCRIPTION_PROVIDER_IDS: ReadonlySet<string> = new Set([
"minimax", // "Minimax Coding" plan
@@ -43,6 +44,8 @@ const FLAT_RATE_SUBSCRIPTION_PROVIDER_IDS: ReadonlySet<string> = new Set([
"qwen-cloud-token-plan", // Qwen Cloud Token Plan
"glm", // GLM Coding plan
"glm-cn", // GLM Coding (China) plan
"claude", // Claude Code plan (OAuth-only — a Claude Pro/Max subscription)
"cc", // Claude Code plan (alias id — same connection, shares the `cc` pricing rows)
]);
/**