The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(settings): add custom routing dialog for AI provider selection\n\nIntroduce a new CustomRoutingDialog component that allows users to configure custom routing rules for AI provider selection, replacing the previous ProviderModelPickerDialog. This change enables more flexible and granular control over how AI requests are routed to different providers based on user-defined criteria.\n\nAuto-committed-on: macbook\n
Steven Enamakelcd3fe89e5719
diff --git a/app/src/components/settings/panels/ai/CustomRoutingDialog.tsx b/app/src/components/settings/panels/ai/CustomRoutingDialog.tsxindex 313a0b79f0..0832cb1382 100644--- a/app/src/components/settings/panels/ai/CustomRoutingDialog.tsx+++ b/app/src/components/settings/panels/ai/CustomRoutingDialog.tsx@@ -283,64 +283,64 @@ export const CustomRoutingDialog = ({</Alert>)}<Button- type="button"- variant="secondary"- size="md"- onClick={() => setPickerOpen(true)}- className="h-auto w-full justify-between px-3 py-2.5 text-left">- <span className="flex min-w-0 flex-col gap-0.5">- <span className="text-xs font-medium text-content-secondary">Provider and model</span>- <span className="truncate text-sm font-medium text-content">- {model ? `${selectedProviderLabel} · ${model}` : 'Select provider and model'}- </span>+ type="button"+ variant="secondary"+ size="md"+ onClick={() => setPickerOpen(true)}+ className="h-auto w-full justify-between px-3 py-2.5 text-left">+ <span className="flex min-w-0 flex-col gap-0.5">+ <span className="text-xs font-medium text-content-secondary">Provider and model</span>+ <span className="truncate text-sm font-medium text-content">+ {model ? `${selectedProviderLabel} · ${model}` : 'Select provider and model'}</span>- <span className="text-xs text-content-muted">Change</span>- </Button>+ </span>+ <span className="text-xs text-content-muted">Change</span>+ </Button>- <TemperatureOverrideField temperature={temperature} onChange={setTemperature} />+ <TemperatureOverrideField temperature={temperature} onChange={setTemperature} />- {/* Vision capability (optional). Marks a custom/BYOK model as+ {/* Vision capability (optional). Marks a custom/BYOK model asaccepting image input so the chat composer offers imageattachments for it. Only shown once a concrete model is chosen. */}- {registrySlug && model.trim().length > 0 && (- <div className="flex flex-col gap-1.5">- <Label className="inline-flex items-center gap-2 text-xs text-content-secondary">- <Checkbox- checked={visionLocked ? true : vision}- onCheckedChange={setVision}- disabled={visionLocked}- className="h-3.5 w-3.5 disabled:opacity-60"- />- {t('settings.ai.modelVision')}- </Label>- <p className="text-[11px] text-content-faint">{t('settings.ai.modelVisionDesc')}</p>- </div>- )}+ {registrySlug && model.trim().length > 0 && (+ <div className="flex flex-col gap-1.5">+ <Label className="inline-flex items-center gap-2 text-xs text-content-secondary">+ <Checkbox+ checked={visionLocked ? true : vision}+ onCheckedChange={setVision}+ disabled={visionLocked}+ className="h-3.5 w-3.5 disabled:opacity-60"+ />+ {t('settings.ai.modelVision')}+ </Label>+ <p className="text-[11px] text-content-faint">{t('settings.ai.modelVisionDesc')}</p>+ </div>+ )}- <ModelTestResultPanel- testBusy={testBusy}- testReply={testReply}- testError={testError}- testStartedAt={testStartedAt}- currentProviderString={currentProviderString}- />+ <ModelTestResultPanel+ testBusy={testBusy}+ testReply={testReply}+ testError={testError}+ testStartedAt={testStartedAt}+ currentProviderString={currentProviderString}+ />- {pickerOpen && (- <ProviderModelPickerDialog- cloudProviders={customCloud}- localModels={localModels}- ollamaRunning={ollamaRunning}- claudeCodeEnabled={claudeCodeEnabled}- initial={source && model ? { source, model } : null}- onClose={() => setPickerOpen(false)}- onSelect={({ source: nextSource, model: nextModel }) => {- resetTestState();- setSource(nextSource);- setModel(nextModel);- setPickerOpen(false);- }}- />- )}+ {pickerOpen && (+ <ProviderModelPickerDialog+ cloudProviders={customCloud}+ localModels={localModels}+ ollamaRunning={ollamaRunning}+ claudeCodeEnabled={claudeCodeEnabled}+ initial={source && model ? { source, model } : null}+ onClose={() => setPickerOpen(false)}+ onSelect={({ source: nextSource, model: nextModel }) => {+ resetTestState();+ setSource(nextSource);+ setModel(nextModel);+ setPickerOpen(false);+ }}+ />+ )}</div></ModalShell>);diff --git a/app/src/components/settings/panels/ai/ProviderModelPickerDialog.tsx b/app/src/components/settings/panels/ai/ProviderModelPickerDialog.tsxindex 5c3651cc62..332626c66c 100644--- a/app/src/components/settings/panels/ai/ProviderModelPickerDialog.tsx+++ b/app/src/components/settings/panels/ai/ProviderModelPickerDialog.tsx@@ -1,7 +1,6 @@import { useEffect, useMemo, useState } from 'react';import { useT } from '../../../../lib/i18n/I18nContext';-import { listProviderModels, type ModelInfo } from '../../../../services/api/aiSettingsApi';import Button from '../../../ui/Button';import { ModalShell } from '../../../ui/ModalShell';