Skip to content

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

Python

fix: exclude unsupported watsonx models (#2359)

Edwin Jose02e3ef3e6eb8
diff --git a/src/config/model_providers.yaml b/src/config/model_providers.yaml
index b0d91d7de..55d83ba4f 100644
--- a/src/config/model_providers.yaml
+++ b/src/config/model_providers.yaml
@@ -55,6 +55,34 @@ providers:
oss: true
on_prem: true
saas: true
+ exclude_models:
+ # LiteLLM ids that do not match the API ids in IBM's model documentation.
+ - bigscience/mt0-xxl-13b
+ - google/flan-t5-xl-3b
+ - ibm/granite-guardian-3-2-2b
+ - ibm/granite-guardian-3-3-8b
+ - meta-llama/llama-4-maverick-17b
+ - mistralai/mistral-small-2503
+ - mistralai/pixtral-12b-2409
+ # Models reported unusable against watsonx.ai in tracker issue 82237.
+ - mistralai/mistral-medium-2505 # fails during streamed chat responses
+ - ibm/granite-3-3-8b-instruct # unsupported or removed by watsonx.ai
+ - ibm/granite-3-8b-instruct
+ - meta-llama/llama-3-2-90b-vision-instruct
+ - meta-llama/llama-3-2-11b-vision-instruct
+ - meta-llama/llama-3-2-3b-instruct
+ - meta-llama/llama-3-2-1b-instruct
+ - mistralai/mistral-large
+ - meta-llama/llama-guard-3-11b-vision
+ - ibm/granite-vision-3-2-2b
+ - ibm/granite-ttm-1536-96-r2
+ - ibm/granite-ttm-1024-96-r2
+ - ibm/granite-ttm-512-96-r2
+ - core42/jais-13b-chat
+ - ibm/granite-13b-chat-v2
+ - ibm/granite-13b-instruct-v2
+ - sdaia/allam-1-13b-instruct
+ - bigscience/mt0-xxl
# watsonx.ai running on a Cloud Pak for Data / IBM Software Hub cluster. It
# is a second front door onto the same `/ml/v1` API as the row above, kept
diff --git a/tests/unit/services/test_model_catalog.py b/tests/unit/services/test_model_catalog.py
index e82644e78..7d6258745 100644
--- a/tests/unit/services/test_model_catalog.py
+++ b/tests/unit/services/test_model_catalog.py
@@ -406,6 +406,65 @@ def test_the_shipped_config_keeps_the_legacy_openai_generation_out(monkeypatch)
assert any(name.startswith("gpt-5.6") for name in models)
+def test_the_shipped_config_keeps_broken_watsonx_models_out_of_live_inventory(
+ monkeypatch,
+) -> None:
+ """Undocumented or broken watsonx.ai ids must not be offered in its picker."""
+ monkeypatch.setenv("OPENRAG_RUN_MODE", "oss")
+ excluded = [
+ "bigscience/mt0-xxl-13b",
+ "google/flan-t5-xl-3b",
+ "ibm/granite-guardian-3-2-2b",
+ "ibm/granite-guardian-3-3-8b",
+ "meta-llama/llama-4-maverick-17b",
+ "mistralai/mistral-small-2503",
+ "mistralai/pixtral-12b-2409",
+ "mistralai/mistral-medium-2505",
+ "ibm/granite-3-3-8b-instruct",
+ "ibm/granite-3-8b-instruct",
+ "meta-llama/llama-3-2-90b-vision-instruct",
+ "meta-llama/llama-3-2-11b-vision-instruct",
+ "meta-llama/llama-3-2-3b-instruct",
+ "meta-llama/llama-3-2-1b-instruct",
+ "mistralai/mistral-large",
+ "meta-llama/llama-guard-3-11b-vision",
+ "ibm/granite-vision-3-2-2b",
+ "ibm/granite-ttm-1536-96-r2",
+ "ibm/granite-ttm-1024-96-r2",
+ "ibm/granite-ttm-512-96-r2",
+ "core42/jais-13b-chat",
+ "ibm/granite-13b-chat-v2",
+ "ibm/granite-13b-instruct-v2",
+ "sdaia/allam-1-13b-instruct",
+ "bigscience/mt0-xxl",
+ ]
+ retained = [
+ "google/flan-t5-xl",
+ "ibm/granite-guardian-3-2b",
+ "ibm/granite-guardian-3-8b",
+ "meta-llama/llama-4-maverick-17b-128e-instruct-fp8",
+ "mistralai/mistral-small-3-1-24b-instruct-2503",
+ "mistralai/pixtral-12b",
+ "ibm/granite-4-h-small",
+ ]
+ payload = {
+ "language_models": [{"value": model} for model in excluded + retained],
+ "embedding_models": [{"value": "ibm/slate-125m-english-rtrvr"}],
+ }
+
+ filtered = model_catalog.hide_excluded_live_models("watsonx", payload)
+
+ assert [entry["value"] for entry in filtered["language_models"]] == retained
+ assert filtered["embedding_models"] == payload["embedding_models"]
+ catalogued = {
+ entry["model"]
+ for provider in model_catalog.catalog()["providers"]
+ if provider["key"] == "watsonx"
+ for entry in provider["models"]
+ }
+ assert not catalogued.intersection(excluded)
+
+
def test_a_plain_name_also_excludes_its_regional_listings(monkeypatch, tmp_path) -> None:
"""Azure lists the same model per region; suppressing it means all of them."""
monkeypatch.setenv(