Skip to content

OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.

Python

feat: ingestion tab (#2272)

Wallgau3da4a793f0e5
diff --git a/frontend/app/settings/[tab]/page.tsx b/frontend/app/settings/[tab]/page.tsx
index 75dbf0807..8b5b2aa8e 100644
--- a/frontend/app/settings/[tab]/page.tsx
+++ b/frontend/app/settings/[tab]/page.tsx
@@ -11,22 +11,25 @@ import { AgentSettingsSection } from "../_components/agent-settings-section";
import { ApiKeysSection } from "../_components/api-keys-section";
import { ConnectorAccessSection } from "../_components/connector-access-section";
import { ConnectorsTab } from "../_components/connectors-tab";
-import { IngestPreviewSettingsSection } from "../_components/ingest-preview-settings-section";
-import { IngestSettingsSection } from "../_components/ingest-settings-section";
+import { IngestionTab } from "../_components/ingestion-tab";
import { LangflowUpdatesBanner } from "../_components/langflow-updates-banner";
import ModelProviders from "../_components/model-providers";
const VALID_TABS = [
"connectors",
"providers",
- "langflow",
+ "ingestion",
+ "agent",
"api-keys",
"connector-access",
- "ingest-preview",
] as const;
type Tab = (typeof VALID_TABS)[number];
+function isValidTab(tab: string): tab is Tab {
+ return (VALID_TABS as readonly string[]).includes(tab);
+}
+
async function getTabAuthContext() {
const [authRes, meRes] = await Promise.allSettled([
fetchFromBackend("auth/me"),
@@ -67,7 +70,7 @@ export default async function SettingsTabPage({
}) {
const { tab } = await params;
- if (!VALID_TABS.includes(tab as Tab)) {
+ if (!isValidTab(tab)) {
redirect("/settings/connectors");
}
@@ -105,7 +108,7 @@ export default async function SettingsTabPage({
redirect("/settings/connectors");
}
if (
- tab === "langflow" &&
+ (tab === "agent" || tab === "ingestion") &&
!canShowRbacGatedSettingsTab("config:write", tabAccess)
) {
redirect("/settings/connectors");
@@ -144,16 +147,15 @@ export default async function SettingsTabPage({
<HydrationBoundary state={dehydrate(queryClient)}>
{tab === "connectors" && <ConnectorsTab />}
{tab === "providers" && <ModelProviders />}
- {tab === "langflow" && (
+ {tab === "ingestion" && <IngestionTab />}
+ {tab === "agent" && (
<div className="space-y-6">
<LangflowUpdatesBanner />
<AgentSettingsSection />
- <IngestSettingsSection />
</div>
)}
{tab === "api-keys" && <ApiKeysSection />}
{tab === "connector-access" && <ConnectorAccessSection />}
- {tab === "ingest-preview" && <IngestPreviewSettingsSection />}
</HydrationBoundary>
);
}
diff --git a/frontend/app/settings/_components/anthropic-settings-dialog.tsx b/frontend/app/settings/_components/anthropic-settings-dialog.tsx
index 8a59a03da..0fa9d2b48 100644
--- a/frontend/app/settings/_components/anthropic-settings-dialog.tsx
+++ b/frontend/app/settings/_components/anthropic-settings-dialog.tsx
@@ -92,7 +92,7 @@ const AnthropicSettingsDialog = ({
action: {
label: "Settings",
onClick: () => {
- router.push("/settings/langflow?focusLlmModel=true");
+ router.push("/settings/agent?focusLlmModel=true");
},
},
});
diff --git a/frontend/app/settings/_components/ingest-preview-settings-section.tsx b/frontend/app/settings/_components/ingest-preview-settings-section.tsx
index 1763f504e..33f88ab12 100644
--- a/frontend/app/settings/_components/ingest-preview-settings-section.tsx
+++ b/frontend/app/settings/_components/ingest-preview-settings-section.tsx
@@ -1,34 +1,19 @@
"use client";
-import { useState } from "react";
+import { useMemo, useState } from "react";
import { toast } from "sonner";
import { IngestPreviewAutoOpenControl } from "@/components/ingest-preview-auto-open-control";
import { IngestReviewDialog } from "@/components/ingest-review";
import { Button } from "@/components/ui/button";
import { Label } from "@/components/ui/label";
-import { Switch } from "@/components/ui/switch";
import {
INGEST_PREVIEW_AUTO_OPEN_OPTIONS,
type IngestPreviewSettings,
useIngestPreviewSettings,
} from "@/hooks/use-ingest-preview-settings";
import { createSampleDemoFile } from "@/lib/ingest-preview-demo";
-import { cn } from "@/lib/utils";
-const INGEST_PREVIEW_SETTING_KEYS = [
- "autoOpen",
- "showChunkBoundaries",
- "showIndexingPipeline",
- "showChunkContents",
- "completionNotification",
-] as const satisfies ReadonlyArray<keyof IngestPreviewSettings>;
-
-function settingsEqual(
- a: IngestPreviewSettings,
- b: IngestPreviewSettings,
-): boolean {
- return INGEST_PREVIEW_SETTING_KEYS.every((key) => a[key] === b[key]);
-}
+const EMPTY_PREVIEW_FILES: File[] = [];
export function IngestPreviewSettingsSection() {
const { settings, updateSettings } = useIngestPreviewSettings();
@@ -45,18 +30,18 @@ export function IngestPreviewSettingsSection() {
setDraft(settings);
}
- const isDirty = !settingsEqual(draft, settings);
+ const isDirty = draft.autoOpen !== settings.autoOpen;
const autoOpenDescription =
INGEST_PREVIEW_AUTO_OPEN_OPTIONS.find(
(option) => option.value === draft.autoOpen,
)?.description ?? INGEST_PREVIEW_AUTO_OPEN_OPTIONS[0].description;
-
- const patchDraft = (patch: Partial<IngestPreviewSettings>) => {
- setDraft((prev) => ({ ...prev, ...patch }));
- };
+ const previewFiles = useMemo(
+ () => (previewFile ? [previewFile] : EMPTY_PREVIEW_FILES),
+ [previewFile],
+ );
const saveChanges = () => {
- updateSettings(draft);
+ updateSettings({ autoOpen: draft.autoOpen });
toast.success("Ingest preview settings saved");
};
@@ -67,7 +52,7 @@ export function IngestPreviewSettingsSection() {
return (
<div className="space-y-0" data-testid="ingest-preview-settings">
- <div className="flex items-center justify-between gap-4 py-4 border-b border-border">
+ <div className="flex items-center justify-between gap-4 py-4">
<div className="flex-1 min-w-0">
<Label className="text-base font-medium">
Auto-open ingest preview
@@ -78,49 +63,11 @@ export function IngestPreviewSettingsSection() {
</div>
<IngestPreviewAutoOpenControl
value={draft.autoOpen}
- onChange={(autoOpen) => patchDraft({ autoOpen })}
+ onChange={(autoOpen) => setDraft((prev) => ({ ...prev, autoOpen }))}
aria-label="Auto-open ingest preview"
/>
</div>
- <SettingToggle
- id="show-chunk-boundaries"
- label="Show chunk boundaries"
- description="Show the indexed chunk list for each document."
- checked={draft.showChunkBoundaries}
- onCheckedChange={(checked) =>
- patchDraft({ showChunkBoundaries: checked })
- }
- />
- <SettingToggle
- id="show-indexing-pipeline"
- label="Show indexing pipeline"
- description="Reading layout, creating chunks, embeddings, stored."
- checked={draft.showIndexingPipeline}
- onCheckedChange={(checked) =>
- patchDraft({ showIndexingPipeline: checked })
- }
- />
- <SettingToggle
- id="show-chunk-contents"
- label="Show chunk contents"
- description="Stream each chunk's extracted text as it is created."
- checked={draft.showChunkContents}
- onCheckedChange={(checked) =>
- patchDraft({ showChunkContents: checked })
- }
- />
- <SettingToggle
- id="completion-notification"
- label="Completion notification"
- description="Show a 'Task completed' toast when ingestion finishes."
- checked={draft.completionNotification}
- onCheckedChange={(checked) =>
- patchDraft({ completionNotification: checked })
- }
- last
- />
-
<div className="flex flex-wrap items-center justify-end gap-2 pt-6">
<Button
type="button"
@@ -129,7 +76,7 @@ export function IngestPreviewSettingsSection() {
onClick={runSampleIngest}
data-testid="ingest-preview-run-sample"
>
- <div>Run a sample ingest</div>
+ Run a sample ingest
</Button>
<Button
type="button"
@@ -148,41 +95,8 @@ export function IngestPreviewSettingsSection() {
onOpenChange={setShowPreviewDialog}
demo
settingsOverride={draft}
- previewFiles={previewFile ? [previewFile] : []}
+ previewFiles={previewFiles}
/>
</div>
);
}
-
-function SettingToggle({
- id,
- label,
- description,
- checked,
- onCheckedChange,
- last = false,
-}: {
- id: string;
- label: string;
- description: string;
- checked: boolean;
- onCheckedChange: (checked: boolean) => void;
- last?: boolean;
-}) {
- return (
- <div
- className={cn(
- "flex items-center justify-between gap-4 py-4",
- !last && "border-b border-border",
- )}
- >
- <div className="flex-1 min-w-0">
- <Label htmlFor={id} className="text-base font-medium">
- {label}
- </Label>
- <p className="text-sm text-muted-foreground mt-1">{description}</p>
- </div>
- <Switch id={id} checked={checked} onCheckedChange={onCheckedChange} />
- </div>
- );
-}
diff --git a/frontend/app/settings/_components/ingestion-tab.tsx b/frontend/app/settings/_components/ingestion-tab.tsx
new file mode 100644
index 000000000..20b4c337b
--- /dev/null
+++ b/frontend/app/settings/_components/ingestion-tab.tsx
@@ -0,0 +1,25 @@
+"use client";
+
+import { useAuth } from "@/contexts/auth-context";
+import { useIsCloudBrand } from "@/contexts/brand-context";
+import { isIngestPreviewEnabled } from "@/lib/ingest-preview";
+import { IngestPreviewSettingsSection } from "./ingest-preview-settings-section";
+import { IngestSettingsSection } from "./ingest-settings-section";
+
+export function IngestionTab() {
+ const { runMode } = useAuth();
+ const isCloudBrand = useIsCloudBrand();
+ const showPreview = isIngestPreviewEnabled(runMode, { isCloudBrand });
+
+ return (
+ <div className="space-y-6">
+ <IngestSettingsSection />
+ {showPreview ? (
+ <div className="space-y-4">
+ <h2 className="text-lg font-medium">Ingest preview</h2>
+ <IngestPreviewSettingsSection />
+ </div>
+ ) : null}
+ </div>
+ );
+}
diff --git a/frontend/app/settings/_components/ollama-settings-dialog.tsx b/frontend/app/settings/_components/ollama-settings-dialog.tsx
index 718240739..031a01301 100644
--- a/frontend/app/settings/_components/ollama-settings-dialog.tsx
+++ b/frontend/app/settings/_components/ollama-settings-dialog.tsx
@@ -102,7 +102,7 @@ const OllamaSettingsDialog = ({
action: {
label: "Settings",
onClick: () => {
- router.push("/settings/langflow?focusLlmModel=true");
+ router.push("/settings/agent?focusLlmModel=true");
},
},
});
diff --git a/frontend/app/settings/_components/openai-settings-dialog.tsx b/frontend/app/settings/_components/openai-settings-dialog.tsx
index 8f4ed39b6..50e396f4b 100644
--- a/frontend/app/settings/_components/openai-settings-dialog.tsx
+++ b/frontend/app/settings/_components/openai-settings-dialog.tsx
@@ -99,7 +99,7 @@ const OpenAISettingsDialog = ({
action: {
label: "Settings",
onClick: () => {
- router.push("/settings/langflow?focusLlmModel=true");
+ router.push("/settings/agent?focusLlmModel=true");
},
},
});
diff --git a/frontend/app/settings/_components/settings-nav.tsx b/frontend/app/settings/_components/settings-nav.tsx
index 9395abcda..746db3241 100644
--- a/frontend/app/settings/_components/settings-nav.tsx
+++ b/frontend/app/settings/_components/settings-nav.tsx
@@ -1,7 +1,7 @@
"use client";
-import { usePathname, useRouter } from "next/navigation";
-import { useEffect } from "react";
+import Link from "next/link";
+import { usePathname } from "next/navigation";
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/settings-tabs";
import { useAuth } from "@/contexts/auth-context";
import { useIsCloudBrand } from "@/contexts/brand-context";
@@ -10,34 +10,27 @@ import {
canAccessConnectorAccessTab,
canShowRbacGatedSettingsTab,
} from "@/lib/brand";
-import { isIngestPreviewEnabled } from "@/lib/ingest-preview";
import { cn } from "@/lib/utils";
const TABS = [
{ value: "connectors", label: "Connectors" },
{ value: "providers", label: "Providers", perm: "providers:write" },
- // Agent + ingest settings write workspace config (admin-only).
- { value: "langflow", label: "Langflow", perm: "config:write" },
+ // Knowledge ingest settings write workspace config (admin-only).
+ // Preview controls on this tab stay gated by isIngestPreviewEnabled.
+ { value: "ingestion", label: "Ingestion", perm: "config:write" },
+ // Agent settings write workspace config (admin-only).
+ { value: "agent", label: "Agent", perm: "config:write" },
{ value: "api-keys", label: "API Keys", apiKeysTab: true },
{
value: "connector-access",
label: "Connector Settings",
perm: "connectors:manage:access",
},
- { value: "ingest-preview", label: "Ingest preview", ingestPreviewTab: true },
] as const;
export function SettingsNav() {
const pathname = usePathname();
- const router = useRouter();
- const {
- isAuthenticated,
- isNoAuthMode,
- isIbmAuthMode,
- isLoading,
- permissionsResolved,
- runMode,
- } = useAuth();
+ const { isAuthenticated, isNoAuthMode, isIbmAuthMode } = useAuth();
const isCloudBrand = useIsCloudBrand();
const tabAccess = useSettingsTabAccess();
@@ -50,21 +43,9 @@ export function SettingsNav() {
if ("perm" in tab) return canShowRbacGatedSettingsTab(tab.perm, tabAccess);
if ("apiKeysTab" in tab)
return (isAuthenticated || isNoAuthMode) && !isIbmAuthMode;
- if ("ingestPreviewTab" in tab)
- return isIngestPreviewEnabled(runMode, { isCloudBrand });
return true;
});
- const _visibleTabKey = visibleTabs.map((tab) => tab.value).join("|");
- const tabIsVisible = visibleTabs.some((tab) => tab.value === currentTab);
- const fallbackTab = visibleTabs[0]?.value ?? "connectors";
-
- useEffect(() => {
- if (isLoading || !permissionsResolved) return;
- if (tabIsVisible) return;
- router.replace(`/settings/${fallbackTab}`);
- }, [isLoading, permissionsResolved, tabIsVisible, fallbackTab, router]);
-
return (
<Tabs value={currentTab}>
<TabsList
@@ -75,10 +56,10 @@ export function SettingsNav() {
<TabsTrigger
key={tab.value}
value={tab.value}
- onClick={() => router.push(`/settings/${tab.value}`)}
+ asChild
className={cn(!isCloudBrand && "p-3 rounded-full")}
>
- {tab.label}
+ <Link href={`/settings/${tab.value}`}>{tab.label}</Link>
</TabsTrigger>
))}
</TabsList>
diff --git a/frontend/app/settings/_components/watsonx-settings-dialog.tsx b/frontend/app/settings/_components/watsonx-settings-dialog.tsx
index 911324c38..886c61100 100644
--- a/frontend/app/settings/_components/watsonx-settings-dialog.tsx
+++ b/frontend/app/settings/_components/watsonx-settings-dialog.tsx
@@ -105,7 +105,7 @@ const WatsonxSettingsDialog = ({
action: {
label: "Settings",
onClick: () => {
- router.push("/settings/langflow?focusLlmModel=true");
+ router.push("/settings/agent?focusLlmModel=true");
},
},
});
diff --git a/frontend/components/ingest-preview-auto-open-control.tsx b/frontend/components/ingest-preview-auto-open-control.tsx
index 0532e04a9..fddb06026 100644
--- a/frontend/components/ingest-preview-auto-open-control.tsx
+++ b/frontend/components/ingest-preview-auto-open-control.tsx
@@ -25,14 +25,17 @@ export function IngestPreviewAutoOpenControl({
<Tabs
value={value}
onValueChange={(next) => onChange(next as IngestPreviewAutoOpen)}
- className={className}
+ className={cn("min-w-0 w-full sm:w-auto", className)}
>
<TabsList
variant="default"
aria-label={ariaLabel}
className={cn(
- "h-auto shrink-0 border border-border p-0.5",
- isCloudBrand ? "!rounded-none overflow-hidden" : "rounded-md",
+ "grid !h-9 w-full min-w-0 max-w-[220px] sm:w-[220px] sm:shrink-0 grid-cols-2 items-stretch gap-0 !p-0",
+ "border border-border !bg-transparent",
+ isCloudBrand
+ ? "rounded-none overflow-hidden"
+ : "rounded-md overflow-hidden",
)}
>
{INGEST_PREVIEW_AUTO_OPEN_OPTIONS.map((option) => (
@@ -40,9 +43,15 @@ export function IngestPreviewAutoOpenControl({
key={option.value}
value={option.value}
className={cn(
- "px-3 py-1.5 text-xs sm:text-sm",
- isCloudBrand &&
- "!rounded-none dark:hover:!bg-[#F4F4F4] dark:hover:!text-neutral-900 dark:data-[state=active]:!bg-[#F4F4F4] dark:data-[state=active]:!text-neutral-900",
+ "!flex !h-full !min-h-0 items-center justify-center",
+ "!rounded-none !border-0 !px-3 !py-0 !leading-none text-sm font-medium",
+ "!shadow-none text-muted-foreground hover:text-foreground",
+ "hover:!bg-transparent data-[state=active]:!shadow-none",
+ "data-[state=active]:!bg-muted data-[state=active]:!text-foreground",
+ "dark:hover:!bg-transparent dark:hover:!text-foreground",
+ "dark:data-[state=active]:!bg-white/10 dark:data-[state=active]:!text-foreground",
+ "dark:focus-visible:!bg-white/10 dark:focus-visible:!text-foreground",
+ option.value === "every" && "!border-r !border-border",
)}
>
{option.label}
diff --git a/frontend/tests/core/chunk-overlap-analysis.spec.ts b/frontend/tests/core/chunk-overlap-analysis.spec.ts
index 4410c1c5e..1aa002819 100644
--- a/frontend/tests/core/chunk-overlap-analysis.spec.ts
+++ b/frontend/tests/core/chunk-overlap-analysis.spec.ts
@@ -45,7 +45,7 @@ test.describe("Chunk Overlap Impact Analysis @33219205 , @34581144 , @34581148",
test.setTimeout(300000); // 5 minutes timeout
// Configure chunk settings (fixed size, variable overlap)
- await settings.clickTab("Langflow");
+ await settings.clickTab("Ingestion");
await settings.updateChunkSettings(
TEST_CONFIG.chunkSettings.defaultSize,
scenario.overlap.toString(),
@@ -135,7 +135,7 @@ test.describe("Chunk Overlap Edge Case - Very Low Overlap with CSV Data", () =>
// Test with both overlap values
for (const overlap of ["1", "50"]) {
- await settings.clickTab("Langflow");
+ await settings.clickTab("Ingestion");
await settings.updateChunkSettings(
TEST_CONFIG.chunkSettings.defaultSize,
overlap,
diff --git a/frontend/tests/core/chunk-size-analysis.spec.ts b/frontend/tests/core/chunk-size-analysis.spec.ts
index 3db20f65a..24d4fe92b 100644
--- a/frontend/tests/core/chunk-size-analysis.spec.ts
+++ b/frontend/tests/core/chunk-size-analysis.spec.ts
@@ -43,7 +43,7 @@ test.describe("Chunk Size Impact Analysis @33219206 , @34581149 , @3481151", ()
test.setTimeout(300000); // 5 minutes timeout
// Configure chunk settings
- await settings.clickTab("Langflow");
+ await settings.clickTab("Ingestion");
await settings.updateChunkSettings(
scenario.size.toString(),
TEST_CONFIG.chunkSettings.defaultOverlap,
@@ -125,7 +125,7 @@ test.describe("Large Chunk Size - Wrong Section Retrieval Test", () => {
}) => {
test.setTimeout(300000);
- await settings.clickTab("Langflow");
+ await settings.clickTab("Ingestion");
await settings.updateChunkSettings(
"1000",
TEST_CONFIG.chunkSettings.defaultOverlap,
diff --git a/frontend/tests/core/chunk_search.spec.ts b/frontend/tests/core/chunk_search.spec.ts
index 1b0f0a922..750600d27 100644
--- a/frontend/tests/core/chunk_search.spec.ts
+++ b/frontend/tests/core/chunk_search.spec.ts
@@ -45,7 +45,7 @@ test("Chunk Search & Ranking - OpenAI @33219236", async ({
// Step 2: Set embedding model for OpenAI
logger.info(` ⚙️ Setting embedding model for OpenAI...`);
- await settings.clickTab("Langflow");
+ await settings.clickTab("Ingestion");
await settings.selectModel("Embedding model", OPENAI_CONFIG.embedding);
logger.info(` ✓ Embedding model set to: ${OPENAI_CONFIG.embedding}`);
diff --git a/frontend/tests/core/financial_document.spec.ts b/frontend/tests/core/financial_document.spec.ts
index 682a1826e..d3722c510 100644
--- a/frontend/tests/core/financial_document.spec.ts
+++ b/frontend/tests/core/financial_document.spec.ts
@@ -30,8 +30,9 @@ test.describe("Financial Document - OpenAI @33219232", () => {
// Configure models
await settings.open();
- await settings.clickTab("Langflow");
+ await settings.clickTab("Agent");
await settings.selectModel("Language model", OPENAI_CONFIG.language);
+ await settings.clickTab("Ingestion");
await settings.selectModel("Embedding model", OPENAI_CONFIG.embedding);
logger.info(` ✓ Language model set to: ${OPENAI_CONFIG.language}`);
logger.info(` ✓ Embedding model set to: ${OPENAI_CONFIG.embedding}`);
@@ -43,7 +44,7 @@ test.describe("Financial Document - OpenAI @33219232", () => {
await knowledge.deleteDocument(testDocument);
await settings.open();
- await settings.clickTab("Langflow");
+ await settings.clickTab("Ingestion");
await settings.setTableStructure(true);
await knowledge.open();
diff --git a/frontend/tests/core/model_switching.spec.ts b/frontend/tests/core/model_switching.spec.ts
index 8ea2544d8..05216bdff 100644
--- a/frontend/tests/core/model_switching.spec.ts
+++ b/frontend/tests/core/model_switching.spec.ts
@@ -12,7 +12,7 @@ test("Model switching transitions (Language + Embedding) - OpenAI @33219223, @33
await navigateToHome(page);
logger.info("\n🧪 Testing Model Switching with OpenAI");
- await settings.clickTab("Langflow");
+ await settings.clickTab("Agent");
// OpenAI model sequences for testing transitions
const languageSequence = ["gpt-4o", "gpt-4o-mini", "gpt-4o"]; // Circular: A→B→A
@@ -47,8 +47,9 @@ test("Model switching transitions (Language + Embedding) - OpenAI @33219223, @33
}
}
- // Test Embedding model transitions
+ // Test Embedding model transitions (embedding selector is on Ingestion)
logger.info(`\n🔄 Testing Embedding model transitions...`);
+ await settings.clickTab("Ingestion");
const embeddingFailures: string[] = [];
for (let i = 0; i < embeddingSequence.length - 1; i++) {
diff --git a/frontend/tests/core/picture_desc.spec.ts b/frontend/tests/core/picture_desc.spec.ts
index ea8d3d595..5d0aba558 100644
--- a/frontend/tests/core/picture_desc.spec.ts
+++ b/frontend/tests/core/picture_desc.spec.ts
@@ -29,8 +29,9 @@ test("Picture Description Configuration @33219221", async ({
// Set OpenAI models before starting
logger.info("\n⚙️ Configuring OpenAI models...");
- await settings.clickTab("Langflow");
+ await settings.clickTab("Agent");
await settings.selectModel("Language model", OPENAI_CONFIG.language);
+ await settings.clickTab("Ingestion");
await settings.selectModel("Embedding model", OPENAI_CONFIG.embedding);
logger.info(` ✓ Language model: ${OPENAI_CONFIG.language}`);
logger.info(` ✓ Embedding model: ${OPENAI_CONFIG.embedding}`);
@@ -51,7 +52,7 @@ test("Picture Description Configuration @33219221", async ({
// Enable picture descriptions
logger.info("\n📸 Enabling picture descriptions...");
- await settings.clickTab("Langflow");
+ await settings.clickTab("Ingestion");
await settings.setPictureDescriptions(true);
// Ingest first PDF with picture descriptions enabled
@@ -75,7 +76,7 @@ test("Picture Description Configuration @33219221", async ({
// Disable picture descriptions
logger.info("\n📸 Disabling picture descriptions...");
- await settings.clickTab("Langflow");
+ await settings.clickTab("Ingestion");
await settings.setPictureDescriptions(false);
// Ingest second PDF with picture descriptions disabled
diff --git a/frontend/tests/core/restore_flow.spec.ts b/frontend/tests/core/restore_flow.spec.ts
index e5115027e..9f046c88d 100644
--- a/frontend/tests/core/restore_flow.spec.ts
+++ b/frontend/tests/core/restore_flow.spec.ts
@@ -15,7 +15,7 @@ test.describe("Restore Flow", () => {
// Make sure we start with a clean default state
await navigateToHome(page);
await settings.open();
- await settings.clickTab("Langflow");
+ await settings.clickTab("Ingestion");
const pictureDescToggle = page.getByRole("switch", {
name: /picture descriptions/i,
@@ -77,7 +77,7 @@ test.describe("Restore Flow", () => {
// Navigate to the application
await navigateToHome(page);
await settings.open();
- await settings.clickTab("Langflow");
+ await settings.clickTab("Ingestion");
// Get references to settings elements
const pictureDescToggle = page.getByRole("switch", {
@@ -217,7 +217,7 @@ test.describe("Restore Flow", () => {
// Navigate to the application
await navigateToHome(page);
await settings.open();
- await settings.clickTab("Langflow");
+ await settings.clickTab("Ingestion");
// Get references to settings elements
const pictureDescToggle = page.getByRole("switch", {
diff --git a/frontend/tests/core/search.spec.ts b/frontend/tests/core/search.spec.ts
index efe578481..d6acec4f4 100644
--- a/frontend/tests/core/search.spec.ts
+++ b/frontend/tests/core/search.spec.ts
@@ -31,7 +31,7 @@ test("Opensearch Indexing - OpenAI @33219220", async ({
// Step 2: Set embedding model for OpenAI
logger.info(` ⚙️ Setting embedding model for OpenAI...`);
- await settings.clickTab("Langflow");
+ await settings.clickTab("Ingestion");
await settings.selectModel("Embedding model", OPENAI_CONFIG.embedding);
logger.info(` ✓ Embedding model set to: ${OPENAI_CONFIG.embedding}`);
diff --git a/frontend/tests/core/url_ingestion.spec.ts b/frontend/tests/core/url_ingestion.spec.ts
index 455d6f63f..e273e6ef0 100644
--- a/frontend/tests/core/url_ingestion.spec.ts
+++ b/frontend/tests/core/url_ingestion.spec.ts
@@ -32,8 +32,9 @@ test("@smoke URL connector ingestion reliability - OpenAI @33219228", async ({
// Step 2: Set models for OpenAI
logger.info(` ⚙️ Setting models for OpenAI...`);
- await settings.clickTab("Langflow");
+ await settings.clickTab("Agent");
await settings.selectModel("Language model", OPENAI_CONFIG.language);
+ await settings.clickTab("Ingestion");
await settings.selectModel("Embedding model", OPENAI_CONFIG.embedding);
logger.info(` ✓ Language model set to: ${OPENAI_CONFIG.language}`);
logger.info(` ✓ Embedding model set to: ${OPENAI_CONFIG.embedding}`);
@@ -84,8 +85,9 @@ test("URL connector ingestion - Invalid URL handling @34581217", async ({
logger.info(`\n🧪 Testing Invalid URL Ingestion`);
// Set models
- await settings.clickTab("Langflow");
+ await settings.clickTab("Agent");
await settings.selectModel("Language model", OPENAI_CONFIG.language);
+ await settings.clickTab("Ingestion");
await settings.selectModel("Embedding model", OPENAI_CONFIG.embedding);
// Attempt to ingest invalid URL
@@ -138,8 +140,9 @@ test("URL connector ingestion - Authentication-blocked URL handling @34581218",
logger.info(`\n🧪 Testing Authentication-Blocked URL Ingestion`);
// Set models
- await settings.clickTab("Langflow");
+ await settings.clickTab("Agent");
await settings.selectModel("Language model", OPENAI_CONFIG.language);
+ await settings.clickTab("Ingestion");
await settings.selectModel("Embedding model", OPENAI_CONFIG.embedding);
// Attempt to ingest authentication-blocked URL
@@ -203,8 +206,9 @@ test("URL ingestion persists after conversation deletion @34581222", async ({
// Step 2: Set models for OpenAI
logger.info(` ⚙️ Setting models for OpenAI...`);
- await settings.clickTab("Langflow");
+ await settings.clickTab("Agent");
await settings.selectModel("Language model", OPENAI_CONFIG.language);
+ await settings.clickTab("Ingestion");
await settings.selectModel("Embedding model", OPENAI_CONFIG.embedding);
logger.info(` ✓ Language model set to: ${OPENAI_CONFIG.language}`);
logger.info(` ✓ Embedding model set to: ${OPENAI_CONFIG.embedding}`);
diff --git a/frontend/tests/core/z_update_model_providers.spec.ts b/frontend/tests/core/z_update_model_providers.spec.ts
index 9feb8efb6..dded1952c 100644
--- a/frontend/tests/core/z_update_model_providers.spec.ts
+++ b/frontend/tests/core/z_update_model_providers.spec.ts
@@ -34,8 +34,9 @@ test.describe("Update model providers to watsonx.ai and openai @33219219, @33219
await settings.clickTab("Providers");
await settings.configureWatsonxai();
await settings.removeModelProviderSetup("OpenAI");
- await settings.clickTab("Langflow");
+ await settings.clickTab("Agent");
await settings.selectModel("Language model", "ibm/granite-4-h-small");
+ await settings.clickTab("Ingestion");
await settings.selectModel(
"Embedding model",
"ibm/slate-125m-english-rtrvr-v2",
@@ -65,8 +66,9 @@ test.describe("Update model providers to watsonx.ai and openai @33219219, @33219
await settings.clickTab("Providers");
await settings.configureOpenAPI();
await settings.removeModelProviderSetup("IBM watsonx.ai");
- await settings.clickTab("Langflow");
+ await settings.clickTab("Agent");
await settings.selectModel("Language model", "gpt-4o-mini");
+ await settings.clickTab("Ingestion");
await settings.selectModel("Embedding model", "text-embedding-3-small");
await knowledge.deleteDocument(testDocumentName);
await knowledge.ingestFile(testDocumentPath);
diff --git a/frontend/tests/pages/Settings.ts b/frontend/tests/pages/Settings.ts
index 935cc91ea..7aef5b945 100644
--- a/frontend/tests/pages/Settings.ts
+++ b/frontend/tests/pages/Settings.ts
@@ -9,7 +9,8 @@ function escapeRegExp(str: string): string {
export type SettingsTab =
| "Connectors"
| "Providers"
- | "Langflow"
+ | "Ingestion"
+ | "Agent"
| "Connectors Permission";
export class Settings {
@@ -113,16 +114,26 @@ export class Settings {
/**
* Get locator for model dropdown by section name
- * @param section - The section name (e.g., "Chat Model", "Embedding Model")
+ * @param section - The section name (e.g., "Language model", "Embedding model")
* @returns Locator for the dropdown
*/
private getModelDropdown(section: string) {
+ // Target the field label so we don't match helper copy such as
+ // "The embedding model saves as soon as you pick one".
return this.page
- .getByText(new RegExp(escapeRegExp(section), "i"))
+ .locator("label")
+ .filter({ hasText: new RegExp(`^${escapeRegExp(section)}`, "i") })
.locator("..")
.getByRole("combobox");
}
+ /**
+ * Language model lives on Agent; embedding model lives on Ingestion.
+ */
+ private tabForModelSection(section: string): SettingsTab {
+ return /embedding/i.test(section) ? "Ingestion" : "Agent";
+ }
+
/**
* Get locator for focused search model input
* @returns Locator for the search input
@@ -166,7 +177,7 @@ export class Settings {
/**
* Click a Settings page tab
- * @param tabName - The tab to click: 'Connectors' | 'Providers' | 'Langflow' | 'Connectors Permission'
+ * @param tabName - The tab to click: 'Connectors' | 'Providers' | 'Ingestion' | 'Agent' | 'Connectors Permission'
*/
async clickTab(tabName: SettingsTab) {
logger.info(`Clicking Settings tab: ${tabName}`);
@@ -203,7 +214,7 @@ export class Settings {
}
async setPictureDescriptions(enabled: boolean) {
- await this.open();
+ await this.clickTab("Ingestion");
const toggle = this.pictureDescriptionsToggle();
await toggle.scrollIntoViewIfNeeded();
const state = await toggle.getAttribute("data-state");
@@ -215,7 +226,7 @@ export class Settings {
}
async setTableStructure(enabled: boolean) {
- await this.open();
+ await this.clickTab("Ingestion");
const toggle = this.tableStructureToggle();
await toggle.scrollIntoViewIfNeeded();
const state = await toggle.getAttribute("data-state");
@@ -227,7 +238,7 @@ export class Settings {
}
async setOCR(enabled: boolean) {
- await this.open();
+ await this.clickTab("Ingestion");
const toggle = this.ocrToggle();
await toggle.scrollIntoViewIfNeeded();
const state = await toggle.getAttribute("data-state");
@@ -239,7 +250,7 @@ export class Settings {
}
async setDisableLangflowIngestion(enabled: boolean) {
- await this.clickTab("Langflow");
+ await this.clickTab("Ingestion");
const toggle = this.disableLangflowIngestionToggle();
await toggle.scrollIntoViewIfNeeded();
const state = await toggle.getAttribute("data-state");
@@ -250,8 +261,12 @@ export class Settings {
}
}
+ /**
+ * Select a language or embedding model. Opens Agent for language models
+ * and Ingestion for embedding models.
+ */
async selectModel(section: string, model: string) {
- await this.open();
+ await this.clickTab(this.tabForModelSection(section));
const dropdown = this.getModelDropdown(section);
await dropdown.scrollIntoViewIfNeeded();
const currentText = (await dropdown.textContent())?.toLowerCase() || "";
@@ -285,7 +300,7 @@ export class Settings {
* @param chunkOverlap - Chunk overlap value (e.g., "50")
*/
async updateChunkSettings(chunkSize: string, chunkOverlap: string) {
- await this.open();
+ await this.clickTab("Ingestion");
// Find and update chunk size input
const chunkSizeInp = this.chunkSizeInput();