diff --git a/src/webview/providers.tsx b/src/webview/providers.tsx
index 7c42da90..b0972c87 100644
--- a/src/webview/providers.tsx
+++ b/src/webview/providers.tsx
@@ -181,6 +181,8 @@ function ProviderForm({ onClose, provider }: ProviderFormProps) {
onClose()
}
+ const hasOllamaModels = !!models?.length
+
return (
<>
@@ -268,7 +270,7 @@ function ProviderForm({ onClose, provider }: ProviderFormProps) {
- {formState.provider === ApiProviders.Ollama && models?.length && (
+ {formState.provider === ApiProviders.Ollama && hasOllamaModels && (