-
Notifications
You must be signed in to change notification settings - Fork 403
feat: add NVIDIA provider as supported model provider #3421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Priyanshu-sde
wants to merge
2
commits into
docker:main
Choose a base branch
from
Priyanshu-sde:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+155
−4
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| --- | ||
| title: "NVIDIA NIM" | ||
| description: "Use NVIDIA NIM models with docker-agent." | ||
| keywords: docker agent, ai agents, model providers, llm, nvidia, nim, nemotron | ||
| weight: 290 | ||
| --- | ||
|
|
||
| _Use NVIDIA NIM models with docker-agent._ | ||
|
|
||
| ## Overview | ||
|
|
||
| NVIDIA provides access to Nemotron and many other open-weight models through | ||
| [build.nvidia.com](https://build.nvidia.com/) (with a free tier) via an | ||
| OpenAI-compatible API. docker-agent includes built-in support for NVIDIA as an | ||
| alias provider. The same alias also works against a self-hosted | ||
| [NVIDIA NIM](https://docs.nvidia.com/nim/) deployment by overriding `base_url`. | ||
|
|
||
| ## Setup | ||
|
|
||
| 1. Get an API key from [build.nvidia.com](https://build.nvidia.com/) | ||
| 2. Set the environment variable: | ||
|
|
||
| ```bash | ||
| export NVIDIA_API_KEY=your-api-key | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| ### Inline Syntax | ||
|
|
||
| The simplest way to use NVIDIA NIM: | ||
|
|
||
| ```yaml | ||
| agents: | ||
| root: | ||
| model: nvidia/nvidia/nemotron-3-super-120b-a12b | ||
| description: Assistant using NVIDIA NIM | ||
| instruction: You are a helpful assistant. | ||
| ``` | ||
|
|
||
| ### Named Model | ||
|
|
||
| For more control over parameters: | ||
|
|
||
| ```yaml | ||
| models: | ||
| nemotron: | ||
| provider: nvidia | ||
| model: nvidia/nemotron-3-super-120b-a12b | ||
| temperature: 0.7 | ||
| max_tokens: 8192 | ||
|
|
||
| agents: | ||
| root: | ||
| model: nemotron | ||
| description: Assistant using NVIDIA NIM | ||
| instruction: You are a helpful assistant. | ||
| ``` | ||
|
|
||
| ## Available Models | ||
|
|
||
| NVIDIA NIM hosts Nemotron alongside many other open models (Llama, Qwen, | ||
| DeepSeek, Mistral, ...). Check the [NVIDIA API catalog](https://build.nvidia.com/) | ||
| for the current model list. | ||
|
|
||
| | Model | Description | | ||
| | -------------------------------------------- | ---------------------------------- | | ||
| | `nvidia/nemotron-3-super-120b-a12b` | Nemotron 3 Super, reasoning + tool calling | | ||
| | `nvidia/nemotron-3-nano-30b-a3b` | Nemotron 3 Nano, smaller/faster | | ||
| | `meta/llama-3.3-70b-instruct` | Llama 3.3 70B instruction-tuned | | ||
| | `qwen/qwen3-coder-480b-a35b-instruct` | Qwen3 Coder, code-focused | | ||
|
|
||
| ## On-Prem / Self-Hosted NIM | ||
|
|
||
| For self-hosted NIM deployments, point `base_url` at your own endpoint instead | ||
| of the hosted `integrate.api.nvidia.com` API: | ||
|
|
||
| ```yaml | ||
| models: | ||
| local_nim: | ||
| provider: nvidia | ||
| model: meta/llama-3.3-70b-instruct | ||
| base_url: http://localhost:8000/v1 | ||
| ``` | ||
|
|
||
| ## How It Works | ||
|
|
||
| NVIDIA is implemented as a built-in alias in docker-agent: | ||
|
|
||
| - **API Type:** OpenAI-compatible (`openai_chatcompletions`) | ||
| - **Base URL:** `https://integrate.api.nvidia.com/v1` | ||
| - **Token Variable:** `NVIDIA_API_KEY` | ||
|
|
||
| Because NIM fronts open-weight models whose chat templates often only accept | ||
| a single system message, docker-agent coalesces the agent instruction and any | ||
| toolset instructions into one leading system message before sending the | ||
| request. | ||
|
|
||
| ## Example: Code Assistant | ||
|
|
||
| ```yaml | ||
| agents: | ||
| coder: | ||
| model: nvidia/nvidia/nemotron-3-super-120b-a12b | ||
| description: Code assistant using Nemotron | ||
| instruction: | | ||
| You are an expert programmer using NVIDIA Nemotron. | ||
| Write clean, well-documented code. | ||
| Follow best practices for the language being used. | ||
| toolsets: | ||
| - type: filesystem | ||
| - type: shell | ||
| - type: think | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # yaml-language-server: $schema=../agent-schema.json | ||
|
|
||
| models: | ||
| nemotron: | ||
| provider: nvidia | ||
| model: nvidia/nemotron-3-super-120b-a12b | ||
|
|
||
| agents: | ||
| root: | ||
| model: nemotron | ||
| description: Assistant using NVIDIA NIM | ||
| instruction: | | ||
| You are a helpful assistant. | ||
| toolsets: | ||
| - type: filesystem | ||
| - type: shell | ||
| - type: think | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.