@sateeshreddy/n8n-nodes-nvidia-nim 0.1.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +234 -10
- package/package.json +1 -1
- package/.claude/settings.local.json +0 -7
- package/Claude.md +0 -87
package/README.md
CHANGED
|
@@ -1,21 +1,245 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="https://upload.wikimedia.org/wikipedia/commons/a/a4/NVIDIA_logo.svg" height="48" alt="NVIDIA Logo" />
|
|
4
|
+
|
|
1
5
|
# n8n-nodes-nvidia-nim
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
**Connect any free NVIDIA NIM language model to your n8n workflows — in one node.**
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/n8n-nodes-nvidia-nim)
|
|
10
|
+
[](https://n8n.io)
|
|
11
|
+
[](LICENSE)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Overview
|
|
18
|
+
|
|
19
|
+
`n8n-nodes-nvidia-nim` is an n8n community node that gives you access to **NVIDIA NIM's free hosted language models** directly inside your workflows.
|
|
20
|
+
It plugs into n8n's **AI Agent** as a drop-in language model — just like the built-in OpenAI or Anthropic nodes.
|
|
21
|
+
|
|
22
|
+
### Why use this?
|
|
23
|
+
|
|
24
|
+
- ✅ Free tier models via [build.nvidia.com](https://build.nvidia.com)
|
|
25
|
+
- ✅ Works as a proper **AI sub-node** (connect to any AI Agent)
|
|
26
|
+
- ✅ Supports 17+ models including Llama 4, Mistral, Qwen3, Gemma, and more
|
|
27
|
+
- ✅ Drop-in OpenAI-compatible API — no extra setup
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Supported Models
|
|
32
|
+
|
|
33
|
+
| Model | Value |
|
|
34
|
+
|---|---|
|
|
35
|
+
| Llama 4 Maverick 17B 128E Instruct *(default)* | `meta/llama-4-maverick-17b-128e-instruct` |
|
|
36
|
+
| Mistral Large 3 675B Instruct | `mistralai/mistral-large-3-675b-instruct-2512` |
|
|
37
|
+
| Qwen3 Coder 480B A35B Instruct | `qwen/qwen3-coder-480b-a35b-instruct` |
|
|
38
|
+
| Mistral Nemotron (Function Calling) | `mistralai/mistral-nemotron` |
|
|
39
|
+
| Mistral Medium 3 Instruct | `mistralai/mistral-medium-3-instruct` |
|
|
40
|
+
| Magistral Small 2506 | `mistralai/magistral-small-2506` |
|
|
41
|
+
| Step 3.5 Flash (Agentic) | `stepfun-ai/step-3.5-flash` |
|
|
42
|
+
| Seed OSS 36B Instruct (Agentic) | `bytedance/seed-oss-36b-instruct` |
|
|
43
|
+
| GLM-4.7 (Tool Calling) | `thudm/glm-4.7` |
|
|
44
|
+
| MiniMax M2.7 | `minimax/minimax-m2.7` |
|
|
45
|
+
| Phi-4 Multimodal Instruct | `microsoft/phi-4-multimodal-instruct` |
|
|
46
|
+
| Gemma 3N E4B IT | `google/gemma-3n-e4b-it` |
|
|
47
|
+
| Gemma 3N E2B IT | `google/gemma-3n-e2b-it` |
|
|
48
|
+
| Gemma 2 2B IT | `google/gemma-2-2b-it` |
|
|
49
|
+
| Dracarys Llama 3.1 70B Instruct | `abacusai/dracarys-llama-3.1-70b-instruct` |
|
|
50
|
+
| Nemotron Mini 4B Instruct | `nvidia/nemotron-mini-4b-instruct` |
|
|
51
|
+
| Solar 10.7B Instruct | `upstage/solar-10.7b-instruct` |
|
|
52
|
+
|
|
53
|
+
---
|
|
4
54
|
|
|
5
55
|
## Installation
|
|
6
56
|
|
|
7
|
-
|
|
8
|
-
|
|
57
|
+
### Via n8n Community Nodes (Recommended)
|
|
58
|
+
|
|
59
|
+
1. Open your n8n instance
|
|
60
|
+
2. Go to **Settings → Community Nodes**
|
|
61
|
+
3. Click **Install**
|
|
62
|
+
4. Enter `n8n-nodes-nvidia-nim` and confirm
|
|
63
|
+
|
|
64
|
+
### Manual Installation
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Navigate to your n8n custom nodes directory
|
|
68
|
+
cd ~/.n8n/custom/
|
|
69
|
+
|
|
70
|
+
# Install the package
|
|
71
|
+
npm install n8n-nodes-nvidia-nim
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Then restart n8n.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Getting Your API Key
|
|
79
|
+
|
|
80
|
+
1. Visit [build.nvidia.com](https://build.nvidia.com)
|
|
81
|
+
2. Sign in or create a free account
|
|
82
|
+
3. Navigate to **API Keys** in your dashboard
|
|
83
|
+
4. Generate a new key and copy it
|
|
84
|
+
|
|
85
|
+
> **Note:** The free tier gives you a generous number of inference credits — no credit card required.
|
|
86
|
+
|
|
87
|
+
---
|
|
9
88
|
|
|
10
89
|
## Usage
|
|
11
90
|
|
|
12
|
-
|
|
91
|
+
### 1. Add Credentials
|
|
92
|
+
|
|
93
|
+
In n8n, go to **Credentials → New → NVIDIA NIM API** and paste your API key.
|
|
94
|
+
|
|
95
|
+
### 2. Add the Node to a Workflow
|
|
96
|
+
|
|
97
|
+
1. Add an **AI Agent** node to your workflow
|
|
98
|
+
2. In the Agent's **Model** slot, click the `+` button
|
|
99
|
+
3. Search for **NVIDIA NIM** and select it
|
|
100
|
+
4. Configure the model, temperature, and max tokens
|
|
101
|
+
5. Run your workflow
|
|
102
|
+
|
|
103
|
+
The node acts as a language model supplier — it connects to AI Agents, chains, and any other LangChain-compatible n8n node.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Configuration Options
|
|
108
|
+
|
|
109
|
+
| Parameter | Type | Default | Description |
|
|
110
|
+
|---|---|---|---|
|
|
111
|
+
| **Model** | Dropdown | `llama-4-maverick-17b-128e-instruct` | The NIM model to use |
|
|
112
|
+
| **Temperature** | Number (0–2) | `0.7` | Controls output randomness. Lower = more deterministic |
|
|
113
|
+
| **Max Tokens** | Number (1–4096) | `1000` | Maximum tokens in the response |
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Known Issue — Routing Light Not Animating
|
|
118
|
+
|
|
119
|
+
> ⚠️ **This section documents a bug found in earlier versions of this node and how it was fixed.**
|
|
120
|
+
> If you installed version `1.0.0` or earlier, please update to the latest version.
|
|
121
|
+
|
|
122
|
+
### What was happening
|
|
123
|
+
|
|
124
|
+
When users ran a workflow containing this node, the **routing light** (the animated glow/pulse around a node that shows it is actively executing) never appeared — even though the node was working correctly behind the scenes.
|
|
125
|
+
|
|
126
|
+
Every other node in the workflow showed the animation, but the NVIDIA NIM node stayed visually "dark" throughout execution.
|
|
127
|
+
|
|
128
|
+
### Root Cause
|
|
129
|
+
|
|
130
|
+
This node uses n8n's `supplyData()` method instead of `execute()` — which is the correct pattern for **AI sub-nodes** (language model supply nodes that connect to AI Agents). However, `supplyData` has a different execution lifecycle than `execute`, and n8n tracks visual status through that lifecycle.
|
|
131
|
+
|
|
132
|
+
Three things were missing:
|
|
133
|
+
|
|
134
|
+
**1. No `closeFunction` returned**
|
|
135
|
+
|
|
136
|
+
`supplyData` must return a `closeFunction` alongside the model response. n8n uses this callback as the signal that the node has finished its work — which is what triggers the routing light to complete its animation and mark the node as done.
|
|
137
|
+
|
|
138
|
+
```ts
|
|
139
|
+
// ❌ Before — n8n never knew the node finished
|
|
140
|
+
return {
|
|
141
|
+
response: chatModel,
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
// ✅ After — n8n now correctly tracks completion
|
|
145
|
+
return {
|
|
146
|
+
response: chatModel,
|
|
147
|
+
closeFunction: async () => {},
|
|
148
|
+
};
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**2. Errors were not re-thrown as `NodeOperationError`**
|
|
152
|
+
|
|
153
|
+
When the node threw an error (bad API key, network failure, etc.), n8n had no way to update the node's visual state to "failed". The routing light would simply never appear.
|
|
154
|
+
|
|
155
|
+
```ts
|
|
156
|
+
// ❌ Before — silent failure, n8n UI stays blank
|
|
157
|
+
} catch (error) {
|
|
158
|
+
console.error(error);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// ✅ After — n8n marks the node as failed with an error badge
|
|
162
|
+
} catch (error) {
|
|
163
|
+
throw new NodeOperationError(this.getNode(), error as Error);
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**3. Missing `outputConnectionTypes` in node descriptor**
|
|
168
|
+
|
|
169
|
+
Without declaring `outputConnectionTypes`, n8n's UI couldn't properly register the node as a typed AI supply node, which prevented the execution tracker from attaching to it.
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
// ✅ Added to NvidiaNim.node.json
|
|
173
|
+
"outputConnectionTypes": {
|
|
174
|
+
"ai_languageModel": [{ "type": "ai_languageModel" }]
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### The Fix (v1.1.0+)
|
|
179
|
+
|
|
180
|
+
All three issues were resolved in `v1.1.0`. The node now correctly shows the routing light animation during execution, displays an error badge on failure, and cleans up properly after each run.
|
|
181
|
+
|
|
182
|
+
---
|
|
13
183
|
|
|
14
184
|
## Development
|
|
15
185
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
186
|
+
```bash
|
|
187
|
+
# Install dependencies
|
|
188
|
+
npm install
|
|
189
|
+
|
|
190
|
+
# TypeScript watch mode (auto-recompile on save)
|
|
191
|
+
npm run dev
|
|
192
|
+
|
|
193
|
+
# Build distributable files
|
|
194
|
+
npm run build
|
|
195
|
+
|
|
196
|
+
# Lint code
|
|
197
|
+
npm run lint
|
|
198
|
+
|
|
199
|
+
# Auto-fix lint issues
|
|
200
|
+
npm run lintfix
|
|
201
|
+
|
|
202
|
+
# Format with Prettier
|
|
203
|
+
npm run format
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Project Structure
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
n8n-nodes-nvidia-nim/
|
|
210
|
+
├── credentials/
|
|
211
|
+
│ └── NvidiaNimApi.credentials.ts # API key credential definition
|
|
212
|
+
├── nodes/
|
|
213
|
+
│ └── NvidiaNim/
|
|
214
|
+
│ ├── NvidiaNim.node.ts # Node logic (supplyData)
|
|
215
|
+
│ ├── NvidiaNim.node.json # Node descriptor & UI properties
|
|
216
|
+
│ └── nvidia-nim.png # Node icon
|
|
217
|
+
├── dist/ # Compiled output (generated)
|
|
218
|
+
├── package.json
|
|
219
|
+
└── README.md
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Contributing
|
|
225
|
+
|
|
226
|
+
Pull requests are welcome! If you'd like to add a new model, fix a bug, or improve documentation:
|
|
227
|
+
|
|
228
|
+
1. Fork the repo
|
|
229
|
+
2. Create a feature branch: `git checkout -b feat/your-feature`
|
|
230
|
+
3. Commit your changes: `git commit -m 'feat: add your feature'`
|
|
231
|
+
4. Push and open a PR
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## License
|
|
236
|
+
|
|
237
|
+
[MIT](LICENSE)
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
<div align="center">
|
|
242
|
+
|
|
243
|
+
Made with ☕ for the n8n community · Powered by [NVIDIA NIM](https://build.nvidia.com)
|
|
244
|
+
|
|
245
|
+
</div>
|
package/package.json
CHANGED
package/Claude.md
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
-
|
|
5
|
-
## Project Overview
|
|
6
|
-
This repository contains the `n8n-nodes-nvidia-nim` package - an n8n community node that allows users to call any free model from NVIDIA NIM (build.nvidia.com) directly in their workflows. The node wraps NVIDIA's OpenAI-compatible REST API (`https://integrate.api.nvidia.com/v1`) with a friendly n8n UI.
|
|
7
|
-
|
|
8
|
-
## Repository Structure
|
|
9
|
-
```
|
|
10
|
-
n8n-nodes-nvidia-nim/
|
|
11
|
-
├── package.json
|
|
12
|
-
├── tsconfig.json
|
|
13
|
-
├── tsconfig.build.json
|
|
14
|
-
├── gulpfile.js
|
|
15
|
-
├── eslint.config.mjs
|
|
16
|
-
├── .gitignore
|
|
17
|
-
├── README.md
|
|
18
|
-
├── nodes/
|
|
19
|
-
│ └── NvidiaNim/
|
|
20
|
-
│ ├── NvidiaNim.node.ts # Main node logic (TypeScript)
|
|
21
|
-
│ ├── NvidiaNim.node.json # Node metadata/codex
|
|
22
|
-
│ └── nvidia-nim.svg # Node icon
|
|
23
|
-
└── credentials/
|
|
24
|
-
└── NvidiaNimApi.credentials.ts # API key credential definition
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Key Commands
|
|
28
|
-
All commands are executed by Claude Code within the project directory:
|
|
29
|
-
|
|
30
|
-
- **Install dependencies**: `npm install`
|
|
31
|
-
- **Lint code**: `npm run lint` (checks for TypeScript errors and enforces coding standards)
|
|
32
|
-
- **Fix lint issues**: `npm run lintfix` (auto-fixes lintable issues)
|
|
33
|
-
- **Format code**: `npm run format` (uses Prettier to format TypeScript and JSON files)
|
|
34
|
-
- **Build package**: `npm run build` (compiles TypeScript to dist/ and copies SVG icons)
|
|
35
|
-
- **Watch for changes**: `npm run dev` (TypeScript watch mode during development)
|
|
36
|
-
- **Prepublish checks**: `npm run prepublishOnly` (runs build and lint before publishing)
|
|
37
|
-
|
|
38
|
-
## Development Workflow
|
|
39
|
-
1. **Setup**: Run `npm install` to install dependencies
|
|
40
|
-
2. **Develop**: Use `npm run dev` for continuous TypeScript compilation
|
|
41
|
-
3. **Code Quality**:
|
|
42
|
-
- Run `npm run lint` to check for issues
|
|
43
|
-
- Run `npm run lintfix` to automatically fix lint issues
|
|
44
|
-
- Run `npm run format` to format code with Prettier
|
|
45
|
-
4. **Build**: Run `npm run build` to generate distributable files in `dist/`
|
|
46
|
-
5. **Test**: Manual testing can be done by linking to n8n (see notes below)
|
|
47
|
-
|
|
48
|
-
## Architecture Highlights
|
|
49
|
-
- **Node Implementation**: The main logic resides in `nodes/NvidiaNim/NvidiaNim.node.ts` which implements the `INodeType` interface from `n8n-workflow`
|
|
50
|
-
- **Credentials**: API key handling is defined in `credentials/NvidiaNimApi.credentials.ts` using n8n's credential system
|
|
51
|
-
- **Build Process**:
|
|
52
|
-
- TypeScript compilation via `tsc` (using `tsconfig.build.json` for production builds)
|
|
53
|
-
- SVG icon copying via Gulp (`gulpfile.js`)
|
|
54
|
-
- Output directed to `dist/` directory as specified in package.json
|
|
55
|
-
- **n8n Integration**:
|
|
56
|
-
- Package.json includes `n8n` section specifying nodes and credentials paths
|
|
57
|
-
- Uses `n8nNodesApiVersion: 1` for compatibility
|
|
58
|
-
- Leverages n8n's built-in `httpRequest` helper for API calls (no external dependencies)
|
|
59
|
-
|
|
60
|
-
## Testing Approach
|
|
61
|
-
While the project doesn't include automated test files, validation includes:
|
|
62
|
-
- **Build verification**: Confirming `npm run build` succeeds and produces expected output in `dist/`
|
|
63
|
-
- **TypeScript checking**: Ensuring no `any` type errors (warnings allowed) via ESLint
|
|
64
|
-
- **Lint compliance**: Zero warnings from `npm run lint`
|
|
65
|
-
- **Structural checks**: Verifying required files exist in correct locations post-build
|
|
66
|
-
- **Manual verification**: Smoke test script (`test/manual.ts`) to validate node description loads correctly
|
|
67
|
-
|
|
68
|
-
## Important Notes for Claude Code
|
|
69
|
-
1. **Do not ask users to run commands** - execute all commands yourself
|
|
70
|
-
2. **Always verify build output** - after `npm run build`, check that `dist/` contains:
|
|
71
|
-
- `dist/nodes/NvidiaNim/NvidiaNim.node.js`
|
|
72
|
-
- `dist/nodes/NvidiaNim/nvidia-nim.svg`
|
|
73
|
-
- `dist/credentials/NvidiaNimApi.credentials.js`
|
|
74
|
-
3. **Use n8n helpers** - rely on `this.helpers.httpRequest` for API calls, not external libraries
|
|
75
|
-
4. **Handle streaming properly** - when `stream: true`, collect SSE chunks before outputting
|
|
76
|
-
5. **Respect continueOnFail()** - wrap per-item processing in try/catch blocks
|
|
77
|
-
6. **No runtime dependencies** - avoid adding axios, node-fetch, etc.; use n8n's built-in helpers
|
|
78
|
-
7. **Expression support** - n8n automatically resolves expressions in `userMessage` and `systemPrompt` fields
|
|
79
|
-
|
|
80
|
-
## Common Issues to Watch For
|
|
81
|
-
- **Module not found**: Ensure `npm install` has been run for `n8n-workflow` dependency
|
|
82
|
-
- **Gulp not found**: Use `npx gulp build:icons` if gulp command missing
|
|
83
|
-
- **SVG not copied**: Verify gulpfile.js correctly copies SVG to dist/nodes/
|
|
84
|
-
- **Node not appearing**: Check package.json → n8n.nodes path matches actual dist file
|
|
85
|
-
- **Authentication errors**: API key must start with `nvapi-` and be obtained from build.nvidia.com
|
|
86
|
-
- **Model not found**: Use exact vendor/model-name format from build.nvidia.com
|
|
87
|
-
- **Rate limiting**: Free tier allows ~40 RPM; consider Wait nodes in tight loops
|