Date: Mon, 24 Nov 2025 16:46:16 -0600
Subject: [PATCH 5/9] Detect and default to provider with env set
---
.../_components/onboarding-card.tsx | 40 ++++++++++++++++++-
1 file changed, 38 insertions(+), 2 deletions(-)
diff --git a/frontend/app/onboarding/_components/onboarding-card.tsx b/frontend/app/onboarding/_components/onboarding-card.tsx
index 3dffb21e..7ac2e85c 100644
--- a/frontend/app/onboarding/_components/onboarding-card.tsx
+++ b/frontend/app/onboarding/_components/onboarding-card.tsx
@@ -2,7 +2,7 @@
import { useQueryClient } from "@tanstack/react-query";
import { AnimatePresence, motion } from "framer-motion";
-import { Info, X } from "lucide-react";
+import { X } from "lucide-react";
import { useEffect, useState } from "react";
import { toast } from "sonner";
import {
@@ -74,6 +74,42 @@ const OnboardingCard = ({
// Fetch current settings to check if providers are already configured
const { data: currentSettings } = useGetSettingsQuery();
+ // Auto-select the first provider that has an API key set in env vars
+ useEffect(() => {
+ if (!currentSettings?.providers) return;
+
+ // Define provider order based on whether it's embedding or not
+ const providerOrder = isEmbedding
+ ? ["openai", "watsonx", "ollama"]
+ : ["anthropic", "openai", "watsonx", "ollama"];
+
+ // Find the first provider with an API key
+ for (const provider of providerOrder) {
+ if (
+ provider === "anthropic" &&
+ currentSettings.providers.anthropic?.has_api_key
+ ) {
+ setModelProvider("anthropic");
+ return;
+ } else if (provider === "openai" && currentSettings.providers.openai?.has_api_key) {
+ setModelProvider("openai");
+ return;
+ } else if (
+ provider === "watsonx" &&
+ currentSettings.providers.watsonx?.has_api_key
+ ) {
+ setModelProvider("watsonx");
+ return;
+ } else if (
+ provider === "ollama" &&
+ currentSettings.providers.ollama?.endpoint
+ ) {
+ setModelProvider("ollama");
+ return;
+ }
+ }
+ }, [currentSettings, isEmbedding]);
+
const handleSetModelProvider = (provider: string) => {
setIsLoadingModels(false);
setModelProvider(provider);
@@ -305,7 +341,7 @@ const OnboardingCard = ({
From a358166a2d372813ac50f21550c826a04e0694e3 Mon Sep 17 00:00:00 2001
From: "April I. Murphy" <36110273+aimurphy@users.noreply.github.com>
Date: Mon, 24 Nov 2025 15:25:21 -0800
Subject: [PATCH 6/9] Apply suggestions from code review
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
---
docs/docs/_partial-wsl-install.mdx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/docs/_partial-wsl-install.mdx b/docs/docs/_partial-wsl-install.mdx
index ff674297..7cab4029 100644
--- a/docs/docs/_partial-wsl-install.mdx
+++ b/docs/docs/_partial-wsl-install.mdx
@@ -15,5 +15,5 @@
4. [Install Docker Desktop for Windows with WSL 2](https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers). When you reach the Docker Desktop **WSL integration** settings, make sure your Ubuntu distribution is enabled, and then click **Apply & Restart** to enable Docker support in WSL.
5. Install and run OpenRAG from within your WSL Ubuntu distribution.
-
-If you encounter issues with port forwarding or the Windows Firewall, you might to adjust the [Hyper-V firewall settings](https://learn.microsoft.com/en-us/windows/security/operating-system-security/network-security/windows-firewall/hyper-v-firewall) to allow communication between your WSL distribution and the Windows host. For more troubleshooting advice for networking issues, see [Troubleshooting WLS common issues](https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#common-issues).
\ No newline at end of file
+
+If you encounter issues with port forwarding or the Windows Firewall, you might need to adjust the [Hyper-V firewall settings](https://learn.microsoft.com/en-us/windows/security/operating-system-security/network-security/windows-firewall/hyper-v-firewall) to allow communication between your WSL distribution and the Windows host. For more troubleshooting advice for networking issues, see [Troubleshooting WLS common issues](https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#common-issues).
\ No newline at end of file
From ad703df6ec9d7291f57c4880691532c07dec582d Mon Sep 17 00:00:00 2001
From: April M <36110273+aimurphy@users.noreply.github.com>
Date: Tue, 25 Nov 2025 08:09:32 -0800
Subject: [PATCH 7/9] limitation for nested virtualization
---
docs/docs/_partial-wsl-install.mdx | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/docs/docs/_partial-wsl-install.mdx b/docs/docs/_partial-wsl-install.mdx
index 7cab4029..536c10b6 100644
--- a/docs/docs/_partial-wsl-install.mdx
+++ b/docs/docs/_partial-wsl-install.mdx
@@ -1,12 +1,18 @@
1. [Install WSL](https://learn.microsoft.com/en-us/windows/wsl/install) with the Ubuntu distribution using WSL 2:
- ```powershell
- wsl --install -d Ubuntu
- ```
+ ```powershell
+ wsl --install -d Ubuntu
+ ```
- For new installations, the `wsl --install` command uses WSL 2 and Ubuntu by default.
+ For new installations, the `wsl --install` command uses WSL 2 and Ubuntu by default.
- For existing WSL installations, you can [change the distribution](https://learn.microsoft.com/en-us/windows/wsl/install#change-the-default-linux-distribution-installed) and [check the WSL version](https://learn.microsoft.com/en-us/windows/wsl/install#upgrade-version-from-wsl-1-to-wsl-2).
+ For existing WSL installations, you can [change the distribution](https://learn.microsoft.com/en-us/windows/wsl/install#change-the-default-linux-distribution-installed) and [check the WSL version](https://learn.microsoft.com/en-us/windows/wsl/install#upgrade-version-from-wsl-1-to-wsl-2).
+
+ :::info Known limitation
+ OpenRAG isn't compatible with nested virtualization, which can cause networking issues.
+ Don't install OpenRAG in on a WSL distribution that is installed inside a Windows VM.
+ Instead, install OpenRAG on your base OS or a non-nested Linux VM.
+ :::
2. [Start your WSL Ubuntu distribution](https://learn.microsoft.com/en-us/windows/wsl/install#ways-to-run-multiple-linux-distributions-with-wsl) if it doesn't start automatically.
From b807bbcd253ceceb298d0f37a6a0f47e2cd878b6 Mon Sep 17 00:00:00 2001
From: "April I. Murphy" <36110273+aimurphy@users.noreply.github.com>
Date: Tue, 25 Nov 2025 08:15:12 -0800
Subject: [PATCH 8/9] Update docs/docs/_partial-wsl-install.mdx
---
docs/docs/_partial-wsl-install.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/docs/_partial-wsl-install.mdx b/docs/docs/_partial-wsl-install.mdx
index 536c10b6..42768ff5 100644
--- a/docs/docs/_partial-wsl-install.mdx
+++ b/docs/docs/_partial-wsl-install.mdx
@@ -8,7 +8,7 @@
For existing WSL installations, you can [change the distribution](https://learn.microsoft.com/en-us/windows/wsl/install#change-the-default-linux-distribution-installed) and [check the WSL version](https://learn.microsoft.com/en-us/windows/wsl/install#upgrade-version-from-wsl-1-to-wsl-2).
- :::info Known limitation
+ :::warning Known limitation
OpenRAG isn't compatible with nested virtualization, which can cause networking issues.
Don't install OpenRAG in on a WSL distribution that is installed inside a Windows VM.
Instead, install OpenRAG on your base OS or a non-nested Linux VM.
From 370c668fc4a8f958d433ef0ee165e46c8d47b580 Mon Sep 17 00:00:00 2001
From: April M <36110273+aimurphy@users.noreply.github.com>
Date: Tue, 25 Nov 2025 08:34:01 -0800
Subject: [PATCH 9/9] peer review
---
docs/docs/_partial-wsl-install.mdx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/docs/_partial-wsl-install.mdx b/docs/docs/_partial-wsl-install.mdx
index 42768ff5..4db6d1dd 100644
--- a/docs/docs/_partial-wsl-install.mdx
+++ b/docs/docs/_partial-wsl-install.mdx
@@ -10,7 +10,7 @@
:::warning Known limitation
OpenRAG isn't compatible with nested virtualization, which can cause networking issues.
- Don't install OpenRAG in on a WSL distribution that is installed inside a Windows VM.
+ Don't install OpenRAG on a WSL distribution that is installed inside a Windows VM.
Instead, install OpenRAG on your base OS or a non-nested Linux VM.
:::
@@ -22,4 +22,4 @@
5. Install and run OpenRAG from within your WSL Ubuntu distribution.
-If you encounter issues with port forwarding or the Windows Firewall, you might need to adjust the [Hyper-V firewall settings](https://learn.microsoft.com/en-us/windows/security/operating-system-security/network-security/windows-firewall/hyper-v-firewall) to allow communication between your WSL distribution and the Windows host. For more troubleshooting advice for networking issues, see [Troubleshooting WLS common issues](https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#common-issues).
\ No newline at end of file
+If you encounter issues with port forwarding or the Windows Firewall, you might need to adjust the [Hyper-V firewall settings](https://learn.microsoft.com/en-us/windows/security/operating-system-security/network-security/windows-firewall/hyper-v-firewall) to allow communication between your WSL distribution and the Windows host. For more troubleshooting advice for networking issues, see [Troubleshooting WSL common issues](https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#common-issues).
\ No newline at end of file