Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/(dashboard)/dashboard/cache/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ export default function CachePage() {
</div>

{loading && (
<div className="grid grid-cols-1 gap-6" aria-busy="true" aria-label="Loading cache">
<div className="grid grid-cols-1 gap-6" aria-busy="true" aria-label={t("loadingCacheAria")}>
<div className="h-96 rounded-3xl bg-surface-raised animate-pulse" />
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,8 @@ export default function CavemanContextPageClient() {
)}

<section className="rounded-lg border border-border bg-surface p-4">
<h2 className="text-sm font-semibold text-text-main">Input compression</h2>
<p className="mt-1 text-xs text-text-muted">
Rewrite chat history with shorter wording. Reduces input tokens by ~50%.
</p>
<h2 className="text-sm font-semibold text-text-main">{t("inputCompressionTitle")}</h2>
<p className="mt-1 text-xs text-text-muted">{t("inputCompressionDesc")}</p>
<div className="mt-3 flex flex-wrap gap-4 text-sm text-text-main">
<label className="flex items-center gap-2">
<input
Expand Down
8 changes: 6 additions & 2 deletions src/app/(dashboard)/dashboard/costs/CostOverviewTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ export default function CostOverviewTab() {
{ key: "cost", label: t("cost"), align: "right", format: "currency" },
]}
locale={locale}
legacyFreeLabel={t("legacyFreeLabel")}
/>
)}
{accountsByCost.length > 0 && (
Expand All @@ -728,6 +729,7 @@ export default function CostOverviewTab() {
{ key: "cost", label: t("cost"), align: "right", format: "currency" },
]}
locale={locale}
legacyFreeLabel={t("legacyFreeLabel")}
/>
)}
</div>
Expand Down Expand Up @@ -1095,7 +1097,7 @@ function TopListCard({
{hasCostData || Number(row[valueKey] || 0) > 0 ? (
currencyFormatter.format(Number(row[valueKey] || 0))
) : (
<span className="text-xs italic opacity-70">Legacy / Free</span>
<span className="text-xs italic opacity-70">{t("legacyFreeLabel")}</span>
)}
</span>
</div>
Expand All @@ -1118,19 +1120,21 @@ function CostBreakdownTable({
rows,
columns,
locale,
legacyFreeLabel,
}: {
title: string;
rows: Array<Record<string, any>>;
columns: ColumnDef[];
locale: string;
legacyFreeLabel: string;
}) {
const currencyFormatter = createCurrencyFormatter(locale);

function formatValue(value: unknown, format?: ColumnDef["format"]): string {
const num = Number(value || 0);
switch (format) {
case "currency":
return num > 0 ? currencyFormatter.format(num) : "Legacy / Free";
return num > 0 ? currencyFormatter.format(num) : legacyFreeLabel;
case "compact":
return new Intl.NumberFormat(locale, { notation: "compact" }).format(num);
case "number":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ export default function ProviderCard({
<span
key="fast"
className="inline-flex items-center gap-0.5 rounded-full bg-sky-500/10 px-1.5 py-0 text-[9px] font-semibold uppercase tracking-wide text-sky-600 dark:text-sky-400"
title="Codex Fast tier is active"
title={t("codexFastTierActiveChip")}
>
<span className="material-symbols-outlined text-[10px] leading-none">bolt</span>
Fast
{t("tierFast")}
</span>
) : null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const TIER_FILTERS = [
{ key: "ultra", labelKey: "tierUltra" },
{ key: "pro", labelKey: "tierPro" },
{ key: "plus", labelKey: "tierPlus" },
{ key: "lite", label: "Lite" },
{ key: "lite", labelKey: "tierLite" },
{ key: "free", labelKey: "tierFree" },
{ key: "unknown", labelKey: "tierUnknown" },
];
Expand Down Expand Up @@ -804,9 +804,9 @@ export default function ProviderLimits() {
const tone = STATUS_TONE[key];
const labelMap: Record<string, string> = {
all: tr("statTotal", "Total"),
critical: tr("statCritical", "Crítico"),
alert: tr("statAlert", "Alerta"),
ok: tr("statHealthy", "Saudável"),
critical: tr("statCritical", "Critical"),
alert: tr("statAlert", "Alert"),
ok: tr("statHealthy", "Healthy"),
};
const active = statusFilter === key;
const count = statusCounts[key] || 0;
Expand Down Expand Up @@ -847,7 +847,7 @@ export default function ProviderLimits() {
{/* Purchase Type Filter */}
<div className="flex items-center gap-2 flex-wrap">
<span className="text-[11px] uppercase tracking-wider text-text-muted font-semibold mr-1">
{tr("filterPurchaseTypeLabel", "Tipo")}
{tr("filterPurchaseTypeLabel", "Type")}
</span>
{PURCHASE_TYPES.map((type) => {
const count = purchaseTypeCounts[type.key] || 0;
Expand Down Expand Up @@ -985,7 +985,7 @@ export default function ProviderLimits() {
{formatQuotaLabel(q.name) || tr("creditsLabel", "Credits")}
</div>
<div className="text-[10px] text-text-muted">
{tr("creditBalanceHint", "Saldo restante")}
{tr("creditBalanceHint", "Remaining balance")}
</div>
</div>
</div>
Expand Down Expand Up @@ -1039,7 +1039,7 @@ export default function ProviderLimits() {
</span>
) : cd ? (
<span className="text-[10px] text-text-muted">
⏱ {tr("resetsIn", "reset em")} {cd}
⏱ {tr("resetsIn", "Resets in")} {cd}
</span>
) : null}
<span
Expand Down Expand Up @@ -1330,7 +1330,7 @@ export default function ProviderLimits() {
className="inline-flex items-center gap-1.5 text-[12px] font-medium px-3 py-1.5 rounded-md border border-border bg-bg-subtle hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer"
>
<span className="material-symbols-outlined text-[14px]">tune</span>
{tr("editCutoffs", "Editar Cutoffs")}
{tr("editCutoffs", "Edit cutoffs")}
</button>
<button
type="button"
Expand All @@ -1343,7 +1343,7 @@ export default function ProviderLimits() {
>
refresh
</span>
{tr("forceRefresh", "Refresh agora")}
{tr("forceRefresh", "Refresh now")}
</button>
</div>
</>
Expand Down
48 changes: 47 additions & 1 deletion src/i18n/messages/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -2030,6 +2030,17 @@
"recommendationsApplied": "Recommendations applied to this combo.",
"intelligentPanelTitle": "Intelligent Routing Dashboard",
"intelligentPanelDesc": "Real-time scoring and health status for this auto-routing combo.",
"configOnlyStatus": "__MISSING__:Configuration View",
"configOnlyHint": "__MISSING__:This panel shows routing inputs only. Live breaker state is available on the Health page.",
"routingInputs": "__MISSING__:Routing Inputs",
"routingInputsHint": "__MISSING__:Mode pack and weighting stay here; breaker runtime state stays on the Health page.",
"emailVisibilityHint": "__MISSING__:Account emails here follow the global privacy toggle.",
"emailVisibilityTooltip": "__MISSING__:Use the eye icon to reveal or hide account emails globally across combos, providers and quota screens.",
"manualModel": "__MISSING__:Manual model",
"manualModelInvalid": "__MISSING__:Enter a model as provider/model.",
"manualModelUnknownProvider": "__MISSING__:Unknown provider prefix.",
"builderDynamicAccountShort": "__MISSING__:Dynamic account",
"builderNeedValidName": "__MISSING__:Define a valid combo name before continuing.",
"statusOverview": "Status Overview",
"normalOperation": "Normal Operation",
"allProvidersHealthy": "Providers are reporting healthy routing conditions.",
Expand Down Expand Up @@ -2339,7 +2350,8 @@
"previousPeriod": "__MISSING__:Previous Half",
"currentPeriod": "__MISSING__:Current Half",
"exportCSV": "__MISSING__:Export as CSV",
"exportJSON": "__MISSING__:Export as JSON"
"exportJSON": "__MISSING__:Export as JSON",
"legacyFreeLabel": "__MISSING__:Legacy / Free"
},
"endpoint": {
"title": "نقطة نهاية واجهة برمجة التطبيقات",
Expand Down Expand Up @@ -3622,6 +3634,12 @@
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
"geminiCliProjectIdPlaceholder": "__MISSING__:my-gcp-project-id",
"antigravityProjectIdHint": "__MISSING__:Optional override for Antigravity Cloud Code requests. Leave blank to use the project discovered during Google OAuth.",
"antigravityClientProfileLabel": "__MISSING__:Client profile",
"antigravityClientProfileHint": "__MISSING__:Choose which Antigravity client identity OmniRoute presents to the API.",
"antigravityClientProfileIde": "__MISSING__:IDE",
"antigravityClientProfileHarness": "__MISSING__:Harness / CLI",
"codexFastTierActiveChip": "__MISSING__:Codex Fast tier is active",
"tierFast": "__MISSING__:Fast",
"antigravityProjectIdLabel": "__MISSING__:Google Cloud Project ID",
"antigravityProjectIdPlaceholder": "__MISSING__:my-gcp-project-id",
"grokWebCookieHint": "Grok Web Cookie Hint",
Expand Down Expand Up @@ -4557,6 +4575,13 @@
"codexFastTierDesc": "__MISSING__:Globally inject service_tier=priority for OpenAI Codex requests.",
"codexFastTierHint": "__MISSING__:When enabled, OmniRoute adds service_tier=priority to outbound Codex requests for connections that don't already specify a tier. Priority tier requires an OpenAI Enterprise API key or the ChatGPT-auth Codex path; other key types will receive a tier-related error from OpenAI. Per-connection settings on the Codex provider page take precedence.",
"codexFastTierSaveError": "__MISSING__:Failed to update Codex Fast Tier setting",
"codexFastTierTierLabel": "__MISSING__:Service tier",
"codexFastTierTierPriority": "__MISSING__:Priority",
"codexFastTierTierFlex": "__MISSING__:Flex",
"codexFastTierTierDefault": "__MISSING__:Default",
"codexFastTierModelsLabel": "__MISSING__:Fast-tier models",
"codexFastTierModelsHint": "__MISSING__:Only checked models receive service_tier when Fast Tier is enabled.",
"codexFastTierModelCheckbox": "__MISSING__:Enable Fast Tier for {model}",
"claudeFastModeTitle": "__MISSING__:Claude Fast Mode",
"claudeFastModeDesc": "__MISSING__:Opt selected Claude requests into Anthropic Fast Mode (speed:\"fast\").",
"claudeFastModeHint": "__MISSING__:Anthropic does not officially support Fast Mode for SDK-style clients. When enabled, OmniRoute forwards an X-CPA-Force-Fast-Mode header so a paired CLIProxyAPI build can opt-in spoof the entrypoint. Only the listed Opus models are gated by Anthropic's client-side check. Subscription tier, Max plan, and Fast Mode credit balance are still enforced server-side — Anthropic may return out_of_credits even when the toggle is on.",
Expand Down Expand Up @@ -4657,6 +4682,8 @@
"enabled": "Enabled",
"autoDetect": "Auto-detect language",
"rulesCount": "{count} rules",
"inputCompressionTitle": "__MISSING__:Input compression",
"inputCompressionDesc": "__MISSING__:Rewrite chat history with shorter wording. Reduces input tokens by ~50%.",
"analyticsTitle": "Compression Analytics",
"noAnalytics": "No compression analytics yet.",
"outputMode": "__MISSING__:Output Mode",
Expand Down Expand Up @@ -5058,7 +5085,25 @@
"tierPro": "برو",
"tierPlus": "زائد",
"tierFree": "مجاني",
"tierLite": "__MISSING__:Lite",
"tierUnknown": "غير معروف",
"statTotal": "__MISSING__:Total",
"statCritical": "__MISSING__:Critical",
"statAlert": "__MISSING__:Alert",
"statHealthy": "__MISSING__:Healthy",
"filterPurchaseTypeLabel": "__MISSING__:Type",
"filterTierLabel": "__MISSING__:Tier",
"purchaseAll": "__MISSING__:All",
"purchaseOauthSub": "__MISSING__:Subscription",
"purchaseOauthFree": "__MISSING__:OAuth Free",
"purchaseApiKey": "__MISSING__:API Key",
"creditsLabel": "__MISSING__:Credits",
"creditBalanceHint": "__MISSING__:Remaining balance",
"unlimitedLabel": "__MISSING__:Unlimited",
"refreshing": "__MISSING__:Refreshing",
"resetsIn": "__MISSING__:Resets in",
"editCutoffs": "__MISSING__:Edit cutoffs",
"forceRefresh": "__MISSING__:Refresh now",
"suiteBuilderSaveFailed": "Failed to save suite",
"clone": "__MISSING__:Clone",
"exportSuite": "__MISSING__:Export",
Expand Down Expand Up @@ -5879,6 +5924,7 @@
"clearError": "Failed to clear cache.",
"unavailable": "Cache unavailable",
"unavailableDesc": "Could not fetch cache statistics. Make sure the server is running.",
"loadingCacheAria": "__MISSING__:Loading cache",
"promptCache": "Prompt Cache (Provider-Side)",
"semanticCache": "Semantic Cache",
"promptCacheSectionDesc": "Shows provider-side prompt caching activity from usage history so you can see where cache control is active and how much input reuse you are getting.",
Expand Down
48 changes: 47 additions & 1 deletion src/i18n/messages/az.json
Original file line number Diff line number Diff line change
Expand Up @@ -2030,6 +2030,17 @@
"recommendationsApplied": "Recommendations applied to this combo.",
"intelligentPanelTitle": "Intelligent Routing Dashboard",
"intelligentPanelDesc": "Real-time scoring and health status for this auto-routing combo.",
"configOnlyStatus": "__MISSING__:Configuration View",
"configOnlyHint": "__MISSING__:This panel shows routing inputs only. Live breaker state is available on the Health page.",
"routingInputs": "__MISSING__:Routing Inputs",
"routingInputsHint": "__MISSING__:Mode pack and weighting stay here; breaker runtime state stays on the Health page.",
"emailVisibilityHint": "__MISSING__:Account emails here follow the global privacy toggle.",
"emailVisibilityTooltip": "__MISSING__:Use the eye icon to reveal or hide account emails globally across combos, providers and quota screens.",
"manualModel": "__MISSING__:Manual model",
"manualModelInvalid": "__MISSING__:Enter a model as provider/model.",
"manualModelUnknownProvider": "__MISSING__:Unknown provider prefix.",
"builderDynamicAccountShort": "__MISSING__:Dynamic account",
"builderNeedValidName": "__MISSING__:Define a valid combo name before continuing.",
"statusOverview": "Status Overview",
"normalOperation": "Normal Operation",
"allProvidersHealthy": "Providers are reporting healthy routing conditions.",
Expand Down Expand Up @@ -2339,7 +2350,8 @@
"previousPeriod": "Previous Half",
"currentPeriod": "Current Half",
"exportCSV": "Export as CSV",
"exportJSON": "Export as JSON"
"exportJSON": "Export as JSON",
"legacyFreeLabel": "__MISSING__:Legacy / Free"
},
"endpoint": {
"title": "API Endpoint",
Expand Down Expand Up @@ -3622,6 +3634,12 @@
"geminiCliProjectIdLabel": "Google Cloud Project ID",
"geminiCliProjectIdPlaceholder": "my-gcp-project-id",
"antigravityProjectIdHint": "Optional override for Antigravity Cloud Code requests. Leave blank to use the project discovered during Google OAuth.",
"antigravityClientProfileLabel": "__MISSING__:Client profile",
"antigravityClientProfileHint": "__MISSING__:Choose which Antigravity client identity OmniRoute presents to the API.",
"antigravityClientProfileIde": "__MISSING__:IDE",
"antigravityClientProfileHarness": "__MISSING__:Harness / CLI",
"codexFastTierActiveChip": "__MISSING__:Codex Fast tier is active",
"tierFast": "__MISSING__:Fast",
"antigravityProjectIdLabel": "Google Cloud Project ID",
"antigravityProjectIdPlaceholder": "my-gcp-project-id",
"grokWebCookieHint": "Grok Web Cookie Hint",
Expand Down Expand Up @@ -4557,6 +4575,13 @@
"codexFastTierDesc": "__MISSING__:Globally inject service_tier=priority for OpenAI Codex requests.",
"codexFastTierHint": "__MISSING__:When enabled, OmniRoute adds service_tier=priority to outbound Codex requests for connections that don't already specify a tier. Priority tier requires an OpenAI Enterprise API key or the ChatGPT-auth Codex path; other key types will receive a tier-related error from OpenAI. Per-connection settings on the Codex provider page take precedence.",
"codexFastTierSaveError": "__MISSING__:Failed to update Codex Fast Tier setting",
"codexFastTierTierLabel": "__MISSING__:Service tier",
"codexFastTierTierPriority": "__MISSING__:Priority",
"codexFastTierTierFlex": "__MISSING__:Flex",
"codexFastTierTierDefault": "__MISSING__:Default",
"codexFastTierModelsLabel": "__MISSING__:Fast-tier models",
"codexFastTierModelsHint": "__MISSING__:Only checked models receive service_tier when Fast Tier is enabled.",
"codexFastTierModelCheckbox": "__MISSING__:Enable Fast Tier for {model}",
"claudeFastModeTitle": "__MISSING__:Claude Fast Mode",
"claudeFastModeDesc": "__MISSING__:Opt selected Claude requests into Anthropic Fast Mode (speed:\"fast\").",
"claudeFastModeHint": "__MISSING__:Anthropic does not officially support Fast Mode for SDK-style clients. When enabled, OmniRoute forwards an X-CPA-Force-Fast-Mode header so a paired CLIProxyAPI build can opt-in spoof the entrypoint. Only the listed Opus models are gated by Anthropic's client-side check. Subscription tier, Max plan, and Fast Mode credit balance are still enforced server-side — Anthropic may return out_of_credits even when the toggle is on.",
Expand Down Expand Up @@ -4657,6 +4682,8 @@
"enabled": "Enabled",
"autoDetect": "Auto-detect language",
"rulesCount": "{count} rules",
"inputCompressionTitle": "__MISSING__:Input compression",
"inputCompressionDesc": "__MISSING__:Rewrite chat history with shorter wording. Reduces input tokens by ~50%.",
"analyticsTitle": "Compression Analytics",
"noAnalytics": "No compression analytics yet.",
"outputMode": "__MISSING__:Output Mode",
Expand Down Expand Up @@ -5058,7 +5085,25 @@
"tierPro": "Pro",
"tierPlus": "Plus",
"tierFree": "Free",
"tierLite": "__MISSING__:Lite",
"tierUnknown": "Unknown",
"statTotal": "__MISSING__:Total",
"statCritical": "__MISSING__:Critical",
"statAlert": "__MISSING__:Alert",
"statHealthy": "__MISSING__:Healthy",
"filterPurchaseTypeLabel": "__MISSING__:Type",
"filterTierLabel": "__MISSING__:Tier",
"purchaseAll": "__MISSING__:All",
"purchaseOauthSub": "__MISSING__:Subscription",
"purchaseOauthFree": "__MISSING__:OAuth Free",
"purchaseApiKey": "__MISSING__:API Key",
"creditsLabel": "__MISSING__:Credits",
"creditBalanceHint": "__MISSING__:Remaining balance",
"unlimitedLabel": "__MISSING__:Unlimited",
"refreshing": "__MISSING__:Refreshing",
"resetsIn": "__MISSING__:Resets in",
"editCutoffs": "__MISSING__:Edit cutoffs",
"forceRefresh": "__MISSING__:Refresh now",
"suiteBuilderSaveFailed": "Failed to save suite",
"clone": "Clone",
"exportSuite": "Export",
Expand Down Expand Up @@ -5879,6 +5924,7 @@
"clearError": "Failed to clear cache.",
"unavailable": "Cache unavailable",
"unavailableDesc": "Could not fetch cache statistics. Make sure the server is running.",
"loadingCacheAria": "__MISSING__:Loading cache",
"promptCache": "Prompt Cache (Provider-Side)",
"semanticCache": "Semantic Cache",
"promptCacheSectionDesc": "Shows provider-side prompt caching activity from usage history so you can see where cache control is active and how much input reuse you are getting.",
Expand Down
Loading