diff --git a/ui/public/icons/ollama.svg b/ui/public/icons/ollama.svg new file mode 100644 index 00000000..cc887e3d --- /dev/null +++ b/ui/public/icons/ollama.svg @@ -0,0 +1 @@ +Ollama \ No newline at end of file diff --git a/ui/src/components/profiles/profile-create-dialog.tsx b/ui/src/components/profiles/profile-create-dialog.tsx index 0d7fff12..2c3d283a 100644 --- a/ui/src/components/profiles/profile-create-dialog.tsx +++ b/ui/src/components/profiles/profile-create-dialog.tsx @@ -215,8 +215,8 @@ export function ProfileCreateDialog({ // Use user-provided baseUrl (allows customization of preset URLs) const finalData = { ...data, - // For presets that don't require API key, use empty string - apiKey: currentPreset?.requiresApiKey === false ? '' : data.apiKey, + // Use provided API key, or empty string if not provided (for optional auth providers) + apiKey: data.apiKey || '', }; try { await createMutation.mutateAsync(finalData); @@ -374,51 +374,52 @@ export function ProfileCreateDialog({ )} - {/* API Key - hidden for presets that don't require it */} - {currentPreset?.requiresApiKey !== false ? ( -
- -
- - -
- {errors.apiKey ? ( -

{errors.apiKey.message}

- ) : ( - currentPreset?.apiKeyHint && ( -

{currentPreset.apiKeyHint}

- ) + {/* API Key - optional for presets that don't require it */} +
+ +
+ +
- ) : ( -
- -
-

No API Key Required

-

- {currentPreset?.apiKeyHint || - 'This provider runs locally and does not require authentication.'} -

-
-
- )} + {errors.apiKey ? ( +

{errors.apiKey.message}

+ ) : currentPreset?.requiresApiKey === false ? ( +

+ Only needed if you have configured Ollama authentication +

+ ) : ( + currentPreset?.apiKeyHint && ( +

{currentPreset.apiKeyHint}

+ ) + )} +
diff --git a/ui/src/lib/provider-presets.ts b/ui/src/lib/provider-presets.ts index 2cd68f18..4b900e4a 100644 --- a/ui/src/lib/provider-presets.ts +++ b/ui/src/lib/provider-presets.ts @@ -53,6 +53,7 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [ defaultProfileName: 'ollama', badge: 'Local', featured: true, + icon: '/icons/ollama.svg', defaultModel: 'qwen3-coder', requiresApiKey: false, apiKeyPlaceholder: '', @@ -158,6 +159,7 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [ baseUrl: 'https://ollama.com', defaultProfileName: 'ollama-cloud', badge: 'Cloud', + icon: '/icons/ollama.svg', defaultModel: 'glm-4.7:cloud', requiresApiKey: true, apiKeyPlaceholder: 'YOUR_OLLAMA_CLOUD_API_KEY',