Conversation
- 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"
}
Usage Example for andy.json:{ |
There was a problem hiding this comment.
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...`); |
There was a problem hiding this comment.
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").
| console.log(`Awaiting NVIDIA API (${this.model_name}) response...`); | |
| console.log(`Awaiting nvidia api (${this.model_name}) response...`); |
keys.example.json
Outdated
| "MERCURY_API_KEY":"", | ||
| "NVIDIA_API_KEY":"" |
There was a problem hiding this comment.
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": "".
| "MERCURY_API_KEY":"", | |
| "NVIDIA_API_KEY":"" | |
| "MERCURY_API_KEY": "", | |
| "NVIDIA_API_KEY": "" |
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>
Summary of changes:
src/models/nvidia.jsto support NVIDIA NIM API (OpenAI compatible).keys.example.jsonwithNVIDIA_API_KEYplaceholder.