From ed2bf680baedfbdc914232cd7fbcdfd41c4ee2f4 Mon Sep 17 00:00:00 2001 From: Daniel Klein <37589721+danielmklein@users.noreply.github.com> Date: Tue, 18 Nov 2025 22:19:36 -0600 Subject: [PATCH] fix: hide setup banner if any custom providers are configured (#1756) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #1108 ## Summary The "Setup AI Access" banner was not being hidden when custom providers were configured. This was because the `isAnyProviderSetup()` function only checked hardcoded cloud providers and didn't account for custom providers. ## Changes Updated `useLanguageModelProviders.ts` to check for configured custom providers in addition to the hardcoded cloud providers. ## Test plan - Configure a custom provider without setting up any cloud providers - Verify that the "Setup AI Access" banner is now hidden 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- ## Summary by cubic Hide the "Setup AI Access" banner when any provider is configured, including custom providers. Fixes a logic gap where only hardcoded cloud providers were checked. - **Bug Fixes** - Extend isAnyProviderSetup to check custom providers from query data (by id). - Banner no longer shows when a custom provider is configured without cloud providers. Written for commit 2ecef7aac52da0b4d43c69fc5d3afb7bafa5706a. Summary will update automatically on new commits. --- src/hooks/useLanguageModelProviders.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/hooks/useLanguageModelProviders.ts b/src/hooks/useLanguageModelProviders.ts index 5cf6397..7518933 100644 --- a/src/hooks/useLanguageModelProviders.ts +++ b/src/hooks/useLanguageModelProviders.ts @@ -61,7 +61,18 @@ export function useLanguageModelProviders() { }; const isAnyProviderSetup = () => { - return cloudProviders.some((provider) => isProviderSetup(provider)); + // Check hardcoded cloud providers + if (cloudProviders.some((provider) => isProviderSetup(provider))) { + return true; + } + + // Check custom providers + const customProviders = queryResult.data?.filter( + (provider) => provider.type === "custom", + ); + return ( + customProviders?.some((provider) => isProviderSetup(provider.id)) ?? false + ); }; return {