Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(ai): handle provider list update after adding new provider

Steven Enamakel08ad00fad203
diff --git a/app/src/components/settings/panels/ai/AddProviderDialog.tsx b/app/src/components/settings/panels/ai/AddProviderDialog.tsx
index 5416268240..e2284e37ba 100644
--- a/app/src/components/settings/panels/ai/AddProviderDialog.tsx
+++ b/app/src/components/settings/panels/ai/AddProviderDialog.tsx
@@ -63,7 +63,7 @@ export interface ProviderCategory {
/** Brand mark where Simple Icons has one, the initial where it does not. See
* `providerIcons.tsx` for why coverage is partial by design. */
const OptionSwatch = ({ slug, label, tone }: { slug: string; label: string; tone: string }) => {
- const Icon = providerIcon(slug);
+ const icon = providerIcon(slug, 'h-3.5 w-3.5');
return (
<span
aria-hidden
@@ -71,7 +71,7 @@ const OptionSwatch = ({ slug, label, tone }: { slug: string; label: string; tone
'flex h-6 w-6 flex-shrink-0 items-center justify-center rounded-md text-[10px] font-semibold ring-1',
tone
)}>
- {Icon ? <Icon className="h-3.5 w-3.5" /> : label.trim().charAt(0).toUpperCase() || '?'}
+ {icon ?? (label.trim().charAt(0).toUpperCase() || '?')}
</span>
);
};
diff --git a/app/src/components/settings/panels/ai/ProviderListRow.tsx b/app/src/components/settings/panels/ai/ProviderListRow.tsx
index cb3f9fc4a9..b47a6edae2 100644
--- a/app/src/components/settings/panels/ai/ProviderListRow.tsx
+++ b/app/src/components/settings/panels/ai/ProviderListRow.tsx
@@ -72,7 +72,7 @@ export interface ProviderRowAction {
* announcing "O, OpenAI" helps nobody.
*/
const ProviderSwatch = ({ slug, label, tone }: { slug: string; label: string; tone: string }) => {
- const Icon = providerIcon(slug);
+ const icon = providerIcon(slug, 'h-4 w-4');
return (
<span
aria-hidden
@@ -81,7 +81,7 @@ const ProviderSwatch = ({ slug, label, tone }: { slug: string; label: string; to
'flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg text-xs font-semibold ring-1',
tone
)}>
- {Icon ? <Icon className="h-4 w-4" /> : label.trim().charAt(0).toUpperCase() || '?'}
+ {icon ?? (label.trim().charAt(0).toUpperCase() || '?')}
</span>
);
};