From 27f73cde6a6f1cf15045dd23902c14fa73bae85d Mon Sep 17 00:00:00 2001 From: Duc Nguyen <87276974+itsddvn@users.noreply.github.com> Date: Sun, 1 Mar 2026 14:38:28 +0700 Subject: [PATCH] Fix/model name display (#26) * fix(channels): start outbound dispatcher before channel check StartAll() returned early when no channels existed at boot, skipping the dispatchOutbound goroutine. Channels loaded later via Reload() assumed the dispatcher was running, causing outbound messages (agent responses) to never reach Telegram. Move dispatcher startup before the empty-channel early return so dynamically loaded channels always have a running consumer. * feat(ui): add LLM provider warning on overview page and ignore plans dir Show alert when no providers configured or all disabled, linking to provider settings. Add plans/ to .gitignore. * fix: use model ID as display name in OpenAI-compatible provider list The `owned_by` field (e.g. "system") was incorrectly used as the model display name, causing all models to show as "system" in the UI dropdown for providers like AliCloud DashScope. --------- Co-authored-by: ntduc --- .gitignore | 3 ++- internal/http/provider_models.go | 2 +- ui/web/src/pages/overview/overview-page.tsx | 27 ++++++++++++++++++++- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7c6955a9..5e09d045 100644 --- a/.gitignore +++ b/.gitignore @@ -35,4 +35,5 @@ tmp deploy-*.sh -docs/technical-diaries \ No newline at end of file +docs/technical-diaries +plans \ No newline at end of file diff --git a/internal/http/provider_models.go b/internal/http/provider_models.go index b5c69f9f..e0294ecf 100644 --- a/internal/http/provider_models.go +++ b/internal/http/provider_models.go @@ -194,7 +194,7 @@ func fetchOpenAIModels(ctx context.Context, apiBase, apiKey string) ([]ModelInfo models := make([]ModelInfo, 0, len(result.Data)) for _, m := range result.Data { - models = append(models, ModelInfo{ID: m.ID, Name: m.OwnedBy}) + models = append(models, ModelInfo{ID: m.ID, Name: m.ID}) } return models, nil } diff --git a/ui/web/src/pages/overview/overview-page.tsx b/ui/web/src/pages/overview/overview-page.tsx index d5717c53..f264d561 100644 --- a/ui/web/src/pages/overview/overview-page.tsx +++ b/ui/web/src/pages/overview/overview-page.tsx @@ -1,11 +1,15 @@ import { useEffect, useState, useCallback } from "react"; -import { Activity, Bot, History, Zap } from "lucide-react"; +import { Activity, Bot, History, Zap, AlertTriangle } from "lucide-react"; +import { Link } from "react-router"; import { PageHeader } from "@/components/shared/page-header"; import { StatusBadge } from "@/components/shared/status-badge"; +import { Alert, AlertTitle, AlertDescription } from "@/components/ui/alert"; import { useAuthStore } from "@/stores/use-auth-store"; import { useWsCall } from "@/hooks/use-ws-call"; import { useWsEvent } from "@/hooks/use-ws-event"; +import { useProviders } from "@/pages/providers/hooks/use-providers"; import { Methods, Events } from "@/api/protocol"; +import { ROUTES } from "@/lib/constants"; interface HealthPayload { status?: string; @@ -52,8 +56,12 @@ export function OverviewPage() { const connected = useAuthStore((s) => s.connected); const { call: fetchHealth, data: health } = useWsCall(Methods.HEALTH); const { call: fetchStatus, data: status } = useWsCall(Methods.STATUS); + const { providers, loading: providersLoading } = useProviders(); const [, setLastUpdate] = useState(0); + const hasNoProviders = !providersLoading && providers.length === 0; + const hasNoEnabledProviders = !providersLoading && providers.length > 0 && !providers.some((p) => p.enabled); + useEffect(() => { if (connected) { fetchHealth(); @@ -82,6 +90,23 @@ export function OverviewPage() { } /> + {(hasNoProviders || hasNoEnabledProviders) && ( + + + + {hasNoProviders ? "No LLM providers configured" : "No LLM providers enabled"} + + + {hasNoProviders + ? "You need to add at least one LLM provider before agents can work. " + : "All providers are currently disabled. Enable at least one to start using agents. "} + + Go to Provider Settings + + + + )} +