Add NVIDIA NIM provider

Register NVIDIA NIM for chat and embedding models through LiteLLM, including hosted model discovery.\n\nExpose NIM in onboarding with API key and documentation links, and cover the provider contract with a focused regression test.

Alessandro committed Jul 10, 2026 at 19:04 UTC 705a400fe78f3773cccfa3cc4debd6929f355c59
3 files changed +39
conf/model_providers.yaml
+10
@@ -114,6 +114,11 @@ chat:
114 endpoint_url: "/models"
115 kwargs:
116 api_base: https://api.tokenfactory.nebius.com/v1
117 + nvidia_nim:
118 + name: NVIDIA NIM
119 + litellm_provider: nvidia_nim
120 + models_list:
121 + endpoint_url: "https://integrate.api.nvidia.com/v1/models"
122 ollama:
123 name: Ollama
124 litellm_provider: ollama
@@ -239,6 +244,11 @@ embedding:
244 mistral:
245 name: Mistral AI
246 litellm_provider: mistral
247 + nvidia_nim:
248 + name: NVIDIA NIM
249 + litellm_provider: nvidia_nim
250 + models_list:
251 + endpoint_url: "https://integrate.api.nvidia.com/v1/models"
252 ollama:
253 name: Ollama
254 litellm_provider: ollama
plugins/_onboarding/webui/onboarding-providers.js
+10
@@ -8,6 +8,7 @@ export const TOP_CLOUD_PROVIDER_IDS = [
8 "venice",
9 "zai",
10 "mistral",
11 + "nvidia_nim",
12 "azure",
13 ];
14
@@ -162,6 +163,15 @@ export const ONBOARDING_PROVIDER_OVERRIDES = {
163 model_list_autoload: true,
164 short_description: "OpenAI-compatible inference for open models.",
165 },
166 + nvidia_nim: {
167 + logo: "https://www.nvidia.com/favicon.ico",
168 + setup_url: "https://build.nvidia.com/",
169 + api_key_url: "https://build.nvidia.com/settings/api-keys",
170 + docs_url: "https://docs.api.nvidia.com/nim/reference/llm-apis",
171 + api_key_mode: "required",
172 + model_list_autoload: true,
173 + short_description: "NVIDIA-optimized models through hosted NIM APIs.",
174 + },
175 ollama: {
176 logo: "https://ollama.com/public/ollama.png",
177 setup_url: "https://ollama.com/download",
tests/test_onboarding_static.py
+19
@@ -188,6 +188,25 @@ def test_nebius_provider_config_uses_openai_compatible_token_factory_endpoint():
188 assert "api_key_mode" not in nebius
189
190
191 +def test_nvidia_nim_is_a_first_class_provider():
192 + provider_config = yaml.safe_load(
193 + (PROJECT_ROOT / "conf/model_providers.yaml").read_text(encoding="utf-8")
194 + )
195 + provider_ui = (PROJECT_ROOT / "plugins/_onboarding/webui/onboarding-providers.js").read_text(
196 + encoding="utf-8"
197 + )
198 +
199 + for model_type in ("chat", "embedding"):
200 + provider = provider_config[model_type]["nvidia_nim"]
201 + assert provider["litellm_provider"] == "nvidia_nim"
202 + assert provider["models_list"]["endpoint_url"] == (
203 + "https://integrate.api.nvidia.com/v1/models"
204 + )
205 +
206 + assert '"nvidia_nim"' in provider_ui
207 + assert "https://docs.api.nvidia.com/nim/reference/llm-apis" in provider_ui
208 +
209 +
210 def test_discovery_auto_modal_extension_contains_required_guards():
211 content = (PROJECT_ROOT / "plugins/_discovery/extensions/webui/initFw_end/auto-modal.js").read_text(encoding="utf-8")
212