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(routing): Decision strategy, a decision model picks the preset per request (#1354) (#1577)

Tashfeen00228cedd5af
diff --git a/client/src/components/decision-models.test.tsx b/client/src/components/decision-models.test.tsx
index 2e688943..fac7211c 100644
--- a/client/src/components/decision-models.test.tsx
+++ b/client/src/components/decision-models.test.tsx
@@ -63,7 +63,7 @@ it('lists the decision models with usage and a no-key badge', async () => {
expect(text).toContain('inception/mercury-decide:free')
expect(text).toContain('4 this month')
expect(text).toContain('POST /v1/decisions')
- expect(text).toContain('Chat routing never uses these models')
+ expect(text).toContain('Chat routing only uses them when the Decision routing strategy is on')
expect(container.querySelectorAll('[role="switch"]')).toHaveLength(2)
})
diff --git a/client/src/components/decision-models.tsx b/client/src/components/decision-models.tsx
index 1b532acf..b12143b1 100644
--- a/client/src/components/decision-models.tsx
+++ b/client/src/components/decision-models.tsx
@@ -25,7 +25,8 @@ import {
const AUTO = 'auto'
// One model from the catalog's `decisionModels` section. Decision models are
-// not part of chat routing; the toggle only affects POST /v1/decisions.
+// not part of chat routing unless the Decision routing strategy is on (#1354);
+// the toggle affects POST /v1/decisions and that strategy alike.
function DecisionModelCard({
model: m,
onToggle,
diff --git a/client/src/components/decision-routing-popover.test.tsx b/client/src/components/decision-routing-popover.test.tsx
new file mode 100644
index 00000000..e7efc2c1
--- /dev/null
+++ b/client/src/components/decision-routing-popover.test.tsx
@@ -0,0 +1,149 @@
+// @vitest-environment jsdom
+// The 'decision' strategy's settings popover (#1354): pick the decision model
+// and the minimum confidence, see since-restart picks, warn when nothing can
+// decide. Nothing is saved until Apply.
+import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest'
+import { act } from 'react'
+import { createRoot, type Root } from 'react-dom/client'
+import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
+import { MemoryRouter, Route, Routes, useLocation } from 'react-router-dom'
+import { I18nProvider } from '@/i18n'
+import { apiFetch } from '@/lib/api'
+import type { DecisionRoutingStatus } from '@/lib/routing'
+import { DecisionRoutingPopover, DecisionSetupGuide } from './decision-routing-popover'
+
+vi.mock('@/lib/api', () => ({ apiFetch: vi.fn() }))
+
+const status = (over: Partial<DecisionRoutingStatus> = {}): DecisionRoutingStatus => ({
+ model: 'auto', minProbability: 0.5, ready: true, hasModels: true, keyPlatforms: ['cloudflare', 'openrouter'],
+ counts: { smartest: 3, fastest: 5, balanced: 2, reliable: 0 }, fallbacks: { low_confidence: 1 }, ...over,
+})
+
+let root: Root
+let container: HTMLDivElement
+let client: QueryClient
+
+beforeAll(() => { (globalThis as unknown as { IS_REACT_ACT_ENVIRONMENT: boolean }).IS_REACT_ACT_ENVIRONMENT = true })
+beforeEach(() => {
+ client = new QueryClient({ defaultOptions: { queries: { retry: false, gcTime: 0 } } })
+ container = document.createElement('div'); document.body.appendChild(container); root = createRoot(container)
+ vi.mocked(apiFetch).mockReset().mockImplementation(async (path: string) => {
+ if (path === '/api/decisions/models') {
+ return [
+ { id: 1, platform: 'cloudflare', modelId: '@cf/cloudflare/clef-flash', displayName: 'Clef Flash', priority: 0, enabled: true },
+ { id: 2, platform: 'openrouter', modelId: 'inception/mercury-decide:free', displayName: 'Mercury Decide (free)', priority: 1, enabled: false },
+ ]
+ }
+ return {}
+ })
+})
+afterEach(() => { act(() => root.unmount()); client.clear(); container.remove(); document.body.innerHTML = '' })
+
+async function flush() { for (let i = 0; i < 4; i++) await act(async () => { await new Promise(r => setTimeout(r, 0)) }) }
+// Shows where a navigation went, so a test can assert on the URL.
+function WhereAmI() {
+ const loc = useLocation()
+ return <div data-testid="where">{loc.pathname + loc.search}</div>
+}
+
+async function render(node: React.ReactNode) {
+ act(() => root.render(
+ <QueryClientProvider client={client}>
+ <I18nProvider initialLocale="en">
+ <MemoryRouter initialEntries={['/fallback']}>
+ <Routes>
+ <Route path="/fallback" element={node} />
+ <Route path="*" element={<WhereAmI />} />
+ </Routes>
+ </MemoryRouter>
+ </I18nProvider>
+ </QueryClientProvider>
+ ))
+ await flush()
+}
+
+async function click(label: string, root: ParentNode = document.body) {
+ const button = [...root.querySelectorAll('button')].find(b => b.textContent?.includes(label)) as HTMLButtonElement
+ expect(button, `button "${label}"`).toBeTruthy()
+ await act(async () => { button.click() })
+ await flush()
+}
+
+const where = () => document.body.querySelector('[data-testid="where"]')?.textContent
+
+async function open(s: DecisionRoutingStatus, onSave = vi.fn()) {
+ await render(<DecisionRoutingPopover status={s} saving={false} onSave={onSave} />)
+ const trigger = [...container.querySelectorAll('button')].find(b => b.textContent?.includes('Adjust')) as HTMLButtonElement
+ await act(async () => { trigger.click() })
+ await flush()
+ return onSave
+}
+
+const body = () => document.body.textContent ?? ''
+
+it('shows settings, enabled decision models and since-restart picks', async () => {
+ await open(status())
+ expect(body()).toContain('Decision routing')
+ const select = document.body.querySelector('select') as HTMLSelectElement
+ expect([...select.options].map(o => o.textContent)).toEqual(['Auto (first available)', 'Clef Flash'])
+ expect(body()).toContain('Picks since restart (10)')
+ expect(body()).toContain('1 routed as Balanced')
+ expect(body()).not.toContain('No decision model is ready')
+})
+
+it('warns when no decision model can answer, with a button to the missing key', async () => {
+ await open(status({ ready: false, counts: { smartest: 0, fastest: 0, balanced: 0, reliable: 0 }, fallbacks: {} }))
+ expect(body()).toContain('No decision model is ready')
+ expect(body()).not.toContain('Picks since restart')
+ await click('Add OpenRouter key')
+ expect(where()).toBe('/keys?add=openrouter')
+})
+
+it('saves the chosen model and minimum confidence only on Apply', async () => {
+ const onSave = await open(status())
+ const select = document.body.querySelector('select') as HTMLSelectElement
+ const slider = document.body.querySelector('input[type="range"]') as HTMLInputElement
+ await act(async () => {
+ const setValue = Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, 'value')!.set!
+ setValue.call(select, '@cf/cloudflare/clef-flash')
+ select.dispatchEvent(new Event('change', { bubbles: true }))
+ })
+ await act(async () => {
+ const setValue = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value')!.set!
+ setValue.call(slider, '70')
+ slider.dispatchEvent(new Event('input', { bubbles: true }))
+ })
+ expect(onSave).not.toHaveBeenCalled()
+ const apply = [...document.body.querySelectorAll('button')].find(b => b.textContent === 'Apply') as HTMLButtonElement
+ await act(async () => { apply.click() })
+ expect(onSave).toHaveBeenCalledWith({ decisionModel: '@cf/cloudflare/clef-flash', decisionMinProbability: 0.7 })
+})
+
+describe('Decision setup guide (pill without a usable key)', () => {
+ const notReady = status({ ready: false, counts: { smartest: 0, fastest: 0, balanced: 0, reliable: 0 }, fallbacks: {} })
+
+ it('opens a guide with one Add key button per provider instead of switching', async () => {
+ await render(<DecisionSetupGuide status={notReady} className="pill">Decision</DecisionSetupGuide>)
+ await click('Decision', container)
+ expect(body()).toContain('Add a free key to use Decision')
+ const adds = [...document.body.querySelectorAll('button')].map(b => b.textContent).filter(t => t?.startsWith('Add '))
+ expect(adds).toEqual(['Add Cloudflare Workers AI key', 'Add OpenRouter key'])
+ // The guide never changes the routing strategy itself.
+ expect(vi.mocked(apiFetch).mock.calls.some(([path]) => path === '/api/fallback/routing')).toBe(false)
+ })
+
+ it('takes the user to Keys with the provider preselected', async () => {
+ await render(<DecisionSetupGuide status={notReady} className="pill">Decision</DecisionSetupGuide>)
+ await click('Decision', container)
+ await click('Add Cloudflare Workers AI key')
+ expect(where()).toBe('/keys?add=cloudflare')
+ })
+
+ it('points at Models → Decision when no decision model is turned on', async () => {
+ await render(<DecisionSetupGuide status={{ ...notReady, hasModels: false, keyPlatforms: [] }} className="pill">Decision</DecisionSetupGuide>)
+ await click('Decision', container)
+ expect(body()).toContain('No decision model is turned on yet')
+ await click('Open decision models')
+ expect(where()).toBe('/models/decision')
+ })
+})
diff --git a/client/src/components/decision-routing-popover.tsx b/client/src/components/decision-routing-popover.tsx
new file mode 100644
index 00000000..57a69b4a
--- /dev/null
+++ b/client/src/components/decision-routing-popover.tsx
@@ -0,0 +1,179 @@
+import { useState, type ReactNode } from 'react'
+import { useQuery } from '@tanstack/react-query'
+import { useNavigate } from 'react-router-dom'
+import { KeyRound, SlidersHorizontal } from 'lucide-react'
+import { useI18n } from '@/i18n'
+import { apiFetch } from '@/lib/api'
+import { Button } from '@/components/ui/button'
+import { Popover, PopoverTrigger, PopoverContent } from '@/components/ui/popover'
+import { PLATFORMS } from '@/components/keys/shared'
+import type { DecisionModel } from '@/lib/decision'
+import type { DecisionRoutingStatus } from '@/lib/routing'
+
+const AUTO = 'auto'
+// The presets a decision model picks between, in the order the pills show them.
+// `tKey` is the label suffix under `strategies.*`.
+const PICKS: { key: keyof DecisionRoutingStatus['counts']; tKey: string }[] = [
+ { key: 'smartest', tKey: 'smartest' },
+ { key: 'fastest', tKey: 'fastest' },
+ { key: 'balanced', tKey: 'balanced' },
+ { key: 'reliable', tKey: 'reliable' },
+]
+
+// Settings for the 'decision' strategy (#1354): which decision model picks the
+// preset for each request, and how sure it must be before its pick is used.
+// Below that, or when it is slow or unavailable, the request routes as
+// Balanced. Nothing is saved until Apply is pressed.
+export function DecisionRoutingPopover({ status, onSave, saving }: {
+ status: DecisionRoutingStatus
+ onSave: (settings: { decisionModel: string; decisionMinProbability: number }) => void
+ saving: boolean
+}) {
+ const { t } = useI18n()
+ const [model, setModel] = useState(status.model)
+ const [minPercent, setMinPercent] = useState(Math.round(status.minProbability * 100))
+ const [dirty, setDirty] = useState(false)
+
+ const { data: models = [] } = useQuery<DecisionModel[]>({
+ queryKey: ['decision-models'],
+ queryFn: () => apiFetch('/api/decisions/models'),
+ })
+ const choices = models.filter(m => m.enabled).sort((a, b) => a.priority - b.priority || a.id - b.id)
+ const total = PICKS.reduce((n, p) => n + (status.counts[p.key] ?? 0), 0)
+ const fallbacks = Object.values(status.fallbacks).reduce((n, v) => n + (v ?? 0), 0)
+
+ function apply() {
+ onSave({ decisionModel: model, decisionMinProbability: minPercent / 100 })
+ setDirty(false)
+ }
+
+ return (
+ <Popover onOpenChange={open => {
+ if (open) { setModel(status.model); setMinPercent(Math.round(status.minProbability * 100)); setDirty(false) }
+ }}>
+ <PopoverTrigger className="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors">
+ <SlidersHorizontal className="size-3.5" />
+ {t('strategies.adjust')}
+ </PopoverTrigger>
+ <PopoverContent align="start" className="w-80">
+ <div className="space-y-4">
+ <div>
+ <h3 className="text-sm font-medium">{t('strategies.decisionSettings')}</h3>
+ <p className="mt-0.5 text-xs text-muted-foreground">{t('strategies.decisionSettingsHelp')}</p>
+ </div>
+
+ {!status.ready && (
+ <div className="space-y-2">
+ <p className="text-xs text-amber-600 dark:text-amber-500">{t('strategies.decisionNotReady')}</p>
+ <DecisionSetupActions status={status} />
+ </div>
+ )}
+
+ <label className="block text-xs">
+ <span className="mb-1 block">{t('strategies.decisionModel')}</span>
+ <select
+ value={model}
+ onChange={e => { setModel(e.target.value); setDirty(true) }}
+ className="w-full rounded-md border bg-background px-2 py-1.5 text-xs"
+ >
+ <option value={AUTO}>{t('strategies.decisionModelAuto')}</option>
+ {choices.map(m => (
+ <option key={m.id} value={m.modelId}>{m.displayName}</option>
+ ))}
+ {model !== AUTO && !choices.some(m => m.modelId === model) && <option value={model}>{model}</option>}
+ </select>
+ </label>
+
+ <div>
+ <div className="mb-1 flex items-baseline justify-between text-xs">
+ <span>{t('strategies.decisionMinConfidence')}</span>
+ <span className="tabular-nums text-muted-foreground">{minPercent}%</span>
+ </div>
+ <input
+ type="range"
+ min={0}
+ max={100}
+ step={5}
+ value={minPercent}
+ onChange={e => { setMinPercent(Number(e.target.value)); setDirty(true) }}
+ className="w-full cursor-pointer"
+ aria-label={t('strategies.decisionMinConfidence')}
+ />
+ <p className="mt-0.5 text-xs text-muted-foreground">{t('strategies.decisionMinConfidenceHelp')}</p>
+ </div>
+
+ {total > 0 && (
+ <div className="text-xs">
+ <p className="mb-1 text-muted-foreground">{t('strategies.decisionPicks', { total })}</p>
+ <div className="flex flex-wrap gap-x-3 gap-y-1">
+ {PICKS.map(p => (
+ <span key={p.key}>{t(`strategies.${p.tKey}`)} <span className="tabular-nums text-muted-foreground">{status.counts[p.key] ?? 0}</span></span>
+ ))}
+ </div>
+ {fallbacks > 0 && (
+ <p className="mt-1 text-muted-foreground">{t('strategies.decisionFallbacks', { count: fallbacks })}</p>
+ )}
+ </div>
+ )}
+
+ <Button size="sm" className="w-full" disabled={!dirty || saving} onClick={apply}>
+ {saving ? t('common.applying') : dirty ? t('common.apply') : t('common.applied')}
+ </Button>
+ </div>
+ </PopoverContent>
+ </Popover>
+ )
+}
+
+// What gets Decision routing working: one "Add <provider> key" button per
+// provider that has an enabled decision model (opens Keys with that provider
+// preselected), or a pointer to Models → Decision when none is turned on.
+function DecisionSetupActions({ status }: { status: DecisionRoutingStatus }) {
+ const { t } = useI18n()
+ const navigate = useNavigate()
+ const label = (platform: string) => PLATFORMS.find(p => p.value === platform)?.label ?? platform
+ return (
+ <div className="space-y-2">
+ {status.hasModels ? (
+ <div className="flex flex-col gap-1.5">
+ {status.keyPlatforms.map(platform => (
+ <Button key={platform} size="sm" className="w-full justify-start" onClick={() => navigate(`/keys?add=${encodeURIComponent(platform)}`)}>
+ <KeyRound className="size-3.5" />
+ {t('strategies.decisionAddKey', { provider: label(platform) })}
+ </Button>
+ ))}
+ </div>
+ ) : (
+ <p className="text-xs text-muted-foreground">{t('strategies.decisionNoModels')}</p>
+ )}
+ <Button size="sm" variant="outline" className="w-full" onClick={() => navigate('/models/decision')}>
+ {t('strategies.decisionOpenModels')}
+ </Button>
+ </div>
+ )
+}
+
+// The Decision pill while nothing can decide yet (#1354): instead of switching
+// to a strategy that would silently route everything as Balanced, a click
+// opens this guide to the one key that makes it work. `children` is the pill.
+export function DecisionSetupGuide({ status, className, children }: {
+ status: DecisionRoutingStatus
+ className: string
+ children: ReactNode
+}) {
+ const { t } = useI18n()
+ return (
+ <Popover>
+ <PopoverTrigger className={className}>{children}</PopoverTrigger>
+ <PopoverContent align="start" className="w-80">
+ <div className="space-y-3">
+ <div>
+ <h3 className="text-sm font-medium">{t('strategies.decisionSetupTitle')}</h3>
+ <p className="mt-0.5 text-xs text-muted-foreground">{t('strategies.decisionSetupHelp')}</p>
+ </div>
+ <DecisionSetupActions status={status} />
+ </div>
+ </PopoverContent>
+ </Popover>
+ )
+}
diff --git a/client/src/i18n/locales/am.json b/client/src/i18n/locales/am.json
index 480e31ad..0c8aac46 100644
--- a/client/src/i18n/locales/am.json
+++ b/client/src/i18n/locales/am.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "የራውተር ግፊት",
diff --git a/client/src/i18n/locales/ar.json b/client/src/i18n/locales/ar.json
index 9443dd08..17cc0274 100644
--- a/client/src/i18n/locales/ar.json
+++ b/client/src/i18n/locales/ar.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "يستبعد النموذج من التوجيه عندما تنخفض نسبة نجاحه المرصودة دون هذه القيمة. 0.8 تعني 80٪. اتركه فارغًا للتعطيل — تُحفظ دائمًا النماذج ذات السجلّ القليل حتى تظل النماذج الجديدة قابلة للتجربة. لا يُفرِّغ السلسلة كاملة أبدًا.",
"minReliabilityFloorOff": "معطّل",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "ضغط جهاز التوجيه",
diff --git a/client/src/i18n/locales/az.json b/client/src/i18n/locales/az.json
index 183eef8b..6f072966 100644
--- a/client/src/i18n/locales/az.json
+++ b/client/src/i18n/locales/az.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Router təzyiqi",
diff --git a/client/src/i18n/locales/bg.json b/client/src/i18n/locales/bg.json
index d452f715..50217892 100644
--- a/client/src/i18n/locales/bg.json
+++ b/client/src/i18n/locales/bg.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Налягане в рутера",
diff --git a/client/src/i18n/locales/bn.json b/client/src/i18n/locales/bn.json
index 05af12f0..c2e3e929 100644
--- a/client/src/i18n/locales/bn.json
+++ b/client/src/i18n/locales/bn.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "রাউটারের চাপ",
diff --git a/client/src/i18n/locales/cs.json b/client/src/i18n/locales/cs.json
index aab9d35d..20b6e289 100644
--- a/client/src/i18n/locales/cs.json
+++ b/client/src/i18n/locales/cs.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Tlak frézky",
diff --git a/client/src/i18n/locales/da.json b/client/src/i18n/locales/da.json
index 3aa9a418..11761cf7 100644
--- a/client/src/i18n/locales/da.json
+++ b/client/src/i18n/locales/da.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Fræsertryk",
diff --git a/client/src/i18n/locales/de.json b/client/src/i18n/locales/de.json
index ce656358..f386b715 100644
--- a/client/src/i18n/locales/de.json
+++ b/client/src/i18n/locales/de.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Nimmt ein Modell aus dem Routing, sobald seine beobachtete Erfolgsquote unter diesen Wert fällt. 0,8 bedeutet 80 %. Leer lassen zum Deaktivieren – Modelle mit zu wenig Historie bleiben immer erhalten, damit neue Modelle weiter getestet werden können. Leert niemals die gesamte Kette.",
"minReliabilityFloorOff": "Deaktiviert",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Router-Druck",
diff --git a/client/src/i18n/locales/el.json b/client/src/i18n/locales/el.json
index daffba3a..059b6ece 100644
--- a/client/src/i18n/locales/el.json
+++ b/client/src/i18n/locales/el.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Πίεση δρομολογητή",
diff --git a/client/src/i18n/locales/en.json b/client/src/i18n/locales/en.json
index ae7b7fdf..1322f7e1 100644
--- a/client/src/i18n/locales/en.json
+++ b/client/src/i18n/locales/en.json
@@ -349,7 +349,23 @@
"weightSpeed": "Speed",
"weightIntelligence": "Intelligence",
"weightRequired": "At least one weight must be above zero.",
- "scoreColumn": "Score"
+ "scoreColumn": "Score",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Router pressure",
@@ -1273,7 +1289,7 @@
"tab": "Decision",
"pageDesc": "Decision models answer a question about your text with a choice, a yes or no, or a score, and say how confident they are. They run on your Cloudflare and OpenRouter keys.",
"endpointHint": "Call via",
- "notRoutingHint": "— separate from chat. Chat routing never uses these models.",
+ "notRoutingHint": "— separate from chat. Chat routing only uses them when the Decision routing strategy is on.",
"empty": "No decision models yet. They sync from the catalog.",
"thisMonth": "{count} this month",
"tryTitle": "Try it",
diff --git a/client/src/i18n/locales/es.json b/client/src/i18n/locales/es.json
index c4fcf2c1..792a05cb 100644
--- a/client/src/i18n/locales/es.json
+++ b/client/src/i18n/locales/es.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Excluye un modelo del enrutamiento cuando su tasa de éxito observada cae por debajo de este valor. 0,8 significa 80 %. Déjelo vacío para desactivarlo: los modelos con poco historial siempre se conservan para que los nuevos modelos sigan probándose. Nunca vacía toda la cadena.",
"minReliabilityFloorOff": "Desactivado",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Presión del router",
diff --git a/client/src/i18n/locales/fa.json b/client/src/i18n/locales/fa.json
index 6d1d86fb..7e00ade7 100644
--- a/client/src/i18n/locales/fa.json
+++ b/client/src/i18n/locales/fa.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "فشار روتر",
diff --git a/client/src/i18n/locales/fi.json b/client/src/i18n/locales/fi.json
index 49334abf..29603ec2 100644
--- a/client/src/i18n/locales/fi.json
+++ b/client/src/i18n/locales/fi.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Jyrsimen paine",
diff --git a/client/src/i18n/locales/fr.json b/client/src/i18n/locales/fr.json
index b53a809a..48dc009d 100644
--- a/client/src/i18n/locales/fr.json
+++ b/client/src/i18n/locales/fr.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Retire un modèle du routage dès que son taux de succès observé passe sous cette valeur. 0,8 signifie 80 %. Laissez vide pour désactiver — les modèles avec trop peu d'historique sont toujours conservés afin que les nouveaux modèles puissent encore être essayés. Ne vide jamais toute la chaîne.",
"minReliabilityFloorOff": "Désactivé",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Pression sur le routeur",
diff --git a/client/src/i18n/locales/gu.json b/client/src/i18n/locales/gu.json
index 4196f77d..07d54a0f 100644
--- a/client/src/i18n/locales/gu.json
+++ b/client/src/i18n/locales/gu.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "રાઉટર દબાણ",
diff --git a/client/src/i18n/locales/ha.json b/client/src/i18n/locales/ha.json
index f63c6f4b..f466b0b4 100644
--- a/client/src/i18n/locales/ha.json
+++ b/client/src/i18n/locales/ha.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Matsin na'ura mai ba da hanya tsakanin hanyoyin sadarwa",
diff --git a/client/src/i18n/locales/he.json b/client/src/i18n/locales/he.json
index 2bbc2e6b..75a3387a 100644
--- a/client/src/i18n/locales/he.json
+++ b/client/src/i18n/locales/he.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "לחץ הנתב",
diff --git a/client/src/i18n/locales/hi.json b/client/src/i18n/locales/hi.json
index 9eeb0390..976f1e56 100644
--- a/client/src/i18n/locales/hi.json
+++ b/client/src/i18n/locales/hi.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "जब किसी मॉडल की देखी गई सफलता दर इस मान से नीचे गिर जाए, तो उसे रूटिंग से हटा देता है। 0.8 का अर्थ 80% है। अक्षम करने के लिए खाली छोड़ें — बहुत कम इतिहास वाले मॉडल हमेशा रखे जाते हैं ताकि नए मॉडल आज़माए जा सकें। पूरी श्रृंखला कभी खाली नहीं करता।",
"minReliabilityFloorOff": "अक्षम",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "राउटर का दबाव",
diff --git a/client/src/i18n/locales/hr.json b/client/src/i18n/locales/hr.json
index 6439f540..b19d4c65 100644
--- a/client/src/i18n/locales/hr.json
+++ b/client/src/i18n/locales/hr.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Tlak glodalice",
diff --git a/client/src/i18n/locales/hu.json b/client/src/i18n/locales/hu.json
index 6d968cf8..33e46cbd 100644
--- a/client/src/i18n/locales/hu.json
+++ b/client/src/i18n/locales/hu.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Router nyomás",
diff --git a/client/src/i18n/locales/id.json b/client/src/i18n/locales/id.json
index 8e8bf178..dee65583 100644
--- a/client/src/i18n/locales/id.json
+++ b/client/src/i18n/locales/id.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Tekanan router",
diff --git a/client/src/i18n/locales/ig.json b/client/src/i18n/locales/ig.json
index d1b5d1bd..24e49af2 100644
--- a/client/src/i18n/locales/ig.json
+++ b/client/src/i18n/locales/ig.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Nrụgide rawụta",
diff --git a/client/src/i18n/locales/it.json b/client/src/i18n/locales/it.json
index 77f068f2..e0908188 100644
--- a/client/src/i18n/locales/it.json
+++ b/client/src/i18n/locales/it.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Pressione del router",
diff --git a/client/src/i18n/locales/ja.json b/client/src/i18n/locales/ja.json
index 507394d3..fa64880d 100644
--- a/client/src/i18n/locales/ja.json
+++ b/client/src/i18n/locales/ja.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "観測された成功率がこの値を下回ったモデルをルーティングから除外します。0.8 は 80% を意味します。空欄で無効 — 履歴が少なすぎるモデルは常に保持され、新しいモデルも試行され続けます。チェーン全体が空になることはありません。",
"minReliabilityFloorOff": "無効",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "ルーターの圧力",
diff --git a/client/src/i18n/locales/ka.json b/client/src/i18n/locales/ka.json
index 57ea9f3a..e2ba5660 100644
--- a/client/src/i18n/locales/ka.json
+++ b/client/src/i18n/locales/ka.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "როუტერის წნევა",
diff --git a/client/src/i18n/locales/km.json b/client/src/i18n/locales/km.json
index b381afb7..7f8d5896 100644
--- a/client/src/i18n/locales/km.json
+++ b/client/src/i18n/locales/km.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "សំពាធរ៉ោទ័រ",
diff --git a/client/src/i18n/locales/kn.json b/client/src/i18n/locales/kn.json
index fc078fea..daeb9234 100644
--- a/client/src/i18n/locales/kn.json
+++ b/client/src/i18n/locales/kn.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "ರೂಟರ್ ಒತ್ತಡ",
diff --git a/client/src/i18n/locales/ko.json b/client/src/i18n/locales/ko.json
index 46410ae7..d1ae6ea3 100644
--- a/client/src/i18n/locales/ko.json
+++ b/client/src/i18n/locales/ko.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "관측된 성공률이 이 값 아래로 떨어지면 해당 모델을 라우팅에서 제외합니다. 0.8은 80%를 의미합니다. 비워 두면 비활성화됩니다 — 기록이 너무 적은 모델은 항상 유지되어 새 모델도 계속 시도할 수 있습니다. 전체 체인을 비우지는 않습니다.",
"minReliabilityFloorOff": "비활성",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "라우터 압력",
diff --git a/client/src/i18n/locales/lt.json b/client/src/i18n/locales/lt.json
index ab3dc56c..8ec56721 100644
--- a/client/src/i18n/locales/lt.json
+++ b/client/src/i18n/locales/lt.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Maršrutizatoriaus slėgis",
diff --git a/client/src/i18n/locales/ml.json b/client/src/i18n/locales/ml.json
index ed768112..eb139d92 100644
--- a/client/src/i18n/locales/ml.json
+++ b/client/src/i18n/locales/ml.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "റൂട്ടർ മർദ്ദം",
diff --git a/client/src/i18n/locales/mr.json b/client/src/i18n/locales/mr.json
index 011cb889..11bcc3e7 100644
--- a/client/src/i18n/locales/mr.json
+++ b/client/src/i18n/locales/mr.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "राउटर दबाव",
diff --git a/client/src/i18n/locales/ms.json b/client/src/i18n/locales/ms.json
index c5fe0eb4..93200aaa 100644
--- a/client/src/i18n/locales/ms.json
+++ b/client/src/i18n/locales/ms.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Tekanan penghala",
diff --git a/client/src/i18n/locales/my.json b/client/src/i18n/locales/my.json
index c444dca8..030c9f29 100644
--- a/client/src/i18n/locales/my.json
+++ b/client/src/i18n/locales/my.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "ရောတာဖိအား",
diff --git a/client/src/i18n/locales/ne.json b/client/src/i18n/locales/ne.json
index 37e58345..87badf31 100644
--- a/client/src/i18n/locales/ne.json
+++ b/client/src/i18n/locales/ne.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "राउटरको चाप",
diff --git a/client/src/i18n/locales/nl.json b/client/src/i18n/locales/nl.json
index 00ebe470..0d0a38e8 100644
--- a/client/src/i18n/locales/nl.json
+++ b/client/src/i18n/locales/nl.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Routerdruk",
diff --git a/client/src/i18n/locales/no.json b/client/src/i18n/locales/no.json
index a684465f..96641b12 100644
--- a/client/src/i18n/locales/no.json
+++ b/client/src/i18n/locales/no.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Frestrykk",
diff --git a/client/src/i18n/locales/or.json b/client/src/i18n/locales/or.json
index a31303cf..defa4988 100644
--- a/client/src/i18n/locales/or.json
+++ b/client/src/i18n/locales/or.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "ରାଉଟର ଚାପ",
diff --git a/client/src/i18n/locales/pa.json b/client/src/i18n/locales/pa.json
index efe104be..2d3bae0d 100644
--- a/client/src/i18n/locales/pa.json
+++ b/client/src/i18n/locales/pa.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "ਰਾਊਟਰ ਦਾ ਦਬਾਅ",
diff --git a/client/src/i18n/locales/pl.json b/client/src/i18n/locales/pl.json
index e34838dc..edd7fa3f 100644
--- a/client/src/i18n/locales/pl.json
+++ b/client/src/i18n/locales/pl.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Ciśnienie routera",
diff --git a/client/src/i18n/locales/pt-BR.json b/client/src/i18n/locales/pt-BR.json
index 1ef45a61..5a14236a 100644
--- a/client/src/i18n/locales/pt-BR.json
+++ b/client/src/i18n/locales/pt-BR.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Remove um modelo do roteamento quando sua taxa de sucesso observada cai abaixo deste valor. 0,8 significa 80%. Deixe em branco para desativar — modelos com pouco histórico são sempre mantidos para que modelos novos ainda possam ser testados. Nunca esvazia toda a cadeia.",
"minReliabilityFloorOff": "Desativado",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Pressão do roteador",
diff --git a/client/src/i18n/locales/pt-PT.json b/client/src/i18n/locales/pt-PT.json
index 21bca9d5..2d3317f0 100644
--- a/client/src/i18n/locales/pt-PT.json
+++ b/client/src/i18n/locales/pt-PT.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Pressão do router",
diff --git a/client/src/i18n/locales/ro.json b/client/src/i18n/locales/ro.json
index 86e10720..5125e6e3 100644
--- a/client/src/i18n/locales/ro.json
+++ b/client/src/i18n/locales/ro.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Presiunea routerului",
diff --git a/client/src/i18n/locales/ru.json b/client/src/i18n/locales/ru.json
index 642ef8bb..f89c2945 100644
--- a/client/src/i18n/locales/ru.json
+++ b/client/src/i18n/locales/ru.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Исключает модель из маршрутизации, когда её наблюдаемая доля успешных запросов падает ниже этого значения. 0,8 означает 80 %. Оставьте пустым, чтобы отключить — модели с малой историей всегда сохраняются, чтобы новые модели продолжали пробоваться. Никогда не опустошает всю цепочку.",
"minReliabilityFloorOff": "Отключено",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Давление маршрутизатора",
diff --git a/client/src/i18n/locales/si.json b/client/src/i18n/locales/si.json
index 77a5835c..2180b939 100644
--- a/client/src/i18n/locales/si.json
+++ b/client/src/i18n/locales/si.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "රවුටරයේ පීඩනය",
diff --git a/client/src/i18n/locales/sk.json b/client/src/i18n/locales/sk.json
index 828745fc..f85b3c36 100644
--- a/client/src/i18n/locales/sk.json
+++ b/client/src/i18n/locales/sk.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Tlak frézky",
diff --git a/client/src/i18n/locales/sr.json b/client/src/i18n/locales/sr.json
index ae6e1227..577b882e 100644
--- a/client/src/i18n/locales/sr.json
+++ b/client/src/i18n/locales/sr.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Притисак рутера",
diff --git a/client/src/i18n/locales/sv.json b/client/src/i18n/locales/sv.json
index 0a5c5406..675d6ad0 100644
--- a/client/src/i18n/locales/sv.json
+++ b/client/src/i18n/locales/sv.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Frästryck",
diff --git a/client/src/i18n/locales/sw.json b/client/src/i18n/locales/sw.json
index 60a47690..83cc8dce 100644
--- a/client/src/i18n/locales/sw.json
+++ b/client/src/i18n/locales/sw.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Shinikizo la router",
diff --git a/client/src/i18n/locales/ta.json b/client/src/i18n/locales/ta.json
index 2796ff6d..35400471 100644
--- a/client/src/i18n/locales/ta.json
+++ b/client/src/i18n/locales/ta.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "திசைவி அழுத்தம்",
diff --git a/client/src/i18n/locales/te.json b/client/src/i18n/locales/te.json
index bee85113..b423868e 100644
--- a/client/src/i18n/locales/te.json
+++ b/client/src/i18n/locales/te.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "రూటర్ ఒత్తిడి",
diff --git a/client/src/i18n/locales/th.json b/client/src/i18n/locales/th.json
index ca3d991e..1f74534a 100644
--- a/client/src/i18n/locales/th.json
+++ b/client/src/i18n/locales/th.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "แรงดันเราเตอร์",
diff --git a/client/src/i18n/locales/tl.json b/client/src/i18n/locales/tl.json
index 9595a7ed..3a3f00b8 100644
--- a/client/src/i18n/locales/tl.json
+++ b/client/src/i18n/locales/tl.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Presyon ng router",
diff --git a/client/src/i18n/locales/tr.json b/client/src/i18n/locales/tr.json
index 504a4563..6cd7ee66 100644
--- a/client/src/i18n/locales/tr.json
+++ b/client/src/i18n/locales/tr.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Yönlendirici baskısı",
diff --git a/client/src/i18n/locales/uk.json b/client/src/i18n/locales/uk.json
index e752bbb3..ad6ac93e 100644
--- a/client/src/i18n/locales/uk.json
+++ b/client/src/i18n/locales/uk.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Тиск фрезера",
diff --git a/client/src/i18n/locales/ur.json b/client/src/i18n/locales/ur.json
index e222c1ac..49922223 100644
--- a/client/src/i18n/locales/ur.json
+++ b/client/src/i18n/locales/ur.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "راؤٹر کا دباؤ",
diff --git a/client/src/i18n/locales/uz.json b/client/src/i18n/locales/uz.json
index 339f22e7..940bb9c4 100644
--- a/client/src/i18n/locales/uz.json
+++ b/client/src/i18n/locales/uz.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Router bosimi",
diff --git a/client/src/i18n/locales/vi.json b/client/src/i18n/locales/vi.json
index dc3bba5b..378fb91d 100644
--- a/client/src/i18n/locales/vi.json
+++ b/client/src/i18n/locales/vi.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Áp lực bộ định tuyến",
diff --git a/client/src/i18n/locales/yo.json b/client/src/i18n/locales/yo.json
index f2ac16a9..49853e2e 100644
--- a/client/src/i18n/locales/yo.json
+++ b/client/src/i18n/locales/yo.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "Drop a model from routing once its observed success rate falls below this. 0.8 means 80%. Leave blank to disable — models with too little history are always kept so new models can still be tried. Never empties the whole chain.",
"minReliabilityFloorOff": "Disabled",
"providerMomentAttribution": "Attribute rate-limit failures to the provider",
- "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring."
+ "providerMomentAttributionHint": "When on, 429s, 5xx errors, timeouts and dropped connections are treated as the provider having a bad minute: they still bench the key, but they no longer count against the model's reliability score. Off by default — leave it off to keep today's scoring.",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "Ipa olulana",
diff --git a/client/src/i18n/locales/zh-CN.json b/client/src/i18n/locales/zh-CN.json
index 61909bd5..d1a561b9 100644
--- a/client/src/i18n/locales/zh-CN.json
+++ b/client/src/i18n/locales/zh-CN.json
@@ -349,7 +349,23 @@
"weightSpeed": "速度",
"weightIntelligence": "智能",
"weightRequired": "至少一个权重必须大于零。",
- "scoreColumn": "评分"
+ "scoreColumn": "评分",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "路由压力",
diff --git a/client/src/i18n/locales/zh-TW.json b/client/src/i18n/locales/zh-TW.json
index 033e4883..8af4fecc 100644
--- a/client/src/i18n/locales/zh-TW.json
+++ b/client/src/i18n/locales/zh-TW.json
@@ -349,7 +349,23 @@
"minReliabilityFloorHint": "模型實際成功率低於此值時不再參與路由。0.8 表示 80%。留空表示關閉——歷史樣本太少的模型始終保留,以便新模型仍有機會被嘗試。不會清空整條候選鏈。",
"minReliabilityFloorOff": "關閉",
"providerMomentAttribution": "把限流失敗歸因到渠道",
- "providerMomentAttributionHint": "開啟後,429、5xx、逾時和連接中斷會被視為「渠道這一刻不行」:仍會冷卻對應的 key,但不再計入模型的可靠性評分。預設關閉——關閉即保持現有評分行為。"
+ "providerMomentAttributionHint": "開啟後,429、5xx、逾時和連接中斷會被視為「渠道這一刻不行」:仍會冷卻對應的 key,但不再計入模型的可靠性評分。預設關閉——關閉即保持現有評分行為。",
+ "decision": "Decision",
+ "decisionBlurb": "A decision model reads each request and picks Smartest, Fastest, Balanced or Most reliable for it. When it is unsure, slow or unavailable, the request routes as Balanced. Needs a Cloudflare or OpenRouter key.",
+ "decisionSettings": "Decision routing",
+ "decisionSettingsHelp": "For each request, a decision model picks the strategy that fits it best. Requests that pin a model are never asked about.",
+ "decisionNotReady": "No decision model is ready, so every request routes as Balanced. Add a Cloudflare or OpenRouter key and turn on a model under Models → Decision.",
+ "decisionModel": "Decision model",
+ "decisionModelAuto": "Auto (first available)",
+ "decisionMinConfidence": "Minimum confidence",
+ "decisionMinConfidenceHelp": "Below this, the request routes as Balanced.",
+ "decisionPicks": "Picks since restart ({total})",
+ "decisionFallbacks": "{count} routed as Balanced (unsure, slow or unavailable)",
+ "decisionSetupTitle": "Add a free key to use Decision",
+ "decisionSetupHelp": "Decision routing asks a free decision model which strategy fits each request. It needs a key for one of these providers. Both have a free tier, no card needed.",
+ "decisionAddKey": "Add {provider} key",
+ "decisionNoModels": "No decision model is turned on yet. Turn one on under Models → Decision.",
+ "decisionOpenModels": "Open decision models"
},
"penaltyInspector": {
"title": "路由壓力",
diff --git a/client/src/lib/routing.ts b/client/src/lib/routing.ts
index edd36fea..09f88b9b 100644
--- a/client/src/lib/routing.ts
+++ b/client/src/lib/routing.ts
@@ -56,7 +56,22 @@ export interface FallbackEntry {
groupLabel?: string
}
-export type RoutingStrategy = 'priority' | 'balanced' | 'smartest' | 'fastest' | 'reliable' | 'custom'
+export type RoutingStrategy = 'priority' | 'balanced' | 'smartest' | 'fastest' | 'reliable' | 'custom' | 'decision'
+
+/** The 'decision' strategy's settings and since-restart picks (#1354): a
+ * decision model picks one of four presets per request, Balanced when unsure. */
+export interface DecisionRoutingStatus {
+ model: string
+ minProbability: number
+ /** False when no decision model has a usable key: every request routes as Balanced. */
+ ready: boolean
+ /** Whether any decision model is turned on for the setup guide to point at. */
+ hasModels: boolean
+ /** Providers whose key would make Decision routing ready, in priority order. */
+ keyPlatforms: string[]
+ counts: { smartest: number; fastest: number; balanced: number; reliable: number }
+ fallbacks: Partial<Record<'low_confidence' | 'timeout' | 'unavailable' | 'error', number>>
+}
// How the gateway picks between several keys of ONE platform, once a model has
// been chosen (#919). Separate from RoutingStrategy, which ranks models: the
@@ -84,6 +99,8 @@ export interface RoutingScore {
export interface RoutingData {
strategy: RoutingStrategy
+ /** Optional so an older server (no decision routing) still renders. */
+ decision?: DecisionRoutingStatus
weights: RoutingWeights | null
customWeights: RoutingWeights
/** Exploration toggle: when on, unmeasured models get a guaranteed chance to
diff --git a/client/src/pages/FallbackPage.tsx b/client/src/pages/FallbackPage.tsx
index 05430d35..5bdf3c42 100644
--- a/client/src/pages/FallbackPage.tsx
+++ b/client/src/pages/FallbackPage.tsx
@@ -50,6 +50,7 @@ import { PenaltyInspector } from '@/components/penalty-inspector'
import { PeakHoursControls } from '@/components/peak-hours-controls'
import { ReliabilityFloorControl } from '@/components/reliability-floor-control'
import { ProviderMomentControl } from '@/components/provider-moment-control'
+import { DecisionRoutingPopover, DecisionSetupGuide } from '@/components/decision-routing-popover'
import { ChainManager } from '@/components/chain-manager'
// `tKey` is the i18n suffix under `strategies.*` (label) and `strategies.*Blurb`.
@@ -61,6 +62,7 @@ const STRATEGIES: { key: RoutingStrategy; tKey: string }[] = [
{ key: 'fastest', tKey: 'fastest' },
{ key: 'reliable', tKey: 'reliable' },
{ key: 'custom', tKey: 'custom' },
+ { key: 'decision', tKey: 'decision' },
]
// Minimum-context filter buckets for the Models page toolbar. `key` is the token
@@ -181,6 +183,7 @@ export default function FallbackPage() {
strategy: RoutingStrategy; weights?: RoutingWeights; exploreEnabled?: boolean
peakHoursAdjust?: boolean; peakStartHour?: number; peakEndHour?: number; peakTimezone?: string
keySelectionStrategy?: KeySelectionStrategy; cooldownCeilingMs?: number | null
+ decisionModel?: string; decisionMinProbability?: number
}) =>
apiFetch('/api/fallback/routing', { method: 'PUT', body: JSON.stringify(payload) }),
onSuccess: () => queryClient.invalidateQueries({ queryKey: ['fallback', 'routing'] }),
@@ -375,21 +378,37 @@ export default function FallbackPage() {
secondary hangs off that toggle so the card reads as one choice. */}
<div className="flex flex-wrap items-center justify-between gap-3">
<div className="inline-flex flex-wrap items-center gap-1 rounded-xl border p-1">
- {STRATEGIES.map(s => (
- <Tooltip key={s.key} text={t(`strategies.${s.tKey}Blurb`)}>
- <button
- disabled={strategyMutation.isPending}
- onClick={() => strategyMutation.mutate({ strategy: s.key })}
- className={`px-3 py-1.5 text-xs rounded-lg transition-colors ${
- s.key === strategy
- ? 'bg-foreground text-background font-medium'
- : 'text-muted-foreground hover:text-foreground hover:bg-muted'
- }`}
- >
- {t(`strategies.${s.tKey}`)}
- </button>
- </Tooltip>
- ))}
+ {STRATEGIES.map(s => {
+ const pillClass = `px-3 py-1.5 text-xs rounded-lg transition-colors ${
+ s.key === strategy
+ ? 'bg-foreground text-background font-medium'
+ : 'text-muted-foreground hover:text-foreground hover:bg-muted'
+ }`
+ // Decision with nothing able to decide (#1354): the pill opens a
+ // setup guide instead of switching to a strategy that would
+ // route everything as Balanced.
+ const needsSetup = s.key === 'decision' && strategy !== 'decision' && routing?.decision && !routing.decision.ready
+ // The guide explains itself, so it skips the hover blurb, which
+ // would otherwise sit on top of the guide's buttons.
+ if (needsSetup && routing?.decision) {
+ return (
+ <DecisionSetupGuide key={s.key} status={routing.decision} className={pillClass}>
+ {t(`strategies.${s.tKey}`)}
+ </DecisionSetupGuide>
+ )
+ }
+ return (
+ <Tooltip key={s.key} text={t(`strategies.${s.tKey}Blurb`)}>
+ <button
+ disabled={strategyMutation.isPending}
+ onClick={() => strategyMutation.mutate({ strategy: s.key })}
+ className={pillClass}
+ >
+ {t(`strategies.${s.tKey}`)}
+ </button>
+ </Tooltip>
+ )
+ })}
{strategy === 'custom' && routing && (
<CustomWeightsPopover
saved={routing.customWeights}
@@ -397,6 +416,13 @@ export default function FallbackPage() {
onSave={w => strategyMutation.mutate({ strategy: 'custom', weights: w })}
/>
)}
+ {strategy === 'decision' && routing?.decision && (
+ <DecisionRoutingPopover
+ status={routing.decision}
+ saving={strategyMutation.isPending}
+ onSave={settings => strategyMutation.mutate({ strategy: 'decision', ...settings })}
+ />
+ )}
</div>
<button
diff --git a/client/src/pages/KeysPage.add-link.test.tsx b/client/src/pages/KeysPage.add-link.test.tsx
new file mode 100644
index 00000000..322a0457
--- /dev/null
+++ b/client/src/pages/KeysPage.add-link.test.tsx
@@ -0,0 +1,70 @@
+// @vitest-environment jsdom
+// `/keys?add=<platform>` opens Add key preselected to that provider (#1354:
+// the Decision routing setup guide links here), then drops the param.
+import { afterEach, beforeAll, beforeEach, expect, it, vi } from 'vitest'
+import { act } from 'react'
+import { createRoot, type Root } from 'react-dom/client'
+import { MemoryRouter, Route, Routes, useLocation } from 'react-router-dom'
+import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
+import { I18nProvider } from '@/i18n'
+import KeysPage from './KeysPage'
+
+vi.mock('@/lib/api', () => ({ apiFetch: vi.fn(async () => []) }))
+// Only the page's own add-key wiring is under test; the sections are stubbed.
+vi.mock('@/components/keys/add-key-dialog', () => ({
+ AddKeyDialog: ({ open, initialPlatform }: { open: boolean; initialPlatform?: string }) =>
+ <div data-testid="add-dialog">{open ? `open:${initialPlatform ?? ''}` : 'closed'}</div>,
+}))
+vi.mock('@/components/keys/quota-signals-section', () => ({ QuotaSignalsSection: () => null }))
+vi.mock('@/components/keys/unified-key-section', () => ({ UnifiedKeySection: () => null }))
+vi.mock('@/components/keys/client-profiles-section', () => ({ ClientProfilesSection: () => null }))
+vi.mock('@/components/keys/proxy-settings-section', () => ({ ProxySettingsSection: () => null }))
+vi.mock('@/components/keys/backups-section', () => ({ BackupsSection: () => null }))
+vi.mock('@/components/keys/anthropic-section', () => ({ AnthropicSection: () => null }))
+vi.mock('@/components/keys/provider-list', () => ({ ProviderList: () => null }))
+vi.mock('@/components/keys/provider-checklist-section', () => ({ ProviderChecklistSection: () => null }))
+vi.mock('@/components/keys/export-keys-dialog', () => ({ ExportKeysDialog: () => null }))
+vi.mock('@/components/keys/agent-compatibility-section', () => ({ AgentCompatibilitySection: () => null }))
+
+let root: Root
+let container: HTMLDivElement
+beforeAll(() => { (globalThis as unknown as { IS_REACT_ACT_ENVIRONMENT: boolean }).IS_REACT_ACT_ENVIRONMENT = true })
+beforeEach(() => { container = document.createElement('div'); document.body.appendChild(container); root = createRoot(container) })
+afterEach(() => { act(() => root.unmount()); container.remove() })
+
+function Search() { return <div data-testid="search">{useLocation().search}</div> }
+
+async function mount(url: string) {
+ const client = new QueryClient({ defaultOptions: { queries: { retry: false } } })
+ act(() => root.render(
+ <QueryClientProvider client={client}>
+ <I18nProvider initialLocale="en">
+ <MemoryRouter initialEntries={[url]}>
+ <Routes><Route path="/keys" element={<><KeysPage /><Search /></>} /></Routes>
+ </MemoryRouter>
+ </I18nProvider>
+ </QueryClientProvider>
+ ))
+ for (let i = 0; i < 4; i++) await act(async () => { await new Promise(r => setTimeout(r, 0)) })
+}
+
+const dialog = () => container.querySelector('[data-testid="add-dialog"]')?.textContent
+const search = () => container.querySelector('[data-testid="search"]')?.textContent
+
+it('opens Add key preselected from ?add= and clears the param', async () => {
+ await mount('/keys?add=cloudflare')
+ expect(dialog()).toBe('open:cloudflare')
+ expect(search()).toBe('')
+})
+
+it('ignores an unknown or hidden provider', async () => {
+ await mount('/keys?add=not-a-provider')
+ expect(dialog()).toBe('closed')
+ await mount('/keys?add=auray')
+ expect(dialog()).toBe('closed')
+})
+
+it('stays closed without the param', async () => {
+ await mount('/keys')
+ expect(dialog()).toBe('closed')
+})
diff --git a/client/src/pages/KeysPage.tsx b/client/src/pages/KeysPage.tsx
index 58f79dca..f2230c76 100644
--- a/client/src/pages/KeysPage.tsx
+++ b/client/src/pages/KeysPage.tsx
@@ -1,4 +1,5 @@
-import { useState } from 'react'
+import { useEffect, useState } from 'react'
+import { useSearchParams } from 'react-router-dom'
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'
import { apiFetch } from '@/lib/api'
import { Button } from '@/components/ui/button'
@@ -7,7 +8,7 @@ import { PageHeader } from '@/components/page-header'
import type { ApiKey, Platform } from '../../../shared/types'
import { Plus, Download } from 'lucide-react'
import { useI18n } from '@/i18n'
-import type { HealthData } from '@/components/keys/shared'
+import { LISTED_PLATFORMS, type HealthData } from '@/components/keys/shared'
import { QuotaSignalsSection } from '@/components/keys/quota-signals-section'
import { UnifiedKeySection } from '@/components/keys/unified-key-section'
import { ClientProfilesSection } from '@/components/keys/client-profiles-section'
@@ -33,10 +34,19 @@ export default function KeysPage() {
const { t } = useI18n()
const queryClient = useQueryClient()
const [tab, setTab] = useState<KeysTab>('providers')
- const [addOpen, setAddOpen] = useState(false)
+ // `/keys?add=<platform>` opens Add key preselected to that provider, so other
+ // pages can send the user straight to the one key they need (e.g. the
+ // Decision routing setup guide, #1354). Unknown values are ignored.
+ const [searchParams, setSearchParams] = useSearchParams()
+ const linkedPlatform = LISTED_PLATFORMS.find(p => p.value === searchParams.get('add'))?.value
+ const [addOpen, setAddOpen] = useState(linkedPlatform !== undefined)
// Provider the Add key dialog opens preselected to, when the add flow was
- // entered from a checklist chip rather than the generic Add key button.
- const [addPlatform, setAddPlatform] = useState<Platform | ''>('')
+ // entered from a checklist chip (or a link) rather than the generic Add key button.
+ const [addPlatform, setAddPlatform] = useState<Platform | ''>(linkedPlatform ?? '')
+ // Drop the param once read, so closing the dialog and reloading does not reopen it.
+ useEffect(() => {
+ if (searchParams.has('add')) setSearchParams(prev => { prev.delete('add'); return prev }, { replace: true })
+ }, [searchParams, setSearchParams])
const [exportOpen, setExportOpen] = useState(false)
const openAddKey = (platform: Platform | '' = '') => {
diff --git a/docs/en/architecture/01-routing-and-bandit-scoring.md b/docs/en/architecture/01-routing-and-bandit-scoring.md
index add6f823..895968e5 100644
--- a/docs/en/architecture/01-routing-and-bandit-scoring.md
+++ b/docs/en/architecture/01-routing-and-bandit-scoring.md
@@ -13,7 +13,7 @@ base = w_rel·reliability + w_speed·speed + w_intel·intelligence (convex, we
effective = base × headroomFactor × rateLimitFactor (guardrail multipliers ∈ [floor, 1])
```
-The **weights** come from a selectable strategy (`balanced` / `smartest` / `fastest` / `reliable` / `custom` / `priority`). The default is `balanced` (0.5 / 0.25 / 0.25). Operators can switch strategies from the dashboard or via `PUT /api/fallback/routing`.
+The **weights** come from a selectable strategy (`balanced` / `smartest` / `fastest` / `reliable` / `custom` / `priority` / `decision`). The default is `balanced` (0.5 / 0.25 / 0.25). Operators can switch strategies from the dashboard or via `PUT /api/fallback/routing`.
Key selection within a model is driven by a separate `KeySelectionStrategy` (`auto` / `least-remaining`), independent of the model-ranking bandit so the two concerns don't interfere (#919, #930).
@@ -249,6 +249,17 @@ When enabled, logical models (e.g. `glm-4.7`) collapse multiple providers into o
| reliable | 0.70 | 0.15 | 0.15 |
| custom | user-tuned (normalized) | | |
| priority | manual order + 429 penalty (dense rank + penalty) | | |
+| decision | one of the four presets above, picked per request by a decision model | | |
+
+### Decision Routing (opt-in, #1354)
+
+With `decision` selected, a decision model (Models → Decision: Clef on Cloudflare, Mercury Decide on OpenRouter) reads each request and answers one `choice` question: which of `smartest` / `fastest` / `balanced` / `reliable` serves it best. That preset's weights score the chain for that one request. Nothing else changes: capability gates, guardrails and the keep-trying failover walk are the same as under any preset.
+
+- **What it reads:** the opening of the system prompt (400 chars) and the latest user message (1,600 chars). Never the whole conversation.
+- **When it asks:** once per user turn. The answer is cached on the text it judged (30 min), so an agent's tool-call loop inside one turn costs one decision. Requests that pin a model, or that a sticky session already maps to one, are never asked about.
+- **When in doubt, Balanced:** the top probability is below the minimum confidence (`routing_decision_min_probability`, default 0.5), the decision takes longer than 1.5 s, no decision model has a usable key, or the call fails.
+- **Which model decides:** `routing_decision_model`, `auto` by default (first enabled decision model with a key). `auto` skips BeatAPI's free JEV routes, whose 1 request/minute cannot keep up with chat traffic; pinning one explicitly still works.
+- **Visibility:** each routed response carries `X-FreeLLM-Routing-Strategy: <preset>` (or `balanced; fallback=<reason>`), decisions are logged under Models → Decision with client `freellmapi-router`, and `GET /api/fallback/routing` returns `decision: { model, minProbability, ready, counts, fallbacks, recent }`.
### Key Selection Strategy (#919, #930)
diff --git a/server/src/__tests__/routes/decision-routing.test.ts b/server/src/__tests__/routes/decision-routing.test.ts
new file mode 100644
index 00000000..7d6f0360
--- /dev/null
+++ b/server/src/__tests__/routes/decision-routing.test.ts
@@ -0,0 +1,211 @@
+import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
+import type { Express } from 'express';
+import { createApp } from '../../app.js';
+import { initDb, getDb, getUnifiedApiKey } from '../../db/index.js';
+import { encrypt } from '../../lib/crypto.js';
+import { clearAllCooldowns } from '../../services/ratelimit.js';
+import { resetDecisionRoutingCache } from '../../services/routing-decision.js';
+import { refreshStatsCache } from '../../services/router.js';
+import { mintDashboardToken, isGatedApiPath } from '../helpers/auth.js';
+import { seedDecisionModels } from '../helpers/decision-models.js';
+
+// End to end through the real chat surfaces (#1354): switch the strategy to
+// 'decision' over the dashboard API, let a (mocked) decision model pick a
+// preset, and check both the header and which model actually served.
+
+let app: Express;
+let dashToken = '';
+
+async function request(method: string, path: string, body?: any, headers: Record<string, string> = {}) {
+ const server = app.listen(0, '127.0.0.1');
+ if (!server.listening) await new Promise<void>(resolve => server.once('listening', () => resolve()));
+ const addr = server.address() as any;
+ const res = await fetch(`http://127.0.0.1:${addr.port}${path}`, {
+ method,
+ headers: {
+ ...(body ? { 'Content-Type': 'application/json' } : {}),
+ ...(isGatedApiPath(path) && !('Authorization' in headers) ? { Authorization: `Bearer ${dashToken}` } : {}),
+ ...headers,
+ },
+ body: body ? JSON.stringify(body) : undefined,
+ });
+ const text = await res.text();
+ server.close();
+ let json: any = null;
+ try { json = JSON.parse(text); } catch { /* non-JSON */ }
+ return { status: res.status, body: json, headers: res.headers };
+}
+
+const auth = () => ({ Authorization: `Bearer ${getUnifiedApiKey()}` });
+
+function addKey(platform: string, raw: string): void {
+ const secret = encrypt(raw);
+ getDb().prepare(`
+ INSERT INTO api_keys (platform, label, encrypted_key, iv, auth_tag, status, enabled)
+ VALUES (?, 'decision-routing', ?, ?, ?, 'healthy', 1)
+ `).run(platform, secret.encrypted, secret.iv, secret.authTag);
+}
+
+// Two chat models at opposite corners: a big slow one and a small fast one.
+// Smartest must serve the big one, Fastest the small one.
+function addModel(modelId: string, sizeLabel: string, speedRank: number): void {
+ const db = getDb();
+ const id = Number(db.prepare(`
+ INSERT INTO models (platform, model_id, display_name, intelligence_rank, speed_rank, size_label,
+ monthly_token_budget, context_window, enabled, supports_vision, supports_tools)
+ VALUES ('groq', ?, ?, 1, ?, ?, '~1M', 128000, 1, 0, 1)
+ `).run(modelId, modelId, speedRank, sizeLabel).lastInsertRowid);
+ db.prepare('INSERT INTO fallback_config (model_db_id, priority, enabled) VALUES (?, ?, 1)').run(id, id);
+ const profile = db.prepare("SELECT value FROM settings WHERE key = 'active_profile_id'").get() as { value: string } | undefined;
+ if (profile) {
+ db.prepare('INSERT INTO profile_models (profile_id, model_db_id, priority, enabled) VALUES (?, ?, ?, 1)').run(Number(profile.value), id, id);
+ }
+}
+
+// Speed is scored only from observed traffic, so give both models the same
+// success record and very different latencies: equally reliable, one fast.
+function seedHistory(modelId: string, latencyMs: number, ttfbMs: number): void {
+ const insert = getDb().prepare(`
+ INSERT INTO requests (platform, model_id, status, input_tokens, output_tokens, latency_ms, ttfb_ms)
+ VALUES ('groq', ?, 'success', 50, 300, ?, ?)
+ `);
+ for (let i = 0; i < 20; i++) insert.run(modelId, latencyMs, ttfbMs);
+}
+
+let decisionChoice = 'smartest';
+let decisionCalls = 0;
+
+function mockUpstreams() {
+ const origFetch = global.fetch;
+ vi.spyOn(global, 'fetch').mockImplementation(async (url, init) => {
+ const u = typeof url === 'string' ? url : url.toString();
+ if (u.includes('/ai/run/@cf/cloudflare/clef-flash')) {
+ decisionCalls++;
+ const probabilities: Record<string, number> = { smartest: 0.02, fastest: 0.02, balanced: 0.02, reliable: 0.02 };
+ probabilities[decisionChoice] = 0.94;
+ return new Response(JSON.stringify({
+ success: true,
+ result: { answers: { strategy: { type: 'choice', choice: decisionChoice, probabilities } }, usage: { input_tokens: 200, output_tokens: 0 } },
+ }), { status: 200, headers: { 'content-type': 'application/json' } });
+ }
+ if (u.includes('api.groq.com')) {
+ const body = JSON.parse(String(init?.body ?? '{}'));
+ return new Response(JSON.stringify({
+ id: 'chatcmpl-x', object: 'chat.completion', created: 1, model: body.model,
+ choices: [{ index: 0, message: { role: 'assistant', content: 'ok' }, finish_reason: 'stop' }],
+ usage: { prompt_tokens: 2, completion_tokens: 1, total_tokens: 3 },
+ }), { status: 200, headers: { 'content-type': 'application/json' } });
+ }
+ return origFetch(url as any, init);
+ });
+}
+
+const servedModel = () =>
+ (getDb().prepare('SELECT model_id FROM requests ORDER BY id DESC LIMIT 1').get() as { model_id: string }).model_id;
+
+describe('decision routing over HTTP (#1354)', () => {
+ beforeEach(() => {
+ process.env.ENCRYPTION_KEY = '0'.repeat(64);
+ initDb(':memory:');
+ getDb().prepare('UPDATE models SET enabled = 0').run();
+ addModel('big-slow', 'Frontier', 11);
+ addModel('small-fast', 'Small', 1);
+ seedHistory('big-slow', 15_000, 4_000);
+ seedHistory('small-fast', 400, 100);
+ refreshStatsCache(getDb(), true);
+ seedDecisionModels();
+ addKey('groq', 'gsk-decision-routing');
+ addKey('cloudflare', 'acct:cf-token');
+ clearAllCooldowns(Number.MAX_SAFE_INTEGER);
+ resetDecisionRoutingCache();
+ app = createApp();
+ dashToken = mintDashboardToken();
+ decisionChoice = 'smartest';
+ decisionCalls = 0;
+ mockUpstreams();
+ });
+
+ afterEach(() => {
+ vi.restoreAllMocks();
+ });
+
+ it('accepts the decision strategy and its settings, and reports them', async () => {
+ const put = await request('PUT', '/api/fallback/routing', { strategy: 'decision', decisionModel: 'auto', decisionMinProbability: 0.6 });
+ expect(put.status).toBe(200);
+ expect(put.body.strategy).toBe('decision');
+ expect(put.body.decision).toMatchObject({ model: 'auto', minProbability: 0.6, ready: true });
+ const get = await request('GET', '/api/fallback/routing');
+ expect(get.body.strategy).toBe('decision');
+ expect(get.body.decision).toMatchObject({ model: 'auto', minProbability: 0.6, ready: true });
+ const bad = await request('PUT', '/api/fallback/routing', { strategy: 'decision', decisionMinProbability: 2 });
+ expect(bad.status).toBe(400);
+ });
+
+ it('routes each request with the preset the decision model picks', async () => {
+ await request('PUT', '/api/fallback/routing', { strategy: 'decision', exploreEnabled: false });
+
+ for (let i = 0; i < 5; i++) {
+ decisionChoice = 'smartest';
+ const smart = await request('POST', '/v1/chat/completions', { messages: [{ role: 'user', content: `prove a theorem ${i}` }] }, auth());
+ expect(smart.status).toBe(200);
+ expect(smart.headers.get('x-freellm-routing-strategy')).toBe('smartest');
+ expect(servedModel()).toBe('big-slow');
+
+ decisionChoice = 'fastest';
+ const fast = await request('POST', '/v1/chat/completions', { messages: [{ role: 'user', content: `what is ${i}+${i}` }] }, auth());
+ expect(fast.status).toBe(200);
+ expect(fast.headers.get('x-freellm-routing-strategy')).toBe('fastest');
+ expect(servedModel()).toBe('small-fast');
+ }
+ expect(decisionCalls).toBe(10);
+ });
+
+ it('works on the Anthropic and Responses surfaces too', async () => {
+ await request('PUT', '/api/fallback/routing', { strategy: 'decision', exploreEnabled: false });
+ decisionChoice = 'fastest';
+ const msgs = await request('POST', '/v1/messages', { max_tokens: 50, messages: [{ role: 'user', content: 'hi there' }] }, auth());
+ expect(msgs.status).toBe(200);
+ expect(msgs.headers.get('x-freellm-routing-strategy')).toBe('fastest');
+ expect(servedModel()).toBe('small-fast');
+
+ decisionChoice = 'smartest';
+ const resp = await request('POST', '/v1/responses', { input: 'derive the quadratic formula' }, auth());
+ expect(resp.status).toBe(200);
+ expect(resp.headers.get('x-freellm-routing-strategy')).toBe('smartest');
+ expect(servedModel()).toBe('big-slow');
+ });
+
+ it('never asks when another strategy is active, or when the request pins a model', async () => {
+ await request('PUT', '/api/fallback/routing', { strategy: 'balanced' });
+ const plain = await request('POST', '/v1/chat/completions', { messages: [{ role: 'user', content: 'hi' }] }, auth());
+ expect(plain.status).toBe(200);
+ expect(plain.headers.get('x-freellm-routing-strategy')).toBeNull();
+
+ await request('PUT', '/api/fallback/routing', { strategy: 'decision' });
+ const pinned = await request('POST', '/v1/chat/completions', { model: 'small-fast', messages: [{ role: 'user', content: 'hi' }] }, auth());
+ expect(pinned.status).toBe(200);
+ expect(pinned.headers.get('x-freellm-routing-strategy')).toBeNull();
+ expect(decisionCalls).toBe(0);
+ });
+
+ it('still serves the request as Balanced when the decision model is down', async () => {
+ await request('PUT', '/api/fallback/routing', { strategy: 'decision' });
+ vi.restoreAllMocks();
+ const origFetch = global.fetch;
+ vi.spyOn(global, 'fetch').mockImplementation(async (url, init) => {
+ const u = typeof url === 'string' ? url : url.toString();
+ if (u.includes('/ai/run/')) return new Response('upstream down', { status: 500 });
+ if (u.includes('api.groq.com')) {
+ return new Response(JSON.stringify({
+ id: 'x', object: 'chat.completion', created: 1, model: 'm',
+ choices: [{ index: 0, message: { role: 'assistant', content: 'ok' }, finish_reason: 'stop' }],
+ usage: { prompt_tokens: 1, completion_tokens: 1, total_tokens: 2 },
+ }), { status: 200, headers: { 'content-type': 'application/json' } });
+ }
+ return origFetch(url as any, init);
+ });
+ const res = await request('POST', '/v1/chat/completions', { messages: [{ role: 'user', content: 'hello' }] }, auth());
+ expect(res.status).toBe(200);
+ expect(res.headers.get('x-freellm-routing-strategy')).toBe('balanced; fallback=error');
+ });
+});
diff --git a/server/src/__tests__/services/routing-decision.test.ts b/server/src/__tests__/services/routing-decision.test.ts
new file mode 100644
index 00000000..92dba88f
--- /dev/null
+++ b/server/src/__tests__/services/routing-decision.test.ts
@@ -0,0 +1,268 @@
+import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
+import type { Request, Response } from 'express';
+import { initDb, getDb } from '../../db/index.js';
+import { encrypt } from '../../lib/crypto.js';
+import { clearAllCooldowns } from '../../services/ratelimit.js';
+import { clientContextMiddleware, getClientContext } from '../../lib/client-context.js';
+import { effectiveRoutingStrategy, setRoutingStrategy } from '../../services/router.js';
+import {
+ applyDecisionRouting,
+ chooseRoutingPreset,
+ decisionStateFor,
+ getDecisionRoutingSettings,
+ getDecisionRoutingStats,
+ resetDecisionRoutingCache,
+ routingStrategyHeader,
+ setDecisionRoutingSettings,
+ DECISION_TIMEOUT_MS,
+ ROUTER_CLIENT,
+} from '../../services/routing-decision.js';
+import { seedDecisionModels } from '../helpers/decision-models.js';
+import type { ChatMessage } from '@freellmapi/shared/types.js';
+
+const realFetch = globalThis.fetch;
+
+function addKey(platform: string, raw = `${platform}-test-key`): void {
+ const { encrypted, iv, authTag } = encrypt(raw);
+ getDb().prepare(`
+ INSERT INTO api_keys (platform, label, encrypted_key, iv, auth_tag, status, enabled)
+ VALUES (?, 'test', ?, ?, ?, 'healthy', 1)
+ `).run(platform, encrypted, iv, authTag);
+}
+
+function cloudflareAnswer(choice: string, probability: number) {
+ const probabilities: Record<string, number> = { smartest: 0, fastest: 0, balanced: 0, reliable: 0 };
+ probabilities[choice] = probability;
+ return new Response(JSON.stringify({
+ success: true,
+ result: { model: 'clef-flash', answers: { strategy: { type: 'choice', choice, probabilities, confidence: 0.5 } }, usage: { input_tokens: 250, output_tokens: 0 } },
+ }), { status: 200, headers: { 'content-type': 'application/json' } });
+}
+
+function mockFetch(handler: (url: string, init: RequestInit) => Response | Promise<Response>) {
+ const fn = vi.fn((url: string, init: RequestInit) => Promise.resolve(handler(String(url), init)));
+ globalThis.fetch = fn as unknown as typeof fetch;
+ return fn;
+}
+
+/** Run `fn` inside a request scope, the way every chat surface runs. */
+function inRequest<T>(fn: () => Promise<T>): Promise<T> {
+ const req = { headers: {}, ip: '127.0.0.1', socket: { remoteAddress: '127.0.0.1' } } as unknown as Request;
+ return new Promise<T>((resolve, reject) => {
+ clientContextMiddleware(req, {} as Response, () => { fn().then(resolve, reject); });
+ });
+}
+
+const user = (content: ChatMessage['content']): ChatMessage => ({ role: 'user', content });
+const HARD = [user('Prove that the square root of 2 is irrational, then generalise it.')];
+
+describe('decision routing (#1354)', () => {
+ beforeEach(() => {
+ process.env.ENCRYPTION_KEY = '0'.repeat(64);
+ initDb(':memory:');
+ seedDecisionModels();
+ clearAllCooldowns(Number.MAX_SAFE_INTEGER);
+ resetDecisionRoutingCache();
+ setRoutingStrategy('decision');
+ });
+
+ afterEach(() => {
+ globalThis.fetch = realFetch;
+ vi.restoreAllMocks();
+ vi.useRealTimers();
+ });
+
+ it('does nothing (no decision call) unless the decision strategy is active', async () => {
+ setRoutingStrategy('balanced');
+ addKey('cloudflare', 'acct:token');
+ const fn = mockFetch(() => cloudflareAnswer('smartest', 0.9));
+ expect(await applyDecisionRouting(HARD)).toBeNull();
+ expect(fn).not.toHaveBeenCalled();
+ });
+
+ it('skips the decision when the request pins a model', async () => {
+ addKey('cloudflare', 'acct:token');
+ const fn = mockFetch(() => cloudflareAnswer('smartest', 0.9));
+ expect(await applyDecisionRouting(HARD, { pinned: true })).toBeNull();
+ expect(fn).not.toHaveBeenCalled();
+ });
+
+ it('routes THIS request with the preset the decision model picked', async () => {
+ addKey('cloudflare', 'acct:token');
+ const fn = mockFetch(() => cloudflareAnswer('smartest', 0.82));
+ const seen = await inRequest(async () => {
+ const pick = await applyDecisionRouting(HARD);
+ return { pick, strategy: effectiveRoutingStrategy(), ctx: getClientContext().routingStrategy };
+ });
+ expect(seen.pick).toEqual({ strategy: 'smartest', source: 'decision', probability: 0.82, model: '@cf/cloudflare/clef-flash' });
+ expect(seen.strategy).toBe('smartest');
+ expect(seen.ctx).toBe('smartest');
+ // One choice question whose options are exactly the four presets.
+ const body = JSON.parse((fn.mock.calls[0] as unknown as [string, RequestInit])[1].body as string);
+ expect(Object.keys(body.questions)).toEqual(['strategy']);
+ expect(Object.keys(body.questions.strategy.criteria).sort()).toEqual(['balanced', 'fastest', 'reliable', 'smartest']);
+ expect(body.state).toContain('square root of 2');
+ // Logged as the router's own decision, not as the chat client's.
+ const log = getDb().prepare('SELECT client_agent, status FROM decision_requests').all();
+ expect(log).toEqual([{ client_agent: ROUTER_CLIENT, status: 'ok' }]);
+ });
+
+ it('does not leak a pick into another request', async () => {
+ addKey('cloudflare', 'acct:token');
+ mockFetch(() => cloudflareAnswer('fastest', 0.95));
+ await inRequest(async () => { await applyDecisionRouting([user('hi')]); });
+ const other = await inRequest(async () => effectiveRoutingStrategy());
+ expect(other).toBe('balanced');
+ });
+
+ it('routes as Balanced when the decision model is unsure', async () => {
+ addKey('cloudflare', 'acct:token');
+ mockFetch(() => cloudflareAnswer('reliable', 0.31));
+ const pick = await chooseRoutingPreset(HARD);
+ expect(pick).toEqual({ strategy: 'balanced', source: 'low_confidence', probability: 0.31, model: '@cf/cloudflare/clef-flash' });
+ });
+
+ it('honours a custom minimum probability', async () => {
+ addKey('cloudflare', 'acct:token');
+ setDecisionRoutingSettings({ minProbability: 0.3 });
+ mockFetch(() => cloudflareAnswer('reliable', 0.31));
+ expect((await chooseRoutingPreset(HARD)).strategy).toBe('reliable');
+ });
+
+ it('asks once per turn: the same text is answered from cache', async () => {
+ addKey('cloudflare', 'acct:token');
+ const fn = mockFetch(() => cloudflareAnswer('fastest', 0.9));
+ expect((await chooseRoutingPreset([user('what is 2+2')])).source).toBe('decision');
+ const again = await chooseRoutingPreset([user('what is 2+2'), { role: 'assistant', content: '', tool_calls: [] }, { role: 'tool', content: '4', tool_call_id: 'x' }]);
+ expect(again).toMatchObject({ strategy: 'fastest', source: 'cache' });
+ expect(fn).toHaveBeenCalledTimes(1);
+ await chooseRoutingPreset([user('a different question')]);
+ expect(fn).toHaveBeenCalledTimes(2);
+ });
+
+ it('routes as Balanced on a slow decision instead of holding the request', async () => {
+ addKey('cloudflare', 'acct:token');
+ mockFetch((_url, init) => new Promise<Response>((_resolve, reject) => {
+ init.signal?.addEventListener('abort', () => reject(init.signal?.reason ?? new Error('aborted')));
+ }));
+ const started = Date.now();
+ const pick = await chooseRoutingPreset(HARD);
+ expect(pick).toEqual({ strategy: 'balanced', source: 'timeout' });
+ expect(Date.now() - started).toBeLessThan(DECISION_TIMEOUT_MS + 1000);
+ });
+
+ it('routes as Balanced when no decision key exists, without calling anything', async () => {
+ const fn = mockFetch(() => cloudflareAnswer('smartest', 0.9));
+ expect(await chooseRoutingPreset(HARD)).toEqual({ strategy: 'balanced', source: 'unavailable' });
+ expect(fn).not.toHaveBeenCalled();
+ });
+
+ it('routes as Balanced when the decision call fails or answers off-list', async () => {
+ addKey('cloudflare', 'acct:token');
+ mockFetch(() => new Response('boom', { status: 500 }));
+ expect(await chooseRoutingPreset(HARD)).toMatchObject({ strategy: 'balanced', source: 'error' });
+ resetDecisionRoutingCache();
+ mockFetch(() => cloudflareAnswer('turbo', 0.99));
+ expect(await chooseRoutingPreset([user('another')])).toMatchObject({ strategy: 'balanced', source: 'error' });
+ });
+
+ it("leaves BeatAPI's 1-per-minute free routes out of 'auto'", async () => {
+ getDb().prepare(`INSERT INTO media_models (platform, model_id, display_name, modality, priority, enabled, quota_label)
+ VALUES ('beatapi', 'jev-1.14-free', 'JEV', 'decision', -1, 1, '')`).run();
+ addKey('beatapi', 'sk-beat');
+ const fn = mockFetch(() => cloudflareAnswer('smartest', 0.9));
+ expect(await chooseRoutingPreset(HARD)).toEqual({ strategy: 'balanced', source: 'unavailable' });
+ expect(fn).not.toHaveBeenCalled();
+ });
+
+ it('records picks and fallbacks for the dashboard', async () => {
+ addKey('cloudflare', 'acct:token');
+ mockFetch(() => cloudflareAnswer('fastest', 0.9));
+ await applyDecisionRouting([user('hi')]);
+ await applyDecisionRouting([]);
+ const stats = getDecisionRoutingStats();
+ expect(stats.counts).toEqual({ smartest: 0, fastest: 1, balanced: 1, reliable: 0 });
+ expect(stats.fallbacks).toEqual({ unavailable: 1 });
+ expect(stats.recent.map(r => r.source)).toEqual(['unavailable', 'decision']);
+ });
+
+ it('validates settings', () => {
+ expect(getDecisionRoutingSettings()).toEqual({ model: 'auto', minProbability: 0.5 });
+ expect(() => setDecisionRoutingSettings({ minProbability: 1.5 })).toThrow();
+ expect(() => setDecisionRoutingSettings({ model: ' ' })).toThrow();
+ setDecisionRoutingSettings({ model: 'inception/mercury-decide:free', minProbability: 0.7 });
+ expect(getDecisionRoutingSettings()).toEqual({ model: 'inception/mercury-decide:free', minProbability: 0.7 });
+ });
+
+ it('labels fallbacks in the response header', () => {
+ expect(routingStrategyHeader({ strategy: 'smartest', source: 'decision' })).toBe('smartest');
+ expect(routingStrategyHeader({ strategy: 'fastest', source: 'cache' })).toBe('fastest');
+ expect(routingStrategyHeader({ strategy: 'balanced', source: 'timeout' })).toBe('balanced; fallback=timeout');
+ });
+});
+
+describe('decisionStateFor', () => {
+ it('reads the system prompt opening and the latest user message', () => {
+ const state = decisionStateFor([
+ { role: 'system', content: 'You are a coding agent.' },
+ user('first question'),
+ { role: 'assistant', content: 'answer' },
+ user([{ type: 'text', text: 'second question' }, { type: 'image_url', image_url: { url: 'x' } }]),
+ ]);
+ expect(state).toBe('System prompt (start): You are a coding agent.\n\nRequest: second question');
+ });
+
+ it('bounds a huge message and is empty without user text', () => {
+ expect(decisionStateFor([user('x'.repeat(50_000))]).length).toBeLessThan(2_000);
+ expect(decisionStateFor([{ role: 'system', content: 'only system' }])).toBe('');
+ });
+});
+
+describe('effectiveRoutingStrategy', () => {
+ beforeEach(() => {
+ process.env.ENCRYPTION_KEY = '0'.repeat(64);
+ initDb(':memory:');
+ });
+
+ it('is the set strategy for every non-decision strategy', async () => {
+ setRoutingStrategy('fastest');
+ expect(await inRequest(async () => effectiveRoutingStrategy())).toBe('fastest');
+ });
+
+ it('is Balanced under decision until a preset is picked', async () => {
+ setRoutingStrategy('decision');
+ expect(effectiveRoutingStrategy()).toBe('balanced');
+ expect(await inRequest(async () => effectiveRoutingStrategy())).toBe('balanced');
+ });
+});
+
+describe('decision routing status (setup guide)', () => {
+ beforeEach(() => {
+ process.env.ENCRYPTION_KEY = '0'.repeat(64);
+ initDb(':memory:');
+ resetDecisionRoutingCache();
+ });
+
+ it('has no models to offer before the catalog delivers any', async () => {
+ const { getDecisionRoutingStatus } = await import('../../services/routing-decision.js');
+ expect(getDecisionRoutingStatus()).toMatchObject({ ready: false, hasModels: false, keyPlatforms: [] });
+ });
+
+ it('names the providers whose key would make it ready, until one exists', async () => {
+ const { getDecisionRoutingStatus } = await import('../../services/routing-decision.js');
+ seedDecisionModels();
+ expect(getDecisionRoutingStatus()).toMatchObject({ ready: false, hasModels: true, keyPlatforms: ['cloudflare', 'openrouter'] });
+ addKey('openrouter', 'sk-or');
+ expect(getDecisionRoutingStatus()).toMatchObject({ ready: true, keyPlatforms: ['cloudflare', 'openrouter'] });
+ });
+
+ it("does not count a BeatAPI key as ready under 'auto', but does when BeatAPI is pinned", async () => {
+ const { getDecisionRoutingStatus } = await import('../../services/routing-decision.js');
+ getDb().prepare(`INSERT INTO media_models (platform, model_id, display_name, modality, priority, enabled, quota_label)
+ VALUES ('beatapi', 'jev-1.14-free', 'JEV', 'decision', 0, 1, '')`).run();
+ addKey('beatapi', 'sk-beat');
+ expect(getDecisionRoutingStatus()).toMatchObject({ ready: false, hasModels: false, keyPlatforms: [] });
+ setDecisionRoutingSettings({ model: 'jev-1.14-free' });
+ expect(getDecisionRoutingStatus()).toMatchObject({ ready: true, hasModels: true, keyPlatforms: ['beatapi'] });
+ });
+});
diff --git a/server/src/lib/client-context.ts b/server/src/lib/client-context.ts
index e5c3fc6e..8097f59d 100644
--- a/server/src/lib/client-context.ts
+++ b/server/src/lib/client-context.ts
@@ -1,11 +1,15 @@
import { AsyncLocalStorage } from 'async_hooks';
import type { NextFunction, Request, Response } from 'express';
import { classifyClientAgent, type ClientAgent } from './client-classifier.js';
+import type { PresetStrategy } from '../services/scoring.js';
export interface ClientContext {
ip: string | null;
userAgent: string | null;
agent: ClientAgent | null;
+ /** The preset a decision model picked for this request (#1354), read by the
+ * router while the 'decision' strategy is active. Unset = Balanced. */
+ routingStrategy?: PresetStrategy;
}
// Request-scoped caller identity, readable from anywhere below the middleware
@@ -48,3 +52,10 @@ export function clientContextMiddleware(req: Request, _res: Response, next: Next
export function getClientContext(): ClientContext {
return storage.getStore() ?? { ip: null, userAgent: null, agent: null };
}
+
+/** Record this request's decision-picked preset (#1354). A no-op outside a
+ * request scope (tests, background work), which then routes as Balanced. */
+export function setRequestRoutingStrategy(strategy: PresetStrategy | undefined): void {
+ const store = storage.getStore();
+ if (store) store.routingStrategy = strategy;
+}
diff --git a/server/src/routes/anthropic.ts b/server/src/routes/anthropic.ts
index 8084f03b..423d7cb5 100644
--- a/server/src/routes/anthropic.ts
+++ b/server/src/routes/anthropic.ts
@@ -32,6 +32,7 @@ import { buildModelListing } from '../services/model-listing.js';
import { compressRequest, formatCompressionHeader } from '../services/compression/pipeline.js';
import { normalizeMessageImages } from '../lib/image-normalize.js';
import { maybeServeAnthropicWebSearch, serverToolUseToText, webSearchResultToText } from '../lib/anthropic-web-search.js';
+import { applyDecisionRouting, routingStrategyHeader } from '../services/routing-decision.js';
// Anthropic-compatible Messages API (`POST /v1/messages`). This is a thin
// translation layer over the SAME router/fallback/analytics machinery the
@@ -670,6 +671,13 @@ export async function handleMessages(req: Request, res: Response): Promise<void>
});
const dispatchOptions = { ...completionOptions, signal: AbortSignal.any([clientAbort.signal, hedgeAbort.signal]) };
+ // Decision routing (#1354): with the 'decision' strategy on, a decision
+ // model picks which preset (Smartest / Fastest / Balanced / Most reliable)
+ // this turn routes with. Skipped when the client pinned a model or the
+ // conversation is sticky to one. Any doubt routes as Balanced.
+ const routingPick = await applyDecisionRouting(messages, { pinned: pinnedModelId != null || preferredModel != null, signal: clientAbort.signal });
+ if (routingPick && !res.headersSent) res.setHeader('X-FreeLLM-Routing-Strategy', routingStrategyHeader(routingPick));
+
await runFallbackLoop({
maxRetries: MAX_RETRIES,
state,
diff --git a/server/src/routes/fallback.ts b/server/src/routes/fallback.ts
index 39bf6c71..a15caa94 100644
--- a/server/src/routes/fallback.ts
+++ b/server/src/routes/fallback.ts
@@ -18,6 +18,7 @@ import { qualifiedModelMemberId } from '../lib/endpoint-scope.js';
import { overriddenFieldNames } from '../services/model-state.js';
import { parseModelScope, scopeAllows } from '../lib/model-scope.js';
import { getQuotaOutlook } from '../services/quota-outlook.js';
+import { getDecisionRoutingStatus, setDecisionRoutingSettings } from '../services/routing-decision.js';
export const fallbackRouter = Router();
@@ -39,6 +40,9 @@ fallbackRouter.get('/routing', (_req: Request, res: Response) => {
peakEndHour: peakHours.endHour,
peakTimezone: peakHours.timezone,
cooldownCeilingMs: getCooldownCeilingMs(),
+ // Decision routing (#1354): its settings, whether a decision model is
+ // usable, and since-boot picks. Present whatever the active strategy is.
+ decision: getDecisionRoutingStatus(),
});
});
@@ -54,7 +58,7 @@ fallbackRouter.delete('/penalty-inspector', (_req: Request, res: Response) => {
});
const routingSchema = z.object({
- strategy: z.enum(['priority', 'balanced', 'smartest', 'fastest', 'reliable', 'custom']),
+ strategy: z.enum(['priority', 'balanced', 'smartest', 'fastest', 'reliable', 'custom', 'decision']),
// Only meaningful with strategy 'custom': the user's weight vector. Any
// non-negative vector is accepted; setCustomWeights renormalizes to sum 1.
weights: z.object({
@@ -81,6 +85,11 @@ const routingSchema = z.object({
.min(MIN_COOLDOWN_CEILING_MS, { message: `cooldownCeilingMs must be at least ${MIN_COOLDOWN_CEILING_MS} (1 minute)` })
.max(MAX_COOLDOWN_CEILING_MS, { message: `cooldownCeilingMs must be at most ${MAX_COOLDOWN_CEILING_MS} (24 hours)` })
.nullable().optional(),
+ // Decision routing (#1354): which decision model picks the preset ('auto' or
+ // a decision model id) and the top probability below which it routes as
+ // Balanced. Saved whatever the strategy, so they can be set before switching.
+ decisionModel: z.string().trim().min(1).max(200).optional(),
+ decisionMinProbability: z.number().min(0).max(1).optional(),
});
// PUT /routing → switch strategy. Presets are just weight vectors over the three
@@ -112,6 +121,7 @@ fallbackRouter.put('/routing', (req: Request, res: Response) => {
if (parsed.data.cooldownCeilingMs !== undefined) {
setCooldownCeilingMs(parsed.data.cooldownCeilingMs);
}
+ setDecisionRoutingSettings({ model: parsed.data.decisionModel, minProbability: parsed.data.decisionMinProbability });
try {
setPeakHoursConfig({
enabled: parsed.data.peakHoursAdjust,
@@ -133,6 +143,7 @@ fallbackRouter.put('/routing', (req: Request, res: Response) => {
strategy: getRoutingStrategy(),
exploreEnabled: getExploreEnabled(),
keySelectionStrategy: getKeySelectionStrategy(),
+ decision: getDecisionRoutingStatus(),
presets: BANDIT_PRESETS,
weights: active.weights,
peakAdjusted: active.adjusted,
diff --git a/server/src/routes/mcp.ts b/server/src/routes/mcp.ts
index 95605f86..80f019b5 100644
--- a/server/src/routes/mcp.ts
+++ b/server/src/routes/mcp.ts
@@ -217,7 +217,7 @@ function routingInfo(): unknown {
};
}
-const ROUTING_STRATEGIES = ['priority', 'balanced', 'smartest', 'fastest', 'reliable', 'custom'] as const;
+const ROUTING_STRATEGIES = ['priority', 'balanced', 'smartest', 'fastest', 'reliable', 'custom', 'decision'] as const;
function setStrategy(args: Record<string, unknown>): unknown {
const strategy = args.strategy;
diff --git a/server/src/routes/proxy.ts b/server/src/routes/proxy.ts
index d9276037..e1ca1bda 100644
--- a/server/src/routes/proxy.ts
+++ b/server/src/routes/proxy.ts
@@ -40,6 +40,7 @@ import { isUnifyEnabled, getModelGroups, resolveRequestedIdForDispatch } from '.
import { buildModelListing, type NormalizedModel } from '../services/model-listing.js';
import { claudeFamilyDiscoveryEntries } from '../services/anthropic-map.js';
import { compressRequest, formatCompressionHeader } from '../services/compression/pipeline.js';
+import { applyDecisionRouting, routingStrategyHeader } from '../services/routing-decision.js';
export const proxyRouter = Router();
@@ -2289,6 +2290,13 @@ proxyRouter.post('/chat/completions', async (req: Request, res: Response) => {
// in-flight upstream instead of waiting for a stalled attempt to time out.
const hedgeAbort = new AbortController();
+ // Decision routing (#1354): with the 'decision' strategy on, a decision
+ // model picks which preset (Smartest / Fastest / Balanced / Most reliable)
+ // this turn routes with. Skipped when the client pinned a model or the
+ // conversation is sticky to one. Any doubt routes as Balanced.
+ const routingPick = await applyDecisionRouting(messages, { pinned: pinnedModelId != null || preferredModel != null, signal: clientAbort.signal });
+ if (routingPick && !res.headersSent) res.setHeader('X-FreeLLM-Routing-Strategy', routingStrategyHeader(routingPick));
+
await runFallbackLoop({
maxRetries: MAX_RETRIES,
state,
diff --git a/server/src/routes/responses.ts b/server/src/routes/responses.ts
index b15cc2e9..e2ea372c 100644
--- a/server/src/routes/responses.ts
+++ b/server/src/routes/responses.ts
@@ -48,6 +48,7 @@ import {
runFusion,
type FusionResult,
} from '../services/fusion.js';
+import { applyDecisionRouting, routingStrategyHeader } from '../services/routing-decision.js';
export const responsesRouter = Router();
@@ -1161,6 +1162,13 @@ export async function handleResponses(req: Request, res: Response): Promise<void
res.write(`data: ${JSON.stringify({ type: event, sequence_number: seq++, ...payload })}\n\n`);
};
+ // Decision routing (#1354): with the 'decision' strategy on, a decision
+ // model picks which preset (Smartest / Fastest / Balanced / Most reliable)
+ // this turn routes with. Skipped when the client pinned a model or the
+ // conversation is sticky to one. Any doubt routes as Balanced.
+ const routingPick = await applyDecisionRouting(messages, { pinned: !isAutoModel(requestedModelLabel) || preferredModel != null, signal: clientAbort.signal });
+ if (routingPick && !res.headersSent) res.setHeader('X-FreeLLM-Routing-Strategy', routingStrategyHeader(routingPick));
+
await runFallbackLoop({
maxRetries: MAX_RETRIES,
state,
diff --git a/server/src/services/decision.ts b/server/src/services/decision.ts
index 52792dd2..cf1ba447 100644
--- a/server/src/services/decision.ts
+++ b/server/src/services/decision.ts
@@ -77,6 +77,10 @@ export interface DecisionOptions {
signal?: AbortSignal;
/** Overrides the request-scoped client agent (tests, internal callers). */
clientAgent?: string | null;
+ /** With 'auto', leave these platforms out of the chain. Decision routing
+ * (#1354) asks once per chat turn, which BeatAPI's free 1 request/minute
+ * cannot keep up with. A pinned model is never skipped. */
+ skipPlatforms?: ReadonlySet<string>;
}
interface DecisionModelRow {
@@ -302,9 +306,9 @@ export function decisionsAvailable(): boolean {
return allDecisionRows().some(r => r.enabled === 1 && ADAPTERS[r.platform] && hasUsableKey(r.platform));
}
-function decisionChain(model: string | undefined): DecisionModelRow[] {
+function decisionChain(model: string | undefined, skipPlatforms?: ReadonlySet<string>): DecisionModelRow[] {
const enabled = allDecisionRows().filter(r => r.enabled === 1 && ADAPTERS[r.platform]);
- if (!model || model === 'auto') return enabled;
+ if (!model || model === 'auto') return skipPlatforms ? enabled.filter(r => !skipPlatforms.has(r.platform)) : enabled;
const pinned = enabled.filter(r => r.model_id === model);
if (pinned.length === 0) {
const known = allDecisionRows().some(r => r.model_id === model);
@@ -319,7 +323,7 @@ function decisionChain(model: string | undefined): DecisionModelRow[] {
}
export async function runDecision(body: DecisionRequest, opts: DecisionOptions = {}): Promise<DecisionResponse> {
- const chain = decisionChain(opts.model);
+ const chain = decisionChain(opts.model, opts.skipPlatforms);
const clientAgent = opts.clientAgent !== undefined ? opts.clientAgent : getClientContext().agent;
const questionCount = Object.keys(body.questions).length;
diff --git a/server/src/services/declarative-config.ts b/server/src/services/declarative-config.ts
index 50fb4ce9..fdf32642 100644
--- a/server/src/services/declarative-config.ts
+++ b/server/src/services/declarative-config.ts
@@ -105,7 +105,7 @@ const declarativeConfigSchema = z.object({
models: z.array(modelSchema).optional(),
fallback: z.array(fallbackEntrySchema).optional(),
routing: z.object({
- strategy: z.enum(['priority', 'balanced', 'smartest', 'fastest', 'reliable', 'custom']),
+ strategy: z.enum(['priority', 'balanced', 'smartest', 'fastest', 'reliable', 'custom', 'decision']),
weights: z.object({
reliability: z.number().nonnegative(),
speed: z.number().nonnegative(),
diff --git a/server/src/services/router.ts b/server/src/services/router.ts
index 12b3af60..280ffa6c 100644
--- a/server/src/services/router.ts
+++ b/server/src/services/router.ts
@@ -35,6 +35,7 @@ import { platformDropsResponseFormat } from '../lib/sampling-params.js';
import { passesContextWindowFloor } from '../lib/min-context-window.js';
import { isUnifyEnabled, getModelGroups, resolveRequestedIdForDispatch } from './model-groups.js';
import { getActiveProfileId } from './profile-models.js';
+import { getClientContext } from '../lib/client-context.js';
import { customEndpointKeyIds } from './custom-endpoint.js';
import { isDegraded } from './degradation.js';
import { modelStatsKey, endpointScopeForBaseUrl } from '../lib/endpoint-scope.js';
@@ -509,7 +510,7 @@ export const EXPLORE_CHANCE = 0.1;
/** A model counts as "has data" once its decay-weighted success+failure
* pseudo-count reaches this many samples. */
export const EXPLORE_MIN_SAMPLES = 5;
-const VALID_STRATEGIES: RoutingStrategy[] = ['priority', 'balanced', 'smartest', 'fastest', 'reliable', 'custom'];
+const VALID_STRATEGIES: RoutingStrategy[] = ['priority', 'balanced', 'smartest', 'fastest', 'reliable', 'custom', 'decision'];
export function getRoutingStrategy(): RoutingStrategy {
const raw = getSetting(STRATEGY_KEY);
@@ -751,9 +752,21 @@ export function setCommunityPriors(priors: CommunityPriorMap): number {
function weightsWithPeak(strategy: RoutingStrategy): { weights: RoutingWeights | null; adjusted: boolean } {
if (strategy === 'priority') return { weights: null, adjusted: false };
if (strategy === 'custom') return { weights: getCustomWeights(), adjusted: false };
+ // 'decision' outside a picked request (display, fusion, background) scores
+ // as Balanced, the same preset an unsure or unavailable decision falls to.
+ if (strategy === 'decision') return weightsWithPeak('balanced');
return peakAdjustedWeights(BANDIT_PRESETS[strategy], strategy, getPeakHoursConfig());
}
+/** The strategy THIS request routes with. Under 'decision' (#1354) that is the
+ * preset the decision model picked for the request, else Balanced; every
+ * other strategy is used as set. */
+export function effectiveRoutingStrategy(): RoutingStrategy {
+ const strategy = getRoutingStrategy();
+ if (strategy !== 'decision') return strategy;
+ return getClientContext().routingStrategy ?? 'balanced';
+}
+
function weightsFor(strategy: RoutingStrategy): RoutingWeights | null {
return weightsWithPeak(strategy).weights;
}
@@ -1934,7 +1947,7 @@ export function resolveModelGroupCandidates(
demotedDbIds?: ReadonlySet<number>,
): ChainRow[] {
const db = getDb();
- const strategy = getRoutingStrategy();
+ const strategy = effectiveRoutingStrategy();
if (strategy !== 'priority') refreshStatsCache(db);
const activeProfileId = getActiveProfileId(db);
@@ -2139,7 +2152,7 @@ export function resolveFusionCandidate(modelId: string): FusionCandidate | null
export function routeRequest(estimatedTokens = 1000, skipKeys?: Set<string>, preferredModelDbId?: number, requireVision = false, requireTools = false, skipModels?: Set<number>, prefetchedChain?: ChainRow[], requireStructured = false, skipPlatforms?: Set<string>, exactOutputReserve = 0, task?: 'code' | 'chat'): RouteResult {
const db = getDb();
- const strategy = getRoutingStrategy();
+ const strategy = effectiveRoutingStrategy();
if (strategy !== 'priority') refreshStatsCache(db);
const chain = (prefetchedChain ?? getActiveChain(db)).filter(e => e.enabled);
diff --git a/server/src/services/routing-decision.ts b/server/src/services/routing-decision.ts
new file mode 100644
index 00000000..ac1598ad
--- /dev/null
+++ b/server/src/services/routing-decision.ts
@@ -0,0 +1,253 @@
+import { createHash } from 'crypto';
+import type { ChatMessage, ChatContent } from '@freellmapi/shared/types.js';
+import { getSetting, setSetting } from '../db/index.js';
+import { setRequestRoutingStrategy } from '../lib/client-context.js';
+import { DecisionError, listDecisionModels, runDecision } from './decision.js';
+import { getRoutingStrategy } from './router.js';
+import type { PresetStrategy } from './scoring.js';
+
+// Decision routing (#1354). With the 'decision' strategy on, a decision model
+// reads the request and picks which of the four presets (Smartest, Fastest,
+// Balanced, Most reliable) this request routes with. The pick only re-weights
+// the bandit for this one request: every capability gate and the keep-trying
+// fallback chain stay exactly as they are, and any doubt routes as Balanced:
+// - the top probability is below the configured minimum,
+// - the decision takes longer than DECISION_TIMEOUT_MS,
+// - no decision model or key is available, or the call fails.
+// One decision per user turn: the answer is cached on the text it was asked
+// about, so an agent's tool-call loop inside one turn asks once.
+
+export const DECISION_PRESETS: readonly PresetStrategy[] = ['smartest', 'fastest', 'balanced', 'reliable'];
+
+const DECISION_MODEL_KEY = 'routing_decision_model';
+const MIN_PROBABILITY_KEY = 'routing_decision_min_probability';
+export const DEFAULT_MIN_PROBABILITY = 0.5;
+export const DECISION_TIMEOUT_MS = 1500;
+/** Logged as the decision's client so Models → Decision shows routing usage. */
+export const ROUTER_CLIENT = 'freellmapi-router';
+// BeatAPI's free routes allow one successful call a minute per account: fine
+// for /v1/decisions, far too slow to sit in front of every chat turn.
+const AUTO_SKIP_PLATFORMS: ReadonlySet<string> = new Set(['beatapi']);
+
+const SYSTEM_CHARS = 400;
+const USER_CHARS = 1600;
+const CACHE_TTL_MS = 30 * 60_000;
+const CACHE_MAX = 500;
+
+const QUESTION = {
+ type: 'choice' as const,
+ instructions:
+ 'You route requests for an LLM gateway. Read the request and pick the routing strategy that serves it best. ' +
+ 'Judge by how hard the request is and what the person needs from the answer, not by its topic.',
+ criteria: {
+ smartest: 'Hard or high-stakes: answer quality matters most and waiting a bit longer is fine.',
+ fastest: 'Simple or short: a quick answer matters most and a smaller model will do.',
+ balanced: 'Ordinary request: a sensible mix of quality and speed.',
+ reliable: 'Must work first time: strict formats, structured output or an automated step that cannot be retried by hand.',
+ } satisfies Record<PresetStrategy, string>,
+};
+
+export interface DecisionRoutingSettings {
+ /** A decision model id, or 'auto' (first available, BeatAPI skipped). */
+ model: string;
+ /** 0..1: below this top probability the request routes as Balanced. */
+ minProbability: number;
+}
+
+export function getDecisionRoutingSettings(): DecisionRoutingSettings {
+ const model = getSetting(DECISION_MODEL_KEY)?.trim() || 'auto';
+ const raw = getSetting(MIN_PROBABILITY_KEY);
+ const n = raw === undefined || raw.trim() === '' ? NaN : Number(raw);
+ return { model, minProbability: Number.isFinite(n) && n >= 0 && n <= 1 ? n : DEFAULT_MIN_PROBABILITY };
+}
+
+export function setDecisionRoutingSettings(patch: Partial<DecisionRoutingSettings>): void {
+ if (patch.model !== undefined) {
+ const model = patch.model.trim();
+ if (!model) throw new Error('decision model must be a model id or "auto"');
+ setSetting(DECISION_MODEL_KEY, model);
+ }
+ if (patch.minProbability !== undefined) {
+ if (!Number.isFinite(patch.minProbability) || patch.minProbability < 0 || patch.minProbability > 1) {
+ throw new Error('minProbability must be between 0 and 1');
+ }
+ setSetting(MIN_PROBABILITY_KEY, String(patch.minProbability));
+ }
+}
+
+export type DecisionPickSource = 'decision' | 'cache' | 'low_confidence' | 'timeout' | 'unavailable' | 'error';
+
+export interface DecisionPick {
+ strategy: PresetStrategy;
+ source: DecisionPickSource;
+ /** The top probability the decision model gave (absent on fallback). */
+ probability?: number;
+ /** The decision model that answered. */
+ model?: string;
+}
+
+// ── Per-turn cache ──────────────────────────────────────────────────────────
+const cache = new Map<string, { pick: DecisionPick; at: number }>();
+
+function cacheGet(key: string): DecisionPick | undefined {
+ const hit = cache.get(key);
+ if (!hit) return undefined;
+ if (Date.now() - hit.at > CACHE_TTL_MS) {
+ cache.delete(key);
+ return undefined;
+ }
+ return hit.pick;
+}
+
+function cachePut(key: string, pick: DecisionPick): void {
+ if (cache.size >= CACHE_MAX) cache.delete(cache.keys().next().value!);
+ cache.set(key, { pick, at: Date.now() });
+}
+
+export function resetDecisionRoutingCache(): void {
+ cache.clear();
+ stats.counts = { smartest: 0, fastest: 0, balanced: 0, reliable: 0 };
+ stats.fallbacks = {};
+ stats.recent = [];
+}
+
+// ── Stats for the dashboard (in-memory, since boot) ─────────────────────────
+const RECENT_MAX = 20;
+const stats: {
+ counts: Record<PresetStrategy, number>;
+ fallbacks: Partial<Record<DecisionPickSource, number>>;
+ recent: Array<DecisionPick & { at: number }>;
+} = { counts: { smartest: 0, fastest: 0, balanced: 0, reliable: 0 }, fallbacks: {}, recent: [] };
+
+function record(pick: DecisionPick): void {
+ stats.counts[pick.strategy]++;
+ if (pick.source !== 'decision' && pick.source !== 'cache') {
+ stats.fallbacks[pick.source] = (stats.fallbacks[pick.source] ?? 0) + 1;
+ }
+ stats.recent.unshift({ ...pick, at: Date.now() });
+ if (stats.recent.length > RECENT_MAX) stats.recent.length = RECENT_MAX;
+}
+
+export function getDecisionRoutingStats() {
+ return { counts: { ...stats.counts }, fallbacks: { ...stats.fallbacks }, recent: stats.recent.slice() };
+}
+
+// ── What the decision model reads ───────────────────────────────────────────
+function contentText(content: ChatContent): string {
+ if (typeof content === 'string') return content;
+ if (!Array.isArray(content)) return '';
+ return content
+ .map(block => (typeof block === 'string' ? block : typeof block?.text === 'string' ? block.text : ''))
+ .filter(Boolean)
+ .join('\n');
+}
+
+/** The system prompt's opening plus the latest user message, bounded so a huge
+ * conversation never turns into a huge decision prompt. Empty when there is
+ * no user text to judge (nothing to decide on: route as Balanced). */
+export function decisionStateFor(messages: readonly ChatMessage[]): string {
+ const system = messages.filter(m => m.role === 'system').map(m => contentText(m.content)).join('\n').trim();
+ let user = '';
+ for (let i = messages.length - 1; i >= 0; i--) {
+ if (messages[i].role === 'user') {
+ user = contentText(messages[i].content).trim();
+ if (user) break;
+ }
+ }
+ if (!user) return '';
+ const parts: string[] = [];
+ if (system) parts.push(`System prompt (start): ${system.slice(0, SYSTEM_CHARS)}`);
+ parts.push(`Request: ${user.slice(0, USER_CHARS)}`);
+ return parts.join('\n\n');
+}
+
+function topProbability(answer: unknown, chosen: string): number | undefined {
+ const probs = (answer as { probabilities?: unknown } | null)?.probabilities;
+ if (!probs || typeof probs !== 'object') return undefined;
+ const p = (probs as Record<string, unknown>)[chosen];
+ return typeof p === 'number' && Number.isFinite(p) ? p : undefined;
+}
+
+/** Ask the decision model which preset fits this request. Never throws: every
+ * failure is a Balanced pick with the reason in `source`. */
+export async function chooseRoutingPreset(messages: readonly ChatMessage[], signal?: AbortSignal): Promise<DecisionPick> {
+ const state = decisionStateFor(messages);
+ if (!state) return { strategy: 'balanced', source: 'unavailable' };
+
+ const settings = getDecisionRoutingSettings();
+ const key = createHash('sha256').update(`${settings.model}\0${state}`).digest('hex');
+ const cached = cacheGet(key);
+ if (cached) return { ...cached, source: 'cache' };
+
+ const timeout = AbortSignal.timeout(DECISION_TIMEOUT_MS);
+ try {
+ const out = await runDecision(
+ { state, questions: { strategy: QUESTION } },
+ {
+ model: settings.model,
+ signal: signal ? AbortSignal.any([timeout, signal]) : timeout,
+ clientAgent: ROUTER_CLIENT,
+ skipPlatforms: settings.model === 'auto' ? AUTO_SKIP_PLATFORMS : undefined,
+ },
+ );
+ const answer = out.answers.strategy as { choice?: unknown } | undefined;
+ const choice = answer?.choice;
+ if (typeof choice !== 'string' || !DECISION_PRESETS.includes(choice as PresetStrategy)) {
+ return { strategy: 'balanced', source: 'error', model: out.model };
+ }
+ const probability = topProbability(answer, choice);
+ const pick: DecisionPick = (probability ?? 0) >= settings.minProbability
+ ? { strategy: choice as PresetStrategy, source: 'decision', probability, model: out.model }
+ : { strategy: 'balanced', source: 'low_confidence', probability, model: out.model };
+ cachePut(key, pick);
+ return pick;
+ } catch (err) {
+ if (timeout.aborted) return { strategy: 'balanced', source: 'timeout' };
+ const status = err instanceof DecisionError ? err.status : undefined;
+ return { strategy: 'balanced', source: status === 503 || status === 429 ? 'unavailable' : 'error' };
+ }
+}
+
+/**
+ * Called by the chat surfaces before routing. When the 'decision' strategy is
+ * active and the request did not pin a model, picks the preset for this
+ * request and stores it on the request context for the router. Returns the
+ * pick (for the X-FreeLLM-Routing-Strategy header), or null when the strategy
+ * is something else or the request pins a model.
+ */
+export async function applyDecisionRouting(
+ messages: readonly ChatMessage[],
+ opts: { pinned?: boolean; signal?: AbortSignal } = {},
+): Promise<DecisionPick | null> {
+ if (getRoutingStrategy() !== 'decision' || opts.pinned) return null;
+ const pick = await chooseRoutingPreset(messages, opts.signal);
+ setRequestRoutingStrategy(pick.strategy);
+ record(pick);
+ return pick;
+}
+
+/** Header value: the preset, plus why when it is a fallback. */
+export function routingStrategyHeader(pick: DecisionPick): string {
+ return pick.source === 'decision' || pick.source === 'cache' ? pick.strategy : `${pick.strategy}; fallback=${pick.source}`;
+}
+
+/** Settings + since-boot stats for the dashboard, plus what the setup guide
+ * needs. Mirrors the chain routing would use: the pinned model, or with
+ * 'auto' every enabled decision model except the skipped platforms.
+ * - `ready`: one of those has a usable key (else every request is Balanced).
+ * - `hasModels`: there is at least one such model to add a key for.
+ * - `keyPlatforms`: providers whose key would make it ready, in priority order. */
+export function getDecisionRoutingStatus() {
+ const settings = getDecisionRoutingSettings();
+ const candidates = listDecisionModels()
+ .filter(m => m.enabled)
+ .filter(m => settings.model === 'auto' ? !AUTO_SKIP_PLATFORMS.has(m.platform) : m.modelId === settings.model)
+ .sort((a, b) => a.priority - b.priority || a.id - b.id);
+ return {
+ ...settings,
+ ready: candidates.some(m => m.healthyKeyCount > 0),
+ hasModels: candidates.length > 0,
+ keyPlatforms: [...new Set(candidates.map(m => m.platform))],
+ ...getDecisionRoutingStats(),
+ };
+}
diff --git a/server/src/services/scoring.ts b/server/src/services/scoring.ts
index 73de785b..c72fb113 100644
--- a/server/src/services/scoring.ts
+++ b/server/src/services/scoring.ts
@@ -29,9 +29,14 @@ export interface RoutingWeights {
}
// Strategy is either the legacy manual chain ('priority'), one of the bandit
-// presets, or 'custom' (a user-tuned weight vector persisted in settings — see
-// router.ts). Each is just a weight vector — the engine is identical.
-export type RoutingStrategy = 'priority' | 'balanced' | 'smartest' | 'fastest' | 'reliable' | 'custom';
+// presets, 'custom' (a user-tuned weight vector persisted in settings — see
+// router.ts) or 'decision' (#1354: a decision model picks one of the four
+// presets per request — see services/routing-decision.ts). Each resolves to a
+// weight vector — the engine is identical.
+export type RoutingStrategy = 'priority' | 'balanced' | 'smartest' | 'fastest' | 'reliable' | 'custom' | 'decision';
+
+/** The presets a decision model may choose between, per request. */
+export type PresetStrategy = 'balanced' | 'smartest' | 'fastest' | 'reliable';
// How the router picks BETWEEN several keys of one platform, once a model has
// been chosen. Deliberately not a RoutingStrategy: model ranking and key
@@ -41,7 +46,7 @@ export type RoutingStrategy = 'priority' | 'balanced' | 'smartest' | 'fastest' |
// 'least-remaining' additionally ranks by observed remaining quota (#919).
export type KeySelectionStrategy = 'auto' | 'least-remaining';
-export const BANDIT_PRESETS: Record<Exclude<RoutingStrategy, 'priority' | 'custom'>, RoutingWeights> = {
+export const BANDIT_PRESETS: Record<PresetStrategy, RoutingWeights> = {
// Reliability leads; speed and intelligence split the rest evenly.
balanced: { reliability: 0.5, speed: 0.25, intelligence: 0.25 },
// Intelligence leads, but reliability still carries real weight so a smart