feat(billing): add metering formula admin tab

Expose margin multiplier, FX rate, and cost-mode settings under 计费中心 so operators can adjust DeepSeek billing without env edits.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-06 15:29:16 +08:00
parent d0183cb636
commit 363f9169ba
7 changed files with 446 additions and 3 deletions
+21
View File
@@ -646,6 +646,27 @@ export type BlockedWord = {
updated_at: number;
};
export type BillingAdminConfig = {
useBackendCost: boolean;
usdCnyRate: number;
marginMultiplier: number;
inputCentsPer1k: number;
outputCentsPer1k: number;
minBillCents: number;
costEstimateFromTokens: boolean;
costEstimateInputUsdPer1M: number;
costEstimateOutputUsdPer1M: number;
};
export type BillingAdminConfigResponse = {
config: BillingAdminConfig;
updatedAt: number | null;
updatedBy: string | null;
source?: string;
envOverrideActive?: boolean;
formula?: string;
};
export type PlanDefinition = {
planType: string;
name: string;