From 8473538e7ad1ad2fea7ded8cba404bb3c32f5e79 Mon Sep 17 00:00:00 2001
From: Xubin Ren <52506698+Re-bin@users.noreply.github.com>
Date: Sun, 20 Sep 2026 16:05:03 +0800
Subject: [PATCH] fix(webui): show provider logos in model notices
---
.../components/thread/ModelFallbackNotice.tsx | 15 +++++---
.../components/thread/ModelPresetBadge.tsx | 2 +-
webui/src/components/thread/ThreadShell.tsx | 1 +
.../src/tests/model-fallback-notice.test.tsx | 36 +++++++++++++++++++
4 files changed, 48 insertions(+), 6 deletions(-)
create mode 100644 webui/src/tests/model-fallback-notice.test.tsx
diff --git a/webui/src/components/thread/ModelFallbackNotice.tsx b/webui/src/components/thread/ModelFallbackNotice.tsx
index 7fb35e3f6..bd1cfada4 100644
--- a/webui/src/components/thread/ModelFallbackNotice.tsx
+++ b/webui/src/components/thread/ModelFallbackNotice.tsx
@@ -1,11 +1,13 @@
-import { ArrowRightLeft, KeyRound, X } from "lucide-react";
+import { X } from "lucide-react";
import { useTranslation } from "react-i18next";
import { Button } from "@/components/ui/button";
+import { PresetProviderIcon } from "@/components/thread/ModelPresetBadge";
/** A live fallback is informative, not a failed message or a changed preset. */
-export function ModelFallbackNotice({ model, reauthProviderLabel, onDismiss, onOpenSettings }: {
+export function ModelFallbackNotice({ model, reauthProvider, reauthProviderLabel, onDismiss, onOpenSettings }: {
model: string;
+ reauthProvider?: string;
reauthProviderLabel?: string;
onDismiss: () => void;
onOpenSettings?: () => void;
@@ -16,9 +18,12 @@ export function ModelFallbackNotice({ model, reauthProviderLabel, onDismiss, onO
role="status"
className="mx-auto mb-2 flex w-full max-w-[49.5rem] items-start gap-2 rounded-control border border-border/60 bg-muted/40 px-3 py-2 text-xs text-foreground/80 animate-in fade-in-0 slide-in-from-bottom-1 motion-reduce:animate-none"
>
- {reauthProviderLabel
- ?