Skip to content

Comments

feat: add NVIDIA NIM provider#706

Open
kexiv wants to merge 6 commits intomindcraft-bots:developfrom
kexiv:develop
Open

feat: add NVIDIA NIM provider#706
kexiv wants to merge 6 commits intomindcraft-bots:developfrom
kexiv:develop

Conversation

@kexiv
Copy link

@kexiv kexiv commented Feb 17, 2026

Summary of changes:

  • Created src/models/nvidia.js to support NVIDIA NIM API (OpenAI compatible).
  • Updated keys.example.json with NVIDIA_API_KEY placeholder.

- Add src/models/nvidia.js 
- Implement integration for NVIDIA NIM API (minimaxai/minimax-m2.1)
Added NVIDIA_API_KEY to keys.example.json as a placeholder.
### Usage Example for andy.json:
{
  "name": "andy",
  "model": "nvidia/deepseek-ai/deepseek-v3.2"
}
@kexiv
Copy link
Author

kexiv commented Feb 17, 2026

Usage Example for andy.json:

{
"name": "andy",
"model": "nvidia/deepseek-ai/deepseek-v3.2"
}

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for the NVIDIA NIM provider as an OpenAI-compatible API integration. The implementation follows the established pattern used by other model providers in the codebase, enabling users to interact with NVIDIA's AI models through the same interface as other supported providers.

Changes:

  • Added new NVIDIA provider class with OpenAI-compatible API integration
  • Updated example configuration file with NVIDIA API key placeholder
  • Implemented context length overflow handling with automatic retry logic

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
src/models/nvidia.js New provider class implementing NVIDIA NIM API with sendRequest and embed methods, following the OpenAI-compatible pattern
keys.example.json Added NVIDIA_API_KEY placeholder and fixed formatting for MERCURY_API_KEY

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

};

try {
console.log(`Awaiting NVIDIA API (${this.model_name}) response...`);
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The console log message "Awaiting NVIDIA API" uses uppercase "NVIDIA API" which is inconsistent with other providers. For consistency with deepseek.js:33, mercury.js:40, novita.js:37, and glhf.js:33, this should be lowercase, e.g., "Awaiting nvidia api response..." or "Awaiting NVIDIA api response..." (with lowercase "api").

Suggested change
console.log(`Awaiting NVIDIA API (${this.model_name}) response...`);
console.log(`Awaiting nvidia api (${this.model_name}) response...`);

Copilot uses AI. Check for mistakes.
Comment on lines 18 to 19
"MERCURY_API_KEY":"",
"NVIDIA_API_KEY":""
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after colon in "MERCURY_API_KEY":"". For consistency with other entries in this file (lines 2-17), there should be a space after the colon, i.e., "MERCURY_API_KEY": "".

Suggested change
"MERCURY_API_KEY":"",
"NVIDIA_API_KEY":""
"MERCURY_API_KEY": "",
"NVIDIA_API_KEY": ""

Copilot uses AI. Check for mistakes.
kexiv and others added 4 commits February 18, 2026 09:10
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant