Skip to content

Commit 36401bc

Browse files
committed
fix(models): mark Google + IBM embedding models deprecated
Flag the Google Generative AI and IBM WatsonX embedding model entries in the unified model catalog as deprecated. They are not natively supported by Knowledge Base ingestion, so users were attempting invalid configurations. The KB upload picker and Model Providers modal now fetch with include_deprecated=true and render a "Deprecated" badge so the models stay visible but are clearly flagged as unsupported.
1 parent c90a821 commit 36401bc

7 files changed

Lines changed: 36 additions & 4 deletions

File tree

src/frontend/src/components/core/parameterRenderComponent/components/modelInputComponent/components/ModelList.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import ForwardedIconComponent from "@/components/common/genericIconComponent";
2+
import { Badge } from "@/components/ui/badge";
23
import {
34
CommandGroup,
45
CommandItem,
@@ -52,6 +53,15 @@ const ModelList = ({
5253
className="h-4 w-4 shrink-0 text-primary ml-2"
5354
/>
5455
<div className="truncate text-[13px]">{data.name}</div>
56+
{data.metadata?.deprecated ? (
57+
<Badge
58+
variant="secondaryStatic"
59+
size="tag"
60+
data-testid={`${data.name}-deprecated-badge`}
61+
>
62+
Deprecated
63+
</Badge>
64+
) : null}
5565
<div className="pl-2 ml-auto">
5666
<ForwardedIconComponent
5767
name="Check"

src/frontend/src/modals/knowledgeBaseUploadModal/hooks/useKnowledgeBaseForm.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ export function useKnowledgeBaseForm({
4444
// Wizard state
4545
const [currentStep, setCurrentStep] = useState<WizardStep>(1);
4646

47-
// Fetch embedding model data from API
48-
const { data: modelProviders = [] } = useGetModelProviders({});
47+
// Fetch embedding model data from API. Include deprecated entries so the
48+
// picker can surface them with a "Deprecated" badge instead of dropping them.
49+
const { data: modelProviders = [] } = useGetModelProviders({
50+
includeDeprecated: true,
51+
});
4952

5053
// Transform provider data into ModelOption[] for embedding models only
5154
const embeddingModelOptions = useMemo<ModelOption[]>(() => {

src/frontend/src/modals/modelProviderModal/components/ModelSelection.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import ForwardedIconComponent from "@/components/common/genericIconComponent";
2+
import { Badge } from "@/components/ui/badge";
23
import { Switch } from "@/components/ui/switch";
34
import { useGetEnabledModels } from "@/controllers/API/queries/models/use-get-enabled-models";
45

@@ -40,6 +41,15 @@ const ModelRow = ({
4041
>
4142
{model.model_name}
4243
</span>
44+
{model.metadata?.deprecated ? (
45+
<Badge
46+
variant="secondaryStatic"
47+
size="tag"
48+
data-testid={`${testIdPrefix}-deprecated-${model.model_name}`}
49+
>
50+
Deprecated
51+
</Badge>
52+
) : null}
4353
</div>
4454
{isEnabledModel && (
4555
<Switch

src/frontend/src/modals/modelProviderModal/components/ProviderList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const ProviderList = ({
2222
data: rawProviders = [],
2323
isLoading,
2424
isFetching,
25-
} = useGetModelProviders({});
25+
} = useGetModelProviders({ includeDeprecated: true });
2626

2727
const filteredProviders: Provider[] = useMemo(() => {
2828
return rawProviders.map((provider) => {

src/frontend/src/modals/modelProviderModal/hooks/useProviderConfiguration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export const useProviderConfiguration = ({
105105
const { refreshAllModelInputs } = useRefreshModelInputs();
106106
const { data: modelProviders = [], isFetching: isFetchingModels } =
107107
useGetModelProviders(
108-
{},
108+
{ includeDeprecated: true },
109109
{
110110
refetchInterval:
111111
syncedSelectedProvider?.provider?.toLowerCase() === "ollama"

src/lfx/src/lfx/base/models/google_generative_ai_constants.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,16 @@
113113
]
114114

115115
# Embedding models as detailed metadata
116+
# Marked deprecated: not natively supported by the Knowledge Base ingestion
117+
# flow; hidden from the embedding model picker until support is added.
116118
GOOGLE_GENERATIVE_AI_EMBEDDING_MODELS_DETAILED = [
117119
create_model_metadata(
118120
provider="Google Generative AI",
119121
name=name,
120122
icon="GoogleGenerativeAI",
121123
model_type="embeddings",
122124
default=True,
125+
deprecated=True,
123126
)
124127
for name in GOOGLE_GENERATIVE_AI_EMBEDDING_MODELS
125128
]

src/lfx/src/lfx/base/models/watsonx_constants.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
),
2828
]
2929

30+
# Marked deprecated: not natively supported by the Knowledge Base ingestion
31+
# flow; hidden from the embedding model picker until support is added.
3032
WATSONX_DEFAULT_EMBEDDING_MODELS = [
3133
create_model_metadata(
3234
provider="IBM WatsonX",
@@ -35,6 +37,7 @@
3537
model_type="embeddings",
3638
tool_calling=True,
3739
default=True,
40+
deprecated=True,
3841
),
3942
create_model_metadata(
4043
provider="IBM WatsonX",
@@ -43,6 +46,7 @@
4346
model_type="embeddings",
4447
tool_calling=True,
4548
default=True,
49+
deprecated=True,
4650
),
4751
create_model_metadata(
4852
provider="IBM WatsonX",
@@ -51,6 +55,7 @@
5155
model_type="embeddings",
5256
tool_calling=True,
5357
default=True,
58+
deprecated=True,
5459
),
5560
create_model_metadata(
5661
provider="IBM WatsonX",
@@ -59,6 +64,7 @@
5964
model_type="embeddings",
6065
tool_calling=True,
6166
default=True,
67+
deprecated=True,
6268
),
6369
]
6470

0 commit comments

Comments
 (0)