Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

fix: restore v3.8.0 state for regressive files — prevent auth/gamification/i18n/test regressions

diegosouzapwb50dfb98bcf8
diff --git a/open-sse/executors/base.ts b/open-sse/executors/base.ts
index b726c6a0cd..6fa9f258d8 100644
--- a/open-sse/executors/base.ts
+++ b/open-sse/executors/base.ts
@@ -1,7 +1,11 @@
import { HTTP_STATUS, FETCH_TIMEOUT_MS } from "../config/constants.ts";
import { applyFingerprint, isCliCompatEnabled } from "../config/cliFingerprints.ts";
import { supportsXHighEffort } from "../config/providerModels.ts";
-import { getRotatingApiKey, getValidApiKey } from "../services/apiKeyRotator.ts";
+import {
+ getRotatingApiKey,
+ getValidApiKey,
+ resolveKeyForRequest,
+} from "../services/apiKeyRotator.ts";
import type { KeyHealth } from "../services/apiKeyRotator.ts";
import { getOpenAICompatibleType, isClaudeCodeCompatible } from "../services/provider.ts";
import type { ProviderRequestDefaults } from "../services/providerRequestDefaults.ts";
@@ -345,22 +349,25 @@ export class BaseExecutor {
if (credentials.accessToken) {
headers["Authorization"] = `Bearer ${credentials.accessToken}`;
} else if (credentials.apiKey) {
- // T07: rotate between primary + extra API keys when extraApiKeys is configured
const extraKeys =
(credentials.providerSpecificData?.extraApiKeys as string[] | undefined) ?? [];
- // Extract health directly from credentials for reliability across all call paths
- const credentialsHealth =
- health ??
- (credentials.providerSpecificData?.apiKeyHealth as Record<string, KeyHealth> | undefined);
- const effectiveKey =
- extraKeys.length > 0 && credentials.connectionId
- ? getValidApiKey(
- credentials.connectionId,
- credentials.apiKey,
- extraKeys,
- credentialsHealth
- ) || credentials.apiKey
- : credentials.apiKey;
+ const selectedKeyId = (
+ credentials.providerSpecificData as Record<string, unknown> | undefined
+ )?.selectedKeyId as string | undefined;
+ let effectiveKey = credentials.apiKey;
+ if (extraKeys.length > 0 && credentials.connectionId) {
+ const resolved = resolveKeyForRequest(
+ credentials.connectionId,
+ credentials.apiKey,
+ extraKeys,
+ selectedKeyId ?? null
+ );
+ effectiveKey = resolved?.key ?? credentials.apiKey;
+ if (resolved && credentials.providerSpecificData) {
+ (credentials.providerSpecificData as Record<string, unknown>).selectedKeyId =
+ resolved.keyId;
+ }
+ }
headers["Authorization"] = `Bearer ${effectiveKey}`;
}
@@ -897,7 +904,10 @@ export class BaseExecutor {
// Only apply for Claude/Claude-compatible — OpenAI allows results
// spread across multiple subsequent messages.
const isClaude = this.provider === "claude" || isClaudeCodeCompatible(this.provider);
- const adjacent = isClaude ? fixToolAdjacency(fixed) : fixed;
+ // For Claude, fixToolAdjacency may strip tool_use blocks whose
+ // tool_result isn't in the next message; re-run fixToolPairs to
+ // drop any tool_result orphaned by that strip (discussion #2410).
+ const adjacent = isClaude ? fixToolPairs(fixToolAdjacency(fixed)) : fixed;
tb.messages = stripTrailingAssistantOrphanToolUse(adjacent);
}
}
diff --git a/open-sse/handlers/chatCore.ts b/open-sse/handlers/chatCore.ts
index e5041adb5d..5060b72b8c 100644
--- a/open-sse/handlers/chatCore.ts
+++ b/open-sse/handlers/chatCore.ts
@@ -49,7 +49,6 @@ import { updateProviderConnection } from "@/lib/db/providers";
import {
recordKeyFailure,
recordKeySuccess,
- getLastUsedKeyId,
getInvalidKeyCount,
trackConnectionExtraKeys,
connectionHasExtraKeys,
@@ -1319,6 +1318,63 @@ export async function handleChatCore({
}).catch(() => {});
};
+ const recordKeyHealthStatus = (
+ status: number,
+ creds: Record<string, unknown> | null | undefined
+ ): void => {
+ const connId = creds?.connectionId as string | undefined;
+ if (!connId) return;
+
+ const psd = creds.providerSpecificData as Record<string, unknown> | undefined;
+ const extraKeys = (psd?.extraApiKeys as string[] | undefined) ?? [];
+ const health = psd?.apiKeyHealth as Record<string, KeyHealth> | undefined;
+ const currentKeyId = (psd?.selectedKeyId as string | undefined) ?? "primary";
+
+ trackConnectionExtraKeys(connId, extraKeys);
+
+ if (status === 401) {
+ const updatedHealth = recordKeyFailure(connId, currentKeyId);
+ log?.warn?.(
+ "AUTH",
+ `401 on connection ${connId.slice(0, 8)} - key marked as failed (failure #${updatedHealth.failures})`
+ );
+
+ // Persist health status to DB on every failure (not just invalid transitions)
+ // This ensures in-memory state survives process restarts
+ const prevStatus = health?.[currentKeyId]?.status;
+ const prevFailures = health?.[currentKeyId]?.failures ?? 0;
+ if (updatedHealth.status !== prevStatus || updatedHealth.failures !== prevFailures) {
+ updateProviderConnection(connId, {
+ providerSpecificData: {
+ ...psd,
+ apiKeyHealth: { ...health, [currentKeyId]: updatedHealth },
+ },
+ }).catch((err: unknown) => {
+ log?.error?.(
+ "DB",
+ `Failed to persist apiKeyHealth: ${err instanceof Error ? err.message : String(err)}`
+ );
+ });
+ }
+ } else if (status >= 200 && status < 300) {
+ const updatedHealth = recordKeySuccess(connId, currentKeyId);
+ const prevStatus = health?.[currentKeyId]?.status;
+ if (prevStatus === "warning" || prevStatus === "invalid") {
+ updateProviderConnection(connId, {
+ providerSpecificData: {
+ ...psd,
+ apiKeyHealth: { ...health, [currentKeyId]: updatedHealth },
+ },
+ }).catch((err: unknown) => {
+ log?.error?.(
+ "DB",
+ `Failed to persist apiKeyHealth: ${err instanceof Error ? err.message : String(err)}`
+ );
+ });
+ }
+ }
+ };
+
const persistCodexQuotaState = async (
headers: Headers | Record<string, string> | null,
status = 0
@@ -3029,6 +3085,8 @@ export async function handleChatCore({
const executeProviderRequest = async (modelToCall = effectiveModel, allowDedup = false) => {
const execute = async () => {
const executionCredentials = getExecutionCredentials();
+ // Track execution credentials for key health recording (to capture selectedKeyId)
+ let lastExecCreds = executionCredentials;
const accountSemaphoreMaxConcurrency =
resolveAccountSemaphoreMaxConcurrency(executionCredentials);
const accountSemaphoreKey = resolveAccountSemaphoreKey({
@@ -3160,11 +3218,12 @@ export async function handleChatCore({
while (attempts < maxAttempts) {
trace("pre_executor", { attempt: attempts });
+ const execCreds = getExecutionCredentials();
const res = await executor.execute({
model: modelToCall,
body: bodyToSend,
stream: upstreamStream,
- credentials: getExecutionCredentials(),
+ credentials: execCreds,
signal: streamController.signal,
log,
extendedContext,
@@ -3175,41 +3234,8 @@ export async function handleChatCore({
});
trace("post_executor", { status: res?.response?.status });
- // T07: Handle 401 authentication errors with API key health tracking
- if (res.response.status === 401 && credentials?.connectionId) {
- const psd = credentials.providerSpecificData as Record<string, unknown> | undefined;
- const extraKeys = (psd?.extraApiKeys as string[] | undefined) ?? [];
- const health = psd?.apiKeyHealth as Record<string, KeyHealth> | undefined;
-
- // Track extra keys for A3 guard (prevents disabling entire connection on single-key failure)
- trackConnectionExtraKeys(credentials.connectionId, extraKeys);
-
- const currentKeyId = getLastUsedKeyId(credentials.connectionId) || "primary";
-
- // Record failure for the current key
- const updatedHealth = recordKeyFailure(credentials.connectionId, currentKeyId);
- log?.warn?.(
- "AUTH",
- `401 on connection ${credentials.connectionId.slice(0, 8)} - key marked as failed (${updatedHealth.failures}/${3})`
- );
-
- // Persist health status to DB if key is now invalid
- if (
- updatedHealth.status === "invalid" &&
- health?.[currentKeyId]?.status !== "invalid"
- ) {
- updateProviderConnection(credentials.connectionId, {
- providerSpecificData: {
- ...psd,
- apiKeyHealth: { ...health, [currentKeyId]: updatedHealth },
- },
- }).catch((err) => {
- log?.error?.(
- "DB",
- `Failed to persist apiKeyHealth: ${err instanceof Error ? err.message : String(err)}`
- );
- });
- }
+ if (res.response.status === 401 && execCreds?.connectionId) {
+ recordKeyHealthStatus(401, execCreds);
}
// Qwen 429 strict quota backoff (wait 1.5s, 3s and retry)
@@ -3337,6 +3363,7 @@ export async function handleChatCore({
return {
...res,
+ _executionCredentials: execCreds,
response: new Response(
wrapReadableStreamWithFinalize(originalBody, acquireAccountSemaphoreRelease),
{
@@ -3349,7 +3376,10 @@ export async function handleChatCore({
};
}
- return res;
+ return {
+ ...res,
+ _executionCredentials: execCreds,
+ };
}
},
streamController.signal
@@ -3362,62 +3392,12 @@ export async function handleChatCore({
// Non-stream: release semaphore immediately after reading full response body.
const status = rawResult.response.status;
- // T07: Record API key health status
- if (credentials?.connectionId && credentials?.apiKey) {
- const psd = credentials.providerSpecificData as Record<string, unknown> | undefined;
- const extraKeys = (psd?.extraApiKeys as string[] | undefined) ?? [];
- const health = psd?.apiKeyHealth as Record<string, KeyHealth> | undefined;
-
- if (status === 401) {
- // Track extra keys for A3 guard (prevents disabling entire connection on single-key failure)
- trackConnectionExtraKeys(credentials.connectionId, extraKeys);
-
- // Authentication failed - mark current key as failed
- const currentKeyId = getLastUsedKeyId(credentials.connectionId) || "primary";
- const updatedHealth = recordKeyFailure(credentials.connectionId, currentKeyId);
- log?.warn?.(
- "AUTH",
- `401 on connection ${credentials.connectionId.slice(0, 8)} - key marked as failed (${updatedHealth.failures}/3)`
- );
-
- // Persist to DB if status changed to invalid
- if (
- updatedHealth.status === "invalid" &&
- health?.[currentKeyId]?.status !== "invalid"
- ) {
- updateProviderConnection(credentials.connectionId, {
- providerSpecificData: {
- ...psd,
- apiKeyHealth: { ...health, [currentKeyId]: updatedHealth },
- },
- }).catch((err) => {
- log?.error?.(
- "DB",
- `Failed to persist apiKeyHealth: ${err instanceof Error ? err.message : String(err)}`
- );
- });
- }
- } else if (status >= 200 && status < 300) {
- // Success - mark current key as successful
- const currentKeyId = getLastUsedKeyId(credentials.connectionId) || "primary";
- const updatedHealth = recordKeySuccess(credentials.connectionId, currentKeyId);
-
- // Persist to DB if status was warning/invalid and now active
- const prevStatus = health?.[currentKeyId]?.status;
- if (prevStatus === "warning" || prevStatus === "invalid") {
- updateProviderConnection(credentials.connectionId, {
- providerSpecificData: {
- ...psd,
- apiKeyHealth: { ...health, [currentKeyId]: updatedHealth },
- },
- }).catch((err) => {
- log?.error?.(
- "DB",
- `Failed to persist apiKeyHealth: ${err instanceof Error ? err.message : String(err)}`
- );
- });
- }
- }
+ // Use execution credentials captured during request processing
+ if (
+ rawResult._executionCredentials?.connectionId &&
+ rawResult._executionCredentials?.apiKey
+ ) {
+ recordKeyHealthStatus(status, rawResult._executionCredentials);
}
const statusText = rawResult.response.statusText;
@@ -3747,7 +3727,13 @@ export async function handleChatCore({
} else if (errorType === PROVIDER_ERROR_TYPES.ACCOUNT_DEACTIVATED) {
// Plan A: if connection has extra API keys, don't disable — only the failing key is affected.
// Single-key connections still get disabled as before.
- if (connectionHasExtraKeys(connectionId)) {
+ if (
+ connectionHasExtraKeys(
+ connectionId,
+ (credentials?.providerSpecificData as Record<string, unknown> | undefined)
+ ?.extraApiKeys as string[] | undefined
+ )
+ ) {
await updateProviderConnection(connectionId, {
lastErrorType: errorType,
lastError: message,
diff --git a/open-sse/services/apiKeyRotator.ts b/open-sse/services/apiKeyRotator.ts
index 6afeb33065..1814fb833d 100644
--- a/open-sse/services/apiKeyRotator.ts
+++ b/open-sse/services/apiKeyRotator.ts
@@ -18,10 +18,6 @@
// In-memory round-robin index per connection
const _keyIndexes = new Map<string, number>();
-// Tracks the last keyId selected by getValidApiKey() for a connection.
-// Used by chatCore.ts to know which key to record failures/successes against.
-const _lastUsedKeyId = new Map<string, string>();
-
// Tracks which connections have extra API keys (for A3 guard in chatCore.ts)
// Used to prevent disabling an entire connection when only one key fails.
const _connectionExtraKeys = new Map<string, boolean>();
@@ -60,7 +56,7 @@ interface KeyHealth {
const _keyHealth = new Map<string, KeyHealth>();
-const FAILURE_THRESHOLD = 3; // Mark as invalid after 3 consecutive failures
+const FAILURE_THRESHOLD = 2; // Mark as invalid after 2 consecutive failures
/**
* Get or create health status for a specific key within a connection scope.
@@ -95,7 +91,7 @@ export function getValidApiKey(
primaryKey: string,
extraKeys: string[] = [],
health?: Record<string, KeyHealth>
-): string | null {
+): { key: string; keyId: string } | null {
const validExtras = extraKeys.filter((k) => typeof k === "string" && k.trim().length > 0);
// Build list of all keys with their IDs
@@ -106,6 +102,10 @@ export function getValidApiKey(
const primaryHealth = health?.["primary"] || getOrCreateHealth(connectionId, "primary");
if (primaryHealth.status !== "invalid") {
allKeys.push({ key: primaryKey, keyId: "primary" });
+ } else {
+ console.warn(
+ `[KeyRotator] Skipping invalid primary key for connection ${connectionId.slice(0, 8)}`
+ );
}
}
@@ -120,8 +120,7 @@ export function getValidApiKey(
if (allKeys.length === 0) return null;
if (allKeys.length === 1) {
- _lastUsedKeyId.set(connectionId, allKeys[0].keyId);
- return allKeys[0].key;
+ return { key: allKeys[0].key, keyId: allKeys[0].keyId };
}
// Round-robin among valid keys only
@@ -129,16 +128,7 @@ export function getValidApiKey(
const idx = current % allKeys.length;
_keyIndexes.set(connectionId, current + 1);
- _lastUsedKeyId.set(connectionId, allKeys[idx].keyId);
- return allKeys[idx].key;
-}
-
-/**
- * Get the keyId that was last selected by getValidApiKey() for a connection.
- * Used by chatCore.ts to record failures/successes against the correct key.
- */
-export function getLastUsedKeyId(connectionId: string): string | undefined {
- return _lastUsedKeyId.get(connectionId);
+ return { key: allKeys[idx].key, keyId: allKeys[idx].keyId };
}
/**
@@ -299,4 +289,53 @@ export function getApiKeyCount(primaryKey: string, extraKeys: string[] = []): nu
return (primaryKey ? 1 : 0) + validExtras.length;
}
+/**
+ * Resolve the API key and its health status for an ongoing request.
+ *
+ * Unlike getValidApiKey() (which does round-robin for every call), this
+ * method re-uses the previously selected keyId when available — ensuring
+ * that a multi-turn request stream keeps using the same key. If no key
+ * was selected yet or the stored key is no longer valid, it falls back
+ * to fresh round-robin via getValidApiKey().
+ *
+ * @returns The resolved key+keyId, or null if no valid keys remain.
+ */
+export function resolveKeyForRequest(
+ connectionId: string,
+ primaryKey: string,
+ extraKeys: string[],
+ selectedKeyId: string | null
+): { key: string; keyId: string } | null {
+ if (selectedKeyId) {
+ const health = getOrCreateHealth(connectionId, selectedKeyId);
+ if (health.status !== "invalid") {
+ if (selectedKeyId === "primary" && primaryKey) {
+ return { key: primaryKey, keyId: "primary" };
+ }
+ const match = /^extra_(\d+)$/.exec(selectedKeyId);
+ if (match) {
+ const idx = Number.parseInt(match[1], 10);
+ if (idx >= 0 && idx < extraKeys.length && extraKeys[idx].trim().length > 0) {
+ return { key: extraKeys[idx], keyId: selectedKeyId };
+ }
+ }
+ }
+ }
+
+ return getValidApiKey(connectionId, primaryKey, extraKeys);
+}
+
+export function removeConnectionHealth(connectionId: string): void {
+ for (const key of _keyHealth.keys()) {
+ if (key.startsWith(`${connectionId}:`)) {
+ _keyHealth.delete(key);
+ }
+ }
+}
+
+export function removeConnectionIndex(connectionId: string): void {
+ _keyIndexes.delete(connectionId);
+ _connectionExtraKeys.delete(connectionId);
+}
+
export type { KeyHealth };
diff --git a/src/app/api/gamification/federation/leaderboard/route.ts b/src/app/api/gamification/federation/leaderboard/route.ts
index d65da53496..b7dde05699 100644
--- a/src/app/api/gamification/federation/leaderboard/route.ts
+++ b/src/app/api/gamification/federation/leaderboard/route.ts
@@ -1,6 +1,7 @@
import { NextRequest, NextResponse } from "next/server";
import { CORS_HEADERS, handleCorsOptions } from "@/shared/utils/cors";
import { type LeaderboardScope, getTopN } from "@/lib/gamification/leaderboard";
+import crypto from "crypto";
export async function OPTIONS() {
return handleCorsOptions();
@@ -8,8 +9,36 @@ export async function OPTIONS() {
/**
* GET /api/gamification/federation/leaderboard — Serve leaderboard for federation
+ *
+ * Requires bearer token authentication against community_servers.
*/
export async function GET(request: NextRequest) {
+ // Authenticate: validate bearer token against community_servers
+ const authHeader = request.headers.get("Authorization");
+ if (!authHeader?.startsWith("Bearer ")) {
+ return NextResponse.json(
+ { error: "Missing authorization" },
+ { status: 401, headers: CORS_HEADERS }
+ );
+ }
+
+ const token = authHeader.slice(7);
+ const tokenHash = crypto
+ .pbkdf2Sync(token, "omniroute-federation-salt", 120000, 32, "sha256")
+ .toString("hex");
+ const { getDbInstance } = await import("@/lib/db/core");
+ const db = getDbInstance();
+ const server = db
+ .prepare("SELECT id FROM community_servers WHERE api_key_hash = ? AND status = 'connected'")
+ .get(tokenHash) as { id: string } | undefined;
+
+ if (!server) {
+ return NextResponse.json(
+ { error: "Invalid or unauthorized token" },
+ { status: 403, headers: CORS_HEADERS }
+ );
+ }
+
const url = new URL(request.url);
const scope: LeaderboardScope = (url.searchParams.get("scope") || "global") as LeaderboardScope;
const limit = Number(url.searchParams.get("limit") || 100);
diff --git a/src/app/api/gamification/federation/score/route.ts b/src/app/api/gamification/federation/score/route.ts
index e72cef5064..5b7c37d955 100644
--- a/src/app/api/gamification/federation/score/route.ts
+++ b/src/app/api/gamification/federation/score/route.ts
@@ -2,6 +2,7 @@ import { NextRequest, NextResponse } from "next/server";
import { CORS_HEADERS, handleCorsOptions } from "@/shared/utils/cors";
import { updateScore } from "@/lib/gamification/leaderboard";
import { z } from "zod";
+import crypto from "crypto";
export async function OPTIONS() {
return handleCorsOptions();
@@ -19,10 +20,10 @@ export async function POST(request: NextRequest) {
);
}
- // Validate token against connected community servers
const token = authHeader.slice(7);
- const crypto = await import("crypto");
- const tokenHash = crypto.createHash("sha256").update(token).digest("hex");
+ const tokenHash = crypto
+ .pbkdf2Sync(token, "omniroute-federation-salt", 120000, 32, "sha256")
+ .toString("hex");
const { getDbInstance } = await import("@/lib/db/core");
const db = getDbInstance();
const server = db
diff --git a/src/app/api/providers/[id]/route.ts b/src/app/api/providers/[id]/route.ts
index e66555f64f..980cf666a2 100644
--- a/src/app/api/providers/[id]/route.ts
+++ b/src/app/api/providers/[id]/route.ts
@@ -207,6 +207,57 @@ export async function PUT(request: Request, { params }: { params: Promise<{ id:
updateData.providerSpecificData =
normalizeProviderSpecificData(existing.provider, mergedPsd) || {};
+ const psd = updateData.providerSpecificData as Record<string, any>;
+ if (psd.apiKeyHealth) {
+ const health = psd.apiKeyHealth as Record<string, any>;
+
+ // If the primary API key was explicitly replaced in this request,
+ // clear stale health.primary — it no longer corresponds to the
+ // current key. The next health check will regenerate it.
+ if (updateData.apiKey !== undefined && updateData.apiKey !== existing.apiKey) {
+ delete health.primary;
+ }
+
+ // Stale primary guard: no valid primary key → no primary health.
+ const currentApiKey = updateData.apiKey ?? existing.apiKey ?? null;
+ if (typeof currentApiKey !== "string" || currentApiKey.length === 0) {
+ delete health.primary;
+ }
+
+ // Detect whether the extras list was explicitly changed by the caller.
+ // The index-based mapping (extra_0, extra_1, …) drifts when a key is
+ // inserted or removed mid-list, so we clear ALL extra health entries
+ // when the list actually changes and let the next health check regen.
+ const existingExtras = existingPsd.extraApiKeys;
+ const incomingExtras = incomingPsd?.extraApiKeys;
+ const extrasChanged =
+ Array.isArray(incomingExtras) &&
+ (!Array.isArray(existingExtras) ||
+ existingExtras.length !== incomingExtras.length ||
+ existingExtras.some((v: string, i: number) => v !== incomingExtras[i]));
+
+ const extras = psd.extraApiKeys;
+ const maxExtraIdx = Array.isArray(extras) ? extras.length : 0;
+ for (const key of Object.keys(health)) {
+ if (key.startsWith("extra_")) {
+ if (extrasChanged) {
+ // Extras modified — index drift possible. Clear all to be safe.
+ delete health[key];
+ } else {
+ // Extras unchanged: only clean out-of-range indices.
+ const idx = parseInt(key.slice(6), 10);
+ if (isNaN(idx) || idx >= maxExtraIdx) {
+ delete health[key];
+ }
+ }
+ }
+ }
+
+ if (Object.keys(health).length === 0) {
+ delete psd.apiKeyHealth;
+ }
+ }
+
if (!isClaudeExtraUsageBlockEnabled(existing.provider, updateData.providerSpecificData)) {
const clearExtraUsageUpdate = buildClaudeExtraUsageStateClearUpdate({
provider: existing.provider,
diff --git a/src/app/api/providers/[id]/test/route.ts b/src/app/api/providers/[id]/test/route.ts
index b82cd00532..cef3846634 100644
--- a/src/app/api/providers/[id]/test/route.ts
+++ b/src/app/api/providers/[id]/test/route.ts
@@ -22,6 +22,7 @@ import {
resolveGitLabOAuthBaseUrl,
} from "@/lib/oauth/gitlab";
import { providerAllowsOptionalApiKey } from "@/shared/constants/providers";
+import { removeConnectionHealth } from "@omniroute/open-sse/services/apiKeyRotator.ts";
// OAuth provider test endpoints
const OAUTH_TEST_CONFIG = {
@@ -676,6 +677,16 @@ export async function testSingleConnection(connectionId: string, validationModel
if (result.valid) {
updateData.backoffLevel = 0;
+
+ const psd = connection?.providerSpecificData as Record<string, unknown> | undefined;
+ updateData.providerSpecificData = {
+ ...(psd || {}),
+ apiKeyHealth: {},
+ };
+
+ try {
+ removeConnectionHealth(connectionId);
+ } catch {}
}
// If token was refreshed, update tokens in DB
diff --git a/src/app/docs/lib/docs-auto-generated.ts b/src/app/docs/lib/docs-auto-generated.ts
index 0c104756d2..9467bf18ce 100644
--- a/src/app/docs/lib/docs-auto-generated.ts
+++ b/src/app/docs/lib/docs-auto-generated.ts
@@ -75,6 +75,11 @@ export const autoNavSections: AutoGenNavSection[] = [
title: "i18n — Internationalization Guide",
fileName: "guides/I18N.md",
},
+ {
+ slug: "kiro-setup",
+ title: "Kiro Setup Guide",
+ fileName: "guides/KIRO_SETUP.md",
+ },
{
slug: "pwa-guide",
title: "Progressive Web App (PWA) Guide",
@@ -160,6 +165,11 @@ export const autoNavSections: AutoGenNavSection[] = [
title: "Evaluations (Evals)",
fileName: "frameworks/EVALS.md",
},
+ {
+ slug: "gamification",
+ title: "Gamification & Leaderboard System",
+ fileName: "frameworks/GAMIFICATION.md",
+ },
{
slug: "mcp-server",
title: "OmniRoute MCP Server Documentation",
@@ -285,6 +295,11 @@ export const autoNavSections: AutoGenNavSection[] = [
title: "Test Coverage Plan",
fileName: "ops/COVERAGE_PLAN.md",
},
+ {
+ slug: "e2e-dashboard-shakedown-v3.8.0",
+ title: "E2E Dashboard Shakedown — v3.8.0",
+ fileName: "ops/E2E_DASHBOARD_SHAKEDOWN_v3.8.0.md",
+ },
{
slug: "fly-io-deployment-guide",
title: "OmniRoute Fly.io 部署指南",
@@ -498,6 +513,26 @@ export const autoSearchIndex: AutoGenSearchItem[] = [
"2. Add to Generator",
],
},
+ {
+ slug: "kiro-setup",
+ title: "Kiro Setup Guide",
+ fileName: "guides/KIRO_SETUP.md",
+ section: "Guides",
+ content:
+ "This guide covers adding Kiro (AWS-hosted AI coding assistant) accounts to OmniRoute, with a focus on running multiple accounts simultaneously without session conflicts. Starting with v3.8.0, OmniRoute calls registerClient() (AWS SSO OIDC) during every Kiro connection import. This gives each OmniRou",
+ headings: [
+ "Background: Why Kiro Accounts Can Conflict",
+ "How OmniRoute Solves This (v3.8.0+)",
+ "Migration Note for Connections Created Before v3.8.0",
+ "Adding Two Kiro Accounts Side by Side",
+ "Prerequisites",
+ "Step 1: Import the first account",
+ "Step 2: Import the second account",
+ "Step 3: Verify both connections are active",
+ "Step 4: Use a combo to route between accounts",
+ "Enterprise / IDC Users",
+ ],
+ },
{
slug: "pwa-guide",
title: "Progressive Web App (PWA) Guide",
@@ -709,7 +744,7 @@ export const autoSearchIndex: AutoGenSearchItem[] = [
"Categories",
"Free Tier (OAuth-first or no-key) (5)",
"OAuth Providers (11)",
- "Web Cookie Providers (6)",
+ "Web Cookie Providers (7)",
"API Key Providers (paid / paid-with-free-credits) (122)",
"Local Providers (10)",
"Search Providers (11)",
@@ -798,6 +833,26 @@ export const autoSearchIndex: AutoGenSearchItem[] = [
"Dispatch Pipeline",
],
},
+ {
+ slug: "gamification",
+ title: "Gamification & Leaderboard System",
+ fileName: "frameworks/GAMIFICATION.md",
+ section: "Frameworks",
+ content:
+ "Source of truth: src/lib/gamification/, src/lib/db/gamification.ts, src/app/api/gamification/ Last updated: 2026-05-19 — v3.8.0 OmniRoute includes a local-first gamification layer that rewards users for engaging with the platform — making requests, switching providers, creating combos, sharing token",
+ headings: [
+ "Overview",
+ "Purpose",
+ "Scope",
+ "Design Principles",
+ "Architecture",
+ "High-Level Flow",
+ "Module Dependency Graph",
+ "Data Layer",
+ "Database Tables",
+ "Domain Module: src/lib/db/gamification.ts",
+ ],
+ },
{
slug: "mcp-server",
title: "OmniRoute MCP Server Documentation",
@@ -1002,8 +1057,8 @@ export const autoSearchIndex: AutoGenSearchItem[] = [
"4. Forbidden patterns",
"Coverage in CI",
"Related controls",
+ "Upstream details passthrough",
"Known CodeQL limitation: custom sanitizers not recognized",
- "References",
],
},
{
@@ -1196,6 +1251,26 @@ export const autoSearchIndex: AutoGenSearchItem[] = [
"Phase 4: 70% -> 75%",
],
},
+ {
+ slug: "e2e-dashboard-shakedown-v3.8.0",
+ title: "E2E Dashboard Shakedown — v3.8.0",
+ fileName: "ops/E2E_DASHBOARD_SHAKEDOWN_v3.8.0.md",
+ section: "Ops",
+ content:
+ "Branch alvo: release/v3.8.0 Objetivo: validar manualmente, em modo dev (Turbopack), que toda página renderiza sem erro de runtime ou de backend antes de fechar a versão 3.8.0. Para cada erro encontrado, o operador corrige na própria página e segue para a próxima — esse documento é o roteiro vivo da ",
+ headings: [
+ "0. Pré-requisitos (rodar uma vez)",
+ "0.1 Estado do repositório",
+ "0.2 Conflito conhecido — diretório app/ na raiz",
+ "0.3 Cache do Turbopack",
+ "0.4 Dev server",
+ "0.5 Browser",
+ "0.6 Side-channel — busca por erros no backend",
+ '1. O que conta como "passou"',
+ "2. Categorias de erro mais comuns e padrão de correção",
+ "3. Checklist de páginas (ordem sugerida)",
+ ],
+ },
{
slug: "fly-io-deployment-guide",
title: "OmniRoute Fly.io 部署指南",
@@ -1331,6 +1406,7 @@ export const autoAllSlugs: string[] = [
"electron-guide",
"features",
"i18n",
+ "kiro-setup",
"pwa-guide",
"setup-guide",
"termux-guide",
@@ -1346,6 +1422,7 @@ export const autoAllSlugs: string[] = [
"agent-protocols-guide",
"cloud-agent",
"evals",
+ "gamification",
"mcp-server",
"memory",
"opencode",
@@ -1367,6 +1444,7 @@ export const autoAllSlugs: string[] = [
"compression-rules-format",
"rtk-compression",
"coverage-plan",
+ "e2e-dashboard-shakedown-v3.8.0",
"fly-io-deployment-guide",
"proxy-guide",
"release-checklist",
diff --git a/src/i18n/messages/ar.json b/src/i18n/messages/ar.json
index 172aa56e52..1fa751ae8f 100644
--- a/src/i18n/messages/ar.json
+++ b/src/i18n/messages/ar.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/az.json b/src/i18n/messages/az.json
index d6cad80969..f5f1bd5ecf 100644
--- a/src/i18n/messages/az.json
+++ b/src/i18n/messages/az.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3099,6 +3100,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "Google Cloud Project ID",
diff --git a/src/i18n/messages/bg.json b/src/i18n/messages/bg.json
index ff0a0ee611..c86da33536 100644
--- a/src/i18n/messages/bg.json
+++ b/src/i18n/messages/bg.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/bn.json b/src/i18n/messages/bn.json
index 56fedca75d..6830e9582c 100644
--- a/src/i18n/messages/bn.json
+++ b/src/i18n/messages/bn.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/cs.json b/src/i18n/messages/cs.json
index 8fc4fa8479..8867358b51 100644
--- a/src/i18n/messages/cs.json
+++ b/src/i18n/messages/cs.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/da.json b/src/i18n/messages/da.json
index 0aff18fa7a..63d9954b5d 100644
--- a/src/i18n/messages/da.json
+++ b/src/i18n/messages/da.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/de.json b/src/i18n/messages/de.json
index f127ea463f..4e5a9729d1 100644
--- a/src/i18n/messages/de.json
+++ b/src/i18n/messages/de.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json
index 1366890f5f..12515b7554 100644
--- a/src/i18n/messages/en.json
+++ b/src/i18n/messages/en.json
@@ -656,7 +656,56 @@
"audioTranscriptionDesc": "Audio Transcription Desc",
"learnedFromHeaders": "Learned From Headers",
"totalRequests": "Total Requests",
- "cloudUnstableNote": "Cloud Unstable Note"
+ "cloudUnstableNote": "Cloud Unstable Note",
+ "gamificationAdmin": "Gamification Admin",
+ "monitorAnomaliesAndHealth": "Monitor anomalies and system health",
+ "flaggedAnomalies": "Flagged Anomalies",
+ "noAnomaliesDetected": "No anomalies detected",
+ "apiKey": "API Key",
+ "xpLastHour": "XP (1h)",
+ "zScore": "Z-Score",
+ "tokensCommunityServers": "Community Servers",
+ "tokensServerNamePlaceholder": "Server name",
+ "tokensApiKeyPlaceholder": "API key",
+ "tokensTokenBalance": "Token Balance",
+ "tokensSendTokens": "Send Tokens",
+ "tokensRecipientApiKeyId": "Recipient API Key ID",
+ "tokensRecipientApiKeyIdPlaceholder": "Enter recipient API key ID",
+ "tokensReasonOptional": "Reason (optional)",
+ "tokensReasonPlaceholder": "e.g. bonus, reward",
+ "tokensTransactionHistory": "Transaction History",
+ "tokensNoTransactionsYet": "No transactions yet",
+ "tokensInviteCodes": "Invite Codes",
+ "tokensMaxUses": "Max Uses",
+ "tokensRedeemCode": "Redeem Code",
+ "tokensRedeemCodePlaceholder": "Enter invite code",
+ "tokensYourActiveInvites": "Your Active Invites",
+ "tierCoverageTitle": "Tier coverage",
+ "tierCoverageSubtitle": "Providers configured per fallback tier",
+ "batchDetailCopyId": "Copy ID",
+ "batchDetailClose": "Close",
+ "batchDetailEndpoint": "Endpoint",
+ "batchDetailModel": "Model",
+ "batchDetailWindow": "Window",
+ "batchDetailCreated": "Created",
+ "providerTopologyEmpty": "No providers connected yet",
+ "badgeToastUnlocked": "Badge Unlocked!",
+ "batchListSearchPlaceholder": "Search by ID, endpoint, model…",
+ "batchListDeleteAllCompletedTitle": "Delete all completed batches",
+ "batchListBatchesTable": "Batches",
+ "changelogViewerLoading": "Loading changelog from GitHub...",
+ "profileLoading": "Loading profile...",
+ "profileHowToEarn": "How to earn",
+ "bootstrapBannerDismiss": "Dismiss",
+ "batchListDeleteBatchTitle": "Delete batch and its files",
+ "leaderboardYourRank": "Your Rank",
+ "leaderboardLoading": "Loading leaderboard...",
+ "batchFileDetailCopyId": "Copy ID",
+ "batchFileDetailClose": "Close",
+ "batchFileDetailFailedToLoad": "Failed to load file contents",
+ "batchFilesListSearchPlaceholder": "Search by ID or filename…",
+ "batchFilesListFilesTable": "Files",
+ "batchPageLoadingMore": "Loading more…"
},
"sidebar": {
"home": "Home",
@@ -1103,7 +1152,9 @@
"updateNow": "Update Now",
"updating": "Updating...",
"updateAvailableDesc": "A new version is available. Click to update.",
- "updateStarted": "Update started..."
+ "updateStarted": "Update started...",
+ "reloadingPageAutomatically": "Reloading page automatically...",
+ "providerTopology": "Provider Topology"
},
"analytics": {
"title": "Analytics",
@@ -1120,7 +1171,51 @@
"comboHealth": "Combo Health",
"comboHealthDescription": "Combo-level quota, usage distribution, and performance metrics",
"compressionAnalyticsTitle": "Compression Analytics",
- "compressionAnalyticsDescription": "Compression analytics — token savings, mode breakdown, and provider stats."
+ "compressionAnalyticsDescription": "Compression analytics — token savings, mode breakdown, and provider stats.",
+ "autoRoutingTotalAutoRequests": "Total Auto Requests",
+ "autoRoutingAvgSelectionScore": "Avg Selection Score",
+ "autoRoutingExplorationRate": "Exploration Rate",
+ "autoRoutingLkgpHitRate": "LKGP Hit Rate",
+ "autoRoutingRequestsByVariant": "Requests by Variant",
+ "autoRoutingTopRoutedProviders": "Top Routed Providers",
+ "comboHealthWorstQuotaLeft": "Worst quota left",
+ "comboHealthUsageSkew": "Usage skew",
+ "comboHealthSuccessRate": "Success rate",
+ "comboHealthQuotaHealth": "Quota health",
+ "comboHealthRequests": "Requests",
+ "comboHealthTokens": "Tokens",
+ "comboHealthAvgLatency": "Avg latency",
+ "comboHealthTotalRequests": "Total requests",
+ "comboHealthExecutionTargets": "Execution targets",
+ "comboHealthSuccess": "Success",
+ "comboHealthLatency": "Latency",
+ "comboHealthQuota": "Quota",
+ "comboHealthTitle": "Combo health",
+ "comboHealthUnableToLoad": "Unable to load combo health",
+ "comboHealthGettingStarted": "Getting started",
+ "compressionAnalyticsTotalRequests": "Total Requests",
+ "compressionAnalyticsTokensSaved": "Tokens Saved",
+ "compressionAnalyticsAvgSavings": "Avg Savings",
+ "compressionAnalyticsAvgDuration": "Avg Duration",
+ "compressionAnalyticsReceipts": "Receipts",
+ "compressionAnalyticsFallbacks": "Fallbacks",
+ "compressionAnalyticsPromptTokens": "Prompt tokens",
+ "compressionAnalyticsCompletionTokens": "Completion tokens",
+ "compressionAnalyticsTotalTokens": "Total tokens",
+ "compressionAnalyticsCacheTokens": "Cache tokens",
+ "compressionAnalyticsNoDataYet": "No compression data yet",
+ "searchAnalyticsTotalSearches": "Total Searches",
+ "searchAnalyticsCacheHitRate": "Cache Hit Rate",
+ "searchAnalyticsTotalCost": "Total Cost",
+ "searchAnalyticsAvgResponse": "Avg Response",
+ "searchAnalyticsNoSearchesYet": "No searches yet",
+ "providerUtilizationTitle": "Provider utilization",
+ "providerUtilizationFailedToLoad": "Failed to load utilization data",
+ "providerUtilizationNoData": "No utilization data available",
+ "providerUtilizationGettingStarted": "Getting started",
+ "providerUtilizationLatestSnapshot": "Latest quota snapshot",
+ "providerUtilizationRemainingCapacity": "Remaining capacity",
+ "diversityScoreTitle": "Provider Diversity"
},
"apiManager": {
"title": "API Keys",
@@ -1231,7 +1326,21 @@
"permissionsTitle": "Permissions: {name}",
"allowAllDesc": "This key can access all available models.",
"restrictDesc": "This key can access {selectedCount} of {totalModels} models.",
- "selectedCount": "{count} selected"
+ "selectedCount": "{count} selected",
+ "maxActiveSessions": "Max Active Sessions",
+ "apiManagerCustomRateLimits": "Custom Rate Limits",
+ "apiManagerCustomRateLimitsDesc": "Override global default limits. Leave empty to use defaults.",
+ "apiManagerRateLimitRequestsPlaceholder": "Requests",
+ "apiManagerRateLimitReqPer": "req /",
+ "apiManagerRateLimitSecondsPlaceholder": "Seconds",
+ "apiManagerRemoveLimitTitle": "Remove limit",
+ "apiManagerTimezonePlaceholder": "America/Sao_Paulo",
+ "noLogPayloadPrivacy": "No-Log Payload Privacy",
+ "bannedStatus": "Banned Status",
+ "managementApiAccess": "Management API Access",
+ "expirationDate": "Expiration Date",
+ "managementAccess": "Management Access",
+ "allowedConnections": "Allowed Connections"
},
"auditLog": {
"title": "Audit Log",
@@ -1319,7 +1428,9 @@
"rerank": "Rerank",
"rerankModel": "Rerank Model",
"positionDelta": "Position Change",
- "emptyState": "Send a search query to see results"
+ "emptyState": "Send a search query to see results",
+ "copy": "Copy",
+ "resetToDefault": "Reset to default"
},
"cliTools": {
"title": "CLI Tools",
@@ -1640,7 +1751,34 @@
"mitmClientsTab": "MITM Clients",
"customCliTab": "Custom CLI",
"toolCategories": "Tool Categories",
- "visibleToolsCount": "{count} tools available"
+ "visibleToolsCount": "{count} tools available",
+ "customCliBuilderTitle": "OpenAI-compatible CLI builder",
+ "customCliBuilderDescription": "Generate env vars and JSON snippets for any CLI or SDK that accepts an OpenAI-compatible base URL, API key, and model ID.",
+ "customCliNoModels": "Connect at least one provider to populate the model selectors.",
+ "customCliNameLabel": "CLI name",
+ "customCliNamePlaceholder": "e.g. My Team CLI",
+ "customCliDefaultModelLabel": "Default model",
+ "customCliDefaultModelHelp": "Use any OmniRoute model ID or combo. Most OpenAI-compatible CLIs only need the /v1 base URL plus a model string.",
+ "customCliKeyHelper": "For local installs OmniRoute can use sk_omniroute. In cloud mode, pick one of your management API keys.",
+ "customCliAliasMappingsLabel": "Alias mappings",
+ "customCliAliasMappingsHelp": "Optional helper aliases for wrapper scripts or config files that want stable shorthand names.",
+ "customCliAddAlias": "Add alias",
+ "customCliNoMappings": "No alias mappings yet. Add one if your wrapper or team scripts use stable short names.",
+ "customCliAliasPlaceholder": "e.g. review",
+ "customCliTargetModelLabel": "Target model",
+ "customCliEndpointHintLabel": "How to wire the endpoint",
+ "customCliEndpointHint": "Point any OpenAI-compatible client to the OmniRoute /v1 base URL. The raw chat completions endpoint is {endpoint}. Use the JSON block when the tool wants a provider object, or the env script when it reads OPENAI_* variables.",
+ "customCliEnvBlockTitle": "Env / shell snippet",
+ "customCliJsonBlockTitle": "Provider JSON block",
+ "copilotConfigGenerator": "GitHub Copilot Config Generator",
+ "copilotApiKey": "API Key",
+ "copilotFilterModelsPlaceholder": "Filter models...",
+ "copilotMaxInputTokens": "Max Input Tokens",
+ "copilotMaxOutputTokens": "Max Output Tokens",
+ "copilotToolCalling": "Tool Calling",
+ "copilotPasteInto": "Paste into: ",
+ "wireApiChatCompletions": "Chat Completions (/chat/completions)",
+ "wireApiResponses": "Responses API (/responses)"
},
"combos": {
"title": "Combos",
@@ -2110,7 +2248,9 @@
"agentFeaturesContextLengthPlaceholder": "e.g. 128000",
"agentFeaturesContextLengthHint": "Defines the context window for this combo in /v1/models.",
"agentFeaturesContextLengthErrorInteger": "Context length must be a valid integer",
- "agentFeaturesContextLengthErrorRange": "Context length must be between 1000 and 2000000"
+ "agentFeaturesContextLengthErrorRange": "Context length must be between 1000 and 2000000",
+ "compressionOverride": "Compression Override",
+ "modePack": "Mode Pack"
},
"costs": {
"title": "Costs",
@@ -2366,7 +2506,18 @@
"ngrokLastError": "Last error: {error}",
"ngrokStarted": "ngrok tunnel started",
"ngrokStopped": "ngrok tunnel stopped",
- "ngrokRequestFailed": "Failed to update ngrok tunnel"
+ "ngrokRequestFailed": "Failed to update ngrok tunnel",
+ "tokenSaverSubtitle": "Spend less tokens on every request.",
+ "tokenSaverToolOutput": "Tool output",
+ "tokenSaverLlmOutput": "LLM output",
+ "tokenSaverInputCompression": "Input compression",
+ "apiEndpointsCatalogUnavailable": "API catalog unavailable",
+ "apiEndpointsSearchPlaceholder": "Search endpoints...",
+ "apiEndpointsRequiresAuth": "Requires auth",
+ "apiEndpointsNoMatch": "No endpoints match your filter",
+ "localServer": "Local Server",
+ "cloudOmniroute": "Cloud OmniRoute",
+ "copyUrl": "Copy URL"
},
"endpoints": {
"tabProxy": "Endpoint Proxy",
@@ -2450,7 +2601,8 @@
"apiKeyId": "Api Key Id",
"offset": "Offset",
"limit": "Limit",
- "tool": "Tool"
+ "tool": "Tool",
+ "mcpDashboardCopyUrl": "Copy URL"
},
"a2aDashboard": {
"loading": "Loading A2A dashboard...",
@@ -2508,7 +2660,13 @@
"tablePhase": "Table Phase",
"offset": "Offset",
"limit": "Limit",
- "skill": "Skill"
+ "skill": "Skill",
+ "rpcEndpoint": "POST /a2a",
+ "rpcMethodSend": "message/send",
+ "rpcMethodStream": "message/stream",
+ "rpcMethodGet": "tasks/get",
+ "rpcMethodCancel": "tasks/cancel",
+ "serviceLabel": "A2A"
},
"memory": {
"title": "Memory Management",
@@ -2534,7 +2692,19 @@
"episodic": "Episodic",
"procedural": "Procedural",
"semantic": "Semantic",
- "a": "A"
+ "a": "A",
+ "pipelineOk": "Pipeline OK ({latencyMs}ms)",
+ "pipelineError": "Pipeline error",
+ "healthUnknown": "Health unknown",
+ "checkingHealth": "Checking…",
+ "checkHealth": "Check health",
+ "pageInfo": "Page {page} of {totalPages} ({total} total)",
+ "previous": "Previous",
+ "next": "Next",
+ "cancel": "Cancel",
+ "save": "Save",
+ "keyPlaceholder": "e.g. user.preferences.theme",
+ "contentPlaceholder": "Value or JSON content to remember"
},
"skills": {
"title": "Skills",
@@ -2563,7 +2733,11 @@
"networkAccess": "Network Access",
"networkAccessDesc": "Allow outbound network requests",
"mode": "Mode",
- "q": "Q"
+ "q": "Q",
+ "filterSkillsPlaceholder": "Filter skills by name, description, or tag",
+ "allModes": "All modes",
+ "skillsMarketplace": "Skills Marketplace",
+ "installSkill": "Install Skill"
},
"health": {
"title": "System Health",
@@ -2642,7 +2816,13 @@
"learnedFromHeaders": "Learned from headers",
"remainingOfLimit": "{remaining}/{limit} remaining",
"throttleStatus": "Throttle: {value}",
- "lastHeaderUpdate": "Header update: {age}"
+ "lastHeaderUpdate": "Header update: {age}",
+ "databaseHealth": "Database Health",
+ "stickyBoundSessions": "Sticky-bound sessions",
+ "sessionsByApiKey": "Sessions by API key",
+ "noActiveSessionsTracked": "No active sessions tracked yet.",
+ "noSessionQuotaMonitorsActive": "No session quota monitors active.",
+ "gracefulDegradationStatus": "Graceful Degradation Status"
},
"telemetry": {
"title": "System Telemetry",
@@ -2831,7 +3011,24 @@
"failedAddProvider": "Failed to add provider. Try again.",
"connectionError": "Connection error. Please try again.",
"provider": "Provider",
- "apiKeyHelp": "An API key is a password for AI services. Get one from your provider's website (e.g., platform.openai.com, console.anthropic.com)."
+ "apiKeyHelp": "An API key is a password for AI services. Get one from your provider's website (e.g., platform.openai.com, console.anthropic.com).",
+ "tier": {
+ "subtitle": "OmniRoute organises providers into three tiers so routing prefers the most reliable, lowest-cost path first.",
+ "tier1": {
+ "label": "Premium clients",
+ "description": "First-class CLIs with native auth flows and reasoning models."
+ },
+ "tier2": {
+ "label": "Cost-optimised",
+ "description": "Cheap, high-throughput providers used for everyday traffic."
+ },
+ "tier3": {
+ "label": "Fallback & specialty",
+ "description": "Locally-hosted or specialty endpoints used as fallbacks."
+ },
+ "configure": "Configure providers"
+ },
+ "tierFlowDiagramAlt": "OmniRoute 3-tier fallback diagram"
},
"providers": {
"title": "Providers",
@@ -2874,6 +3071,7 @@
"connected": "{count} Connected",
"errorCount": "{count} Error ({code})",
"errorCountNoCode": "{count} Error",
+ "warningCount": "{count} Warning",
"noConnections": "No connections",
"expiredBadge": "Expired",
"expiringSoonBadge": "Expiring Soon",
@@ -3392,6 +3590,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "Google Cloud Project ID",
@@ -3484,7 +3684,16 @@
"providerSummaryAll": "Total",
"ideProviders": "IDE Providers",
"ideProvidersDesc": "Editors with built-in AI subscription. Use the provider page to import credentials directly from the IDE keychain.",
- "noIdeProviders": "No IDE providers match the current filters."
+ "noIdeProviders": "No IDE providers match the current filters.",
+ "providerDetailFastTierTooltip": "Apply Codex Fast tier to all Codex connections by default",
+ "providerDetailFastDefaultLabel": "Fast default",
+ "providerDetailBrowserManualConnect": "Browser/manual connect",
+ "providerDetailAuthUrl": "Auth URL",
+ "providerDetailCallbackUrl": "Callback URL",
+ "providerDetailValidClaudeCredentialsFile": "Valid Claude credentials file",
+ "providerDetailPathAutoDetectedAllOs": "Path is auto-detected per OS (Linux/Mac/Windows).",
+ "providerDetailMyClaudeAccountPlaceholder": "My Claude account",
+ "providerDetailPathAutoDetected": "Path is auto-detected per OS (Linux/Mac)."
},
"settings": {
"title": "Settings",
@@ -4178,7 +4387,147 @@
"optional": "Optional",
"current": "Current",
"remove": "Remove",
- "search": "Search"
+ "search": "Search",
+ "oneproxyTitle": "1proxy Free Proxy Marketplace",
+ "oneproxyTotalProxies": "Total Proxies",
+ "oneproxyAvgQuality": "Avg Quality",
+ "resilienceScope": "Scope:",
+ "resilienceTrigger": "Trigger:",
+ "resilienceEffect": "Effect:",
+ "resilienceRequestQueueTitle": "Request Queue & Rate",
+ "resilienceAutoEnableApiKeyProviders": "Auto-enable for API-key providers",
+ "resilienceRequestsPerMinute": "Requests per minute",
+ "resilienceMinTimeBetweenRequests": "Minimum time between requests",
+ "resilienceConcurrentRequests": "Concurrent requests",
+ "resilienceMaxQueueWaitTime": "Maximum queue wait time",
+ "resilienceBaseCooldown": "Base cooldown",
+ "resilienceUseUpstreamRetryHints": "Use upstream retry hints",
+ "resilienceDefaultPerProvider": "Default (per provider)",
+ "resilienceAlwaysOn": "Always on",
+ "resilienceAlwaysOff": "Always off",
+ "routingRemoveEntry": "Remove entry",
+ "routingNeedlesSubstrings": "Needles (substrings to match)",
+ "routingCaseSensitive": "Case sensitive",
+ "routingPrefixes": "Prefixes",
+ "routingMatch": "Match",
+ "routingReplacement": "Replacement",
+ "routingReplaceAllOccurrences": "Replace all occurrences",
+ "routingPatternRegex": "Pattern (regex)",
+ "routingFlags": "Flags",
+ "routingNeedles": "Needles",
+ "routingBlockText": "Block text",
+ "routingIdempotencyKey": "Idempotency key",
+ "routingEntrypoint": "Entrypoint",
+ "routingVersionFormat": "Version format",
+ "routingCchAlgorithm": "CCH algorithm",
+ "routingWordsToObfuscate": "Words to obfuscate (ZWJ inserted after first char)",
+ "logsSettingsTitle": "Logs Settings",
+ "detailedLogsLabel": "Detailed Logs Enabled",
+ "detailedLogsDesc": "Enable detailed request/response logging",
+ "callLogPipelineLabel": "Call Log Pipeline",
+ "callLogPipelineDesc": "Enable call log processing pipeline",
+ "maxDetailSizeLabel": "Max Detail Size (KB)",
+ "maxDetailSizeDesc": "Maximum size for detailed log entries",
+ "ringBufferSizeLabel": "Ring Buffer Size",
+ "ringBufferSizeDesc": "Size of the ring buffer for logs",
+ "semanticCacheEnabledLabel": "Semantic Cache Enabled",
+ "semanticCacheMaxSizeLabel": "Semantic Cache Max Size",
+ "semanticCacheMaxSizeDesc": "Maximum number of semantic cache entries",
+ "semanticCacheTTLLabel": "Semantic Cache TTL",
+ "promptCacheEnabledLabel": "Prompt Cache Enabled",
+ "promptCacheEnabledDesc": "Enable prompt caching",
+ "promptCacheStrategyLabel": "Prompt Cache Strategy",
+ "promptCacheStrategyDesc": "Strategy for prompt caching",
+ "alwaysPreserveClientCacheLabel": "Always Preserve Client Cache",
+ "alwaysPreserveClientCacheDesc": "Client cache preservation policy",
+ "logRetentionPolicyTitle": "Log retention policy",
+ "resilienceUseUpstream429HintsForBreaker": "Use upstream 429 hints (breaker)",
+ "appearanceLogoPreviewAlt": "Logo preview",
+ "appearanceFaviconPreviewAlt": "Favicon preview",
+ "oneproxyLastSync": "Last Sync",
+ "oneproxyAllProtocols": "All Protocols",
+ "oneproxyCountryCodePlaceholder": "Country code (e.g. US)",
+ "oneproxyMinQualityPlaceholder": "Min quality",
+ "oneproxyLoadingProxies": "Loading proxies...",
+ "oneproxyLastSyncLabel": "Last sync:",
+ "oneproxyProxiesFetched": "Proxies fetched:",
+ "oneproxyConsecutiveFailures": "Consecutive failures:",
+ "oneproxyErrorLabel": "Error:",
+ "oneproxyNever": "Never",
+ "oneproxySyncStatusTitle": "Sync Status",
+ "oneproxySuccess": "Success",
+ "oneproxyFailed": "Failed",
+ "routingAntigravitySignatureTitle": "Antigravity Signature Cache Mode",
+ "routingHeaderFingerprintTitle": "Header fingerprint (per provider)",
+ "routingServerRejectedSave": "⚠ Server rejected save:",
+ "routingAddTransformOp": "Add a transform op",
+ "routingClientCacheControlTitle": "Client Cache Control",
+ "visionBridge": "Vision Bridge",
+ "routingZeroConfigTitle": "Zero-Config Auto-Routing",
+ "routingDefaultAutoVariant": "Default Auto Variant",
+ "visionBridgeModel": "Bridge Model",
+ "resilienceMaxBackoffSteps": "Max backoff steps",
+ "resilienceBaseCooldownLabel": "Base cooldown",
+ "resilienceUseUpstreamRetryHintsLabel": "Use upstream retry hints",
+ "resilienceYes": "Yes",
+ "resilienceNo": "No",
+ "resilienceUseUpstream429BreakerLabel": "Use upstream 429 hints (breaker)",
+ "resilienceDefault": "Default",
+ "resilienceMaxBackoffStepsLabel": "Max backoff steps",
+ "visionBridgePrompt": "Bridge Prompt",
+ "visionBridgeTimeoutMs": "Timeout (ms)",
+ "resilienceConnectionCooldownTitle": "Connection Cooldown",
+ "visionBridgeMaxImagesPerRequest": "Max Images Per Request",
+ "resilienceFailureThreshold": "Failure threshold",
+ "resilienceResetTimeout": "Reset timeout",
+ "resilienceFailureThresholdLabel": "Failure threshold",
+ "resilienceResetTimeoutLabel": "Reset timeout",
+ "visionBridgeModelPlaceholder": "openai/gpt-4o-mini",
+ "visionBridgePromptPlaceholder": "Describe this image concisely.",
+ "resilienceProviderBreakerTitle": "Circuit Breaker per Provider",
+ "storageDatabaseBackupRetention": "Database backup retention",
+ "storagePurgeData": "Purge Data",
+ "retentionQuotaSnapshots": "Quota Snapshots (days)",
+ "retentionMcpAudit": "MCP Audit (days)",
+ "retentionA2aEvents": "A2A Events (days)",
+ "retentionCallLogs": "Call Logs (days)",
+ "retentionUsageHistory": "Usage History (days)",
+ "retentionMemoryEntries": "Memory Entries (days)",
+ "storageAutoVacuumMode": "Auto Vacuum Mode",
+ "storageScheduledVacuum": "Scheduled Vacuum",
+ "storageVacuumHour": "Vacuum Hour (0-23)",
+ "storagePageSize": "Page Size (bytes)",
+ "storageDatabaseSize": "Database Size",
+ "storagePageCount": "Page Count",
+ "storageFreelistCount": "Freelist Count",
+ "storageLastVacuum": "Last Vacuum",
+ "storageLastOptimization": "Last Optimization",
+ "storageIntegrityCheck": "Integrity Check",
+ "storageIntegrityOk": "✓ OK",
+ "storageIntegrityError": "✗ Error",
+ "storageUsageTokenBuffer": "Usage Token Buffer",
+ "compressionSettingsAutoTriggerMode": "Auto trigger mode",
+ "compressionSettingsMcpDescriptionCompression": "MCP description compression",
+ "compressionSettingsCavemanIntensity": "Caveman intensity",
+ "compressionSettingsCavemanOutputMode": "Caveman output mode",
+ "compressionSettingsOutputIntensity": "Output intensity",
+ "compressionSettingsAutoClarityBypass": "Auto clarity bypass",
+ "resilienceWaitForCooldown": "Wait for Cooldown",
+ "resilienceEnableServerSideWait": "Enable server-side wait",
+ "resilienceMaximumRetries": "Maximum retries",
+ "resilienceMaximumWaitPerRetry": "Maximum wait per retry",
+ "memorySkillsSkillsmpMarketplace": "SkillsMP Marketplace",
+ "memorySkillsFailedToSave": "Failed to save",
+ "memorySkillsApiKey": "API Key",
+ "memorySkillsActiveSkillsProvider": "Active Skills Provider",
+ "cliproxyapiFallback": "CLIProxyAPI Fallback",
+ "cliproxyapiEnableFallback": "Enable CLIProxyAPI Fallback",
+ "cliproxyapiUrl": "CLIProxyAPI URL",
+ "cliproxyapiStatus": "CLIProxyAPI Status",
+ "cliproxyapiNotDetected": "Not detected",
+ "payloadRulesTitle": "Payload Rules",
+ "modelCooldownsTitle": "Models in cooldown",
+ "modelCooldownsEmpty": "No models in cooldown right now."
},
"contextRtk": {
"title": "RTK Engine",
@@ -4434,6 +4783,16 @@
},
"streaming": {
"prompt": "Tell me a short story about a robot learning to paint."
+ },
+ "vision": {
+ "system": "You are an assistant that describes images precisely.",
+ "userPrompt": "What is shown in this image?",
+ "imageUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/600px-PNG_transparency_demonstration_1.png"
+ },
+ "schemaCoercion": {
+ "userPrompt": "Look up the weather for Tokyo using metric units and include the hourly breakdown.",
+ "toolDescription": "Fetch weather for a city with structured options.",
+ "cityDescription": "The city to query, e.g. 'Tokyo' or 'New York'."
}
},
"openaiCompatibleLabel": "OpenAI Compatible",
@@ -4479,7 +4838,34 @@
"eventSourceTranslatorPage": "• Translator page (Chat Tester, Test Bench)",
"eventSourceMainPipeline": "• Main request pipeline (CLI/IDE/API traffic)",
"liveMonitorDescriptionPrefix": "Shows translation events as API calls flow through OmniRoute. Events come from the in-memory buffer (resets on restart). Use",
- "liveMonitorDescriptionSuffix": ", or external API calls to generate events."
+ "liveMonitorDescriptionSuffix": ", or external API calls to generate events.",
+ "streamTransformer": "Stream Transformer",
+ "modeDescriptionStreamTransformer": "Run chat completions SSE streams through the Responses transformer.",
+ "streamTransformerTitle": "Responses Stream Transformer",
+ "streamTransformerDescription": "Paste a chat completions SSE stream, run it through OmniRoute's Responses transformer, and inspect the emitted response.* events before wiring a client.",
+ "loadTextSample": "Load text sample",
+ "loadToolSample": "Load tool-call sample",
+ "transformToResponses": "Transform to Responses",
+ "rawChatSseInput": "Raw chat completions SSE",
+ "transformedResponsesSse": "Transformed Responses API SSE",
+ "noResultsYet": "No results yet",
+ "transformedEvents": "Transformed events",
+ "uniqueEventTypes": "Unique event types",
+ "inputLines": "Input lines",
+ "outputLines": "Output lines",
+ "transformedEventTimeline": "Transformed event timeline",
+ "transformerTimelineHint": "Run the transformer to inspect emitted response.output_* events in order.",
+ "eventType": "Event type",
+ "eventPreview": "Preview",
+ "comboRouted": "Combo routed",
+ "uniqueEndpoints": "Unique endpoints",
+ "routeDetails": "Route details",
+ "comboBadge": "Combo",
+ "routeEndpointLabel": "Endpoint",
+ "routeConnectionLabel": "Connection",
+ "scenarioVision": "Vision (image understanding)",
+ "scenarioSchemaCoercion": "Schema coercion (structured output)",
+ "techniques": "Techniques:"
},
"usage": {
"title": "Usage",
@@ -4756,7 +5142,34 @@
"quotaCutoffsDefaultHint": "Default min remaining: {default}%",
"quotaCutoffsResetAll": "Reset all",
"quotaCutoffsNoWindows": "No quota windows are available for this account yet.",
- "quotaThresholdInvalid": "Enter a whole number from 0 to 100."
+ "quotaThresholdInvalid": "Enter a whole number from 0 to 100.",
+ "budgetKpiToday": "Today",
+ "budgetKpiThisMonth": "This month",
+ "budgetKpiProjEom": "Proj EOM",
+ "budgetKpiBlocked": "Blocked",
+ "budgetKpiAtRisk": "At risk",
+ "budgetKpiActiveKeys": "Active keys",
+ "budgetSearchKeysPlaceholder": "Search keys...",
+ "budgetSortPctUsed": "Sort: % Used ↓",
+ "budgetSortTodayDollar": "Sort: Today $ ↓",
+ "budgetSortMonthDollar": "Sort: Month $ ↓",
+ "budgetSortNameAZ": "Sort: Name (A–Z)",
+ "budgetColDailyLim": "Daily lim",
+ "budgetColMonthlyLim": "Monthly lim",
+ "budgetColUsedPct": "Used %",
+ "budgetLoading": "Loading…",
+ "budgetNoKeysMatch": "No keys match filters",
+ "budgetLinearExtrapolation": "linear extrapolation",
+ "budgetThisMonthSoFar": "This month so far",
+ "budgetProjectedEndOfMonth": "Projected end of month",
+ "budgetByProvider": "by provider",
+ "budgetDailyDollar": "Daily $",
+ "budgetWeeklyDollar": "Weekly $",
+ "budgetMonthlyDollar": "Monthly $",
+ "budgetWarnAtPct": "Warn at %",
+ "quotaAlerts": "Quota alerts",
+ "quotaTableRefreshing": "⟳ Refreshing...",
+ "noSpendLast30Days": "No spend in last 30 days"
},
"modals": {
"waitingAuth": "Waiting for Authorization",
@@ -5302,7 +5715,17 @@
"flowDiagramCliDesc": "Processes with own auth/model",
"fingerprintSettingsHint": "CLI Fingerprint matching (disguise requests as specific CLI tools) can be configured in",
"settingsRoutingLink": "Settings/Routing",
- "openSettings": "Settings"
+ "openSettings": "Settings",
+ "copyRawUrlTitle": "Copy raw URL to clipboard",
+ "copied": "Copied!",
+ "copyUrl": "Copy URL",
+ "startHere": "Start Here",
+ "badgeNew": "New",
+ "viewOnGithub": "View on GitHub",
+ "howToUse": "How to use",
+ "browseAllSkillsOnGithub": "Browse all skills on GitHub",
+ "apiSkills": "API Skills",
+ "cliSkills": "CLI Skills"
},
"cloudAgents": {
"title": "Cloud Agents",
@@ -5338,7 +5761,10 @@
"statusWaitingApproval": "Waiting Approval",
"statusCompleted": "Completed",
"statusFailed": "Failed",
- "statusCancelled": "Cancelled"
+ "statusCancelled": "Cancelled",
+ "repositoryName": "Repository name",
+ "repositoryUrl": "Repository URL",
+ "branch": "Branch"
},
"templateNames": {
"simple-chat": "Simple Chat",
@@ -5504,7 +5930,13 @@
"reasoningClearAll": "Clear Reasoning Cache",
"reasoningClearSuccess": "Cleared {count} reasoning cache entries",
"reasoningClearError": "Failed to clear reasoning cache",
- "reasoningNoData": "No reasoning entries cached yet. Entries appear when thinking models use tool calling."
+ "reasoningNoData": "No reasoning entries cached yet. Entries appear when thinking models use tool calling.",
+ "cachePerformanceRetry": "Retry",
+ "cachePerformanceHitRate": "Hit Rate",
+ "cachePerformanceAvgLatency": "Avg Latency (ms)",
+ "cachePerformanceP95Latency": "p95 Latency (ms)",
+ "retry": "Retry",
+ "reasoningAvgChars": "Avg Chars"
},
"proxyConfigModal": {
"levelGlobal": "Global",
@@ -5684,7 +6116,9 @@
"bulkImportErrorMissingHost": "Missing HOST",
"bulkImportErrorInvalidPort": "Invalid PORT (must be 1-65535)",
"bulkImportErrorInvalidType": "Invalid TYPE (use http, https, or socks5)",
- "bulkImportErrorInvalidStatus": "Invalid STATUS (use active or inactive)"
+ "bulkImportErrorInvalidStatus": "Invalid STATUS (use active or inactive)",
+ "clearAssignment": "(clear assignment)",
+ "bulkProxyAssignment": "Bulk Proxy Assignment"
},
"playground": {
"title": "Model Playground",
@@ -5725,7 +6159,10 @@
"music": "Music generation",
"rerank": "Rerank",
"search": "Web search"
- }
+ },
+ "conversationalChat": "Conversational Chat",
+ "clearChat": "Clear chat",
+ "typeMessagePlaceholder": "Type a message... (Shift+Enter for new line)"
},
"requestLogger": {
"recording": "Recording",
@@ -5963,6 +6400,10 @@
"totalExceeded": "⚠ exceeds 100%",
"addKey": "+ Add key…",
"equalSplit": "Equal split",
- "save": "Save allocations"
+ "save": "Save allocations",
+ "betaPreviewLabel": "Beta — UI preview.",
+ "betaConfigSavedPrefix": "A configuração é salva em",
+ "betaConfigSavedSuffix": "(não persiste no servidor ainda). A aplicação dos caps por request ainda não está conectada ao pipeline da proxy. Esta tela permite desenhar e visualizar a divisão de cota;",
+ "policyLabel": "Policy:"
}
}
diff --git a/src/i18n/messages/es.json b/src/i18n/messages/es.json
index c6ce66b182..62001c7103 100644
--- a/src/i18n/messages/es.json
+++ b/src/i18n/messages/es.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/fa.json b/src/i18n/messages/fa.json
index 575800d1c1..11ef0e59b2 100644
--- a/src/i18n/messages/fa.json
+++ b/src/i18n/messages/fa.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/fi.json b/src/i18n/messages/fi.json
index eec5c24014..0d9c2d0d95 100644
--- a/src/i18n/messages/fi.json
+++ b/src/i18n/messages/fi.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/fr.json b/src/i18n/messages/fr.json
index 765f558878..91a82a91ff 100644
--- a/src/i18n/messages/fr.json
+++ b/src/i18n/messages/fr.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/gu.json b/src/i18n/messages/gu.json
index d26409a4b3..05dc724ef0 100644
--- a/src/i18n/messages/gu.json
+++ b/src/i18n/messages/gu.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/he.json b/src/i18n/messages/he.json
index 22177d1a70..39027436e0 100644
--- a/src/i18n/messages/he.json
+++ b/src/i18n/messages/he.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/hi.json b/src/i18n/messages/hi.json
index 3348ea0bb8..5e64d7f614 100644
--- a/src/i18n/messages/hi.json
+++ b/src/i18n/messages/hi.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/hu.json b/src/i18n/messages/hu.json
index 6fde38dab5..5acde4d1d2 100644
--- a/src/i18n/messages/hu.json
+++ b/src/i18n/messages/hu.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/id.json b/src/i18n/messages/id.json
index 391411755e..6981d1483c 100644
--- a/src/i18n/messages/id.json
+++ b/src/i18n/messages/id.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/in.json b/src/i18n/messages/in.json
index f0aa839cc7..bf33646cda 100644
--- a/src/i18n/messages/in.json
+++ b/src/i18n/messages/in.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/it.json b/src/i18n/messages/it.json
index 42935d7ddd..264400a3f6 100644
--- a/src/i18n/messages/it.json
+++ b/src/i18n/messages/it.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/ja.json b/src/i18n/messages/ja.json
index f7786d7fff..2720d73366 100644
--- a/src/i18n/messages/ja.json
+++ b/src/i18n/messages/ja.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/ko.json b/src/i18n/messages/ko.json
index 4c81677198..68a3e0baf0 100644
--- a/src/i18n/messages/ko.json
+++ b/src/i18n/messages/ko.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/mr.json b/src/i18n/messages/mr.json
index 74875b15fa..2f898add11 100644
--- a/src/i18n/messages/mr.json
+++ b/src/i18n/messages/mr.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/ms.json b/src/i18n/messages/ms.json
index 9c167f5c51..bf0d5d1ed6 100644
--- a/src/i18n/messages/ms.json
+++ b/src/i18n/messages/ms.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/nl.json b/src/i18n/messages/nl.json
index e4b19ebbca..ca3f714e72 100644
--- a/src/i18n/messages/nl.json
+++ b/src/i18n/messages/nl.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/no.json b/src/i18n/messages/no.json
index e5a9da6503..07d5aa5de1 100644
--- a/src/i18n/messages/no.json
+++ b/src/i18n/messages/no.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/phi.json b/src/i18n/messages/phi.json
index ee3e199fee..f1b225df29 100644
--- a/src/i18n/messages/phi.json
+++ b/src/i18n/messages/phi.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/pl.json b/src/i18n/messages/pl.json
index 6491bd6c2a..27dda5c9bb 100644
--- a/src/i18n/messages/pl.json
+++ b/src/i18n/messages/pl.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/pt-BR.json b/src/i18n/messages/pt-BR.json
index f4007a311e..289b2d22b9 100644
--- a/src/i18n/messages/pt-BR.json
+++ b/src/i18n/messages/pt-BR.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3195,6 +3196,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "O Google Programmable Search exige dois valores: sua chave de API e o Search Engine ID (cx) do painel do Programmable Search Engine.",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/pt.json b/src/i18n/messages/pt.json
index 051ba9aade..3abb567be9 100644
--- a/src/i18n/messages/pt.json
+++ b/src/i18n/messages/pt.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3193,6 +3194,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/ro.json b/src/i18n/messages/ro.json
index e87f3ab168..73e6f0baa7 100644
--- a/src/i18n/messages/ro.json
+++ b/src/i18n/messages/ro.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/ru.json b/src/i18n/messages/ru.json
index 9f673cda5c..8160061634 100644
--- a/src/i18n/messages/ru.json
+++ b/src/i18n/messages/ru.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/sk.json b/src/i18n/messages/sk.json
index 4d5b936280..376e521287 100644
--- a/src/i18n/messages/sk.json
+++ b/src/i18n/messages/sk.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/sv.json b/src/i18n/messages/sv.json
index 837337f5ad..9fb4f18309 100644
--- a/src/i18n/messages/sv.json
+++ b/src/i18n/messages/sv.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/sw.json b/src/i18n/messages/sw.json
index f0aa839cc7..bf33646cda 100644
--- a/src/i18n/messages/sw.json
+++ b/src/i18n/messages/sw.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/ta.json b/src/i18n/messages/ta.json
index ef0629942e..c379916d11 100644
--- a/src/i18n/messages/ta.json
+++ b/src/i18n/messages/ta.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/te.json b/src/i18n/messages/te.json
index b2c1ad237d..bb2f4c18f0 100644
--- a/src/i18n/messages/te.json
+++ b/src/i18n/messages/te.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/th.json b/src/i18n/messages/th.json
index 39a72a0079..c018017aad 100644
--- a/src/i18n/messages/th.json
+++ b/src/i18n/messages/th.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/tr.json b/src/i18n/messages/tr.json
index 4a016f5a99..c48c75a95d 100644
--- a/src/i18n/messages/tr.json
+++ b/src/i18n/messages/tr.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/uk-UA.json b/src/i18n/messages/uk-UA.json
index 1114ec05c0..8d7d1ddda9 100644
--- a/src/i18n/messages/uk-UA.json
+++ b/src/i18n/messages/uk-UA.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/ur.json b/src/i18n/messages/ur.json
index b93e1ead75..ee2665f658 100644
--- a/src/i18n/messages/ur.json
+++ b/src/i18n/messages/ur.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/vi.json b/src/i18n/messages/vi.json
index 823027122c..b3f5485c91 100644
--- a/src/i18n/messages/vi.json
+++ b/src/i18n/messages/vi.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "Compatible Base Url Hint",
"usageTracking": "Usage Tracking",
"disableCloudTitle": "Disable Cloud Title",
+ "warningCount": "{count} Warning",
"noConnections": "No Connections",
"providerHealth": "Provider Health",
"confirmDbImport": "Confirm Db Import",
@@ -3196,6 +3197,8 @@
"primaryKey": "Primary Key",
"apiKeyInvalidAlert": "{count} API key(s) marked as invalid due to authentication failures in connections: {connections}. They will be skipped in rotation. Click to review.",
"apiKeyInvalidAlertTitle": "API Key Health Alert",
+ "apiKeyWarningAlert": "{count} API key(s) in warning state due to elevated failure rate in connections: {connections}. Review to prevent rotation issues.",
+ "apiKeyWarningAlertTitle": "API Key Warning",
"googlePseInfo": "Google Pse Info",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
diff --git a/src/i18n/messages/zh-CN.json b/src/i18n/messages/zh-CN.json
index 626989d9bb..697db12c09 100644
--- a/src/i18n/messages/zh-CN.json
+++ b/src/i18n/messages/zh-CN.json
@@ -181,6 +181,7 @@
"compatibleBaseUrlHint": "填写兼容 API 的 Base URL。",
"usageTracking": "使用量跟踪",
"disableCloudTitle": "禁用云端",
+ "warningCount": "{count} Warning",
"noConnections": "无连接",
"providerHealth": "提供商健康状态",
"confirmDbImport": "确认DB导入",
@@ -1065,7 +1066,8 @@
"updateNow": "立即更新",
"updating": "更新中...",
"updateAvailableDesc": "有新版本可用。点击更新。",
- "updateStarted": "更新已开始..."
+ "updateStarted": "更新已开始...",
+ "providerTopology": "提供商拓扑"
},
"analytics": {
"title": "分析",
@@ -3211,6 +3213,8 @@
"primaryKey": "主密钥",
"apiKeyInvalidAlert": "{count} 个 API 密钥因认证失败被标记为无效:{connections}。轮换时将跳过它们。点击查看。",
"apiKeyInvalidAlertTitle": "API 密钥健康提醒",
+ "apiKeyWarningAlert": "{count} 个 API 密钥在以下连接中处于警告状态:{connections}。请检查以防止轮换问题。",
+ "apiKeyWarningAlertTitle": "API 密钥警告",
"googlePseInfo": "配置 Google Programmable Search Engine 以启用 Web Search。",
"geminiCliProjectIdHint": "__MISSING__:Your Google Cloud Project ID. Required for accounts with exceptions. Enter your GCP Project ID to use with Gemini CLI.",
"geminiCliProjectIdLabel": "__MISSING__:Google Cloud Project ID",
@@ -3301,7 +3305,17 @@
"freeTierProviders": "免费层提供商",
"freeTierLabel": "有免费额度",
"freeTierProvidersDesc": "提供免费层的提供商——有些需要注册 API 密钥,有些无需任何凭证。",
- "showFreeOnly": "仅显示免费"
+ "showFreeOnly": "仅显示免费",
+ "ideProviders": "IDE 提供商",
+ "ideProvidersDesc": "内置 AI 订阅的编辑器。使用提供商页面直接从 IDE 密钥链导入凭据。",
+ "providerDetailFastTierTooltip": "默认对所有 Codex 连接应用 Codex Fast 层级",
+ "providerDetailFastDefaultLabel": "快速默认",
+ "providerDetailBrowserManualConnect": "浏览器/手动连接",
+ "providerDetailAuthUrl": "认证 URL",
+ "providerDetailCallbackUrl": "回调 URL",
+ "providerDetailValidClaudeCredentialsFile": "有效的 Claude 凭据文件",
+ "providerDetailPathAutoDetectedAllOs": "路径按操作系统自动检测(Linux/Mac/Windows)。",
+ "noIdeProviders": "没有符合当前筛选条件的 IDE 提供商。"
},
"settings": {
"title": "设置",
diff --git a/src/lib/db/gamification.ts b/src/lib/db/gamification.ts
index d3c2e2399f..01655ea761 100644
--- a/src/lib/db/gamification.ts
+++ b/src/lib/db/gamification.ts
@@ -6,6 +6,7 @@
*/
import { getDbInstance } from "./core";
+import { calculateLevel } from "../gamification/xp";
// ──────────────── Types ────────────────
@@ -130,13 +131,13 @@ export function getRank(apiKeyId: string, scope: string): number {
return rankRow.rank;
}
-export function getTopN(scope: string, limit: number): LeaderboardRow[] {
+export function getTopN(scope: string, limit: number, offset: number = 0): LeaderboardRow[] {
const rows = db()
.prepare(
`SELECT api_key_id, scope, score, updated_at FROM leaderboard
- WHERE scope = ? ORDER BY score DESC LIMIT ?`
+ WHERE scope = ? ORDER BY score DESC LIMIT ? OFFSET ?`
)
- .all(scope, limit) as Array<{
+ .all(scope, limit, offset) as Array<{
api_key_id: string;
scope: string;
score: number;
@@ -163,11 +164,11 @@ export function addXp(apiKeyId: string, action: string, amount: number, metadata
db()
.prepare(
`INSERT INTO user_levels (api_key_id, total_xp, current_level, updated_at)
- VALUES (?, ?, 1, datetime('now'))
+ VALUES (?, ?, ?, datetime('now'))
ON CONFLICT(api_key_id)
DO UPDATE SET total_xp = total_xp + excluded.total_xp, updated_at = datetime('now')`
)
- .run(apiKeyId, amount);
+ .run(apiKeyId, amount, calculateLevel(amount));
}
export function getXp(apiKeyId: string): UserLevelRow | null {
diff --git a/src/lib/gamification/antiCheat.ts b/src/lib/gamification/antiCheat.ts
index 0af56d2485..beba55ccf8 100644
--- a/src/lib/gamification/antiCheat.ts
+++ b/src/lib/gamification/antiCheat.ts
@@ -85,38 +85,27 @@ export async function getAnomalies(): Promise<AnomalyFlag[]> {
)
.all() as Array<{ api_key_id: string; hourly_total: number }>;
- return rows.map((r) => ({
- apiKeyId: r.api_key_id,
- xpLastHour: r.hourly_total,
- zScore: 0, // Simplified for now
- }));
+ const results: AnomalyFlag[] = [];
+ for (const r of rows) {
+ const z = await computeZScore(r.api_key_id);
+ results.push({
+ apiKeyId: r.api_key_id,
+ xpLastHour: r.hourly_total,
+ zScore: z ?? 0,
+ });
+ }
+ return results;
}
// ─── Internal Helpers ────────────────────────────────────────────────────────
/**
- * Get total XP earned in the last N milliseconds.
- */
-async function getRecentXp(apiKeyId: string, windowMs: number): Promise<number> {
- const d = db();
- const since = new Date(Date.now() - windowMs).toISOString();
-
- const row = d
- .prepare(
- "SELECT COALESCE(SUM(xp_earned), 0) AS total FROM xp_audit_log WHERE api_key_id = ? AND created_at > ?"
- )
- .get(apiKeyId, since) as { total: number };
-
- return row.total;
-}
-
-/**
- * Detect anomalous XP velocity using z-score.
+ * Compute the z-score for a user's hourly XP against the global distribution.
+ * Returns null if insufficient data.
*/
-async function detectAnomaly(apiKeyId: string): Promise<boolean> {
+async function computeZScore(apiKeyId: string): Promise<number | null> {
const d = db();
- // Get user's XP in last hour
const userRow = d
.prepare(
`SELECT COALESCE(SUM(xp_earned), 0) AS total
@@ -125,7 +114,6 @@ async function detectAnomaly(apiKeyId: string): Promise<boolean> {
)
.get(apiKeyId) as { total: number };
- // Get global stats
const statsRow = d
.prepare(
`SELECT AVG(hourly_total) AS mean,
@@ -141,10 +129,32 @@ async function detectAnomaly(apiKeyId: string): Promise<boolean> {
)
.get() as { mean: number; variance: number } | undefined;
- if (!statsRow || statsRow.variance <= 0) return false;
+ if (!statsRow || statsRow.variance <= 0) return null;
const stdDev = Math.sqrt(statsRow.variance);
- const zScore = (userRow.total - statsRow.mean) / stdDev;
+ return (userRow.total - statsRow.mean) / stdDev;
+}
- return zScore > ANOMALY_Z_THRESHOLD;
+/**
+ * Get total XP earned in the last N milliseconds.
+ */
+async function getRecentXp(apiKeyId: string, windowMs: number): Promise<number> {
+ const d = db();
+ const since = new Date(Date.now() - windowMs).toISOString();
+
+ const row = d
+ .prepare(
+ "SELECT COALESCE(SUM(xp_earned), 0) AS total FROM xp_audit_log WHERE api_key_id = ? AND created_at > ?"
+ )
+ .get(apiKeyId, since) as { total: number };
+
+ return row.total;
+}
+
+/**
+ * Detect anomalous XP velocity using z-score.
+ */
+async function detectAnomaly(apiKeyId: string): Promise<boolean> {
+ const z = await computeZScore(apiKeyId);
+ return z !== null && z > ANOMALY_Z_THRESHOLD;
}
diff --git a/src/lib/gamification/events.ts b/src/lib/gamification/events.ts
index 77940a81ce..00fbe808d3 100644
--- a/src/lib/gamification/events.ts
+++ b/src/lib/gamification/events.ts
@@ -151,7 +151,9 @@ async function checkActionCountBadges(apiKeyId: string, action: string): Promise
// Count total actions of this type
const row = db
- .prepare("COALESCE(COUNT(*), 0) AS count FROM xp_audit_log WHERE api_key_id = ? AND action = ?")
+ .prepare(
+ "SELECT COALESCE(COUNT(*), 0) AS count FROM xp_audit_log WHERE api_key_id = ? AND action = ?"
+ )
.get(apiKeyId, action) as { count: number };
const count = row.count;
diff --git a/src/lib/gamification/index.ts b/src/lib/gamification/index.ts
new file mode 100644
index 0000000000..8cf0db476e
--- /dev/null
+++ b/src/lib/gamification/index.ts
@@ -0,0 +1,37 @@
+/**
+ * Gamification module — barrel export.
+ *
+ * @module lib/gamification
+ */
+
+export { emitGamificationEvent } from "./events";
+export {
+ updateScore,
+ getRank,
+ getTopN,
+ getNeighbors,
+ rotateScope,
+ type LeaderboardScope,
+ type LeaderboardEntry,
+} from "./leaderboard";
+export { validateScoreChange, getAnomalies } from "./antiCheat";
+export { BUILTIN_BADGES } from "./badges";
+export {
+ xpForLevel,
+ cumulativeXpForLevel,
+ calculateLevel,
+ xpToNextLevel,
+ getLevelTitle,
+ getLevelTier,
+ XP_REWARDS,
+ type XpAction,
+} from "./xp";
+export { updateStreak } from "./streaks";
+export {
+ recordBadgeUnlock,
+ consumeBadgeUnlocks,
+ createBadgeNotificationStream,
+} from "./notifications";
+export { transferTokens, getBalance, getHistory } from "./sharing";
+export { createInvite, redeemInvite as redeemInviteCode } from "./invites";
+export { connectServer, disconnectServer, listServers } from "./servers";
diff --git a/src/lib/gamification/invites.ts b/src/lib/gamification/invites.ts
index a98d4a5dd1..b99dc9ad6a 100644
--- a/src/lib/gamification/invites.ts
+++ b/src/lib/gamification/invites.ts
@@ -12,9 +12,8 @@ import crypto from "crypto";
function generateInviteCode(): string {
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
let code = "";
- const bytes = crypto.randomBytes(8);
for (let i = 0; i < 8; i++) {
- code += chars[bytes[i] % chars.length];
+ code += chars[crypto.randomInt(0, chars.length)];
}
return code;
}
diff --git a/src/lib/gamification/leaderboard.ts b/src/lib/gamification/leaderboard.ts
index a3faf8f602..3d7fc754da 100644
--- a/src/lib/gamification/leaderboard.ts
+++ b/src/lib/gamification/leaderboard.ts
@@ -38,9 +38,9 @@ export async function getRank(apiKeyId: string, scope: LeaderboardScope): Promis
/**
* Get top N entries for a scope.
*/
-export async function getTopN(scope: LeaderboardScope, limit: number = 50, _offset: number = 0) {
+export async function getTopN(scope: LeaderboardScope, limit: number = 50, offset: number = 0) {
const { getTopN: dbGetTopN } = await import("../db/gamification");
- return dbGetTopN(scope, limit);
+ return dbGetTopN(scope, limit, offset);
}
/**
diff --git a/src/lib/gamification/servers.ts b/src/lib/gamification/servers.ts
index 79cbe9603a..512b090a4b 100644
--- a/src/lib/gamification/servers.ts
+++ b/src/lib/gamification/servers.ts
@@ -24,7 +24,9 @@ export async function connectServer(
apiKey: string
): Promise<ServerConnection> {
const id = crypto.randomUUID();
- const apiKeyHash = crypto.createHash("sha256").update(apiKey).digest("hex");
+ const apiKeyHash = crypto
+ .pbkdf2Sync(apiKey, "omniroute-federation-salt", 120000, 32, "sha256")
+ .toString("hex");
const { connectServer: dbConnect } = await import("../db/gamification");
dbConnect(id, name, url, apiKeyHash);
diff --git a/src/shared/components/NotificationToast.tsx b/src/shared/components/NotificationToast.tsx
index b5aee512f4..b7b6af861a 100644
--- a/src/shared/components/NotificationToast.tsx
+++ b/src/shared/components/NotificationToast.tsx
@@ -19,25 +19,27 @@ const ICONS = {
info: "ℹ",
};
+const BG_DARK = "rgba(30, 30, 30, 0.95)";
+
const COLORS = {
success: {
- bg: "rgba(16, 185, 129, 0.15)",
- border: "rgba(16, 185, 129, 0.4)",
+ bg: BG_DARK,
+ border: "rgba(16, 185, 129, 0.6)",
icon: "#10b981",
},
error: {
- bg: "rgba(239, 68, 68, 0.15)",
- border: "rgba(239, 68, 68, 0.4)",
+ bg: BG_DARK,
+ border: "rgba(239, 68, 68, 0.6)",
icon: "#ef4444",
},
warning: {
- bg: "rgba(40, 28, 0, 0.92)",
- border: "rgba(245, 158, 11, 0.7)",
+ bg: BG_DARK,
+ border: "rgba(245, 158, 11, 0.6)",
icon: "#fbbf24",
},
info: {
- bg: "rgba(59, 130, 246, 0.15)",
- border: "rgba(59, 130, 246, 0.4)",
+ bg: BG_DARK,
+ border: "rgba(59, 130, 246, 0.6)",
icon: "#3b82f6",
},
};
@@ -114,7 +116,10 @@ function Toast({ notification, onDismiss }) {
</div>
{notification.dismissible && (
<button
- onClick={handleDismiss}
+ onClick={(e) => {
+ e.stopPropagation();
+ handleDismiss();
+ }}
aria-label="Dismiss notification"
style={{
background: "none",
diff --git a/src/sse/handlers/chatHelpers.ts b/src/sse/handlers/chatHelpers.ts
index 0049918a29..ff42f01a07 100644
--- a/src/sse/handlers/chatHelpers.ts
+++ b/src/sse/handlers/chatHelpers.ts
@@ -459,6 +459,24 @@ export function handleNoCredentials(
credentials.retryAfterHuman
);
}
+
+ if (credentials?.allExpired) {
+ // Every connection for this provider is in a terminal state (expired,
+ // banned, or credits_exhausted). Surface as 401 with a re-auth hint
+ // instead of the generic 400 "No credentials", so dashboards/CLIs can
+ // distinguish "never configured" from "needs to reconnect".
+ const status = credentials.expiredStatus || "expired";
+ const count = credentials.expiredCount || 1;
+ const reason =
+ status === "credits_exhausted"
+ ? "credits exhausted"
+ : status === "banned"
+ ? "banned by upstream"
+ : "authentication expired";
+ const message = `[${provider}] All ${count} connection(s) ${reason} — please reconnect in the dashboard`;
+ log.warn("CHAT", message);
+ return errorResponse(HTTP_STATUS.UNAUTHORIZED, message);
+ }
if (lastError && lastStatus) {
log.warn("CHAT", "Preserving last upstream error after credential exhaustion", {
provider,
diff --git a/src/sse/services/auth.ts b/src/sse/services/auth.ts
index 0082e6bfaf..07ba626766 100644
--- a/src/sse/services/auth.ts
+++ b/src/sse/services/auth.ts
@@ -36,6 +36,7 @@ import {
isQuotaPreflightEnabled,
} from "@omniroute/open-sse/services/quotaPreflight.ts";
import { resolveResilienceSettings } from "@/lib/resilience/settings";
+import { syncHealthFromDB, type KeyHealth } from "@omniroute/open-sse/services/apiKeyRotator.ts";
import {
classifyProviderError,
PROVIDER_ERROR_TYPES,
@@ -885,6 +886,28 @@ export async function getProviderCredentials(
` → ${c.id?.slice(0, 8)} | isActive=${c.isActive} | rateLimitedUntil=${c.rateLimitedUntil || "none"} | testStatus=${c.testStatus}`
);
});
+
+ // If every existing connection is in a terminal state (expired/banned/
+ // credits_exhausted), surface that as a re-auth signal instead of the
+ // generic "No credentials" 400. The classic case is AWS SSO/Kiro
+ // refresh tokens hitting their 90-day TTL: all connections flip to
+ // is_active=0 with testStatus=banned|expired, and without this branch
+ // the dashboard sees a misleading "bad_request" code.
+ const terminalConnections = allConnections.filter(isTerminalConnectionStatus);
+ if (terminalConnections.length === allConnections.length) {
+ const statusCounts = new Map<string, number>();
+ for (const c of terminalConnections) {
+ const key = normalizeStatus(c.testStatus) || "expired";
+ statusCounts.set(key, (statusCounts.get(key) || 0) + 1);
+ }
+ const dominantStatus =
+ [...statusCounts.entries()].sort((a, b) => b[1] - a[1])[0]?.[0] || "expired";
+ return {
+ allExpired: true,
+ expiredCount: terminalConnections.length,
+ expiredStatus: dominantStatus,
+ };
+ }
}
log.warn("AUTH", `No credentials for ${provider}`);
return null;
@@ -1294,6 +1317,13 @@ export async function getProviderCredentials(
connection = orderedConnections[0];
}
+ const apiKeyHealth = connection.providerSpecificData?.apiKeyHealth as
+ | Record<string, KeyHealth>
+ | undefined;
+ if (apiKeyHealth) {
+ syncHealthFromDB(connection.id, apiKeyHealth);
+ }
+
return {
apiKey: connection.apiKey,
accessToken: connection.accessToken,
@@ -1390,7 +1420,7 @@ export async function getProviderCredentialsWithQuotaPreflight(
return null;
}
- if (credentials.allRateLimited) {
+ if (credentials.allRateLimited || credentials.allExpired) {
return credentials;
}
diff --git a/tests/unit/chat-helpers.test.ts b/tests/unit/chat-helpers.test.ts
index 9ac870459e..1c1603bf61 100644
--- a/tests/unit/chat-helpers.test.ts
+++ b/tests/unit/chat-helpers.test.ts
@@ -257,6 +257,41 @@ test("handleNoCredentials returns structured model_cooldown when every credentia
assert.match(json.error.message, /cooling down/i);
});
+test("handleNoCredentials returns 401 with re-auth hint when every connection is in a terminal state", async () => {
+ // Classic scenario: AWS SSO refresh tokens hit their 90-day TTL, every Kiro
+ // connection flips to is_active=0 + testStatus=banned/expired. Surface as
+ // 401 with a reconnect hint instead of the misleading 400 "No credentials".
+ const response = handleNoCredentials(
+ { allExpired: true, expiredCount: 1, expiredStatus: "banned" },
+ null,
+ "kiro",
+ "claude-sonnet-4.6",
+ null,
+ null
+ );
+ const json = (await response.json()) as any;
+
+ assert.equal(response.status, 401);
+ assert.match(json.error.message, /\[kiro\]/);
+ assert.match(json.error.message, /banned by upstream/);
+ assert.match(json.error.message, /please reconnect/i);
+});
+
+test("handleNoCredentials maps allExpired status='expired' to the 'authentication expired' reason", async () => {
+ const response = handleNoCredentials(
+ { allExpired: true, expiredCount: 3, expiredStatus: "expired" },
+ null,
+ "cline",
+ "claude-sonnet-4.6",
+ null,
+ null
+ );
+ const json = (await response.json()) as any;
+
+ assert.equal(response.status, 401);
+ assert.match(json.error.message, /3 connection\(s\) authentication expired/);
+});
+
test("safeResolveProxy returns the direct route when no proxy config is present", async () => {
const connection = await seedConnection("openai", { apiKey: "sk-openai-direct" });
diff --git a/tests/unit/gamification/antiCheat.test.ts b/tests/unit/gamification/antiCheat.test.ts
index de784b310b..36e46ef59c 100644
--- a/tests/unit/gamification/antiCheat.test.ts
+++ b/tests/unit/gamification/antiCheat.test.ts
@@ -21,5 +21,13 @@ describe("Anti-Cheat", () => {
const anomalies = await getAnomalies();
assert.ok(Array.isArray(anomalies));
});
+
+ it("returns entries with numeric zScore (not hardcoded 0)", async () => {
+ const anomalies = await getAnomalies();
+ for (const a of anomalies) {
+ assert.equal(typeof a.zScore, "number");
+ assert.ok(!Number.isNaN(a.zScore));
+ }
+ });
});
});
diff --git a/tests/unit/gamification/db-gamification.test.ts b/tests/unit/gamification/db-gamification.test.ts
new file mode 100644
index 0000000000..0be7ef6b9b
--- /dev/null
+++ b/tests/unit/gamification/db-gamification.test.ts
@@ -0,0 +1,35 @@
+import { describe, it } from "node:test";
+import assert from "node:assert/strict";
+import { addXp, getXp } from "../../../src/lib/db/gamification";
+import { calculateLevel } from "../../../src/lib/gamification/xp";
+import { getDbInstance } from "../../../src/lib/db/core";
+
+describe("DB Gamification — addXp level computation", () => {
+ it("sets correct level for large initial XP", () => {
+ const testKey = `test-addxp-level-${Date.now()}`;
+ addXp(testKey, "invite_redeem", 50000);
+
+ const xp = getXp(testKey);
+ assert.ok(xp);
+ assert.equal(xp.currentLevel, calculateLevel(50000));
+
+ // Cleanup
+ const db = getDbInstance();
+ db.prepare("DELETE FROM user_levels WHERE api_key_id = ?").run(testKey);
+ db.prepare("DELETE FROM xp_audit_log WHERE api_key_id = ?").run(testKey);
+ });
+
+ it("sets level 1 for small initial XP", () => {
+ const testKey = `test-addxp-small-${Date.now()}`;
+ addXp(testKey, "request", 1);
+
+ const xp = getXp(testKey);
+ assert.ok(xp);
+ assert.equal(xp.currentLevel, 1);
+
+ // Cleanup
+ const db = getDbInstance();
+ db.prepare("DELETE FROM user_levels WHERE api_key_id = ?").run(testKey);
+ db.prepare("DELETE FROM xp_audit_log WHERE api_key_id = ?").run(testKey);
+ });
+});
diff --git a/tests/unit/gamification/events.test.ts b/tests/unit/gamification/events.test.ts
index 327cf265d5..4b08c11607 100644
--- a/tests/unit/gamification/events.test.ts
+++ b/tests/unit/gamification/events.test.ts
@@ -1,6 +1,7 @@
import { describe, it } from "node:test";
import assert from "node:assert/strict";
import { emitGamificationEvent } from "../../../src/lib/gamification/events";
+import { getDbInstance } from "../../../src/lib/db/core";
describe("Gamification Events", () => {
it("does not throw for valid event", async () => {
@@ -16,4 +17,29 @@ describe("Gamification Events", () => {
emitGamificationEvent({ apiKeyId: "test-user", action: "unknown" as any })
);
});
+
+ it("checkActionCountBadges counts actions correctly via SQL", async () => {
+ // Verifies the SELECT fix — before fix, missing SELECT caused silent SQL error
+ const db = getDbInstance();
+
+ const testKey = `test-badge-${Date.now()}`;
+ for (let i = 0; i < 5; i++) {
+ db.prepare("INSERT INTO xp_audit_log (api_key_id, action, xp_earned) VALUES (?, ?, ?)").run(
+ testKey,
+ "request",
+ 1
+ );
+ }
+
+ // Verify the SELECT query works (was broken before fix)
+ const row = db
+ .prepare(
+ "SELECT COALESCE(COUNT(*), 0) AS count FROM xp_audit_log WHERE api_key_id = ? AND action = ?"
+ )
+ .get(testKey, "request") as { count: number };
+ assert.equal(row.count, 5);
+
+ // Cleanup
+ db.prepare("DELETE FROM xp_audit_log WHERE api_key_id = ?").run(testKey);
+ });
});
diff --git a/tests/unit/gamification/federation-auth.test.ts b/tests/unit/gamification/federation-auth.test.ts
new file mode 100644
index 0000000000..fe0b5c0f30
--- /dev/null
+++ b/tests/unit/gamification/federation-auth.test.ts
@@ -0,0 +1,25 @@
+import { describe, it } from "node:test";
+import assert from "node:assert/strict";
+
+describe("Federation Leaderboard Auth", () => {
+ it("rejects requests without Authorization header", async () => {
+ const { GET } = await import("../../../src/app/api/gamification/federation/leaderboard/route");
+
+ const { NextRequest } = await import("next/server");
+ const req = new NextRequest("http://localhost/api/gamification/federation/leaderboard");
+
+ const response = await GET(req);
+ assert.equal(response.status, 401);
+ });
+
+ it("rejects requests with invalid bearer token", async () => {
+ const { GET } = await import("../../../src/app/api/gamification/federation/leaderboard/route");
+ const { NextRequest } = await import("next/server");
+ const req = new NextRequest("http://localhost/api/gamification/federation/leaderboard", {
+ headers: { Authorization: "Bearer invalid-token-12345" },
+ });
+
+ const response = await GET(req);
+ assert.equal(response.status, 403);
+ });
+});
diff --git a/tests/unit/gamification/leaderboard.test.ts b/tests/unit/gamification/leaderboard.test.ts
index 6567701ae0..5296839d0f 100644
--- a/tests/unit/gamification/leaderboard.test.ts
+++ b/tests/unit/gamification/leaderboard.test.ts
@@ -1,12 +1,12 @@
-import { describe, it, beforeEach, after } from "node:test";
+import { describe, it, after } from "node:test";
import assert from "node:assert/strict";
import {
updateScore,
getRank,
getTopN,
getNeighbors,
- rotateScope,
} from "../../../src/lib/gamification/leaderboard";
+import { getDbInstance } from "../../../src/lib/db/core";
describe("Leaderboard Engine", () => {
const testKey = `test-lb-${Date.now()}`;
@@ -14,7 +14,6 @@ describe("Leaderboard Engine", () => {
after(() => {
// Cleanup
try {
- const { getDbInstance } = require("../../../src/lib/db/core");
const db = getDbInstance();
db.prepare("DELETE FROM leaderboard WHERE api_key_id LIKE ?").run("test-lb-%");
} catch {}
@@ -58,6 +57,37 @@ describe("Leaderboard Engine", () => {
const entries = await getTopN("global", 5);
assert.ok(entries.length <= 5);
});
+
+ it("returns different results with offset", async () => {
+ // Seed multiple entries with distinct scores
+ const keys: string[] = [];
+ for (let i = 0; i < 10; i++) {
+ const key = `test-offset-${Date.now()}-${i}`;
+ keys.push(key);
+ await updateScore(key, "global", (10 - i) * 100);
+ }
+
+ const page1 = await getTopN("global", 5, 0);
+ const page2 = await getTopN("global", 5, 5);
+
+ // Pages should not be identical
+ const page1Ids = page1.map((e: any) => e.apiKeyId || e.api_key_id);
+ const page2Ids = page2.map((e: any) => e.apiKeyId || e.api_key_id);
+ const overlap = page1Ids.filter((id: string) => page2Ids.includes(id));
+ assert.equal(overlap.length, 0, "Pages should not overlap");
+
+ // Cleanup
+ const db = getDbInstance();
+ for (const key of keys) {
+ db.prepare("DELETE FROM leaderboard WHERE api_key_id = ?").run(key);
+ }
+ });
+
+ it("offset 0 returns same as no offset", async () => {
+ const withOffset = await getTopN("global", 5, 0);
+ const withoutOffset = await getTopN("global", 5);
+ assert.equal(withOffset.length, withoutOffset.length);
+ });
});
describe("getNeighbors", () => {
diff --git a/tests/unit/image-generation-handler.test.ts b/tests/unit/image-generation-handler.test.ts
index e4fd40e6ec..d8f230f3ca 100644
--- a/tests/unit/image-generation-handler.test.ts
+++ b/tests/unit/image-generation-handler.test.ts
@@ -690,7 +690,7 @@ test("handleImageGeneration uploads source images to Topaz and returns base64 ou
}
});
-test("handleImageGeneration transforms Gemini image responses from Antigravity", async () => {
+test("handleImageGeneration sends Antigravity image requests with native image_gen envelope", async () => {
const originalFetch = globalThis.fetch;
let captured;
@@ -703,13 +703,21 @@ test("handleImageGeneration transforms Gemini image responses from Antigravity",
return new Response(
JSON.stringify({
- candidates: [
- {
- content: {
- parts: [{ text: "revised prompt" }, { inlineData: { data: "YmFzZTY0LWdlbWluaQ==" } }],
+ response: {
+ candidates: [
+ {
+ content: {
+ parts: [
+ {
+ thoughtSignature: "signature",
+ inlineData: { mimeType: "image/jpeg", data: "YmFzZTY0LWdlbWluaQ==" },
+ },
+ ],
+ },
},
- },
- ],
+ ],
+ modelVersion: "gemini-3.1-flash-image",
+ },
}),
{ status: 200, headers: { "content-type": "application/json" } }
);
@@ -718,31 +726,173 @@ test("handleImageGeneration transforms Gemini image responses from Antigravity",
try {
const result = await handleImageGeneration({
body: {
- model: "antigravity/gemini-image-preview",
+ model: "antigravity/gemini-3.1-flash-image-preview",
prompt: "painted beach",
+ size: "1024x1024",
+ aspect_ratio: "not-a-ratio",
},
- credentials: { accessToken: "ag-token" },
+ credentials: { accessToken: "ag-token", projectId: "project-123" },
log: null,
});
assert.equal(result.success, true);
assert.equal(
captured.url,
- "https://generativelanguage.googleapis.com/v1beta/models/gemini-image-preview:generateContent"
+ "https://daily-cloudcode-pa.googleapis.com/v1internal:generateContent"
);
assert.equal(captured.headers.Authorization, "Bearer ag-token");
- assert.deepEqual(captured.body, {
- contents: [{ parts: [{ text: "painted beach" }] }],
- generationConfig: { responseModalities: ["TEXT", "IMAGE"] },
+ assert.equal(captured.headers["x-client-name"], "antigravity");
+ assert.equal(captured.headers["x-goog-user-project"], "project-123");
+ assert.ok(captured.headers["User-Agent"].startsWith("Antigravity/"));
+ assert.equal(captured.body.project, "project-123");
+ assert.match(captured.body.requestId, /^image_gen\//);
+ assert.equal(captured.body.model, "gemini-3.1-flash-image");
+ assert.equal(captured.body.userAgent, "antigravity");
+ assert.equal(captured.body.requestType, "image_gen");
+ assert.deepEqual(captured.body.request, {
+ contents: [{ role: "user", parts: [{ text: "painted beach" }] }],
+ generationConfig: {
+ candidateCount: 1,
+ imageConfig: { aspectRatio: "1:1" },
+ },
});
assert.deepEqual(result.data.data, [
- { b64_json: "YmFzZTY0LWdlbWluaQ==", revised_prompt: "revised prompt" },
+ { b64_json: "YmFzZTY0LWdlbWluaQ==", revised_prompt: "painted beach" },
]);
} finally {
globalThis.fetch = originalFetch;
}
});
+test("handleImageGeneration rejects Antigravity image requests without projectId", async () => {
+ const originalFetch = globalThis.fetch;
+ globalThis.fetch = async () => {
+ throw new Error("fetch should not be called without an Antigravity projectId");
+ };
+
+ try {
+ const result = await handleImageGeneration({
+ body: {
+ model: "antigravity/gemini-3.1-flash-image",
+ prompt: "painted forest",
+ size: "1024x1024",
+ },
+ credentials: { accessToken: "ag-token" },
+ log: null,
+ });
+
+ assert.equal(result.success, false);
+ assert.equal(result.status, 400);
+ assert.match(String(result.error), /Missing Google projectId/);
+ } finally {
+ globalThis.fetch = originalFetch;
+ }
+});
+
+test("handleImageGeneration retries Antigravity image requests without billing project on 403", async () => {
+ const originalFetch = globalThis.fetch;
+ const calls = [];
+
+ globalThis.fetch = async (url, options = {}) => {
+ calls.push({
+ url: String(url),
+ headers: options.headers,
+ body: JSON.parse(String(options.body || "{}")),
+ });
+
+ if (calls.length === 1) {
+ return new Response(
+ JSON.stringify({
+ error: {
+ code: 403,
+ message: "Cloud Code Private API has not been used in project project-123 before.",
+ status: "PERMISSION_DENIED",
+ },
+ }),
+ { status: 403, headers: { "content-type": "application/json" } }
+ );
+ }
+
+ return new Response(
+ JSON.stringify({
+ response: {
+ candidates: [
+ {
+ content: {
+ parts: [
+ {
+ inlineData: { mimeType: "image/jpeg", data: "YmFzZTY0LXJldHJ5" },
+ },
+ ],
+ },
+ },
+ ],
+ modelVersion: "gemini-3.1-flash-image",
+ },
+ }),
+ { status: 200, headers: { "content-type": "application/json" } }
+ );
+ };
+
+ try {
+ const result = await handleImageGeneration({
+ body: {
+ model: "antigravity/gemini-3.1-flash-image",
+ prompt: "painted forest",
+ size: "1024x1024",
+ },
+ credentials: { accessToken: "ag-token", projectId: "project-123" },
+ log: null,
+ });
+
+ assert.equal(result.success, true);
+ assert.equal(calls.length, 2);
+ assert.equal(calls[0].headers["x-goog-user-project"], "project-123");
+ assert.equal(calls[1].headers["x-goog-user-project"], undefined);
+ assert.equal(calls[1].body.project, "project-123");
+ assert.deepEqual(result.data.data, [
+ { b64_json: "YmFzZTY0LXJldHJ5", revised_prompt: "painted forest" },
+ ]);
+ } finally {
+ globalThis.fetch = originalFetch;
+ }
+});
+
+test("handleImageGeneration sanitizes Antigravity upstream error payloads", async () => {
+ const originalFetch = globalThis.fetch;
+
+ globalThis.fetch = async () =>
+ new Response(
+ JSON.stringify({
+ error: {
+ code: 500,
+ message:
+ "failed at /Users/backryun/OmniRoute/open-sse/handlers/imageGeneration.ts:1\nstack",
+ status: "INTERNAL",
+ },
+ }),
+ { status: 500, headers: { "content-type": "application/json" } }
+ );
+
+ try {
+ const result = await handleImageGeneration({
+ body: {
+ model: "antigravity/gemini-3.1-flash-image",
+ prompt: "painted forest",
+ size: "1024x1024",
+ },
+ credentials: { accessToken: "ag-token", projectId: "project-123" },
+ log: null,
+ });
+
+ assert.equal(result.success, false);
+ assert.equal(result.status, 500);
+ assert.equal(result.error.error.message, "failed at <path>");
+ } finally {
+ globalThis.fetch = originalFetch;
+ }
+});
+
test("handleImageGeneration retries Nebius against the fallback URL after retryable failures", async () => {
const originalFetch = globalThis.fetch;
const calls = [];
diff --git a/tests/unit/notificationStore.test.ts b/tests/unit/notificationStore.test.ts
new file mode 100644
index 0000000000..666bce8857
--- /dev/null
+++ b/tests/unit/notificationStore.test.ts
@@ -0,0 +1,171 @@
+/**
+ * NotificationStore Tests
+ *
+ * Tests for Zustand-based global notification system.
+ * Covers onClick callback, duration defaults, and state management.
+ *
+ * Note: Zustand state updates require re-calling getState() to get fresh state.
+ */
+
+import { describe, it, beforeEach, afterEach, mock } from "node:test";
+import assert from "node:assert/strict";
+import { useNotificationStore } from "../../src/store/notificationStore.ts";
+
+describe("NotificationStore", () => {
+ beforeEach(() => {
+ // Clear all notifications before each test
+ useNotificationStore.getState().clearAll();
+ });
+
+ afterEach(() => {
+ useNotificationStore.getState().clearAll();
+ });
+
+ describe("addNotification", () => {
+ it("should add notification with default duration 5000ms", () => {
+ const id = useNotificationStore.getState().addNotification({ type: "info", message: "test" });
+ const notification = useNotificationStore.getState().notifications.find((n) => n.id === id);
+ assert.ok(notification, "notification should exist");
+ assert.equal(notification?.duration, 5000, "default duration should be 5000ms");
+ });
+
+ it("should add notification with onClick callback", () => {
+ const onClick = mock.fn();
+ const id = useNotificationStore.getState().addNotification({
+ type: "warning",
+ message: "clickable notification",
+ onClick,
+ });
+ const notification = useNotificationStore.getState().notifications.find((n) => n.id === id);
+ assert.ok(notification, "notification should exist");
+ assert.equal(notification?.onClick, onClick, "onClick should be stored");
+ });
+
+ it("should include onClick in notification object", () => {
+ const onClick = () => {};
+ const id = useNotificationStore.getState().addNotification({
+ type: "success",
+ message: "test",
+ onClick,
+ });
+ const notification = useNotificationStore.getState().notifications.find((n) => n.id === id);
+ assert.ok(notification?.onClick, "onClick should be present on notification");
+ });
+
+ it("should allow custom duration override", () => {
+ const id = useNotificationStore.getState().addNotification({
+ type: "error",
+ message: "test",
+ duration: 10000,
+ });
+ const notification = useNotificationStore.getState().notifications.find((n) => n.id === id);
+ assert.equal(notification?.duration, 10000, "custom duration should be applied");
+ });
+ });
+
+ describe("convenience methods", () => {
+ it("warning should use 10000ms duration", () => {
+ const id = useNotificationStore.getState().warning("warning message", "Warning Title");
+ const notification = useNotificationStore.getState().notifications.find((n) => n.id === id);
+ assert.ok(notification, "notification should exist");
+ assert.equal(notification?.type, "warning", "type should be warning");
+ assert.equal(notification?.duration, 10000, "warning duration should be 10000ms");
+ assert.equal(notification?.title, "Warning Title", "title should be set");
+ });
+
+ it("error should use 8000ms duration", () => {
+ const id = useNotificationStore.getState().error("error message");
+ const notification = useNotificationStore.getState().notifications.find((n) => n.id === id);
+ assert.equal(notification?.duration, 8000, "error duration should be 8000ms");
+ });
+
+ it("success should use default 5000ms duration", () => {
+ const id = useNotificationStore.getState().success("success message");
+ const notification = useNotificationStore.getState().notifications.find((n) => n.id === id);
+ assert.equal(notification?.duration, 5000, "success duration should be 5000ms");
+ });
+
+ it("info should use default 5000ms duration", () => {
+ const id = useNotificationStore.getState().info("info message");
+ const notification = useNotificationStore.getState().notifications.find((n) => n.id === id);
+ assert.equal(notification?.duration, 5000, "info duration should be 5000ms");
+ });
+ });
+
+ describe("removeNotification", () => {
+ it("should remove notification by id", () => {
+ const id = useNotificationStore
+ .getState()
+ .addNotification({ type: "info", message: "to remove" });
+ assert.equal(
+ useNotificationStore.getState().notifications.length,
+ 1,
+ "should have 1 notification"
+ );
+ useNotificationStore.getState().removeNotification(id);
+ assert.equal(
+ useNotificationStore.getState().notifications.length,
+ 0,
+ "should have 0 notifications after removal"
+ );
+ });
+
+ it("should not error when removing non-existent id", () => {
+ useNotificationStore.getState().removeNotification(999);
+ assert.equal(
+ useNotificationStore.getState().notifications.length,
+ 0,
+ "should still have 0 notifications"
+ );
+ });
+ });
+
+ describe("clearAll", () => {
+ it("should clear all notifications", () => {
+ useNotificationStore.getState().addNotification({ type: "info", message: "one" });
+ useNotificationStore.getState().addNotification({ type: "info", message: "two" });
+ useNotificationStore.getState().addNotification({ type: "info", message: "three" });
+ assert.equal(
+ useNotificationStore.getState().notifications.length,
+ 3,
+ "should have 3 notifications"
+ );
+ useNotificationStore.getState().clearAll();
+ assert.equal(
+ useNotificationStore.getState().notifications.length,
+ 0,
+ "should have 0 after clearAll"
+ );
+ });
+ });
+
+ describe("notification structure", () => {
+ it("should include all required fields", () => {
+ const onClick = () => {};
+ const id = useNotificationStore.getState().addNotification({
+ type: "warning",
+ message: "structured test",
+ title: "Title",
+ duration: 15000,
+ dismissible: false,
+ onClick,
+ });
+ const notification = useNotificationStore.getState().notifications.find((n) => n.id === id);
+ assert.ok(notification, "notification should exist");
+ assert.equal(typeof notification?.id, "number", "id should be number");
+ assert.equal(notification?.type, "warning", "type should match");
+ assert.equal(notification?.message, "structured test", "message should match");
+ assert.equal(notification?.title, "Title", "title should match");
+ assert.equal(notification?.duration, 15000, "duration should match");
+ assert.equal(notification?.dismissible, false, "dismissible should match");
+ assert.equal(typeof notification?.createdAt, "number", "createdAt should be number");
+ assert.equal(notification?.onClick, onClick, "onClick should match");
+ });
+
+ it("should have dismissible true by default", () => {
+ const id = useNotificationStore.getState().addNotification({ type: "info", message: "test" });
+ const notification = useNotificationStore.getState().notifications.find((n) => n.id === id);
+ assert.equal(notification?.dismissible, true, "dismissible should default to true");
+ });
+ });
+});