File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -410,6 +410,16 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
410410 } ,
411411 } ,
412412 } ) ,
413+ nvidia : ( ) =>
414+ Effect . succeed ( {
415+ autoload : false ,
416+ options : {
417+ headers : {
418+ "HTTP-Referer" : "https://opencode.ai/" ,
419+ "X-Title" : "opencode" ,
420+ } ,
421+ } ,
422+ } ) ,
413423 vercel : ( ) =>
414424 Effect . succeed ( {
415425 autoload : false ,
Original file line number Diff line number Diff line change @@ -1316,30 +1316,57 @@ To use Kimi K2 from Moonshot AI:
13161316
13171317---
13181318
1319- ### Mistral AI
1319+ ### NVIDIA
13201320
1321- 1 . Head over to the [ Mistral AI console ] ( https://console.mistral.ai/ ) , create an account, and generate an API key .
1321+ NVIDIA provides access to Nemotron models and many other open models through [ build.nvidia.com ] ( https://build.nvidia.com ) for free .
13221322
1323- 2 . Run the ` /connect ` command and search for ** Mistral AI ** .
1323+ 1 . Head over to [ build.nvidia.com ] ( https://build.nvidia.com ) , create an account, and generate an API key .
13241324
1325- ``` txt
1326- /connect
1327- ```
1325+ 2 . Run the ` /connect ` command and search for ** NVIDIA** .
13281326
1329- 3 . Enter your Mistral API key.
1327+ ``` txt
1328+ /connect
1329+ ```
1330+
1331+ 3 . Enter your NVIDIA API key.
1332+
1333+ ``` txt
1334+ ┌ API key
1335+ │
1336+ │
1337+ └ enter
1338+ ```
1339+
1340+ 4 . Run the ` /models ` command to select a model like nemotron-3-super-120b-a12b.
1341+
1342+ ``` txt
1343+ /models
1344+ ```
13301345
1331- ``` txt
1332- ┌ API key
1333- │
1334- │
1335- └ enter
1336- ```
1346+ #### On-Prem / NIM
13371347
1338- 4 . Run the ` / models` command to select a model like _ Mistral Medium _ .
1348+ You can also use NVIDIA models locally via [ NVIDIA NIM ] ( https://docs.nvidia.com/nim/ ) by setting a custom base URL .
13391349
1340- ``` txt
1341- /models
1342- ```
1350+ ``` json title="opencode.json" {6}
1351+ {
1352+ "$schema" : " https://opencode.ai/config.json" ,
1353+ "provider" : {
1354+ "nvidia" : {
1355+ "options" : {
1356+ "baseURL" : " http://localhost:8000/v1"
1357+ }
1358+ }
1359+ }
1360+ }
1361+ ```
1362+
1363+ #### Environment Variable
1364+
1365+ Alternatively, set your API key as an environment variable.
1366+
1367+ ``` bash frame="none"
1368+ export NVIDIA_API_KEY=nvapi-your-key-here
1369+ ```
13431370
13441371---
13451372
You can’t perform that action at this time.
0 commit comments