Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

fix(usage): show a Claude plan's monthly spend, with its amounts (#4174)

Milind Soni96002681cf9c
diff --git a/server/plan-usage.test.ts b/server/plan-usage.test.ts
index 7cdbda6790..40124bfce7 100644
--- a/server/plan-usage.test.ts
+++ b/server/plan-usage.test.ts
@@ -42,6 +42,61 @@ function account(driver: PlanAccount["driver"], extras: Partial<PlanAccount> = {
}
describe("plan usage parsers", () => {
+ describe("a Claude budget in money", () => {
+ const enterprise = {
+ five_hour: null,
+ seven_day: null,
+ spend: { enabled: true, used: { amount_minor: 4_631, currency: "USD", exponent: 2 }, limit: { amount_minor: 50_000, currency: "USD", exponent: 2 }, percent: 9 },
+ extra_usage: { is_enabled: true, used_credits: 4_631, monthly_limit: 50_000, utilization: 9.262, currency: "USD", decimal_places: 2 },
+ };
+ const line = (label: string, used: number, spend?: object) => ({ label, usedPercent: expect.closeTo(used, 2), remainingPercent: expect.closeTo(100 - used, 2), resetsAt: null, ...(spend ? { spend } : {}) });
+
+ it("shows an Enterprise seat's monthly spend with its amounts, once", () => {
+ const parsed = parseClaudeUsage(enterprise);
+ expect(parsed.extra).toEqual([line("Monthly spend", 9.262, { usedMinor: 4_631, limitMinor: 50_000, currency: "USD", exponent: 2 })]);
+ expect(parsed.fiveHour.available).toBe(false);
+ expect(parsed.weekly.available).toBe(false);
+ });
+
+ it("reads the budget from extra usage when the spend block is missing, off or its money does not add up", () => {
+ const fallback = line("Monthly spend", 9.262, { usedMinor: 4_631, limitMinor: 50_000, currency: "USD", exponent: 2 });
+ expect(parseClaudeUsage({ extra_usage: enterprise.extra_usage }).extra).toEqual([fallback]);
+ expect(parseClaudeUsage({ ...enterprise, spend: { ...enterprise.spend, enabled: false } }).extra).toEqual([fallback]);
+ const unmatched = { ...enterprise.spend, used: { amount_minor: 9_000, currency: "USD", exponent: 2 } };
+ expect(parseClaudeUsage({ ...enterprise, spend: { ...unmatched, limit: { amount_minor: 50_000, currency: "EUR", exponent: 2 } } }).extra).toEqual([fallback]);
+ expect(parseClaudeUsage({ ...enterprise, spend: { ...unmatched, limit: { amount_minor: 50_000, currency: "USD", exponent: 3 } } }).extra).toEqual([fallback]);
+ });
+
+ it("prefers the spend block over extra usage, and needs nothing else", () => {
+ const spend = { ...enterprise.spend, used: { amount_minor: 25_000, currency: "USD", exponent: 2 } };
+ const line50 = line("Monthly spend", 50, { usedMinor: 25_000, limitMinor: 50_000, currency: "USD", exponent: 2 });
+ expect(parseClaudeUsage({ ...enterprise, spend }).extra).toEqual([line50]);
+ expect(parseClaudeUsage({ spend }).extra).toEqual([line50]);
+ });
+
+ it("takes the digits from the currency when Claude does not say", () => {
+ const { decimal_places: _digits, ...usd } = enterprise.extra_usage;
+ expect(parseClaudeUsage({ extra_usage: usd }).extra[0]?.spend?.exponent).toBe(2);
+ expect(parseClaudeUsage({ extra_usage: { ...usd, currency: "JPY" } }).extra[0]?.spend?.exponent).toBe(0);
+ });
+
+ it("keeps only the percent without usable amounts", () => {
+ expect(parseClaudeUsage({ extra_usage: { is_enabled: true, utilization: 30, monthly_limit: null, used_credits: null } }).extra).toEqual([line("Monthly spend", 30)]);
+ expect(parseClaudeUsage({ extra_usage: { is_enabled: true, utilization: 30, monthly_limit: 500, used_credits: 150, currency: "not money" } }).extra).toEqual([line("Monthly spend", 30)]);
+ expect(parseClaudeUsage({ extra_usage: { is_enabled: true, utilization: 30, monthly_limit: 0, used_credits: 0, currency: "USD" } }).extra).toEqual([line("Monthly spend", 30)]);
+ });
+
+ it("calls it extra usage on a plan with rolling windows", () => {
+ const parsed = parseClaudeUsage({ five_hour: { utilization: 10, resets_at: null }, seven_day: { utilization: 20, resets_at: null }, extra_usage: { is_enabled: true, used_credits: 500, monthly_limit: 1_000, utilization: 50, currency: "USD" } });
+ expect(parsed.extra).toEqual([line("Extra Usage", 50, { usedMinor: 500, limitMinor: 1_000, currency: "USD", exponent: 2 })]);
+ });
+
+ it("shows nothing for a budget that is off", () => {
+ expect(parseClaudeUsage({ extra_usage: { ...enterprise.extra_usage, is_enabled: false } }).extra).toEqual([]);
+ expect(parseClaudeUsage({ spend: { ...enterprise.spend, enabled: false } }).extra).toEqual([]);
+ });
+ });
+
it("turns Claude utilization into remaining percent and keeps opus as a model window", () => {
const parsed = parseClaudeUsage({
five_hour: { utilization: 25, resets_at: "2026-09-26T12:00:00.000Z" },
diff --git a/server/plan-usage.ts b/server/plan-usage.ts
index 44715e111c..f1cd89b9e0 100644
--- a/server/plan-usage.ts
+++ b/server/plan-usage.ts
@@ -17,11 +17,21 @@ export interface PlanWindow {
resetsAt: string | null;
}
+/** Money in the provider's minor units: 4631 with exponent 2 is 46.31. */
+export interface PlanSpend {
+ usedMinor: number;
+ limitMinor: number;
+ currency: string;
+ exponent: number;
+}
+
export interface PlanExtra {
label: string;
remainingPercent: number;
usedPercent: number;
resetsAt: string | null;
+ /** The amounts behind the percent, on a budget in money. */
+ spend?: PlanSpend;
}
export interface PlanModelUsage {
@@ -105,6 +115,8 @@ const KEYCHAIN_TIMEOUT_MS = 5_000;
const KEYCHAIN_MAX_BUFFER = 1_000_000;
const CLAUDE_KEYCHAIN_SERVICE = "Claude Code-credentials";
const CLAUDE_MODEL_FAMILIES = ["opus", "sonnet", "haiku"];
+const MONTHLY_SPEND = "Monthly spend";
+const EXTRA_USAGE = "Extra Usage";
const CLAUDE_USAGE_URL = "https://api.anthropic.com/api/oauth/usage";
const CODEX_USAGE_URL = "https://chatgpt.com/backend-api/wham/usage";
@@ -155,7 +167,7 @@ export function parseClaudeUsage(body: unknown): PlanWindows {
const models: PlanModelUsage[] = [];
if (root) {
for (const [key, value] of Object.entries(root)) {
- if (key === "five_hour" || key === "seven_day") continue;
+ if (key === "five_hour" || key === "seven_day" || key === "spend" || key === "extra_usage") continue;
if (!/^[a-z][a-z0-9_]{0,40}$/i.test(key)) continue;
const window = readClaudeWindow(value);
if (!window) continue;
@@ -165,10 +177,14 @@ export function parseClaudeUsage(body: unknown): PlanWindows {
}
}
sortModelWindows(models);
+ const fiveHour = (root && readClaudeWindow(root.five_hour)) ?? closedWindow();
+ const weekly = (root && readClaudeWindow(root.seven_day)) ?? closedWindow();
+ const budget = root && readClaudeBudget(root, fiveHour.available || weekly.available);
+ if (budget) extra.unshift(budget);
return {
plan: planLabel(root?.subscription_type ?? root?.plan ?? root?.plan_type),
- fiveHour: (root && readClaudeWindow(root.five_hour)) ?? closedWindow(),
- weekly: (root && readClaudeWindow(root.seven_day)) ?? closedWindow(),
+ fiveHour,
+ weekly,
extra,
models,
};
@@ -399,6 +415,59 @@ function readClaudeWindow(value: unknown): PlanWindow | null {
return openWindow(utilization, isoOrNull(record.resets_at ?? record.resetsAt));
}
+const naturalNumber = (value: unknown): number | null => Number.isSafeInteger(value) && (value as number) >= 0 ? value as number : null;
+
+/** A currency code as the provider sent it, when Intl can name it: Intl.NumberFormat throws on anything else. */
+function currencyCode(value: unknown): string | null {
+ if (typeof value !== "string" || !/^[A-Za-z]{3}$/.test(value.trim())) return null;
+ return value.trim().toUpperCase();
+}
+
+function budgetLine(label: string, spend: PlanSpend): PlanExtra | null {
+ if (spend.limitMinor <= 0) return null;
+ return { ...extraLine(label, openWindow((spend.usedMinor / spend.limitMinor) * 100, null)), spend };
+}
+
+function readSpendBudget(value: unknown): PlanExtra | null {
+ const spend = asRecord(value);
+ if (spend?.enabled !== true) return null;
+ const used = asRecord(spend.used), limit = asRecord(spend.limit);
+ const currency = currencyCode(used?.currency);
+ const exponent = naturalNumber(used?.exponent), usedMinor = naturalNumber(used?.amount_minor), limitMinor = naturalNumber(limit?.amount_minor);
+ if (!currency || currency !== currencyCode(limit?.currency) || exponent === null || exponent !== limit?.exponent || usedMinor === null || limitMinor === null) return null;
+ return budgetLine(MONTHLY_SPEND, { usedMinor, limitMinor, currency, exponent });
+}
+
+/** Claude Code 2.1.312 documents `used_credits` and `monthly_limit` as minor units of `currency` ("cents for USD") and has
+ * no field saying how many digits those are, so the currency says. `is_enabled` false: this budget cannot cover a send. */
+function readExtraUsage(value: unknown, label: string): PlanExtra | null {
+ const extra = asRecord(value);
+ if (extra?.is_enabled !== true) return null;
+ const currency = currencyCode(extra.currency);
+ const usedMinor = naturalNumber(extra.used_credits), limitMinor = naturalNumber(extra.monthly_limit);
+ if (currency && usedMinor !== null && limitMinor !== null) {
+ const exponent = naturalNumber(extra.decimal_places) ?? currencyDigits(currency);
+ const line = exponent === null ? null : budgetLine(label, { usedMinor, limitMinor, currency, exponent });
+ if (line) return line;
+ }
+ const used = finiteNumber(extra.utilization);
+ return used === null ? null : extraLine(label, openWindow(used, null));
+}
+
+function currencyDigits(currency: string): number | null {
+ try {
+ return new Intl.NumberFormat("en", { style: "currency", currency }).resolvedOptions().maximumFractionDigits ?? null;
+ } catch {
+ return null;
+ }
+}
+
+/** A plan with no rolling windows lives on its monthly budget (Claude Enterprise); on others that budget is the extra usage
+ * bought on top of them. */
+function readClaudeBudget(root: Record<string, unknown>, hasWindows: boolean): PlanExtra | null {
+ return readSpendBudget(root.spend) ?? readExtraUsage(root.extra_usage, hasWindows ? EXTRA_USAGE : MONTHLY_SPEND);
+}
+
function claudeExtraLabel(key: string): string {
const suffix = key.startsWith("seven_day_")
? key.slice("seven_day_".length)
diff --git a/src/components/PlanUsage.test.ts b/src/components/PlanUsage.test.ts
index 7722d72a05..e5996eeb94 100644
--- a/src/components/PlanUsage.test.ts
+++ b/src/components/PlanUsage.test.ts
@@ -30,6 +30,34 @@ describe("Plan usage presentation", () => {
expect(html).toContain('aria-valuenow="70"');
});
+ it("shows a monthly budget's amounts beside how much of it is used", () => {
+ fixture.report = {
+ fetchedAt: "2026-10-02T09:00:00Z",
+ providers: [{
+ id: "fixture", name: "Fixture provider", driver: "claude", plan: "Enterprise", ok: true, error: null,
+ fiveHour: { available: false, remainingPercent: null, usedPercent: null, resetsAt: null },
+ weekly: { available: false, remainingPercent: null, usedPercent: null, resetsAt: null },
+ extra: [{ label: "Monthly spend", remainingPercent: 90.7, usedPercent: 9.3, resetsAt: null, spend: { usedMinor: 4_631, limitMinor: 50_000, currency: "USD", exponent: 2 } }],
+ models: [],
+ }],
+ };
+ const html = renderToStaticMarkup(createElement(PlanUsage));
+ expect(html).toContain("Monthly spend");
+ expect(html).toContain("9% used");
+ expect(html).toContain("$46.31 of $500.00 spent");
+ expect(html).toContain('aria-valuenow="9"');
+ });
+
+ it("names the monthly budget in the person's language", async () => {
+ const { loadLocale, setLocale } = await import("@/lib/i18n");
+ await loadLocale("zh");
+ try {
+ expect(renderToStaticMarkup(createElement(PlanUsage))).toContain("每月支出");
+ } finally {
+ setLocale("en");
+ }
+ });
+
it("shows an account error without inventing zero usage", () => {
fixture.report = { providers: [{ id: "fixture", name: "Fixture provider", ok: false, error: "Sign in to this account." }] };
const html = renderToStaticMarkup(createElement(PlanUsage));
@@ -53,4 +81,13 @@ describe("Usage & billing in Simple mode", () => {
expect(busiestWeekly({ providers: [provider("grok", false, 90)] })).toBeNull();
expect(busiestWeekly(null)).toBeNull();
});
+
+ it("stands a plan's monthly budget in for the weekly figure when it has none", async () => {
+ const { monthlySpend } = await import("./PlanUsage");
+ const budget = { label: "Monthly spend", remainingPercent: 91, usedPercent: 9, resetsAt: null };
+ expect(monthlySpend({ providers: [{ ...provider("claude", true, null), extra: [budget] }] })).toMatchObject({ provider: { id: "claude" }, budget });
+ expect(monthlySpend({ providers: [{ ...provider("claude", true, 40), extra: [budget] }] })).toBeNull();
+ expect(monthlySpend({ providers: [{ ...provider("claude", false, null), extra: [budget] }] })).toBeNull();
+ expect(monthlySpend(null)).toBeNull();
+ });
});
diff --git a/src/components/PlanUsage.tsx b/src/components/PlanUsage.tsx
index 9db52b25a3..ec012947d6 100644
--- a/src/components/PlanUsage.tsx
+++ b/src/components/PlanUsage.tsx
@@ -5,6 +5,7 @@ import { t } from "@/lib/i18n";
import { cn } from "@/lib/cn";
import { Card, SIMPLE_CARD } from "./SettingsPrimitives";
import { UsageSummaryCard } from "./CloudUsageMeter";
+import { formatPlanSpend, type PlanSpend } from "@/lib/plan-spend";
interface PlanWindow {
available: boolean;
@@ -18,6 +19,7 @@ interface PlanExtra {
remainingPercent: number;
usedPercent: number;
resetsAt: string | null;
+ spend?: PlanSpend;
}
interface PlanModelUsage {
@@ -85,6 +87,7 @@ function usageTone(used: number): string {
function windowLabel(label: string): string {
if (label === "5-hour") return t("planUsage.fiveHour");
if (label === "Weekly") return t("planUsage.weekly");
+ if (label === "Monthly spend") return t("planUsage.monthlySpend");
return label;
}
@@ -107,11 +110,13 @@ function WindowRow({
window,
now,
usedHeadline = false,
+ detail,
}: {
label: string;
window: PlanWindow;
now: number;
usedHeadline?: boolean;
+ detail?: string;
}) {
const when = window.available ? formatResetDistance(window.resetsAt, now) : null;
const used = window.usedPercent ?? 0;
@@ -125,6 +130,7 @@ function WindowRow({
<div className="min-w-0">
<div className="flex flex-wrap items-baseline gap-x-2 text-[13px] text-ink">
<span className="tabular-nums">{headline}</span>
+ {detail && <span data-plan-spend className="text-[12px] tabular-nums text-ink-secondary">{detail}</span>}
{when && <span className="text-[12px] text-ink-secondary">{t("planUsage.resetsIn", { when })}</span>}
</div>
<div
@@ -186,6 +192,15 @@ function usePlanUsage() {
return { report, loading, error, now, load };
}
+/** The budget of a plan with no weekly window, to stand in for the weekly figure. */
+export function monthlySpend(report: Pick<PlanUsageReport, "providers"> | null): { provider: PlanProvider; budget: PlanExtra } | null {
+ for (const provider of report?.providers ?? []) {
+ const budget = provider.ok && !provider.weekly.available ? provider.extra.find((extra) => extra.label === "Monthly spend") : undefined;
+ if (budget) return { provider, budget };
+ }
+ return null;
+}
+
export function busiestWeekly(report: Pick<PlanUsageReport, "providers"> | null): { provider: PlanProvider; used: number } | null {
let busiest: { provider: PlanProvider; used: number } | null = null;
for (const provider of report?.providers ?? []) {
@@ -199,6 +214,13 @@ export function PlanUsageSummary() {
const { report, now } = usePlanUsage();
if (!report) return null;
const busiest = busiestWeekly(report);
+ const spending = busiest ? null : monthlySpend(report);
+ if (spending) {
+ const name = providerLabel(spending.provider);
+ const used = Math.round(Math.min(100, Math.max(0, spending.budget.usedPercent)));
+ return <UsageSummaryCard kind="plan" title={t("settings.simple.billing.monthlySpend", { provider: name })} percent={used} label={`${name}: ${t("planUsage.used", { used })}`}
+ note={spending.budget.spend ? formatPlanSpend(spending.budget.spend) : null} />;
+ }
if (!busiest) {
return <section data-usage-summary="own-ai" className={cn(SIMPLE_CARD, "px-4 py-3.5 text-[14px] leading-5 text-ink-secondary")}>{t("settings.simple.billing.ownAi")}</section>;
}
@@ -250,6 +272,8 @@ export function PlanUsage() {
key={`${extra.label}-${index}`}
label={windowLabel(extra.label)}
now={now}
+ usedHeadline={Boolean(extra.spend)}
+ detail={extra.spend ? formatPlanSpend(extra.spend) : undefined}
window={{
available: true,
remainingPercent: extra.remainingPercent,
diff --git a/src/components/SidebarProfileMenu.test.ts b/src/components/SidebarProfileMenu.test.ts
index 4ab48d45bd..cc477eb4a0 100644
--- a/src/components/SidebarProfileMenu.test.ts
+++ b/src/components/SidebarProfileMenu.test.ts
@@ -602,6 +602,12 @@ describe("the usage meta", () => {
expect(planUsageSummary({ providers: [provider({ fiveHour: window(40, "2026-10-27T15:00:00Z") })] }, now)).toEqual({ value: "40% used", weekly: false, resets: "Resets in 3 hours" });
});
+ it("falls back to a plan's monthly budget when it has no rolling window", () => {
+ const report = { providers: [provider({ extra: [{ label: "Monthly spend", usedPercent: 9.3 }, { label: "Other", usedPercent: 80 }] })] };
+ expect(planUsageSummary(report, now)).toEqual({ value: "9% used" });
+ expect(planUsageSummary({ providers: [provider({ extra: [{ label: "Other", usedPercent: 80 }] })] }, now)).toBeNull();
+ });
+
it("shows nothing without a percent, not even the plan's name", () => {
expect(planUsageSummary({ providers: [provider({ plan: "Max" })] }, now)).toBeNull();
expect(planUsageSummary({ providers: [provider()] }, now)).toBeNull();
diff --git a/src/components/SidebarProfileMenu.tsx b/src/components/SidebarProfileMenu.tsx
index d6abe6b558..5ec8dcccfc 100644
--- a/src/components/SidebarProfileMenu.tsx
+++ b/src/components/SidebarProfileMenu.tsx
@@ -400,7 +400,7 @@ export function simplePhoneItems({ connected, onGetApp }: { connected: boolean;
}
type PlanWindowUse = { available: boolean; usedPercent: number | null; resetsAt: string | null };
-export type PlanUsageWindows = { providers: Array<{ ok: boolean; plan: string | null; weekly: PlanWindowUse; fiveHour: PlanWindowUse }> };
+export type PlanUsageWindows = { providers: Array<{ ok: boolean; plan: string | null; weekly: PlanWindowUse; fiveHour: PlanWindowUse; extra?: Array<{ label: string; usedPercent: number }> }> };
export interface UsageSummary {
value: string;
@@ -424,7 +424,8 @@ export function planUsageSummary(report: PlanUsageWindows | null, now = Date.now
const resets = resetsIn(tightest.resetsAt ? Date.parse(tightest.resetsAt) : null, now);
return { value: t("sidebar.menu.usageUsed", { percent: Math.round(tightest.usedPercent!) }), weekly: window === "weekly", ...(resets ? { resets } : {}) };
}
- return null;
+ const budgets = signedIn.flatMap((provider) => provider.extra?.filter((extra) => extra.label === "Monthly spend") ?? []);
+ return budgets.length ? { value: t("sidebar.menu.usageUsed", { percent: Math.round(Math.max(...budgets.map((budget) => budget.usedPercent))) }) } : null;
}
export function cloudUsageSummary(plan: CloudPlanSnapshot | null): UsageSummary | null {
diff --git a/src/lib/plan-spend.test.ts b/src/lib/plan-spend.test.ts
new file mode 100644
index 0000000000..db26496961
--- /dev/null
+++ b/src/lib/plan-spend.test.ts
@@ -0,0 +1,28 @@
+import { describe, expect, it } from "vitest";
+
+import { loadLocale, setLocale } from "./i18n";
+import { formatPlanSpend } from "./plan-spend";
+
+describe("formatPlanSpend", () => {
+ it("scales minor units by the provider's exponent", () => {
+ expect(formatPlanSpend({ usedMinor: 4_631, limitMinor: 50_000, currency: "USD", exponent: 2 })).toBe("$46.31 of $500.00 spent");
+ expect(formatPlanSpend({ usedMinor: 1_200, limitMinor: 50_000, currency: "JPY", exponent: 0 })).toBe("¥1,200 of ¥50,000 spent");
+ });
+
+ it("writes money the way the app's language does, whatever the computer's", async () => {
+ await loadLocale("de");
+ try {
+ expect(formatPlanSpend({ usedMinor: 4_631, limitMinor: 50_000, currency: "EUR", exponent: 2 })).toContain("46,31");
+ } finally {
+ setLocale("en");
+ }
+ });
+
+ it("names a currency Intl has no symbol for", () => {
+ expect(formatPlanSpend({ usedMinor: 100, limitMinor: 1_000, currency: "XYZ", exponent: 2 })).toMatch(/XYZ\s1\.00 of XYZ\s10\.00 spent/);
+ });
+
+ it("falls back to plain digits when Intl refuses", () => {
+ expect(formatPlanSpend({ usedMinor: 100, limitMinor: 1_000, currency: "not money", exponent: 2 })).toBe("1.00 not money of 10.00 not money spent");
+ });
+});
diff --git a/src/lib/plan-spend.ts b/src/lib/plan-spend.ts
new file mode 100644
index 0000000000..7c6a5fb7fd
--- /dev/null
+++ b/src/lib/plan-spend.ts
@@ -0,0 +1,22 @@
+import { activeLocale, t } from "./i18n";
+
+export interface PlanSpend {
+ usedMinor: number;
+ limitMinor: number;
+ currency: string;
+ exponent: number;
+}
+
+function money(minor: number, currency: string, exponent: number): string {
+ const amount = minor / 10 ** exponent;
+ try {
+ return new Intl.NumberFormat(activeLocale(), { style: "currency", currency, minimumFractionDigits: exponent, maximumFractionDigits: exponent }).format(amount);
+ } catch {
+ return `${amount.toFixed(Math.min(exponent, 100))} ${currency}`;
+ }
+}
+
+/** "$46.31 of $500.00 spent". */
+export function formatPlanSpend(spend: PlanSpend): string {
+ return t("planUsage.spendAmounts", { used: money(spend.usedMinor, spend.currency, spend.exponent), limit: money(spend.limitMinor, spend.currency, spend.exponent) });
+}
diff --git a/src/locales/en.json b/src/locales/en.json
index 312f702f85..9f45d97862 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -3706,6 +3706,8 @@
"planUsage.weekly": "Weekly",
"planUsage.left": "{remaining}% left",
"planUsage.used": "{used}% used",
+ "planUsage.monthlySpend": "Monthly spend",
+ "planUsage.spendAmounts": "{used} of {limit} spent",
"planUsage.byModel": "By model",
"planUsage.resetsIn": "resets in {when}",
"planUsage.notReported": "Not reported by this plan",
@@ -6257,6 +6259,7 @@
"settings.simple.billing.summary": "{percent}% of this month's included use",
"settings.simple.billing.included": "This month's included use",
"settings.simple.billing.weekly": "Weekly usage · {provider}",
+ "settings.simple.billing.monthlySpend": "Monthly spend · {provider}",
"settings.simple.billing.used": "used",
"settings.simple.billing.ownAi": "Your bots use the AI accounts you connected under AI. Each provider's plan sets its own limits.",
"settings.simple.billing.limits": "See all limits",
diff --git a/src/locales/ko.json b/src/locales/ko.json
index 5ee6a336e3..1968067a13 100644
--- a/src/locales/ko.json
+++ b/src/locales/ko.json
@@ -3566,6 +3566,8 @@
"planUsage.weekly": "주간",
"planUsage.left": "{remaining}% 남음",
"planUsage.used": "{used}% 사용",
+ "planUsage.monthlySpend": "월 사용액",
+ "planUsage.spendAmounts": "{limit} 중 {used} 사용",
"planUsage.byModel": "모델별",
"planUsage.resetsIn": "{when} 후 초기화",
"planUsage.notReported": "이 요금제는 보고하지 않아요",
@@ -6077,6 +6079,7 @@
"settings.simple.billing.summary": "이번 달 포함 사용량의 {percent}%",
"settings.simple.billing.included": "이번 달 포함 사용량",
"settings.simple.billing.weekly": "주간 사용량 · {provider}",
+ "settings.simple.billing.monthlySpend": "월 사용액 · {provider}",
"settings.simple.billing.used": "사용",
"settings.simple.billing.ownAi": "봇은 AI에서 연결한 AI 계정을 써요. 한도는 제공자마다 요금제에서 정해요.",
"settings.simple.billing.limits": "모든 한도 보기",
diff --git a/src/locales/zh.json b/src/locales/zh.json
index 0ca4fd8b6a..8e8c753f13 100644
--- a/src/locales/zh.json
+++ b/src/locales/zh.json
@@ -3698,6 +3698,8 @@
"planUsage.weekly": "每周",
"planUsage.left": "剩余 {remaining}%",
"planUsage.used": "已用 {used}%",
+ "planUsage.monthlySpend": "每月支出",
+ "planUsage.spendAmounts": "已花费 {used},上限 {limit}",
"planUsage.byModel": "按模型",
"planUsage.resetsIn": "{when}后重置",
"planUsage.notReported": "此方案未提供该数据",
@@ -6243,6 +6245,7 @@
"settings.simple.billing.summary": "本月包含用量的 {percent}%",
"settings.simple.billing.included": "本月包含用量",
"settings.simple.billing.weekly": "每周用量 · {provider}",
+ "settings.simple.billing.monthlySpend": "每月支出 · {provider}",
"settings.simple.billing.used": "已用",
"settings.simple.billing.ownAi": "你的机器人使用你在「AI」下连接的 AI 账户。每个提供方的方案各有自己的限额。",
"settings.simple.billing.limits": "查看全部限额",