feat: add NVIDIA NIM as a BYOK LLM provider (JEF-63) - #176
Conversation
Adds NVIDIA's NIM inference API (build.nvidia.com) as another selectable provider in the existing multi-provider BYOK system, alongside OpenAI, Anthropic, Google AI, OpenRouter, Mistral, Groq, xAI, DeepSeek, and Custom. NIM's hosted endpoint implements OpenAI's /chat/completions wire format, so this reuses OpenAICompatibleLLMProvider via a new providerRegistry.ts entry — no new provider class needed, matching the same pattern as Mistral/Groq/xAI/DeepSeek. Default model is meta/llama-3.1-8b-instruct (a small, fast default, consistent with the other providers' defaults); users can override it like any other provider. Verified: typecheck/lint/build clean for both apps, 855/855 API tests and 148/148 web tests passing (providerRegistry.test.ts generically iterates every LLM_PROVIDER value, so it covers the new entry without changes). Manually verified end-to-end against a live dev server: registered a user, selected NVIDIA NIM from the Account page dropdown, saved a fake API key via the real saveLlmApiKey mutation, and confirmed via Playwright screenshot that the Account page correctly shows "AI features are enabled using NVIDIA NIM." Ref: JEF-63
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
WalkthroughThe API adds NVIDIA NIM as an OpenAI-compatible LLM provider. The account settings accept ChangesNVIDIA NIM provider
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant AccountSettings
participant ProviderRegistry
participant OpenAICompatibleLLMProvider
participant NvidiaNIM
AccountSettings->>ProviderRegistry: select nvidia with API key
ProviderRegistry->>OpenAICompatibleLLMProvider: create provider with NVIDIA endpoint and model
OpenAICompatibleLLMProvider->>NvidiaNIM: send chat-completions request
Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview deployments for this PR: |
Summary
Adds NVIDIA's NIM inference API (build.nvidia.com) as another selectable provider in the existing multi-provider BYOK system, alongside OpenAI, Anthropic, Google AI, OpenRouter, Mistral, Groq, xAI, DeepSeek, and Custom.
NIM's hosted endpoint (
https://integrate.api.nvidia.com/v1/chat/completions) implements OpenAI's/chat/completionswire format, so this reuses the existingOpenAICompatibleLLMProvidervia a newproviderRegistry.tsentry — no new provider class needed, following the same pattern already used for Mistral/Groq/xAI/DeepSeek.constants.ts:LLM_PROVIDER.NVIDIA+LLM.NVIDIA_API_URL/NVIDIA_DEFAULT_MODELproviderRegistry.ts: new registry entryaccount.tsx: added'nvidia'to the provider Zod enum and the dropdown options listDefault model is
meta/llama-3.1-8b-instruct(small, fast — consistent with the other providers' lightweight defaults); users can override it like any other provider via the existing model field.Ref: Linear JEF-63.
Test plan
pnpm --filter @job-finder/api typecheck/pnpm --filter @job-finder/web typecheck— cleanpnpm --filter @job-finder/api lint/pnpm --filter @job-finder/web lint— cleanpnpm --filter @job-finder/api build/pnpm --filter @job-finder/web build— cleanpnpm --filter @job-finder/api test— 855/855 passing.providerRegistry.test.tsgenerically iterates everyLLM_PROVIDERvalue and asserts each has a registry entry, so it covers NVIDIA automatically without changes.pnpm --filter @job-finder/web test— 148/148 passing.saveLlmApiKeywithprovider: "nvidia"directly over GraphQL and confirmedllmKeyStatusread it back correctly, then repeated the flow through the actual browser UI via Playwright — selected "NVIDIA NIM" from the Account page dropdown, saved a key, and confirmed via screenshot that the page shows "AI features are enabled using NVIDIA NIM."🤖 Generated with Claude Code
https://claude.ai/code/session_01N2PBmsuzPhrmNnfZf6C3BM
Summary by CodeRabbit