Skip to content

7.4 billion tokens per month. 34 free LLM providers. 635 free model endpoints. All behind one /v1 endpoint, plus any custom OpenAI-compatible endpoint. Smart routing, automatic failover, encrypted keys. Personal experimentation only.

TypeScript

feat: optional per-key model scopes so one provider's keys can serve different model groups (#657) (#757)

Tashfeen19cdc53d5d85
diff --git a/client/src/components/keys/model-scope-dialog.tsx b/client/src/components/keys/model-scope-dialog.tsx
new file mode 100644
index 00000000..43485dd6
--- /dev/null
+++ b/client/src/components/keys/model-scope-dialog.tsx
@@ -0,0 +1,142 @@
+import { useState } from 'react'
+import { useMutation, useQueryClient } from '@tanstack/react-query'
+import { apiFetch } from '@/lib/api'
+import { Button } from '@/components/ui/button'
+import { Dialog, DialogPopup, DialogTitle } from '@/components/ui/dialog'
+import { Input } from '@/components/ui/input'
+import { useI18n } from '@/i18n'
+import { X } from 'lucide-react'
+import type { ApiKey } from '../../../../shared/types'
+
+// #657: relay stations hand out keys that only serve one model group; a key
+// scoped here is skipped by the router for every model outside its list. A
+// deliberately light editor: a chip list plus a free-text id field. Suggestions
+// come only from data the key row already carries (a custom endpoint's
+// registered models) — no extra fetching for catalog platforms.
+export function ModelScopeDialog({
+ apiKey,
+ onOpenChange,
+}: {
+ apiKey: ApiKey
+ onOpenChange: (open: boolean) => void
+}) {
+ const { t } = useI18n()
+ const queryClient = useQueryClient()
+ // Mounted only while open, so state seeds from the row without reset effects.
+ const [ids, setIds] = useState<string[]>(apiKey.modelScope ?? [])
+ const [draft, setDraft] = useState('')
+
+ const suggestions = (apiKey.models ?? [])
+ .filter(m => m.kind === 'chat' && !ids.includes(m.modelId))
+ .map(m => m.modelId)
+
+ const save = useMutation({
+ mutationFn: (modelScope: string[] | null) =>
+ apiFetch(`/api/keys/${apiKey.id}`, { method: 'PATCH', body: JSON.stringify({ modelScope }) }),
+ onSuccess: () => {
+ queryClient.invalidateQueries({ queryKey: ['keys'] })
+ onOpenChange(false)
+ },
+ })
+
+ const add = (raw: string) => {
+ const id = raw.trim()
+ if (!id) return
+ setIds(prev => (prev.includes(id) ? prev : [...prev, id]))
+ setDraft('')
+ }
+
+ const submit = () => {
+ // A typed-but-unconfirmed id still counts — losing it on Save is the
+ // classic chip-input paper cut.
+ const pending = draft.trim()
+ const next = pending && !ids.includes(pending) ? [...ids, pending] : ids
+ save.mutate(next.length > 0 ? next : null)
+ }
+
+ return (
+ <Dialog open onOpenChange={onOpenChange}>
+ <DialogPopup maxWidth="max-w-md">
+ <DialogTitle>{t('keys.modelScope')}</DialogTitle>
+ <p className="mt-1 text-xs text-muted-foreground">{t('keys.modelScopeDesc')}</p>
+ <code className="mt-2 block truncate font-mono text-[11px] text-muted-foreground">{apiKey.maskedKey}</code>
+
+ <div className="mt-4 space-y-3">
+ {ids.length === 0 ? (
+ <p className="text-xs text-muted-foreground">{t('keys.modelScopeEmpty')}</p>
+ ) : (
+ <div className="flex flex-wrap gap-1.5">
+ {ids.map(id => (
+ <span key={id} className="inline-flex min-w-0 items-center gap-1 rounded-md border bg-muted/40 px-2 py-0.5 font-mono text-[11px]">
+ <span className="max-w-[240px] truncate" title={id}>{id}</span>
+ <button
+ type="button"
+ onClick={() => setIds(prev => prev.filter(x => x !== id))}
+ aria-label={t('common.remove')}
+ className="text-muted-foreground hover:text-destructive"
+ >
+ <X className="size-3" />
+ </button>
+ </span>
+ ))}
+ </div>
+ )}
+
+ <Input
+ value={draft}
+ onChange={e => setDraft(e.target.value)}
+ onKeyDown={e => {
+ if (e.key === 'Enter') {
+ e.preventDefault()
+ add(draft)
+ }
+ }}
+ placeholder={t('keys.modelScopeAdd')}
+ className="h-8 font-mono text-xs"
+ />
+
+ {suggestions.length > 0 && (
+ <div className="flex flex-wrap gap-1.5">
+ {suggestions.map(id => (
+ <button
+ key={id}
+ type="button"
+ onClick={() => add(id)}
+ className="max-w-[240px] truncate rounded-md border border-dashed px-2 py-0.5 font-mono text-[11px] text-muted-foreground hover:text-foreground"
+ title={id}
+ >
+ + {id}
+ </button>
+ ))}
+ </div>
+ )}
+
+ {save.isError && (
+ <p className="text-xs text-destructive">{(save.error as Error).message}</p>
+ )}
+
+ <div className="flex items-center justify-end gap-2 pt-1">
+ {(apiKey.modelScope?.length ?? 0) > 0 && (
+ <Button
+ type="button"
+ variant="outline"
+ size="sm"
+ className="mr-auto"
+ onClick={() => save.mutate(null)}
+ disabled={save.isPending}
+ >
+ {t('keys.modelScopeClear')}
+ </Button>
+ )}
+ <Button type="button" variant="outline" size="sm" onClick={() => onOpenChange(false)}>
+ {t('common.cancel')}
+ </Button>
+ <Button type="button" size="sm" onClick={submit} disabled={save.isPending}>
+ {save.isPending ? t('common.saving') : t('common.save')}
+ </Button>
+ </div>
+ </div>
+ </DialogPopup>
+ </Dialog>
+ )
+}
diff --git a/client/src/components/keys/provider-list.tsx b/client/src/components/keys/provider-list.tsx
index 644e616f..df670411 100644
--- a/client/src/components/keys/provider-list.tsx
+++ b/client/src/components/keys/provider-list.tsx
@@ -17,7 +17,7 @@ import {
DropdownMenuItem,
DropdownMenuCheckboxItem,
} from '@/components/ui/dropdown-menu'
-import { ChevronDown, CircleAlert, Copy, ExternalLink, KeyRound, ListPlus, MoreHorizontal, Pencil, Plus, RefreshCw, Search, Trash2, Zap } from 'lucide-react'
+import { ChevronDown, CircleAlert, Copy, ExternalLink, KeyRound, ListFilter, ListPlus, MoreHorizontal, Pencil, Plus, RefreshCw, Search, Trash2, Zap } from 'lucide-react'
import type { ApiKey, ApiKeyModel } from '../../../../shared/types'
import { formatSqliteUtcToLocalTime } from '@/lib/utils'
import { useI18n } from '@/i18n'
@@ -35,6 +35,7 @@ import type { HealthData } from './shared'
import { DiscoverModelsDialog } from './discover-models-dialog'
import { AddEndpointKeyDialog } from './add-endpoint-key-dialog'
import { CopyKeyDialog } from './copy-key-dialog'
+import { ModelScopeDialog } from './model-scope-dialog'
type StatusFilter = 'all' | 'healthy' | 'issues' | 'disabled'
@@ -62,6 +63,8 @@ export function ProviderList({ onAddKey }: { onAddKey: () => void }) {
// Key whose plaintext the operator asked to copy; re-authentication happens
// in the dialog, not here (#705).
const [copyKey, setCopyKey] = useState<{ id: number; maskedKey: string } | null>(null)
+ // Key whose model scope is being edited (#657).
+ const [scopeKeyId, setScopeKeyId] = useState<number | null>(null)
const editInputRef = useRef<HTMLInputElement>(null)
const { data: keys = [], isLoading } = useQuery<ApiKey[]>({
@@ -471,6 +474,16 @@ export function ProviderList({ onAddKey }: { onAddKey: () => void }) {
</>
)}
<span className={`text-xs text-muted-foreground ${k.enabled ? '' : 'opacity-50'}`}>{statusLabelKey[status] ? t(statusLabelKey[status]) : status}</span>
+ {/* Only a SCOPED key shows anything (#657); an unscoped one stays as it always was. */}
+ {(k.modelScope?.length ?? 0) > 0 && (
+ <Badge
+ variant="secondary"
+ className={`text-[10px] text-muted-foreground ${k.enabled ? '' : 'opacity-50'}`}
+ title={k.modelScope!.join(', ')}
+ >
+ {t(k.modelScope!.length === 1 ? 'keys.modelScopeBadgeOne' : 'keys.modelScopeBadgeOther', { count: k.modelScope!.length })}
+ </Badge>
+ )}
<div className="flex-1" />
{lastChecked && (
<span className="text-[11px] text-muted-foreground tabular-nums">
@@ -536,6 +549,20 @@ export function ProviderList({ onAddKey }: { onAddKey: () => void }) {
</Tooltip>
</>
)}
+ {/* Deliberately secondary (#657): a small hover-cluster affordance,
+ not a first-fold control. */}
+ {!k.keyless && (
+ <Tooltip text={t('keys.modelScope')}>
+ <Button
+ variant="ghost"
+ size="icon-xs"
+ onClick={() => setScopeKeyId(k.id)}
+ aria-label={t('keys.modelScope')}
+ >
+ <ListFilter className="size-3" />
+ </Button>
+ </Tooltip>
+ )}
<Tooltip text={t('keys.checkNow')}>
<Button
variant="ghost"
@@ -633,6 +660,17 @@ export function ProviderList({ onAddKey }: { onAddKey: () => void }) {
onOpenChange={(open) => { if (!open) setCopyKey(null) }}
/>
)}
+
+ {(() => {
+ // Resolved from the live query so a save re-seeds the next open (#657).
+ const scopeKey = scopeKeyId !== null ? keys.find(k => k.id === scopeKeyId) : undefined
+ return scopeKey ? (
+ <ModelScopeDialog
+ apiKey={scopeKey}
+ onOpenChange={(open) => { if (!open) setScopeKeyId(null) }}
+ />
+ ) : null
+ })()}
</div>
)
}
diff --git a/client/src/i18n/locales/am.json b/client/src/i18n/locales/am.json
index dff1218b..e58e372e 100644
--- a/client/src/i18n/locales/am.json
+++ b/client/src/i18n/locales/am.json
@@ -483,7 +483,14 @@
"createUrlToken": "ቶከን ፍጠር",
"urlTokenOnce": "ይህን ቶከን አሁን ይቅዱ። ዳግም አይታይም።",
"revoked": "ተሽሯል",
- "revoke": "ሻር"
+ "revoke": "ሻር",
+ "modelScope": "የሞዴል ወሰን",
+ "modelScopeDesc": "ይህን ቁልፍ ለተወሰኑ የሞዴል መታወቂያዎች ብቻ ገድብ። ለሌላ ማንኛውም ሞዴል ራውተሩ ይህን ቁልፍ ያልፋል።",
+ "modelScopeAdd": "የሞዴል መታወቂያ ያስገቡና Enter ይጫኑ",
+ "modelScopeEmpty": "ወሰን አልተቀመጠም — ይህ ቁልፍ የአቅራቢውን ሞዴሎች ሁሉ ያገለግላል።",
+ "modelScopeClear": "ወሰን አጥፋ",
+ "modelScopeBadgeOne": "የተገደበ · 1 ሞዴል",
+ "modelScopeBadgeOther": "የተገደበ · {count} ሞዴሎች"
},
"status": {
"healthy": "ጤናማ",
diff --git a/client/src/i18n/locales/ar.json b/client/src/i18n/locales/ar.json
index 21c55e36..a9c658e6 100644
--- a/client/src/i18n/locales/ar.json
+++ b/client/src/i18n/locales/ar.json
@@ -483,7 +483,14 @@
"createUrlToken": "إنشاء رمز",
"urlTokenOnce": "انسخ هذا الرمز الآن. لن يتم عرضه مرة أخرى.",
"revoked": "مُلغى",
- "revoke": "إلغاء"
+ "revoke": "إلغاء",
+ "modelScope": "نطاق النماذج",
+ "modelScopeDesc": "قصر هذا المفتاح على معرّفات نماذج محددة. يتخطى الموجّه هذا المفتاح لأي نموذج آخر.",
+ "modelScopeAdd": "أدخل معرّف نموذج ثم اضغط Enter",
+ "modelScopeEmpty": "لا يوجد نطاق محدد — يخدم هذا المفتاح جميع نماذج مزوّده.",
+ "modelScopeClear": "مسح النطاق",
+ "modelScopeBadgeOne": "مقيّد · نموذج واحد",
+ "modelScopeBadgeOther": "مقيّد · {count} نماذج"
},
"status": {
"healthy": "صحي",
diff --git a/client/src/i18n/locales/az.json b/client/src/i18n/locales/az.json
index 6d77b80d..b6157515 100644
--- a/client/src/i18n/locales/az.json
+++ b/client/src/i18n/locales/az.json
@@ -483,7 +483,14 @@
"createUrlToken": "Token yarat",
"urlTokenOnce": "Bu tokeni indi kopyalayın. O, bir daha göstərilməyəcək.",
"revoked": "Ləğv edilib",
- "revoke": "Ləğv et"
+ "revoke": "Ləğv et",
+ "modelScope": "Model əhatəsi",
+ "modelScopeDesc": "Bu açarı müəyyən model ID-ləri ilə məhdudlaşdırın. Digər modellər üçün router bu açarı ötürür.",
+ "modelScopeAdd": "Model ID-sini daxil edin və Enter basın",
+ "modelScopeEmpty": "Əhatə təyin edilməyib — bu açar provayderinin bütün modellərinə xidmət edir.",
+ "modelScopeClear": "Əhatəni təmizlə",
+ "modelScopeBadgeOne": "məhdud · 1 model",
+ "modelScopeBadgeOther": "məhdud · {count} model"
},
"status": {
"healthy": "sağlam",
diff --git a/client/src/i18n/locales/bg.json b/client/src/i18n/locales/bg.json
index b9a0a1e2..e891d95c 100644
--- a/client/src/i18n/locales/bg.json
+++ b/client/src/i18n/locales/bg.json
@@ -483,7 +483,14 @@
"createUrlToken": "Създай токен",
"urlTokenOnce": "Копирайте този токен сега. Той няма да бъде показан отново.",
"revoked": "Отменен",
- "revoke": "Отмени"
+ "revoke": "Отмени",
+ "modelScope": "Обхват на моделите",
+ "modelScopeDesc": "Ограничете този ключ до конкретни ID на модели. За всеки друг модел рутерът пропуска този ключ.",
+ "modelScopeAdd": "Въведете ID на модел и натиснете Enter",
+ "modelScopeEmpty": "Няма зададен обхват — този ключ обслужва всички модели на доставчика си.",
+ "modelScopeClear": "Изчисти обхвата",
+ "modelScopeBadgeOne": "ограничен · 1 модел",
+ "modelScopeBadgeOther": "ограничен · {count} модела"
},
"status": {
"healthy": "здравословно",
diff --git a/client/src/i18n/locales/bn.json b/client/src/i18n/locales/bn.json
index a6a347d2..db78b988 100644
--- a/client/src/i18n/locales/bn.json
+++ b/client/src/i18n/locales/bn.json
@@ -483,7 +483,14 @@
"createUrlToken": "টোকেন তৈরি করুন",
"urlTokenOnce": "এই টোকেনটি এখনই কপি করুন। এটি আর দেখানো হবে না।",
"revoked": "প্রত্যাহার করা হয়েছে",
- "revoke": "প্রত্যাহার করুন"
+ "revoke": "প্রত্যাহার করুন",
+ "modelScope": "মডেল পরিধি",
+ "modelScopeDesc": "এই কী-টিকে নির্দিষ্ট মডেল ID-তে সীমাবদ্ধ করুন। অন্য যেকোনো মডেলের জন্য রাউটার এই কী এড়িয়ে যায়।",
+ "modelScopeAdd": "মডেল ID লিখে Enter চাপুন",
+ "modelScopeEmpty": "কোনো পরিধি সেট নেই — এই কী তার প্রোভাইডারের সব মডেলের জন্য কাজ করে।",
+ "modelScopeClear": "পরিধি মুছুন",
+ "modelScopeBadgeOne": "সীমিত · 1টি মডেল",
+ "modelScopeBadgeOther": "সীমিত · {count}টি মডেল"
},
"status": {
"healthy": "সুস্থ",
diff --git a/client/src/i18n/locales/cs.json b/client/src/i18n/locales/cs.json
index f33210f4..4af9faff 100644
--- a/client/src/i18n/locales/cs.json
+++ b/client/src/i18n/locales/cs.json
@@ -483,7 +483,14 @@
"createUrlToken": "Vytvořit token",
"urlTokenOnce": "Zkopírujte tento token nyní. Znovu se již nezobrazí.",
"revoked": "Odvoláno",
- "revoke": "Odvolat"
+ "revoke": "Odvolat",
+ "modelScope": "Rozsah modelů",
+ "modelScopeDesc": "Omezte tento klíč na konkrétní ID modelů. Pro jakýkoli jiný model router tento klíč přeskočí.",
+ "modelScopeAdd": "Zadejte ID modelu a stiskněte Enter",
+ "modelScopeEmpty": "Rozsah není nastaven — tento klíč obsluhuje všechny modely svého poskytovatele.",
+ "modelScopeClear": "Vymazat rozsah",
+ "modelScopeBadgeOne": "omezený · 1 model",
+ "modelScopeBadgeOther": "omezený · {count} modelů"
},
"status": {
"healthy": "zdravé",
diff --git a/client/src/i18n/locales/da.json b/client/src/i18n/locales/da.json
index d4c91b18..81021aca 100644
--- a/client/src/i18n/locales/da.json
+++ b/client/src/i18n/locales/da.json
@@ -483,7 +483,14 @@
"createUrlToken": "Opret token",
"urlTokenOnce": "Kopiér dette token nu. Det vises ikke igen.",
"revoked": "Tilbagekaldt",
- "revoke": "Tilbagekald"
+ "revoke": "Tilbagekald",
+ "modelScope": "Modelomfang",
+ "modelScopeDesc": "Begræns denne nøgle til bestemte model-ID'er. For alle andre modeller springer routeren nøglen over.",
+ "modelScopeAdd": "Indtast et model-ID og tryk Enter",
+ "modelScopeEmpty": "Intet omfang angivet — nøglen betjener alle modeller hos sin udbyder.",
+ "modelScopeClear": "Ryd omfang",
+ "modelScopeBadgeOne": "begrænset · 1 model",
+ "modelScopeBadgeOther": "begrænset · {count} modeller"
},
"status": {
"healthy": "sundt",
diff --git a/client/src/i18n/locales/de.json b/client/src/i18n/locales/de.json
index 37c47856..29fe90e9 100644
--- a/client/src/i18n/locales/de.json
+++ b/client/src/i18n/locales/de.json
@@ -483,7 +483,14 @@
"createUrlToken": "Token erstellen",
"urlTokenOnce": "Kopieren Sie dieses Token jetzt. Es wird nicht erneut angezeigt.",
"revoked": "Widerrufen",
- "revoke": "Widerrufen"
+ "revoke": "Widerrufen",
+ "modelScope": "Modell-Bereich",
+ "modelScopeDesc": "Beschränkt diesen Schlüssel auf bestimmte Modell-IDs. Für alle anderen Modelle überspringt der Router diesen Schlüssel.",
+ "modelScopeAdd": "Modell-ID eingeben und Enter drücken",
+ "modelScopeEmpty": "Kein Bereich gesetzt — dieser Schlüssel bedient alle Modelle seines Anbieters.",
+ "modelScopeClear": "Bereich löschen",
+ "modelScopeBadgeOne": "begrenzt · 1 Modell",
+ "modelScopeBadgeOther": "begrenzt · {count} Modelle"
},
"status": {
"healthy": "gesund",
diff --git a/client/src/i18n/locales/el.json b/client/src/i18n/locales/el.json
index 6693e2c3..e4b3881e 100644
--- a/client/src/i18n/locales/el.json
+++ b/client/src/i18n/locales/el.json
@@ -483,7 +483,14 @@
"createUrlToken": "Δημιουργία token",
"urlTokenOnce": "Αντιγράψτε αυτό το token τώρα. Δεν θα εμφανιστεί ξανά.",
"revoked": "Ανακλήθηκε",
- "revoke": "Ανάκληση"
+ "revoke": "Ανάκληση",
+ "modelScope": "Εύρος μοντέλων",
+ "modelScopeDesc": "Περιορίστε αυτό το κλειδί σε συγκεκριμένα ID μοντέλων. Για κάθε άλλο μοντέλο ο δρομολογητής παρακάμπτει αυτό το κλειδί.",
+ "modelScopeAdd": "Πληκτρολογήστε ένα ID μοντέλου και πατήστε Enter",
+ "modelScopeEmpty": "Δεν έχει οριστεί εύρος — αυτό το κλειδί εξυπηρετεί όλα τα μοντέλα του παρόχου του.",
+ "modelScopeClear": "Καθαρισμός εύρους",
+ "modelScopeBadgeOne": "περιορισμένο · 1 μοντέλο",
+ "modelScopeBadgeOther": "περιορισμένο · {count} μοντέλα"
},
"status": {
"healthy": "υγιής",
diff --git a/client/src/i18n/locales/en.json b/client/src/i18n/locales/en.json
index 381e20a1..c84ea5c3 100644
--- a/client/src/i18n/locales/en.json
+++ b/client/src/i18n/locales/en.json
@@ -483,7 +483,14 @@
"quotaLimit": "Limit",
"quotaRemaining": "Remaining",
"quotaReset": "Reset",
- "quotaObserved": "Observed"
+ "quotaObserved": "Observed",
+ "modelScope": "Model scope",
+ "modelScopeDesc": "Limit this key to specific model IDs. The router skips this key for any other model.",
+ "modelScopeAdd": "Add a model ID and press Enter",
+ "modelScopeEmpty": "No scope set — this key serves every model of its provider.",
+ "modelScopeClear": "Clear scope",
+ "modelScopeBadgeOne": "scoped · 1 model",
+ "modelScopeBadgeOther": "scoped · {count} models"
},
"status": {
"healthy": "healthy",
diff --git a/client/src/i18n/locales/es.json b/client/src/i18n/locales/es.json
index d1539a24..ac78beb6 100644
--- a/client/src/i18n/locales/es.json
+++ b/client/src/i18n/locales/es.json
@@ -483,7 +483,14 @@
"createUrlToken": "Crear token",
"urlTokenOnce": "Copia este token ahora. No se volverá a mostrar.",
"revoked": "Revocado",
- "revoke": "Revocar"
+ "revoke": "Revocar",
+ "modelScope": "Alcance de modelos",
+ "modelScopeDesc": "Limita esta clave a determinados ID de modelo. El enrutador omite esta clave para cualquier otro modelo.",
+ "modelScopeAdd": "Añade un ID de modelo y pulsa Intro",
+ "modelScopeEmpty": "Sin alcance definido: esta clave sirve todos los modelos de su proveedor.",
+ "modelScopeClear": "Borrar alcance",
+ "modelScopeBadgeOne": "limitada · 1 modelo",
+ "modelScopeBadgeOther": "limitada · {count} modelos"
},
"status": {
"healthy": "correcto",
diff --git a/client/src/i18n/locales/fa.json b/client/src/i18n/locales/fa.json
index fe25ff86..ca648d6e 100644
--- a/client/src/i18n/locales/fa.json
+++ b/client/src/i18n/locales/fa.json
@@ -483,7 +483,14 @@
"createUrlToken": "ایجاد توکن",
"urlTokenOnce": "این توکن را همین حالا کپی کنید. دوباره نمایش داده نخواهد شد.",
"revoked": "لغو شده",
- "revoke": "لغو"
+ "revoke": "لغو",
+ "modelScope": "محدوده مدل‌ها",
+ "modelScopeDesc": "این کلید را به شناسه‌های مدل مشخص محدود کنید. مسیریاب برای هر مدل دیگری از این کلید صرف‌نظر می‌کند.",
+ "modelScopeAdd": "شناسه مدل را وارد کنید و Enter را بزنید",
+ "modelScopeEmpty": "محدوده‌ای تنظیم نشده — این کلید به همه مدل‌های ارائه‌دهنده‌اش خدمت می‌دهد.",
+ "modelScopeClear": "پاک کردن محدوده",
+ "modelScopeBadgeOne": "محدود · 1 مدل",
+ "modelScopeBadgeOther": "محدود · {count} مدل"
},
"status": {
"healthy": "سالم",
diff --git a/client/src/i18n/locales/fi.json b/client/src/i18n/locales/fi.json
index 238cbd3d..b7f19012 100644
--- a/client/src/i18n/locales/fi.json
+++ b/client/src/i18n/locales/fi.json
@@ -483,7 +483,14 @@
"createUrlToken": "Luo token",
"urlTokenOnce": "Kopioi tämä token nyt. Sitä ei näytetä uudelleen.",
"revoked": "Peruutettu",
- "revoke": "Peruuta"
+ "revoke": "Peruuta",
+ "modelScope": "Mallirajaus",
+ "modelScopeDesc": "Rajaa tämä avain tiettyihin malli-ID:ihin. Muille malleille reititin ohittaa tämän avaimen.",
+ "modelScopeAdd": "Kirjoita malli-ID ja paina Enter",
+ "modelScopeEmpty": "Rajausta ei ole asetettu — avain palvelee kaikkia tarjoajansa malleja.",
+ "modelScopeClear": "Tyhjennä rajaus",
+ "modelScopeBadgeOne": "rajattu · 1 malli",
+ "modelScopeBadgeOther": "rajattu · {count} mallia"
},
"status": {
"healthy": "terve",
diff --git a/client/src/i18n/locales/fr.json b/client/src/i18n/locales/fr.json
index c9750758..91725d53 100644
--- a/client/src/i18n/locales/fr.json
+++ b/client/src/i18n/locales/fr.json
@@ -483,7 +483,14 @@
"createUrlToken": "Créer un token",
"urlTokenOnce": "Copiez ce token maintenant. Il ne sera plus affiché.",
"revoked": "Révoqué",
- "revoke": "Révoquer"
+ "revoke": "Révoquer",
+ "modelScope": "Portée des modèles",
+ "modelScopeDesc": "Limitez cette clé à certains ID de modèles. Le routeur ignore cette clé pour tout autre modèle.",
+ "modelScopeAdd": "Ajoutez un ID de modèle puis appuyez sur Entrée",
+ "modelScopeEmpty": "Aucune portée définie — cette clé sert tous les modèles de son fournisseur.",
+ "modelScopeClear": "Effacer la portée",
+ "modelScopeBadgeOne": "limitée · 1 modèle",
+ "modelScopeBadgeOther": "limitée · {count} modèles"
},
"status": {
"healthy": "sain",
diff --git a/client/src/i18n/locales/gu.json b/client/src/i18n/locales/gu.json
index c9e22ea7..23c54356 100644
--- a/client/src/i18n/locales/gu.json
+++ b/client/src/i18n/locales/gu.json
@@ -483,7 +483,14 @@
"createUrlToken": "ટોકન બનાવો",
"urlTokenOnce": "આ ટોકન હમણાં કૉપિ કરો. તે ફરીથી બતાવવામાં આવશે નહીં.",
"revoked": "રદ કરેલ",
- "revoke": "રદ કરો"
+ "revoke": "રદ કરો",
+ "modelScope": "મૉડલ વ્યાપ",
+ "modelScopeDesc": "આ કીને ચોક્કસ મૉડલ ID પૂરતી મર્યાદિત કરો. અન્ય કોઈપણ મૉડલ માટે રાઉટર આ કીને છોડી દે છે.",
+ "modelScopeAdd": "મૉડલ ID લખો અને Enter દબાવો",
+ "modelScopeEmpty": "કોઈ વ્યાપ સેટ નથી — આ કી તેના પ્રદાતાના બધા મૉડલ માટે કામ કરે છે.",
+ "modelScopeClear": "વ્યાપ દૂર કરો",
+ "modelScopeBadgeOne": "મર્યાદિત · 1 મૉડલ",
+ "modelScopeBadgeOther": "મર્યાદિત · {count} મૉડલ"
},
"status": {
"healthy": "સ્વસ્થ",
diff --git a/client/src/i18n/locales/ha.json b/client/src/i18n/locales/ha.json
index 9ba032f0..ba051c5b 100644
--- a/client/src/i18n/locales/ha.json
+++ b/client/src/i18n/locales/ha.json
@@ -483,7 +483,14 @@
"createUrlToken": "Ƙirƙiri alama",
"urlTokenOnce": "Kwafi wannan alamar yanzu. Ba za a sake nuna ta ba.",
"revoked": "An soke",
- "revoke": "Soke"
+ "revoke": "Soke",
+ "modelScope": "Iyakar samfura",
+ "modelScopeDesc": "Iyakance wannan maɓalli ga takamaiman ID na samfura. Router yana tsallake wannan maɓalli ga kowane sauran samfuri.",
+ "modelScopeAdd": "Rubuta ID na samfuri sannan ka danna Enter",
+ "modelScopeEmpty": "Ba a saita iyaka ba — wannan maɓalli yana aiki da duk samfuran mai bayarwa.",
+ "modelScopeClear": "Share iyaka",
+ "modelScopeBadgeOne": "iyakantacce · samfuri 1",
+ "modelScopeBadgeOther": "iyakantacce · samfura {count}"
},
"status": {
"healthy": "lafiya",
diff --git a/client/src/i18n/locales/he.json b/client/src/i18n/locales/he.json
index a4d2ab37..b53e2950 100644
--- a/client/src/i18n/locales/he.json
+++ b/client/src/i18n/locales/he.json
@@ -483,7 +483,14 @@
"createUrlToken": "צור טוקן",
"urlTokenOnce": "העתק את הטוקן עכשיו. הוא לא יוצג שוב.",
"revoked": "בוטל",
- "revoke": "בטל"
+ "revoke": "בטל",
+ "modelScope": "טווח מודלים",
+ "modelScopeDesc": "הגבל מפתח זה למזהי מודלים מסוימים. עבור כל מודל אחר הנתב מדלג על מפתח זה.",
+ "modelScopeAdd": "הקלד מזהה מודל והקש Enter",
+ "modelScopeEmpty": "לא הוגדר טווח — מפתח זה משרת את כל המודלים של הספק שלו.",
+ "modelScopeClear": "נקה טווח",
+ "modelScopeBadgeOne": "מוגבל · מודל 1",
+ "modelScopeBadgeOther": "מוגבל · {count} מודלים"
},
"status": {
"healthy": "בריא",
diff --git a/client/src/i18n/locales/hi.json b/client/src/i18n/locales/hi.json
index 7a787bfd..0416180d 100644
--- a/client/src/i18n/locales/hi.json
+++ b/client/src/i18n/locales/hi.json
@@ -483,7 +483,14 @@
"createUrlToken": "टोकन बनाएँ",
"urlTokenOnce": "यह टोकन अभी कॉपी करें। यह दोबारा नहीं दिखाया जाएगा।",
"revoked": "रद्द किया गया",
- "revoke": "रद्द करें"
+ "revoke": "रद्द करें",
+ "modelScope": "मॉडल दायरा",
+ "modelScopeDesc": "इस कुंजी को विशिष्ट मॉडल ID तक सीमित करें। राउटर किसी अन्य मॉडल के लिए इस कुंजी को छोड़ देता है।",
+ "modelScopeAdd": "मॉडल ID लिखें और Enter दबाएँ",
+ "modelScopeEmpty": "कोई दायरा सेट नहीं — यह कुंजी अपने प्रदाता के सभी मॉडल के लिए काम करती है।",
+ "modelScopeClear": "दायरा हटाएँ",
+ "modelScopeBadgeOne": "सीमित · 1 मॉडल",
+ "modelScopeBadgeOther": "सीमित · {count} मॉडल"
},
"status": {
"healthy": "स्वस्थ",
diff --git a/client/src/i18n/locales/hr.json b/client/src/i18n/locales/hr.json
index c55dc362..f2241518 100644
--- a/client/src/i18n/locales/hr.json
+++ b/client/src/i18n/locales/hr.json
@@ -483,7 +483,14 @@
"createUrlToken": "Stvori token",
"urlTokenOnce": "Kopirajte ovaj token sada. Neće se ponovno prikazati.",
"revoked": "Opozvano",
- "revoke": "Opozovi"
+ "revoke": "Opozovi",
+ "modelScope": "Opseg modela",
+ "modelScopeDesc": "Ograničite ovaj ključ na određene ID-ove modela. Za svaki drugi model router preskače ovaj ključ.",
+ "modelScopeAdd": "Unesite ID modela i pritisnite Enter",
+ "modelScopeEmpty": "Opseg nije postavljen — ovaj ključ služi sve modele svog pružatelja.",
+ "modelScopeClear": "Očisti opseg",
+ "modelScopeBadgeOne": "ograničen · 1 model",
+ "modelScopeBadgeOther": "ograničen · {count} modela"
},
"status": {
"healthy": "Zdravo",
diff --git a/client/src/i18n/locales/hu.json b/client/src/i18n/locales/hu.json
index 5189e2ae..673a5896 100644
--- a/client/src/i18n/locales/hu.json
+++ b/client/src/i18n/locales/hu.json
@@ -483,7 +483,14 @@
"createUrlToken": "Token létrehozása",
"urlTokenOnce": "Másold ki ezt a tokent most. Többé nem jelenik meg.",
"revoked": "Visszavonva",
- "revoke": "Visszavonás"
+ "revoke": "Visszavonás",
+ "modelScope": "Modellek köre",
+ "modelScopeDesc": "Korlátozza ezt a kulcsot adott modellazonosítókra. Minden más modellnél a router kihagyja ezt a kulcsot.",
+ "modelScopeAdd": "Írjon be egy modellazonosítót, majd nyomjon Entert",
+ "modelScopeEmpty": "Nincs beállított kör — ez a kulcs a szolgáltató összes modelljét kiszolgálja.",
+ "modelScopeClear": "Kör törlése",
+ "modelScopeBadgeOne": "korlátozva · 1 modell",
+ "modelScopeBadgeOther": "korlátozva · {count} modell"
},
"status": {
"healthy": "egészséges",
diff --git a/client/src/i18n/locales/id.json b/client/src/i18n/locales/id.json
index 005e96ec..03496d31 100644
--- a/client/src/i18n/locales/id.json
+++ b/client/src/i18n/locales/id.json
@@ -483,7 +483,14 @@
"createUrlToken": "Buat token",
"urlTokenOnce": "Salin token ini sekarang. Token tidak akan ditampilkan lagi.",
"revoked": "Dicabut",
- "revoke": "Cabut"
+ "revoke": "Cabut",
+ "modelScope": "Cakupan model",
+ "modelScopeDesc": "Batasi kunci ini ke ID model tertentu. Router melewati kunci ini untuk model lain.",
+ "modelScopeAdd": "Masukkan ID model lalu tekan Enter",
+ "modelScopeEmpty": "Cakupan belum diatur — kunci ini melayani semua model penyedianya.",
+ "modelScopeClear": "Hapus cakupan",
+ "modelScopeBadgeOne": "dibatasi · 1 model",
+ "modelScopeBadgeOther": "dibatasi · {count} model"
},
"status": {
"healthy": "sehat",
diff --git a/client/src/i18n/locales/ig.json b/client/src/i18n/locales/ig.json
index 7e9607d6..a891429e 100644
--- a/client/src/i18n/locales/ig.json
+++ b/client/src/i18n/locales/ig.json
@@ -483,7 +483,14 @@
"createUrlToken": "Mepụta akara",
"urlTokenOnce": "Detuo akara a ugbu a. A gaghị egosi ya ọzọ.",
"revoked": "Akagbuola",
- "revoke": "Kagbuo"
+ "revoke": "Kagbuo",
+ "modelScope": "Oke model",
+ "modelScopeDesc": "Kpaa mkpụrụ igodo a n'ID model ụfọdụ. Router na-agafe igodo a maka model ọ bụla ọzọ.",
+ "modelScopeAdd": "Tinye ID model wee pịa Enter",
+ "modelScopeEmpty": "Enweghị oke edobere — igodo a na-arụ ọrụ maka model niile nke onye na-eweta ya.",
+ "modelScopeClear": "Hichapụ oke",
+ "modelScopeBadgeOne": "oke · model 1",
+ "modelScopeBadgeOther": "oke · model {count}"
},
"status": {
"healthy": "ahụike",
diff --git a/client/src/i18n/locales/it.json b/client/src/i18n/locales/it.json
index c07783d2..4afacccb 100644
--- a/client/src/i18n/locales/it.json
+++ b/client/src/i18n/locales/it.json
@@ -483,7 +483,14 @@
"createUrlToken": "Crea token",
"urlTokenOnce": "Copia questo token ora. Non verrà mostrato di nuovo.",
"revoked": "Revocato",
- "revoke": "Revoca"
+ "revoke": "Revoca",
+ "modelScope": "Ambito modelli",
+ "modelScopeDesc": "Limita questa chiave a specifici ID di modello. Il router salta questa chiave per qualsiasi altro modello.",
+ "modelScopeAdd": "Aggiungi un ID modello e premi Invio",
+ "modelScopeEmpty": "Nessun ambito impostato — questa chiave serve tutti i modelli del suo provider.",
+ "modelScopeClear": "Cancella ambito",
+ "modelScopeBadgeOne": "limitata · 1 modello",
+ "modelScopeBadgeOther": "limitata · {count} modelli"
},
"status": {
"healthy": "funzionante",
diff --git a/client/src/i18n/locales/ja.json b/client/src/i18n/locales/ja.json
index e3bdabd9..7b8ce5f5 100644
--- a/client/src/i18n/locales/ja.json
+++ b/client/src/i18n/locales/ja.json
@@ -483,7 +483,14 @@
"createUrlToken": "トークンを作成",
"urlTokenOnce": "このトークンを今すぐコピーしてください。二度と表示されません。",
"revoked": "取り消し済み",
- "revoke": "取り消す"
+ "revoke": "取り消す",
+ "modelScope": "モデルスコープ",
+ "modelScopeDesc": "このキーを特定のモデル ID に限定します。他のモデルではルーターがこのキーをスキップします。",
+ "modelScopeAdd": "モデル ID を入力して Enter を押してください",
+ "modelScopeEmpty": "スコープ未設定 — このキーはプロバイダーのすべてのモデルに使えます。",
+ "modelScopeClear": "スコープを解除",
+ "modelScopeBadgeOne": "限定 · 1 モデル",
+ "modelScopeBadgeOther": "限定 · {count} モデル"
},
"status": {
"healthy": "健康な",
diff --git a/client/src/i18n/locales/ka.json b/client/src/i18n/locales/ka.json
index f13fcb5c..739c5056 100644
--- a/client/src/i18n/locales/ka.json
+++ b/client/src/i18n/locales/ka.json
@@ -483,7 +483,14 @@
"createUrlToken": "ტოკენის შექმნა",
"urlTokenOnce": "დააკოპირეთ ეს ტოკენი ახლავე. ის აღარ გამოჩნდება.",
"revoked": "გაუქმებულია",
- "revoke": "გაუქმება"
+ "revoke": "გაუქმება",
+ "modelScope": "მოდელების ფარგლები",
+ "modelScopeDesc": "შეზღუდეთ ეს გასაღები კონკრეტული მოდელის ID-ებით. ნებისმიერი სხვა მოდელისთვის რაუტერი ამ გასაღებს გამოტოვებს.",
+ "modelScopeAdd": "შეიყვანეთ მოდელის ID და დააჭირეთ Enter-ს",
+ "modelScopeEmpty": "ფარგლები არ არის დაყენებული — ეს გასაღები ემსახურება მისი პროვაიდერის ყველა მოდელს.",
+ "modelScopeClear": "ფარგლების გასუფთავება",
+ "modelScopeBadgeOne": "შეზღუდული · 1 მოდელი",
+ "modelScopeBadgeOther": "შეზღუდული · {count} მოდელი"
},
"status": {
"healthy": "ჯანსაღი",
diff --git a/client/src/i18n/locales/km.json b/client/src/i18n/locales/km.json
index 5c6b179c..b6dd279d 100644
--- a/client/src/i18n/locales/km.json
+++ b/client/src/i18n/locales/km.json
@@ -483,7 +483,14 @@
"createUrlToken": "បង្កើត token",
"urlTokenOnce": "ចម្លង token នេះឥឡូវនេះ។ វានឹងមិនបង្ហាញម្តងទៀតទេ។",
"revoked": "បានដកហូត",
- "revoke": "ដកហូត"
+ "revoke": "ដកហូត",
+ "modelScope": "វិសាលភាពម៉ូដែល",
+ "modelScopeDesc": "កំណត់សោនេះឱ្យប្រើបានតែ ID ម៉ូដែលជាក់លាក់ប៉ុណ្ណោះ។ សម្រាប់ម៉ូដែលផ្សេងទៀត រ៉ោតទ័ររំលងសោនេះ។",
+ "modelScopeAdd": "វាយ ID ម៉ូដែល រួចចុច Enter",
+ "modelScopeEmpty": "មិនទាន់កំណត់វិសាលភាព — សោនេះប្រើបានជាមួយម៉ូដែលទាំងអស់របស់អ្នកផ្តល់សេវា។",
+ "modelScopeClear": "លុបវិសាលភាព",
+ "modelScopeBadgeOne": "កំណត់ · ម៉ូដែល 1",
+ "modelScopeBadgeOther": "កំណត់ · ម៉ូដែល {count}"
},
"status": {
"healthy": "មានសុខភាពល្អ",
diff --git a/client/src/i18n/locales/kn.json b/client/src/i18n/locales/kn.json
index 2489e1f9..db57cba3 100644
--- a/client/src/i18n/locales/kn.json
+++ b/client/src/i18n/locales/kn.json
@@ -483,7 +483,14 @@
"createUrlToken": "ಟೋಕನ್ ರಚಿಸಿ",
"urlTokenOnce": "ಈ ಟೋಕನ್ ಅನ್ನು ಈಗಲೇ ನಕಲಿಸಿ. ಇದನ್ನು ಮತ್ತೆ ತೋರಿಸಲಾಗುವುದಿಲ್ಲ.",
"revoked": "ಹಿಂಪಡೆಯಲಾಗಿದೆ",
- "revoke": "ಹಿಂಪಡೆಯಿರಿ"
+ "revoke": "ಹಿಂಪಡೆಯಿರಿ",
+ "modelScope": "ಮಾಡೆಲ್ ವ್ಯಾಪ್ತಿ",
+ "modelScopeDesc": "ಈ ಕೀಲಿಯನ್ನು ನಿರ್ದಿಷ್ಟ ಮಾಡೆಲ್ ID-ಗಳಿಗೆ ಸೀಮಿತಗೊಳಿಸಿ. ಇತರ ಯಾವುದೇ ಮಾಡೆಲ್‌ಗೆ ರೂಟರ್ ಈ ಕೀಲಿಯನ್ನು ಬಿಟ್ಟುಬಿಡುತ್ತದೆ.",
+ "modelScopeAdd": "ಮಾಡೆಲ್ ID ನಮೂದಿಸಿ Enter ಒತ್ತಿರಿ",
+ "modelScopeEmpty": "ವ್ಯಾಪ್ತಿ ಹೊಂದಿಸಿಲ್ಲ — ಈ ಕೀಲಿ ತನ್ನ ಪೂರೈಕೆದಾರರ ಎಲ್ಲ ಮಾಡೆಲ್‌ಗಳಿಗೂ ಕೆಲಸ ಮಾಡುತ್ತದೆ.",
+ "modelScopeClear": "ವ್ಯಾಪ್ತಿ ತೆಗೆದುಹಾಕಿ",
+ "modelScopeBadgeOne": "ಸೀಮಿತ · 1 ಮಾಡೆಲ್",
+ "modelScopeBadgeOther": "ಸೀಮಿತ · {count} ಮಾಡೆಲ್‌ಗಳು"
},
"status": {
"healthy": "ಆರೋಗ್ಯಕರ",
diff --git a/client/src/i18n/locales/ko.json b/client/src/i18n/locales/ko.json
index f7f200c1..359efc45 100644
--- a/client/src/i18n/locales/ko.json
+++ b/client/src/i18n/locales/ko.json
@@ -483,7 +483,14 @@
"createUrlToken": "토큰 생성",
"urlTokenOnce": "이 토큰을 지금 복사하세요. 다시 표시되지 않습니다.",
"revoked": "취소됨",
- "revoke": "취소"
+ "revoke": "취소",
+ "modelScope": "모델 범위",
+ "modelScopeDesc": "이 키를 특정 모델 ID로 제한합니다. 다른 모델에는 라우터가 이 키를 건너뜁니다.",
+ "modelScopeAdd": "모델 ID를 입력하고 Enter를 누르세요",
+ "modelScopeEmpty": "범위 미설정 — 이 키는 제공자의 모든 모델에 사용됩니다.",
+ "modelScopeClear": "범위 지우기",
+ "modelScopeBadgeOne": "제한됨 · 모델 1개",
+ "modelScopeBadgeOther": "제한됨 · 모델 {count}개"
},
"status": {
"healthy": "건강한",
diff --git a/client/src/i18n/locales/lt.json b/client/src/i18n/locales/lt.json
index 7d844ee7..8c35b2d4 100644
--- a/client/src/i18n/locales/lt.json
+++ b/client/src/i18n/locales/lt.json
@@ -483,7 +483,14 @@
"createUrlToken": "Sukurti žetoną",
"urlTokenOnce": "Nukopijuokite šį žetoną dabar. Jis daugiau nebus rodomas.",
"revoked": "Atšaukta",
- "revoke": "Atšaukti"
+ "revoke": "Atšaukti",
+ "modelScope": "Modelių aprėptis",
+ "modelScopeDesc": "Apribokite šį raktą konkrečiais modelių ID. Kitiems modeliams maršrutizatorius šį raktą praleidžia.",
+ "modelScopeAdd": "Įveskite modelio ID ir spauskite Enter",
+ "modelScopeEmpty": "Aprėptis nenustatyta — šis raktas aptarnauja visus savo teikėjo modelius.",
+ "modelScopeClear": "Išvalyti aprėptį",
+ "modelScopeBadgeOne": "apribotas · 1 modelis",
+ "modelScopeBadgeOther": "apribotas · {count} modeliai"
},
"status": {
"healthy": "Sveika",
diff --git a/client/src/i18n/locales/ml.json b/client/src/i18n/locales/ml.json
index c4739633..c5b7f9df 100644
--- a/client/src/i18n/locales/ml.json
+++ b/client/src/i18n/locales/ml.json
@@ -483,7 +483,14 @@
"createUrlToken": "ടോക്കൺ സൃഷ്ടിക്കുക",
"urlTokenOnce": "ഈ ടോക്കൺ ഇപ്പോൾ പകർത്തുക. ഇത് വീണ്ടും കാണിക്കില്ല.",
"revoked": "റദ്ദാക്കി",
- "revoke": "റദ്ദാക്കുക"
+ "revoke": "റദ്ദാക്കുക",
+ "modelScope": "മോഡൽ പരിധി",
+ "modelScopeDesc": "ഈ കീ നിർദ്ദിഷ്ട മോഡൽ ID-കളിലേക്ക് പരിമിതപ്പെടുത്തുക. മറ്റേതൊരു മോഡലിനും റൂട്ടർ ഈ കീ ഒഴിവാക്കുന്നു.",
+ "modelScopeAdd": "മോഡൽ ID നൽകി Enter അമർത്തുക",
+ "modelScopeEmpty": "പരിധി സജ്ജമാക്കിയിട്ടില്ല — ഈ കീ അതിന്റെ ദാതാവിന്റെ എല്ലാ മോഡലുകൾക്കും പ്രവർത്തിക്കുന്നു.",
+ "modelScopeClear": "പരിധി നീക്കം ചെയ്യുക",
+ "modelScopeBadgeOne": "പരിമിതം · 1 മോഡൽ",
+ "modelScopeBadgeOther": "പരിമിതം · {count} മോഡലുകൾ"
},
"status": {
"healthy": "ആരോഗ്യമുള്ള",
diff --git a/client/src/i18n/locales/mr.json b/client/src/i18n/locales/mr.json
index 4ec5ccef..fff955f1 100644
--- a/client/src/i18n/locales/mr.json
+++ b/client/src/i18n/locales/mr.json
@@ -483,7 +483,14 @@
"createUrlToken": "टोकन तयार करा",
"urlTokenOnce": "हे टोकन आत्ताच कॉपी करा. ते पुन्हा दाखवले जाणार नाही.",
"revoked": "रद्द केले",
- "revoke": "रद्द करा"
+ "revoke": "रद्द करा",
+ "modelScope": "मॉडेल व्याप्ती",
+ "modelScopeDesc": "ही की विशिष्ट मॉडेल ID पुरती मर्यादित करा. इतर कोणत्याही मॉडेलसाठी राउटर ही की वगळतो.",
+ "modelScopeAdd": "मॉडेल ID लिहा आणि Enter दाबा",
+ "modelScopeEmpty": "व्याप्ती सेट केलेली नाही — ही की तिच्या प्रदात्याच्या सर्व मॉडेलसाठी वापरली जाते.",
+ "modelScopeClear": "व्याप्ती काढा",
+ "modelScopeBadgeOne": "मर्यादित · 1 मॉडेल",
+ "modelScopeBadgeOther": "मर्यादित · {count} मॉडेल"
},
"status": {
"healthy": "निरोगी",
diff --git a/client/src/i18n/locales/ms.json b/client/src/i18n/locales/ms.json
index 594e73fc..e521a397 100644
--- a/client/src/i18n/locales/ms.json
+++ b/client/src/i18n/locales/ms.json
@@ -483,7 +483,14 @@
"createUrlToken": "Cipta token",
"urlTokenOnce": "Salin token ini sekarang. Ia tidak akan dipaparkan lagi.",
"revoked": "Dibatalkan",
- "revoke": "Batalkan"
+ "revoke": "Batalkan",
+ "modelScope": "Skop model",
+ "modelScopeDesc": "Hadkan kunci ini kepada ID model tertentu. Penghala melangkau kunci ini untuk model lain.",
+ "modelScopeAdd": "Masukkan ID model dan tekan Enter",
+ "modelScopeEmpty": "Tiada skop ditetapkan — kunci ini melayani semua model penyedianya.",
+ "modelScopeClear": "Kosongkan skop",
+ "modelScopeBadgeOne": "terhad · 1 model",
+ "modelScopeBadgeOther": "terhad · {count} model"
},
"status": {
"healthy": "sihat",
diff --git a/client/src/i18n/locales/my.json b/client/src/i18n/locales/my.json
index 598bb288..64c5b678 100644
--- a/client/src/i18n/locales/my.json
+++ b/client/src/i18n/locales/my.json
@@ -483,7 +483,14 @@
"createUrlToken": "တိုကင် ဖန်တီးရန်",
"urlTokenOnce": "ဤတိုကင်ကို ယခုပင် ကူးယူပါ။ နောက်ထပ် ပြသမည် မဟုတ်ပါ။",
"revoked": "ရုပ်သိမ်းပြီး",
- "revoke": "ရုပ်သိမ်းရန်"
+ "revoke": "ရုပ်သိမ်းရန်",
+ "modelScope": "မော်ဒယ် အတိုင်းအတာ",
+ "modelScopeDesc": "ဤကီးကို သတ်မှတ်ထားသော မော်ဒယ် ID များအတွက်သာ ကန့်သတ်ပါ။ အခြားမော်ဒယ်များအတွက် router သည် ဤကီးကို ကျော်သွားပါမည်။",
+ "modelScopeAdd": "မော်ဒယ် ID ရိုက်ထည့်ပြီး Enter နှိပ်ပါ",
+ "modelScopeEmpty": "အတိုင်းအတာ မသတ်မှတ်ရသေးပါ — ဤကီးသည် ၎င်း၏ ဝန်ဆောင်မှုပေးသူ၏ မော်ဒယ်အားလုံးအတွက် အသုံးပြုနိုင်သည်။",
+ "modelScopeClear": "အတိုင်းအတာ ဖယ်ရှားရန်",
+ "modelScopeBadgeOne": "ကန့်သတ် · မော်ဒယ် 1 ခု",
+ "modelScopeBadgeOther": "ကန့်သတ် · မော်ဒယ် {count} ခု"
},
"status": {
"healthy": "ကျန်းမာသော",
diff --git a/client/src/i18n/locales/ne.json b/client/src/i18n/locales/ne.json
index 76589efd..498a39c0 100644
--- a/client/src/i18n/locales/ne.json
+++ b/client/src/i18n/locales/ne.json
@@ -483,7 +483,14 @@
"createUrlToken": "टोकन सिर्जना गर्नुहोस्",
"urlTokenOnce": "यो टोकन अहिले नै प्रतिलिपि गर्नुहोस्। यो फेरि देखाइने छैन।",
"revoked": "रद्द गरिएको",
- "revoke": "रद्द गर्नुहोस्"
+ "revoke": "रद्द गर्नुहोस्",
+ "modelScope": "मोडेल दायरा",
+ "modelScopeDesc": "यो कुञ्जीलाई निश्चित मोडेल ID हरूमा सीमित गर्नुहोस्। अन्य कुनै पनि मोडेलका लागि राउटरले यो कुञ्जी छोड्छ।",
+ "modelScopeAdd": "मोडेल ID लेखेर Enter थिच्नुहोस्",
+ "modelScopeEmpty": "कुनै दायरा सेट छैन — यो कुञ्जी आफ्नो प्रदायकका सबै मोडेलका लागि काम गर्छ।",
+ "modelScopeClear": "दायरा हटाउनुहोस्",
+ "modelScopeBadgeOne": "सीमित · 1 मोडेल",
+ "modelScopeBadgeOther": "सीमित · {count} मोडेल"
},
"status": {
"healthy": "स्वस्थ छ",
diff --git a/client/src/i18n/locales/nl.json b/client/src/i18n/locales/nl.json
index 52299bcf..beb4168c 100644
--- a/client/src/i18n/locales/nl.json
+++ b/client/src/i18n/locales/nl.json
@@ -483,7 +483,14 @@
"createUrlToken": "Token aanmaken",
"urlTokenOnce": "Kopieer dit token nu. Het wordt niet opnieuw getoond.",
"revoked": "Ingetrokken",
- "revoke": "Intrekken"
+ "revoke": "Intrekken",
+ "modelScope": "Modelbereik",
+ "modelScopeDesc": "Beperk deze sleutel tot specifieke model-ID's. Voor elk ander model slaat de router deze sleutel over.",
+ "modelScopeAdd": "Voer een model-ID in en druk op Enter",
+ "modelScopeEmpty": "Geen bereik ingesteld — deze sleutel bedient alle modellen van zijn provider.",
+ "modelScopeClear": "Bereik wissen",
+ "modelScopeBadgeOne": "beperkt · 1 model",
+ "modelScopeBadgeOther": "beperkt · {count} modellen"
},
"status": {
"healthy": "Gezond",
diff --git a/client/src/i18n/locales/no.json b/client/src/i18n/locales/no.json
index 403b0d0e..962d98b1 100644
--- a/client/src/i18n/locales/no.json
+++ b/client/src/i18n/locales/no.json
@@ -483,7 +483,14 @@
"createUrlToken": "Opprett token",
"urlTokenOnce": "Kopier dette tokenet nå. Det vises ikke igjen.",
"revoked": "Tilbakekalt",
- "revoke": "Tilbakekall"
+ "revoke": "Tilbakekall",
+ "modelScope": "Modellomfang",
+ "modelScopeDesc": "Begrens denne nøkkelen til bestemte modell-ID-er. For alle andre modeller hopper ruteren over nøkkelen.",
+ "modelScopeAdd": "Skriv inn en modell-ID og trykk Enter",
+ "modelScopeEmpty": "Ingen avgrensning satt — nøkkelen betjener alle modellene til leverandøren sin.",
+ "modelScopeClear": "Fjern avgrensning",
+ "modelScopeBadgeOne": "begrenset · 1 modell",
+ "modelScopeBadgeOther": "begrenset · {count} modeller"
},
"status": {
"healthy": "Sunt",
diff --git a/client/src/i18n/locales/or.json b/client/src/i18n/locales/or.json
index bca4eab6..9f9c9128 100644
--- a/client/src/i18n/locales/or.json
+++ b/client/src/i18n/locales/or.json
@@ -483,7 +483,14 @@
"createUrlToken": "ଟୋକେନ୍ ସୃଷ୍ଟି କରନ୍ତୁ",
"urlTokenOnce": "ଏହି ଟୋକେନ୍‌କୁ ଏବେ କପି କରନ୍ତୁ। ଏହା ପୁଣି ଦେଖାଯିବ ନାହିଁ।",
"revoked": "ପ୍ରତ୍ୟାହୃତ",
- "revoke": "ପ୍ରତ୍ୟାହାର କରନ୍ତୁ"
+ "revoke": "ପ୍ରତ୍ୟାହାର କରନ୍ତୁ",
+ "modelScope": "ମଡେଲ ପରିସର",
+ "modelScopeDesc": "ଏହି କୀ-କୁ ନିର୍ଦ୍ଦିଷ୍ଟ ମଡେଲ ID-ରେ ସୀମିତ କରନ୍ତୁ। ଅନ୍ୟ କୌଣସି ମଡେଲ ପାଇଁ ରାଉଟର ଏହି କୀ-କୁ ଛାଡ଼ିଦିଏ।",
+ "modelScopeAdd": "ମଡେଲ ID ଲେଖି Enter ଦବାନ୍ତୁ",
+ "modelScopeEmpty": "କୌଣସି ପରିସର ସେଟ୍ ନାହିଁ — ଏହି କୀ ତାହାର ପ୍ରଦାତାର ସମସ୍ତ ମଡେଲ ପାଇଁ କାମ କରେ।",
+ "modelScopeClear": "ପରିସର ହଟାନ୍ତୁ",
+ "modelScopeBadgeOne": "ସୀମିତ · 1 ମଡେଲ",
+ "modelScopeBadgeOther": "ସୀମିତ · {count} ମଡେଲ"
},
"status": {
"healthy": "ସୁସ୍ଥ",
diff --git a/client/src/i18n/locales/pa.json b/client/src/i18n/locales/pa.json
index f9148d40..0c8d148d 100644
--- a/client/src/i18n/locales/pa.json
+++ b/client/src/i18n/locales/pa.json
@@ -483,7 +483,14 @@
"createUrlToken": "ਟੋਕਨ ਬਣਾਓ",
"urlTokenOnce": "ਇਹ ਟੋਕਨ ਹੁਣੇ ਕਾਪੀ ਕਰੋ। ਇਹ ਦੁਬਾਰਾ ਨਹੀਂ ਦਿਖਾਇਆ ਜਾਵੇਗਾ।",
"revoked": "ਰੱਦ ਕੀਤਾ ਗਿਆ",
- "revoke": "ਰੱਦ ਕਰੋ"
+ "revoke": "ਰੱਦ ਕਰੋ",
+ "modelScope": "ਮਾਡਲ ਦਾਇਰਾ",
+ "modelScopeDesc": "ਇਸ ਕੁੰਜੀ ਨੂੰ ਖ਼ਾਸ ਮਾਡਲ ID ਤੱਕ ਸੀਮਤ ਕਰੋ। ਕਿਸੇ ਵੀ ਹੋਰ ਮਾਡਲ ਲਈ ਰਾਊਟਰ ਇਸ ਕੁੰਜੀ ਨੂੰ ਛੱਡ ਦਿੰਦਾ ਹੈ।",
+ "modelScopeAdd": "ਮਾਡਲ ID ਲਿਖੋ ਅਤੇ Enter ਦਬਾਓ",
+ "modelScopeEmpty": "ਕੋਈ ਦਾਇਰਾ ਸੈੱਟ ਨਹੀਂ — ਇਹ ਕੁੰਜੀ ਆਪਣੇ ਪ੍ਰਦਾਤਾ ਦੇ ਸਾਰੇ ਮਾਡਲਾਂ ਲਈ ਕੰਮ ਕਰਦੀ ਹੈ।",
+ "modelScopeClear": "ਦਾਇਰਾ ਹਟਾਓ",
+ "modelScopeBadgeOne": "ਸੀਮਤ · 1 ਮਾਡਲ",
+ "modelScopeBadgeOther": "ਸੀਮਤ · {count} ਮਾਡਲ"
},
"status": {
"healthy": "ਸਿਹਤਮੰਦ",
diff --git a/client/src/i18n/locales/pl.json b/client/src/i18n/locales/pl.json
index d44a2a3a..7bd75438 100644
--- a/client/src/i18n/locales/pl.json
+++ b/client/src/i18n/locales/pl.json
@@ -483,7 +483,14 @@
"createUrlToken": "Utwórz token",
"urlTokenOnce": "Skopiuj ten token teraz. Nie zostanie ponownie wyświetlony.",
"revoked": "Odwołany",
- "revoke": "Odwołaj"
+ "revoke": "Odwołaj",
+ "modelScope": "Zakres modeli",
+ "modelScopeDesc": "Ogranicz ten klucz do wybranych ID modeli. Dla pozostałych modeli router pomija ten klucz.",
+ "modelScopeAdd": "Wpisz ID modelu i naciśnij Enter",
+ "modelScopeEmpty": "Brak zakresu — ten klucz obsługuje wszystkie modele swojego dostawcy.",
+ "modelScopeClear": "Wyczyść zakres",
+ "modelScopeBadgeOne": "ograniczony · 1 model",
+ "modelScopeBadgeOther": "ograniczony · {count} modeli"
},
"status": {
"healthy": "zdrowy",
diff --git a/client/src/i18n/locales/pt-BR.json b/client/src/i18n/locales/pt-BR.json
index 1f2dd8a0..d86d3650 100644
--- a/client/src/i18n/locales/pt-BR.json
+++ b/client/src/i18n/locales/pt-BR.json
@@ -483,7 +483,14 @@
"createUrlToken": "Criar token",
"urlTokenOnce": "Copie este token agora. Ele não será exibido novamente.",
"revoked": "Revogado",
- "revoke": "Revogar"
+ "revoke": "Revogar",
+ "modelScope": "Escopo de modelos",
+ "modelScopeDesc": "Limite esta chave a IDs de modelo específicos. O roteador ignora esta chave para qualquer outro modelo.",
+ "modelScopeAdd": "Adicione um ID de modelo e pressione Enter",
+ "modelScopeEmpty": "Sem escopo definido — esta chave atende todos os modelos do provedor.",
+ "modelScopeClear": "Limpar escopo",
+ "modelScopeBadgeOne": "restrita · 1 modelo",
+ "modelScopeBadgeOther": "restrita · {count} modelos"
},
"status": {
"healthy": "saudável",
diff --git a/client/src/i18n/locales/pt-PT.json b/client/src/i18n/locales/pt-PT.json
index 2475bcaf..7078075b 100644
--- a/client/src/i18n/locales/pt-PT.json
+++ b/client/src/i18n/locales/pt-PT.json
@@ -483,7 +483,14 @@
"createUrlToken": "Criar token",
"urlTokenOnce": "Copie este token agora. Não voltará a ser mostrado.",
"revoked": "Revogado",
- "revoke": "Revogar"
+ "revoke": "Revogar",
+ "modelScope": "Âmbito de modelos",
+ "modelScopeDesc": "Limite esta chave a IDs de modelo específicos. O router ignora esta chave para qualquer outro modelo.",
+ "modelScopeAdd": "Adicione um ID de modelo e prima Enter",
+ "modelScopeEmpty": "Sem âmbito definido — esta chave serve todos os modelos do fornecedor.",
+ "modelScopeClear": "Limpar âmbito",
+ "modelScopeBadgeOne": "restrita · 1 modelo",
+ "modelScopeBadgeOther": "restrita · {count} modelos"
},
"status": {
"healthy": "Saudável",
diff --git a/client/src/i18n/locales/ro.json b/client/src/i18n/locales/ro.json
index 954d04a1..5c3d70cc 100644
--- a/client/src/i18n/locales/ro.json
+++ b/client/src/i18n/locales/ro.json
@@ -483,7 +483,14 @@
"createUrlToken": "Creează token",
"urlTokenOnce": "Copiază acest token acum. Nu va mai fi afișat.",
"revoked": "Revocat",
- "revoke": "Revocă"
+ "revoke": "Revocă",
+ "modelScope": "Domeniul modelelor",
+ "modelScopeDesc": "Limitează această cheie la anumite ID-uri de model. Pentru orice alt model, routerul sare peste această cheie.",
+ "modelScopeAdd": "Introdu un ID de model și apasă Enter",
+ "modelScopeEmpty": "Niciun domeniu setat — această cheie servește toate modelele furnizorului ei.",
+ "modelScopeClear": "Șterge domeniul",
+ "modelScopeBadgeOne": "limitată · 1 model",
+ "modelScopeBadgeOther": "limitată · {count} modele"
},
"status": {
"healthy": "Sănătos",
diff --git a/client/src/i18n/locales/ru.json b/client/src/i18n/locales/ru.json
index 570d77eb..c203da56 100644
--- a/client/src/i18n/locales/ru.json
+++ b/client/src/i18n/locales/ru.json
@@ -483,7 +483,14 @@
"createUrlToken": "Создать токен",
"urlTokenOnce": "Скопируйте этот токен сейчас. Он больше не будет показан.",
"revoked": "Отозван",
- "revoke": "Отозвать"
+ "revoke": "Отозвать",
+ "modelScope": "Область моделей",
+ "modelScopeDesc": "Ограничьте этот ключ определёнными ID моделей. Для любых других моделей маршрутизатор пропускает этот ключ.",
+ "modelScopeAdd": "Введите ID модели и нажмите Enter",
+ "modelScopeEmpty": "Область не задана — ключ обслуживает все модели своего провайдера.",
+ "modelScopeClear": "Очистить область",
+ "modelScopeBadgeOne": "ограничен · 1 модель",
+ "modelScopeBadgeOther": "ограничен · {count} моделей"
},
"status": {
"healthy": "здоровый",
diff --git a/client/src/i18n/locales/si.json b/client/src/i18n/locales/si.json
index 8cde4740..6d583d06 100644
--- a/client/src/i18n/locales/si.json
+++ b/client/src/i18n/locales/si.json
@@ -483,7 +483,14 @@
"createUrlToken": "ටෝකනය සාදන්න",
"urlTokenOnce": "මෙම ටෝකනය දැන්ම පිටපත් කරන්න. එය නැවත නොපෙන්වයි.",
"revoked": "අවලංගු කරන ලදී",
- "revoke": "අවලංගු කරන්න"
+ "revoke": "අවලංගු කරන්න",
+ "modelScope": "මොඩල පරාසය",
+ "modelScopeDesc": "මෙම යතුර නිශ්චිත මොඩල ID වලට සීමා කරන්න. වෙනත් ඕනෑම මොඩලයක් සඳහා රවුටරය මෙම යතුර මඟහරියි.",
+ "modelScopeAdd": "මොඩල ID එකක් ටයිප් කර Enter ඔබන්න",
+ "modelScopeEmpty": "පරාසයක් සකසා නැත — මෙම යතුර එහි සැපයුම්කරුගේ සියලුම මොඩල සඳහා ක්‍රියා කරයි.",
+ "modelScopeClear": "පරාසය හිස් කරන්න",
+ "modelScopeBadgeOne": "සීමිත · මොඩල 1",
+ "modelScopeBadgeOther": "සීමිත · මොඩල {count}"
},
"status": {
"healthy": "සෞඛ්ය සම්පන්න",
diff --git a/client/src/i18n/locales/sk.json b/client/src/i18n/locales/sk.json
index b3ba143b..c6718229 100644
--- a/client/src/i18n/locales/sk.json
+++ b/client/src/i18n/locales/sk.json
@@ -483,7 +483,14 @@
"createUrlToken": "Vytvoriť token",
"urlTokenOnce": "Skopírujte tento token teraz. Už sa znova nezobrazí.",
"revoked": "Odvolaný",
- "revoke": "Odvolať"
+ "revoke": "Odvolať",
+ "modelScope": "Rozsah modelov",
+ "modelScopeDesc": "Obmedzte tento kľúč na konkrétne ID modelov. Pre akýkoľvek iný model router tento kľúč preskočí.",
+ "modelScopeAdd": "Zadajte ID modelu a stlačte Enter",
+ "modelScopeEmpty": "Rozsah nie je nastavený — tento kľúč obsluhuje všetky modely svojho poskytovateľa.",
+ "modelScopeClear": "Vymazať rozsah",
+ "modelScopeBadgeOne": "obmedzený · 1 model",
+ "modelScopeBadgeOther": "obmedzený · {count} modelov"
},
"status": {
"healthy": "zdravé",
diff --git a/client/src/i18n/locales/sr.json b/client/src/i18n/locales/sr.json
index 799ac7c2..a226f382 100644
--- a/client/src/i18n/locales/sr.json
+++ b/client/src/i18n/locales/sr.json
@@ -483,7 +483,14 @@
"createUrlToken": "Направи токен",
"urlTokenOnce": "Копирајте овај токен одмах. Неће бити поново приказан.",
"revoked": "Опозван",
- "revoke": "Опозови"
+ "revoke": "Опозови",
+ "modelScope": "Опсег модела",
+ "modelScopeDesc": "Ограничите овај кључ на одређене ID-еве модела. За сваки други модел рутер прескаче овај кључ.",
+ "modelScopeAdd": "Унесите ID модела и притисните Enter",
+ "modelScopeEmpty": "Опсег није постављен — овај кључ служи све моделе свог провајдера.",
+ "modelScopeClear": "Очисти опсег",
+ "modelScopeBadgeOne": "ограничен · 1 модел",
+ "modelScopeBadgeOther": "ограничен · {count} модела"
},
"status": {
"healthy": "здраво",
diff --git a/client/src/i18n/locales/sv.json b/client/src/i18n/locales/sv.json
index f015de58..51b2293b 100644
--- a/client/src/i18n/locales/sv.json
+++ b/client/src/i18n/locales/sv.json
@@ -483,7 +483,14 @@
"createUrlToken": "Skapa token",
"urlTokenOnce": "Kopiera denna token nu. Den visas inte igen.",
"revoked": "Återkallad",
- "revoke": "Återkalla"
+ "revoke": "Återkalla",
+ "modelScope": "Modellomfång",
+ "modelScopeDesc": "Begränsa den här nyckeln till specifika modell-ID:n. För alla andra modeller hoppar routern över nyckeln.",
+ "modelScopeAdd": "Ange ett modell-ID och tryck på Enter",
+ "modelScopeEmpty": "Inget omfång angivet — nyckeln betjänar alla modeller hos sin leverantör.",
+ "modelScopeClear": "Rensa omfång",
+ "modelScopeBadgeOne": "begränsad · 1 modell",
+ "modelScopeBadgeOther": "begränsad · {count} modeller"
},
"status": {
"healthy": "Hälsosamt",
diff --git a/client/src/i18n/locales/sw.json b/client/src/i18n/locales/sw.json
index ca2d1f33..5206d589 100644
--- a/client/src/i18n/locales/sw.json
+++ b/client/src/i18n/locales/sw.json
@@ -483,7 +483,14 @@
"createUrlToken": "Unda tokeni",
"urlTokenOnce": "Nakili tokeni hii sasa. Haitaonyeshwa tena.",
"revoked": "Imebatilishwa",
- "revoke": "Batilisha"
+ "revoke": "Batilisha",
+ "modelScope": "Wigo wa modeli",
+ "modelScopeDesc": "Wekea ufunguo huu kikomo cha ID mahususi za modeli. Kipanga njia kinaruka ufunguo huu kwa modeli nyingine yoyote.",
+ "modelScopeAdd": "Andika ID ya modeli kisha ubonyeze Enter",
+ "modelScopeEmpty": "Hakuna wigo uliowekwa — ufunguo huu unahudumia modeli zote za mtoa huduma wake.",
+ "modelScopeClear": "Futa wigo",
+ "modelScopeBadgeOne": "imezuiliwa · modeli 1",
+ "modelScopeBadgeOther": "imezuiliwa · modeli {count}"
},
"status": {
"healthy": "afya",
diff --git a/client/src/i18n/locales/ta.json b/client/src/i18n/locales/ta.json
index 4c539338..5cfea5b0 100644
--- a/client/src/i18n/locales/ta.json
+++ b/client/src/i18n/locales/ta.json
@@ -483,7 +483,14 @@
"createUrlToken": "டோக்கனை உருவாக்கு",
"urlTokenOnce": "இந்த டோக்கனை இப்போதே நகலெடுக்கவும். இது மீண்டும் காட்டப்படாது.",
"revoked": "ரத்து செய்யப்பட்டது",
- "revoke": "ரத்து செய்"
+ "revoke": "ரத்து செய்",
+ "modelScope": "மாடல் வரம்பு",
+ "modelScopeDesc": "இந்த சாவியை குறிப்பிட்ட மாடல் ID-களுக்கு மட்டுப்படுத்துங்கள். வேறு எந்த மாடலுக்கும் ரூட்டர் இந்த சாவியைத் தவிர்க்கும்.",
+ "modelScopeAdd": "மாடல் ID-ஐ உள்ளிட்டு Enter அழுத்தவும்",
+ "modelScopeEmpty": "வரம்பு அமைக்கப்படவில்லை — இந்த சாவி அதன் வழங்குநரின் அனைத்து மாடல்களுக்கும் செயல்படும்.",
+ "modelScopeClear": "வரம்பை நீக்கு",
+ "modelScopeBadgeOne": "வரம்பிடப்பட்டது · 1 மாடல்",
+ "modelScopeBadgeOther": "வரம்பிடப்பட்டது · {count} மாடல்கள்"
},
"status": {
"healthy": "ஆரோக்கியமான",
diff --git a/client/src/i18n/locales/te.json b/client/src/i18n/locales/te.json
index 22985fc3..8294b7b8 100644
--- a/client/src/i18n/locales/te.json
+++ b/client/src/i18n/locales/te.json
@@ -483,7 +483,14 @@
"createUrlToken": "టోకెన్ సృష్టించండి",
"urlTokenOnce": "ఈ టోకెన్‌ను ఇప్పుడే కాపీ చేయండి. ఇది మళ్లీ చూపబడదు.",
"revoked": "రద్దు చేయబడింది",
- "revoke": "రద్దు చేయండి"
+ "revoke": "రద్దు చేయండి",
+ "modelScope": "మోడల్ పరిధి",
+ "modelScopeDesc": "ఈ కీని నిర్దిష్ట మోడల్ IDలకు పరిమితం చేయండి. ఇతర మోడళ్లకు రూటర్ ఈ కీని దాటవేస్తుంది.",
+ "modelScopeAdd": "మోడల్ ID టైప్ చేసి Enter నొక్కండి",
+ "modelScopeEmpty": "పరిధి సెట్ కాలేదు — ఈ కీ దాని ప్రొవైడర్ యొక్క అన్ని మోడళ్లకు పనిచేస్తుంది.",
+ "modelScopeClear": "పరిధిని తొలగించండి",
+ "modelScopeBadgeOne": "పరిమితం · 1 మోడల్",
+ "modelScopeBadgeOther": "పరిమితం · {count} మోడళ్లు"
},
"status": {
"healthy": "ఆరోగ్యకరమైన",
diff --git a/client/src/i18n/locales/th.json b/client/src/i18n/locales/th.json
index 4a56702f..84212b74 100644
--- a/client/src/i18n/locales/th.json
+++ b/client/src/i18n/locales/th.json
@@ -483,7 +483,14 @@
"createUrlToken": "สร้างโทเค็น",
"urlTokenOnce": "คัดลอกโทเค็นนี้ตอนนี้ จะไม่แสดงอีก",
"revoked": "เพิกถอนแล้ว",
- "revoke": "เพิกถอน"
+ "revoke": "เพิกถอน",
+ "modelScope": "ขอบเขตโมเดล",
+ "modelScopeDesc": "จำกัดคีย์นี้ให้ใช้ได้เฉพาะบาง ID โมเดล เราเตอร์จะข้ามคีย์นี้สำหรับโมเดลอื่น",
+ "modelScopeAdd": "พิมพ์ ID โมเดลแล้วกด Enter",
+ "modelScopeEmpty": "ยังไม่ได้ตั้งขอบเขต — คีย์นี้ใช้ได้กับทุกโมเดลของผู้ให้บริการ",
+ "modelScopeClear": "ล้างขอบเขต",
+ "modelScopeBadgeOne": "จำกัด · 1 โมเดล",
+ "modelScopeBadgeOther": "จำกัด · {count} โมเดล"
},
"status": {
"healthy": "มีสุขภาพดี",
diff --git a/client/src/i18n/locales/tl.json b/client/src/i18n/locales/tl.json
index b45abe6d..e70f8a47 100644
--- a/client/src/i18n/locales/tl.json
+++ b/client/src/i18n/locales/tl.json
@@ -483,7 +483,14 @@
"createUrlToken": "Gumawa ng token",
"urlTokenOnce": "Kopyahin ang token na ito ngayon. Hindi na ito ipapakita muli.",
"revoked": "Na-revoke",
- "revoke": "I-revoke"
+ "revoke": "I-revoke",
+ "modelScope": "Saklaw ng modelo",
+ "modelScopeDesc": "Limitahan ang key na ito sa mga partikular na model ID. Nilalaktawan ng router ang key na ito para sa ibang modelo.",
+ "modelScopeAdd": "Maglagay ng model ID at pindutin ang Enter",
+ "modelScopeEmpty": "Walang nakatakdang saklaw — ginagamit ang key na ito para sa lahat ng modelo ng provider nito.",
+ "modelScopeClear": "Burahin ang saklaw",
+ "modelScopeBadgeOne": "limitado · 1 modelo",
+ "modelScopeBadgeOther": "limitado · {count} na modelo"
},
"status": {
"healthy": "malusog",
diff --git a/client/src/i18n/locales/tr.json b/client/src/i18n/locales/tr.json
index 5965e4a3..fe86a6a7 100644
--- a/client/src/i18n/locales/tr.json
+++ b/client/src/i18n/locales/tr.json
@@ -483,7 +483,14 @@
"createUrlToken": "Belirteç oluştur",
"urlTokenOnce": "Bu belirteci şimdi kopyalayın. Bir daha gösterilmeyecek.",
"revoked": "İptal edildi",
- "revoke": "İptal et"
+ "revoke": "İptal et",
+ "modelScope": "Model kapsamı",
+ "modelScopeDesc": "Bu anahtarı belirli model kimlikleriyle sınırlandırın. Yönlendirici diğer tüm modeller için bu anahtarı atlar.",
+ "modelScopeAdd": "Bir model kimliği yazıp Enter'a basın",
+ "modelScopeEmpty": "Kapsam ayarlanmadı — bu anahtar sağlayıcısının tüm modellerine hizmet eder.",
+ "modelScopeClear": "Kapsamı temizle",
+ "modelScopeBadgeOne": "sınırlı · 1 model",
+ "modelScopeBadgeOther": "sınırlı · {count} model"
},
"status": {
"healthy": "sağlıklı",
diff --git a/client/src/i18n/locales/uk.json b/client/src/i18n/locales/uk.json
index d5d7b13b..b039d4b2 100644
--- a/client/src/i18n/locales/uk.json
+++ b/client/src/i18n/locales/uk.json
@@ -483,7 +483,14 @@
"createUrlToken": "Створити токен",
"urlTokenOnce": "Скопіюйте цей токен зараз. Він більше не буде показаний.",
"revoked": "Відкликано",
- "revoke": "Відкликати"
+ "revoke": "Відкликати",
+ "modelScope": "Область моделей",
+ "modelScopeDesc": "Обмежте цей ключ певними ID моделей. Для будь-якої іншої моделі маршрутизатор пропускає цей ключ.",
+ "modelScopeAdd": "Введіть ID моделі та натисніть Enter",
+ "modelScopeEmpty": "Область не задана — ключ обслуговує всі моделі свого провайдера.",
+ "modelScopeClear": "Очистити область",
+ "modelScopeBadgeOne": "обмежено · 1 модель",
+ "modelScopeBadgeOther": "обмежено · {count} моделей"
},
"status": {
"healthy": "здоровий",
diff --git a/client/src/i18n/locales/ur.json b/client/src/i18n/locales/ur.json
index 6184b94c..a9d3bc29 100644
--- a/client/src/i18n/locales/ur.json
+++ b/client/src/i18n/locales/ur.json
@@ -483,7 +483,14 @@
"createUrlToken": "ٹوکن بنائیں",
"urlTokenOnce": "یہ ٹوکن ابھی کاپی کریں۔ یہ دوبارہ نہیں دکھایا جائے گا۔",
"revoked": "منسوخ شدہ",
- "revoke": "منسوخ کریں"
+ "revoke": "منسوخ کریں",
+ "modelScope": "ماڈل دائرہ",
+ "modelScopeDesc": "اس کلید کو مخصوص ماڈل ID تک محدود کریں۔ کسی بھی دوسرے ماڈل کے لیے راؤٹر اس کلید کو چھوڑ دیتا ہے۔",
+ "modelScopeAdd": "ماڈل ID لکھیں اور Enter دبائیں",
+ "modelScopeEmpty": "کوئی دائرہ مقرر نہیں — یہ کلید اپنے فراہم کنندہ کے تمام ماڈلز کے لیے کام کرتی ہے۔",
+ "modelScopeClear": "دائرہ صاف کریں",
+ "modelScopeBadgeOne": "محدود · 1 ماڈل",
+ "modelScopeBadgeOther": "محدود · {count} ماڈلز"
},
"status": {
"healthy": "صحت مند",
diff --git a/client/src/i18n/locales/uz.json b/client/src/i18n/locales/uz.json
index 9441be16..781de425 100644
--- a/client/src/i18n/locales/uz.json
+++ b/client/src/i18n/locales/uz.json
@@ -483,7 +483,14 @@
"createUrlToken": "Token yaratish",
"urlTokenOnce": "Bu tokenni hozir nusxalang. U boshqa ko'rsatilmaydi.",
"revoked": "Bekor qilingan",
- "revoke": "Bekor qilish"
+ "revoke": "Bekor qilish",
+ "modelScope": "Model doirasi",
+ "modelScopeDesc": "Bu kalitni muayyan model ID lari bilan cheklang. Boshqa har qanday model uchun router bu kalitni o‘tkazib yuboradi.",
+ "modelScopeAdd": "Model ID sini kiriting va Enter bosing",
+ "modelScopeEmpty": "Doira belgilanmagan — bu kalit o‘z provayderining barcha modellariga xizmat qiladi.",
+ "modelScopeClear": "Doirani tozalash",
+ "modelScopeBadgeOne": "cheklangan · 1 model",
+ "modelScopeBadgeOther": "cheklangan · {count} model"
},
"status": {
"healthy": "sog'lom",
diff --git a/client/src/i18n/locales/vi.json b/client/src/i18n/locales/vi.json
index b1fef005..a22e6f37 100644
--- a/client/src/i18n/locales/vi.json
+++ b/client/src/i18n/locales/vi.json
@@ -483,7 +483,14 @@
"createUrlToken": "Tạo mã thông báo",
"urlTokenOnce": "Sao chép mã thông báo này ngay bây giờ. Nó sẽ không được hiển thị lại.",
"revoked": "Đã thu hồi",
- "revoke": "Thu hồi"
+ "revoke": "Thu hồi",
+ "modelScope": "Phạm vi mô hình",
+ "modelScopeDesc": "Giới hạn khóa này cho các ID mô hình cụ thể. Bộ định tuyến bỏ qua khóa này với mọi mô hình khác.",
+ "modelScopeAdd": "Nhập ID mô hình rồi nhấn Enter",
+ "modelScopeEmpty": "Chưa đặt phạm vi — khóa này phục vụ mọi mô hình của nhà cung cấp.",
+ "modelScopeClear": "Xóa phạm vi",
+ "modelScopeBadgeOne": "giới hạn · 1 mô hình",
+ "modelScopeBadgeOther": "giới hạn · {count} mô hình"
},
"status": {
"healthy": "khỏe mạnh",
diff --git a/client/src/i18n/locales/yo.json b/client/src/i18n/locales/yo.json
index 7676331b..b79c0070 100644
--- a/client/src/i18n/locales/yo.json
+++ b/client/src/i18n/locales/yo.json
@@ -483,7 +483,14 @@
"createUrlToken": "Ṣẹda tokini",
"urlTokenOnce": "Daakọ tokini yii ni bayi. Kii yoo han lẹẹkansi.",
"revoked": "Ti fagile",
- "revoke": "Fagile"
+ "revoke": "Fagile",
+ "modelScope": "Àgbègbè àwọn awoṣe",
+ "modelScopeDesc": "Fi bọtìnì yìí mọ àwọn ID awoṣe kan pàtó. Router máa fo bọtìnì yìí fún awoṣe mìíràn.",
+ "modelScopeAdd": "Tẹ ID awoṣe kí o sì tẹ Enter",
+ "modelScopeEmpty": "Kò sí àgbègbè tí a ṣètò — bọtìnì yìí ń ṣiṣẹ́ fún gbogbo awoṣe olùpèsè rẹ̀.",
+ "modelScopeClear": "Pa àgbègbè rẹ́",
+ "modelScopeBadgeOne": "ní ààlà · awoṣe 1",
+ "modelScopeBadgeOther": "ní ààlà · awoṣe {count}"
},
"status": {
"healthy": "ni ilera",
diff --git a/client/src/i18n/locales/zh-CN.json b/client/src/i18n/locales/zh-CN.json
index 5557e77b..a94ba031 100644
--- a/client/src/i18n/locales/zh-CN.json
+++ b/client/src/i18n/locales/zh-CN.json
@@ -483,7 +483,14 @@
"createUrlToken": "创建令牌",
"urlTokenOnce": "请立即复制此令牌,它不会再次显示。",
"revoked": "已撤销",
- "revoke": "撤销"
+ "revoke": "撤销",
+ "modelScope": "模型范围",
+ "modelScopeDesc": "将此密钥限制为特定的模型 ID。路由器会为其他模型跳过此密钥。",
+ "modelScopeAdd": "输入模型 ID 并按回车添加",
+ "modelScopeEmpty": "未设置范围——此密钥可服务该提供商的所有模型。",
+ "modelScopeClear": "清除范围",
+ "modelScopeBadgeOne": "限定 · 1 个模型",
+ "modelScopeBadgeOther": "限定 · {count} 个模型"
},
"status": {
"healthy": "健康",
diff --git a/client/src/i18n/locales/zh-TW.json b/client/src/i18n/locales/zh-TW.json
index 80c52580..7687dea0 100644
--- a/client/src/i18n/locales/zh-TW.json
+++ b/client/src/i18n/locales/zh-TW.json
@@ -483,7 +483,14 @@
"createUrlToken": "建立 Token",
"urlTokenOnce": "請立即複製此 Token,它不會再次顯示。",
"revoked": "已撤銷",
- "revoke": "撤銷"
+ "revoke": "撤銷",
+ "modelScope": "模型範圍",
+ "modelScopeDesc": "將此金鑰限制為特定的模型 ID。路由器會為其他模型略過此金鑰。",
+ "modelScopeAdd": "輸入模型 ID 並按 Enter 新增",
+ "modelScopeEmpty": "未設定範圍——此金鑰可服務該供應商的所有模型。",
+ "modelScopeClear": "清除範圍",
+ "modelScopeBadgeOne": "限定 · 1 個模型",
+ "modelScopeBadgeOther": "限定 · {count} 個模型"
},
"status": {
"healthy": "健康",
diff --git a/server/src/__tests__/db/migrate/roundtrip.test.ts b/server/src/__tests__/db/migrate/roundtrip.test.ts
index 7445a1ef..2848d8b5 100644
--- a/server/src/__tests__/db/migrate/roundtrip.test.ts
+++ b/server/src/__tests__/db/migrate/roundtrip.test.ts
@@ -23,6 +23,7 @@ const AGENT_COMPATIBILITY_FILENAME = '20260727_000001_agent_compatibility.ts';
const TOMBSTONE_PROVENANCE_FILENAME = '20260728_000001_tombstone_provenance.ts';
const CUSTOM_MODEL_ENDPOINT_IDENTITY_FILENAME = '20260729_000001_custom_model_endpoint_identity.ts';
const CUSTOM_ENDPOINT_HOST_LABELS_FILENAME = '20260802_000001_custom_endpoint_host_labels.ts';
+const KEY_MODEL_SCOPE_FILENAME = '20260805_000001_key_model_scope.ts';
interface SchemaRow {
type: string;
@@ -92,6 +93,7 @@ describe('migration round trip', () => {
TOMBSTONE_PROVENANCE_FILENAME,
CUSTOM_MODEL_ENDPOINT_IDENTITY_FILENAME,
CUSTOM_ENDPOINT_HOST_LABELS_FILENAME,
+ KEY_MODEL_SCOPE_FILENAME,
]);
} finally {
db.close();
diff --git a/server/src/__tests__/routes/keys-model-scope.test.ts b/server/src/__tests__/routes/keys-model-scope.test.ts
new file mode 100644
index 00000000..ae2f22ea
--- /dev/null
+++ b/server/src/__tests__/routes/keys-model-scope.test.ts
@@ -0,0 +1,118 @@
+import { describe, it, expect, beforeAll, beforeEach } from 'vitest';
+import type { Express } from 'express';
+import { createApp } from '../../app.js';
+import { initDb, getDb } from '../../db/index.js';
+import { encrypt } from '../../lib/crypto.js';
+import { mintDashboardToken, isGatedApiPath } from '../helpers/auth.js';
+
+let dashToken = '';
+
+async function request(app: Express, method: string, path: string, body?: any) {
+ const server = app.listen(0);
+ const addr = server.address() as any;
+ const url = `http://127.0.0.1:${addr.port}${path}`;
+
+ const res = await fetch(url, {
+ method,
+ headers: {
+ ...(body ? { 'Content-Type': 'application/json' } : {}),
+ ...(isGatedApiPath(path) ? { Authorization: `Bearer ${dashToken}` } : {}),
+ },
+ body: body ? JSON.stringify(body) : undefined,
+ });
+
+ const data = await res.json().catch(() => null);
+ server.close();
+ return { status: res.status, body: data };
+}
+
+// PATCH /api/keys/:id modelScope handling (#657).
+describe('Keys API — model scope', () => {
+ let app: Express;
+
+ beforeAll(() => {
+ process.env.ENCRYPTION_KEY = '0'.repeat(64);
+ initDb(':memory:');
+ app = createApp();
+ dashToken = mintDashboardToken();
+ });
+
+ beforeEach(() => {
+ getDb().prepare('DELETE FROM api_keys').run();
+ });
+
+ function insertKey(): number {
+ const { encrypted, iv, authTag } = encrypt('sk-test');
+ const result = getDb().prepare(`
+ INSERT INTO api_keys (platform, label, encrypted_key, iv, auth_tag, status, enabled)
+ VALUES ('groq', 'test', ?, ?, ?, 'healthy', 1)
+ `).run(encrypted, iv, authTag);
+ return Number(result.lastInsertRowid);
+ }
+
+ it('sets a scope and surfaces it on the key list', async () => {
+ const id = insertKey();
+ const patch = await request(app, 'PATCH', `/api/keys/${id}`, { modelScope: ['llama-3.3-70b', 'qwen-2.5'] });
+ expect(patch.status).toBe(200);
+ expect(patch.body.modelScope).toEqual(['llama-3.3-70b', 'qwen-2.5']);
+
+ const list = await request(app, 'GET', '/api/keys');
+ expect(list.status).toBe(200);
+ expect(list.body.find((k: any) => k.id === id).modelScope).toEqual(['llama-3.3-70b', 'qwen-2.5']);
+ });
+
+ it('dedupes repeated ids', async () => {
+ const id = insertKey();
+ const patch = await request(app, 'PATCH', `/api/keys/${id}`, { modelScope: ['m1', 'm1', 'm2'] });
+ expect(patch.status).toBe(200);
+ expect(patch.body.modelScope).toEqual(['m1', 'm2']);
+ });
+
+ it('null clears the scope', async () => {
+ const id = insertKey();
+ await request(app, 'PATCH', `/api/keys/${id}`, { modelScope: ['m1'] });
+ const patch = await request(app, 'PATCH', `/api/keys/${id}`, { modelScope: null });
+ expect(patch.status).toBe(200);
+ expect(patch.body.modelScope).toBeNull();
+
+ const row = getDb().prepare('SELECT model_scope_json FROM api_keys WHERE id = ?').get(id) as any;
+ expect(row.model_scope_json).toBeNull();
+
+ const list = await request(app, 'GET', '/api/keys');
+ expect(list.body.find((k: any) => k.id === id).modelScope).toBeNull();
+ });
+
+ it('an empty array clears the scope too', async () => {
+ const id = insertKey();
+ await request(app, 'PATCH', `/api/keys/${id}`, { modelScope: ['m1'] });
+ const patch = await request(app, 'PATCH', `/api/keys/${id}`, { modelScope: [] });
+ expect(patch.status).toBe(200);
+ expect(patch.body.modelScope).toBeNull();
+ const row = getDb().prepare('SELECT model_scope_json FROM api_keys WHERE id = ?').get(id) as any;
+ expect(row.model_scope_json).toBeNull();
+ });
+
+ it('leaves the scope alone when only other fields are patched', async () => {
+ const id = insertKey();
+ await request(app, 'PATCH', `/api/keys/${id}`, { modelScope: ['m1'] });
+ await request(app, 'PATCH', `/api/keys/${id}`, { label: 'renamed' });
+ const list = await request(app, 'GET', '/api/keys');
+ expect(list.body.find((k: any) => k.id === id).modelScope).toEqual(['m1']);
+ });
+
+ it('rejects malformed payloads', async () => {
+ const id = insertKey();
+ for (const modelScope of ['not-an-array', [''], [42], [{ id: 'x' }], ['x'.repeat(201)], Array.from({ length: 101 }, (_, i) => `m${i}`)]) {
+ const patch = await request(app, 'PATCH', `/api/keys/${id}`, { modelScope });
+ expect(patch.status, JSON.stringify(modelScope).slice(0, 60)).toBe(400);
+ }
+ // A body naming none of the updatable fields is still rejected.
+ const empty = await request(app, 'PATCH', `/api/keys/${id}`, {});
+ expect(empty.status).toBe(400);
+ });
+
+ it('404s on a missing key', async () => {
+ const patch = await request(app, 'PATCH', '/api/keys/999999', { modelScope: ['m1'] });
+ expect(patch.status).toBe(404);
+ });
+});
diff --git a/server/src/__tests__/services/router-model-scope.test.ts b/server/src/__tests__/services/router-model-scope.test.ts
new file mode 100644
index 00000000..200cea35
--- /dev/null
+++ b/server/src/__tests__/services/router-model-scope.test.ts
@@ -0,0 +1,106 @@
+import { describe, it, expect, beforeAll, beforeEach } from 'vitest';
+import { initDb, getDb } from '../../db/index.js';
+import { encrypt } from '../../lib/crypto.js';
+import { routeRequest, hasOtherUsableKey, setRoutingStrategy } from '../../services/router.js';
+
+// Per-key model scopes (#657): a key whose model_scope_json is set must only
+// ever serve the models it lists, and must not count as a usable sibling for
+// models outside it. NULL scope is today's behavior, verbatim.
+describe('Router model scope (#657)', () => {
+ beforeAll(() => {
+ process.env.ENCRYPTION_KEY = '0'.repeat(64);
+ initDb(':memory:');
+ });
+
+ beforeEach(() => {
+ const db = getDb();
+ // Deterministic manual order, same pinning the base router tests use.
+ setRoutingStrategy('priority');
+ db.prepare('DELETE FROM api_keys').run();
+ db.prepare("DELETE FROM settings WHERE key = 'active_profile_id'").run();
+ const models = db.prepare('SELECT id FROM models ORDER BY intelligence_rank ASC').all() as any[];
+ const update = db.prepare('UPDATE fallback_config SET priority = ? WHERE model_db_id = ?');
+ for (let i = 0; i < models.length; i++) {
+ update.run(i + 1, models[i].id);
+ }
+ });
+
+ function insertKey(platform: string, secret: string, scope: string[] | string | null): number {
+ const db = getDb();
+ const { encrypted, iv, authTag } = encrypt(secret);
+ const scopeJson = scope == null ? null : typeof scope === 'string' ? scope : JSON.stringify(scope);
+ const result = db.prepare(`
+ INSERT INTO api_keys (platform, label, encrypted_key, iv, auth_tag, status, enabled, model_scope_json)
+ VALUES (?, ?, ?, ?, ?, 'healthy', 1, ?)
+ `).run(platform, 'test', encrypted, iv, authTag, scopeJson);
+ return Number(result.lastInsertRowid);
+ }
+
+ function googleModels(): { id: number; model_id: string }[] {
+ return getDb().prepare(
+ 'SELECT id, model_id FROM models WHERE platform = ? AND enabled = 1 ORDER BY intelligence_rank ASC',
+ ).all('google') as { id: number; model_id: string }[];
+ }
+
+ it('a NULL scope serves every model of the platform (regression)', () => {
+ insertKey('google', 'unscoped-key', null);
+ const result = routeRequest();
+ expect(result.platform).toBe('google');
+ expect(result.apiKey).toBe('unscoped-key');
+ expect(result.modelId).toBe(googleModels()[0]!.model_id);
+ });
+
+ it('excludes a model whose only key is scoped to other models', () => {
+ insertKey('google', 'scoped-away', ['some-model-this-platform-does-not-have']);
+ insertKey('groq', 'groq-key', null);
+ // Google outranks Groq in the manual order, but its only key cannot serve
+ // any Google model — the router must fall through instead of burning an
+ // attempt on a guaranteed 403.
+ const result = routeRequest();
+ expect(result.platform).toBe('groq');
+ });
+
+ it('routes a scoped key only to the model in its scope', () => {
+ const [top, second] = googleModels();
+ expect(second).toBeDefined();
+ insertKey('google', 'scoped-key', [second!.model_id]);
+ const result = routeRequest();
+ expect(result.platform).toBe('google');
+ expect(result.modelId).toBe(second!.model_id);
+ expect(result.modelId).not.toBe(top!.model_id);
+ });
+
+ it('treats an empty or corrupt stored scope as unscoped', () => {
+ insertKey('google', 'empty-scope', '[]');
+ expect(routeRequest().modelId).toBe(googleModels()[0]!.model_id);
+
+ getDb().prepare('DELETE FROM api_keys').run();
+ insertKey('google', 'corrupt-scope', 'not json');
+ expect(routeRequest().modelId).toBe(googleModels()[0]!.model_id);
+ });
+
+ describe('hasOtherUsableKey', () => {
+ it('does not count a sibling scoped away from the model', () => {
+ const top = googleModels()[0]!;
+ const failedKeyId = insertKey('google', 'failed-key', null);
+ insertKey('google', 'scoped-sibling', ['some-other-model']);
+ // The only sibling can never serve this model, so the model IS exhausted
+ // and the model-level penalty must not be suppressed (#454 gate).
+ expect(hasOtherUsableKey(top.id, failedKeyId)).toBe(false);
+ });
+
+ it('counts a sibling whose scope includes the model', () => {
+ const top = googleModels()[0]!;
+ const failedKeyId = insertKey('google', 'failed-key', null);
+ insertKey('google', 'in-scope-sibling', [top.model_id]);
+ expect(hasOtherUsableKey(top.id, failedKeyId)).toBe(true);
+ });
+
+ it('counts an unscoped sibling (regression)', () => {
+ const top = googleModels()[0]!;
+ const failedKeyId = insertKey('google', 'failed-key', null);
+ insertKey('google', 'unscoped-sibling', null);
+ expect(hasOtherUsableKey(top.id, failedKeyId)).toBe(true);
+ });
+ });
+});
diff --git a/server/src/db/migrate/defaults.ts b/server/src/db/migrate/defaults.ts
index 6d7ec146..8d5ccfcc 100644
--- a/server/src/db/migrate/defaults.ts
+++ b/server/src/db/migrate/defaults.ts
@@ -18,6 +18,7 @@ import * as agentCompatibility from '../migrations/20260727_000001_agent_compati
import * as tombstoneProvenance from '../migrations/20260728_000001_tombstone_provenance.js';
import * as customModelEndpointIdentity from '../migrations/20260729_000001_custom_model_endpoint_identity.js';
import * as customEndpointHostLabels from '../migrations/20260802_000001_custom_endpoint_host_labels.js';
+import * as keyModelScope from '../migrations/20260805_000001_key_model_scope.js';
export interface MigrationModule {
up(db: Db): void;
@@ -48,6 +49,7 @@ export const AGENT_COMPATIBILITY_FILENAME = '20260727_000001_agent_compatibility
export const TOMBSTONE_PROVENANCE_FILENAME = '20260728_000001_tombstone_provenance.ts';
export const CUSTOM_MODEL_ENDPOINT_IDENTITY_FILENAME = '20260729_000001_custom_model_endpoint_identity.ts';
export const CUSTOM_ENDPOINT_HOST_LABELS_FILENAME = '20260802_000001_custom_endpoint_host_labels.ts';
+export const KEY_MODEL_SCOPE_FILENAME = '20260805_000001_key_model_scope.ts';
export const DEFAULT_MIGRATIONS: readonly DefaultMigration[] = [
{ filename: LEGACY_BASELINE_FILENAME, module: legacyBaseline },
@@ -69,4 +71,5 @@ export const DEFAULT_MIGRATIONS: readonly DefaultMigration[] = [
{ filename: TOMBSTONE_PROVENANCE_FILENAME, module: tombstoneProvenance },
{ filename: CUSTOM_MODEL_ENDPOINT_IDENTITY_FILENAME, module: customModelEndpointIdentity },
{ filename: CUSTOM_ENDPOINT_HOST_LABELS_FILENAME, module: customEndpointHostLabels },
+ { filename: KEY_MODEL_SCOPE_FILENAME, module: keyModelScope },
];
diff --git a/server/src/db/migrations/20260805_000001_key_model_scope.ts b/server/src/db/migrations/20260805_000001_key_model_scope.ts
new file mode 100644
index 00000000..b458b454
--- /dev/null
+++ b/server/src/db/migrations/20260805_000001_key_model_scope.ts
@@ -0,0 +1,20 @@
+import type { Db } from '../types.js';
+
+function hasColumn(db: Db, table: string, column: string): boolean {
+ const columns = db.prepare(`PRAGMA table_info(${table})`).all() as { name: string }[];
+ return columns.some((candidate) => candidate.name === column);
+}
+
+/** Optional per-key model scope (#657): a JSON array of model_id strings the
+ * key may serve. NULL = the key serves every model of its platform. */
+export function up(db: Db): void {
+ if (!hasColumn(db, 'api_keys', 'model_scope_json')) {
+ db.prepare('ALTER TABLE api_keys ADD COLUMN model_scope_json TEXT').run();
+ }
+}
+
+export function down(db: Db): void {
+ if (hasColumn(db, 'api_keys', 'model_scope_json')) {
+ db.prepare('ALTER TABLE api_keys DROP COLUMN model_scope_json').run();
+ }
+}
diff --git a/server/src/lib/model-scope.ts b/server/src/lib/model-scope.ts
new file mode 100644
index 00000000..d785321b
--- /dev/null
+++ b/server/src/lib/model-scope.ts
@@ -0,0 +1,27 @@
+// Per-key model scope (#657). api_keys.model_scope_json is an optional JSON
+// array of model_id strings: relay stations hand out keys that only serve one
+// model group, so a scoped key must never be picked — or counted as a usable
+// sibling — for a model outside its list. NULL means "unscoped": the key
+// serves every model of its platform, which is the pre-#657 behavior.
+
+/**
+ * Parse a stored scope into a Set for O(1) membership tests, or null when the
+ * key is unscoped. Called once per key ROW, never per comparison. An empty or
+ * corrupt value degrades to unscoped rather than silently benching the key.
+ */
+export function parseModelScope(json: string | null | undefined): Set<string> | null {
+ if (!json) return null;
+ try {
+ const raw = JSON.parse(json);
+ if (!Array.isArray(raw)) return null;
+ const ids = raw.filter((v): v is string => typeof v === 'string' && v.length > 0);
+ return ids.length > 0 ? new Set(ids) : null;
+ } catch {
+ return null;
+ }
+}
+
+/** Whether a key with this parsed scope may serve the model. */
+export function scopeAllows(scope: Set<string> | null, modelId: string): boolean {
+ return scope === null || scope.has(modelId);
+}
diff --git a/server/src/routes/keys.ts b/server/src/routes/keys.ts
index e2e4acc8..bc9887f9 100644
--- a/server/src/routes/keys.ts
+++ b/server/src/routes/keys.ts
@@ -17,6 +17,7 @@ import { discoverEndpointModels, probeEndpointModel, ModelDiscoveryError } from
import { probeEmbeddingDimensions, registerCustomEmbeddingModel } from '../services/embeddings.js';
import { endpointScopeForBaseUrl, normalizeBaseUrl } from '../lib/endpoint-scope.js';
import type { Db } from '../db/types.js';
+import { parseModelScope } from '../lib/model-scope.js';
export const keysRouter = Router();
@@ -54,11 +55,15 @@ const addKeySchema = z.object({
label: z.string().optional(),
});
+// `modelScope` (#657): the model_id list this key may serve — relay stations
+// scope each key to a model group. null (or an empty array) clears the scope,
+// returning the key to serving every model of its platform.
const updateKeySchema = z.object({
enabled: z.boolean().optional(),
label: z.string().optional(),
-}).refine(data => data.enabled !== undefined || data.label !== undefined, {
- message: 'At least one of enabled or label must be provided',
+ modelScope: z.array(z.string().trim().min(1).max(200)).max(100).nullable().optional(),
+}).refine(data => data.enabled !== undefined || data.label !== undefined || data.modelScope !== undefined, {
+ message: 'At least one of enabled, label or modelScope must be provided',
});
const importKeySchema = z.object({
@@ -290,6 +295,7 @@ keysRouter.get('/', (_req: Request, res: Response) => {
maskedKey = '[decrypt failed]';
}
const cooldowns = cooldownsByKeyId.get(Number(row.id)) ?? [];
+ const scope = parseModelScope(row.model_scope_json);
return {
id: row.id,
platform: row.platform,
@@ -304,6 +310,8 @@ keysRouter.get('/', (_req: Request, res: Response) => {
createdAt: row.created_at,
lastCheckedAt: row.last_checked_at,
lastHealthError: row.last_health_error ?? null,
+ // The model_id list this key is limited to; null = serves everything (#657).
+ modelScope: scope ? [...scope] : null,
models: row.platform === 'custom' ? (modelsByEndpoint.get(endpointOf(Number(row.id))) ?? []) : undefined,
cooldowns: cooldowns.map(c => ({
modelId: c.modelId,
@@ -1433,9 +1441,9 @@ keysRouter.patch('/:id', (req: Request, res: Response) => {
return;
}
- const { enabled, label } = parsed.data;
+ const { enabled, label, modelScope } = parsed.data;
const updates: string[] = [];
- const values: (string | number)[] = [];
+ const values: (string | number | null)[] = [];
if (enabled !== undefined) {
updates.push('enabled = ?');
@@ -1445,6 +1453,12 @@ keysRouter.patch('/:id', (req: Request, res: Response) => {
updates.push('label = ?');
values.push(label);
}
+ // Deduped; an empty result stores NULL, which the router reads as "unscoped".
+ const scopeIds = modelScope == null ? [] : [...new Set(modelScope)];
+ if (modelScope !== undefined) {
+ updates.push('model_scope_json = ?');
+ values.push(scopeIds.length > 0 ? JSON.stringify(scopeIds) : null);
+ }
values.push(id);
@@ -1459,5 +1473,6 @@ keysRouter.patch('/:id', (req: Request, res: Response) => {
const response: Record<string, unknown> = { success: true };
if (enabled !== undefined) response.enabled = enabled;
if (label !== undefined) response.label = label;
+ if (modelScope !== undefined) response.modelScope = scopeIds.length > 0 ? scopeIds : null;
res.json(response);
});
diff --git a/server/src/services/router.ts b/server/src/services/router.ts
index a6cea647..1302cf8b 100644
--- a/server/src/services/router.ts
+++ b/server/src/services/router.ts
@@ -27,6 +27,7 @@ import { isUnifyEnabled, getModelGroups, resolveRequestedIdForDispatch } from '.
import { getActiveProfileId } from './profile-models.js';
import { customEndpointKeyIds } from './custom-endpoint.js';
import { modelStatsKey, endpointScopeForBaseUrl } from '../lib/endpoint-scope.js';
+import { parseModelScope, scopeAllows } from '../lib/model-scope.js';
import type { BaseProvider } from '../providers/base.js';
import type { Platform } from '@freellmapi/shared/types.js';
import type { Db } from '../db/types.js';
@@ -117,6 +118,9 @@ interface KeyRow {
status: string;
enabled: number;
base_url: string | null;
+ // Optional JSON array of model_id strings this key may serve; NULL = every
+ // model of its platform (#657).
+ model_scope_json: string | null;
}
// Chain row joined with the model fields the bandit needs to score it.
@@ -1058,14 +1062,24 @@ function selectKeyForModel(entry: ChainRow, estimatedTokens: number, skipKeys?:
}
const provider = getProvider(entry.platform as Platform)!;
- const keys = db.prepare(
+ const allKeys = db.prepare(
"SELECT * FROM api_keys WHERE platform = ? AND enabled = 1 AND status IN ('healthy', 'unknown')"
).all(entry.platform) as KeyRow[];
- if (keys.length === 0) {
+ if (allKeys.length === 0) {
diag?.push(`${label}: no enabled+healthy key for platform`);
return null;
}
+ // Scoped keys (#657) are dropped before the walk: a key whose model scope
+ // excludes this model is not a candidate at all — it neither takes a
+ // round-robin slot nor burns an attempt on a guaranteed 403. Parsed once per
+ // key row.
+ const keys = allKeys.filter(k => scopeAllows(parseModelScope(k.model_scope_json), entry.model_id));
+ if (keys.length === 0) {
+ diag?.push(`${label}: no usable key — ${allKeys.length} key(s) scoped to other models`);
+ return null;
+ }
+
// Tally the gate that rejected each key, so the exhaustion diagnostic can say
// *why* a model with keys still couldn't serve (all on cooldown vs over quota).
const skipTally: Record<string, number> = {};
@@ -1192,8 +1206,8 @@ export function hasOtherUsableKey(modelDbId: number, excludingKeyId: number, ski
const limits = { rpm: m.rpm_limit, rpd: m.rpd_limit, tpm: m.tpm_limit, tpd: m.tpd_limit };
const keys = db.prepare(
- "SELECT id FROM api_keys WHERE platform = ? AND enabled = 1 AND status IN ('healthy', 'unknown')"
- ).all(m.platform) as { id: number }[];
+ "SELECT id, model_scope_json FROM api_keys WHERE platform = ? AND enabled = 1 AND status IN ('healthy', 'unknown')"
+ ).all(m.platform) as { id: number; model_scope_json: string | null }[];
// Keys of the model's own custom endpoint (#212, #619); a key belonging to a
// DIFFERENT endpoint cannot serve it, so it doesn't count as an alternative.
@@ -1204,6 +1218,9 @@ export function hasOtherUsableKey(modelDbId: number, excludingKeyId: number, ski
for (const k of keys) {
if (k.id === excludingKeyId) continue;
if (endpointKeyIds && !endpointKeyIds.has(k.id)) continue;
+ // A sibling scoped away from this model can never serve it (#657) — counting
+ // it would wrongly suppress the model-level penalty this gate exists for.
+ if (!scopeAllows(parseModelScope(k.model_scope_json), m.model_id)) continue;
if (skipKeys?.has(`${m.platform}:${m.model_id}:${k.id}`)) continue;
if (isOnCooldown(m.platform, m.model_id, k.id)) continue;
if (!canUseProvider(m.platform, k.id)) continue;
@@ -1356,12 +1373,15 @@ export function getOrderedFusionChain(estimatedTokens: number): FusionCandidate[
// misleading "no available key for model". Passing a placeholder token count
// here made both size gates no-ops.
const usableKeys = db.prepare(
- "SELECT id, platform FROM api_keys WHERE enabled = 1 AND status IN ('healthy', 'unknown')"
- ).all() as { id: number; platform: string }[];
- const keysByPlatform = new Map<string, number[]>();
+ "SELECT id, platform, model_scope_json FROM api_keys WHERE enabled = 1 AND status IN ('healthy', 'unknown')"
+ ).all() as { id: number; platform: string; model_scope_json: string | null }[];
+ // Scope parsed once per key row (#657); the servable filter below re-checks
+ // membership per model.
+ const keysByPlatform = new Map<string, { id: number; scope: Set<string> | null }[]>();
for (const k of usableKeys) {
+ const entry = { id: k.id, scope: parseModelScope(k.model_scope_json) };
const arr = keysByPlatform.get(k.platform);
- if (arr) arr.push(k.id); else keysByPlatform.set(k.platform, [k.id]);
+ if (arr) arr.push(entry); else keysByPlatform.set(k.platform, [entry]);
}
const servable = chain.filter(e => {
// A null context_window means "unknown", not "zero": same convention the
@@ -1374,7 +1394,8 @@ export function getOrderedFusionChain(estimatedTokens: number): FusionCandidate[
? customEndpointKeyIds(db, e.key_id)
: null;
const limits = { rpm: e.rpm_limit, rpd: e.rpd_limit, tpm: e.tpm_limit, tpd: e.tpd_limit };
- return keyIds.some(kid =>
+ return keyIds.some(({ id: kid, scope }) =>
+ scopeAllows(scope, e.model_id) &&
(endpointKeyIds == null || endpointKeyIds.has(kid)) &&
!isOnCooldown(e.platform, e.model_id, kid) &&
canUseProvider(e.platform, kid) &&
diff --git a/shared/types.ts b/shared/types.ts
index 4fa3a03a..1ee1f0dd 100644
--- a/shared/types.ts
+++ b/shared/types.ts
@@ -217,6 +217,9 @@ export interface ApiKey {
createdAt: string;
lastCheckedAt: string | null;
lastHealthError: string | null;
+ /** Model ids this key is limited to; null = serves every model of its
+ * platform (#657). */
+ modelScope?: string[] | null;
models?: ApiKeyModel[];
cooldowns?: ApiKeyCooldown[];
}