VS Code 扩展:NVIDIA NIM 提供者,用于 AI 代理(模型目录、工具循环防护、抽样校准)
AI 翻译
VS Code extension: NVIDIA NIM provider for AI agents (model catalog, tool-loop guard, sampling calibration)
插件TypeScript · JavaScriptGitHub @BaUka0自行安装运营者未确认
试用过了吗? 点一下就好,无需登录。
正在加载完整 README。 以下为已保存的摘录。
Direct access to NVIDIA NIM reasoning models inside GitHub Copilot Chat. No proxy servers in between.
NVIDIA provides free API on build.nvidia.com. You can run DeepSeek V4, Nemotron, GLM, and Kimi directly inside Copilot without any monthly provider subscription.
The extension routes Copilot Chat to NVIDIA NIM models with automatic failover, reasoning controls, agent-mode tool support, and a status bar that shows live token use.查看完整 README ↗Direct access to NVIDIA NIM reasoning models inside GitHub Copilot Chat. No proxy servers in between.
Install • Documentation • Contributing • Supported Models • Quick Start • FAQ • Commands
NVIDIA provides free API on build.nvidia.com. You can run DeepSeek V4, Nemotron, and GLM directly inside Copilot without any monthly provider subscription.
The extension routes Copilot Chat to NVIDIA NIM models with automatic failover, reasoning controls, agent-mode tool support, and a status bar that shows live token use.
Reasoning controls. Collapsible thinking blocks via VS Code's LanguageModelThinkingPart, plus per-turn effort control from None to Max in the Copilot model dropdown.
Failover. When the active model returns 429, 404, 410, an empty stream, or a timeout, the same prompt is rerouted to a backup. A configurable fallback.priorityList is tried first; text requests fall back to Nemotron 3.5 Lightning and image requests to Muse Glimmer by default. The next turn retries the original model, unless NVIDIA has retired it (HTTP 410): a retired model is skipped and hidden from the picker for the rest of the session.
Repetition guard. Detects degenerate "Let me fix..." output loops mid-stream and ends the turn cleanly instead of spinning forever.
Tool calls. A single streaming tag-stack XML scanner handles OpenAI JSON, XML control blocks, and Hermes/Anthropic-style tags. Malformed arguments are auto-repaired through jsonrepair, and a call repeated with identical arguments more than tools.maxConsecutiveIdenticalCalls times in one task (default 4) is dropped as a loop.
Context auto-compaction. Long sessions get compacted in the background by a dedicated model so you don't hit HTTP 400 Context Window Exceeded.
Status bar & diagnostics. Token utilization in the status bar, prompt/completion counts in Copilot's context window widget, and millisecond TTFT logs when debug logging is on.
The extension connects to official NVIDIA NIM endpoints (https://integrate.api.nvidia.com/v1) and ships per-model adapters.
| Model | Intelligence Index | Context Window | Reasoning Modes | Tools | Vision | Notes |
|---|---|---|---|---|---|---|
| DeepSeek V4.1 Flash | 32 | 1M | None, Low, High, Max | Yes | Yes | Fast multimodal reasoning, agentic coding, architecture |
| MiniMax M3.1 Flash | 29 | 262K | Low to Max | Yes | Yes | Fast multimodal MoE for agentic coding and visual input |
| Step 5 Preview | 29 | 1M | Always on | Yes | Yes | StepFun preview; reasoning cannot be turned off |
| Mistral Large 4 | 26 | 1M | Low, Medium, High | Yes | Yes | Large multimodal MoE for agentic coding and document analysis |
| Nemotron 3.5 Super VL | 14 | 1M | None, Low, High | Yes | Yes | Coding, tools, and image input in one model |
| Nemotron 3 Ultra | 12 | 1M | None, Medium, High |
Intelligence Index values are from the Artificial Analysis Intelligence Index v5.0 (checked 2026-10-30). GLM 5.3 Flash and Nemotron 3.5 Lightning have no v5 score yet.
Reasoning is on by default: High, or Medium on Nemotron 3.5 Lightning. Step 5 Preview always reasons and has no Reasoning Mode. Change it per model with Reasoning Mode in the model picker, or for all models with nvidia-nim.reasoning.mode. Copilot agent sessions offer the reasoning level as well; Context Size is available in local chat sessions only.
The full settings.json reference, failover policies, network parameters, and agentic tool configuration live in the dedicated guide:
Full Documentation & Configuration Guide (docs/README.md)
Ctrl + P / Cmd + P): ext install neuraldock.nvidia-nim-agent1.125.0 or laterCtrl + Alt + I / Cmd + Alt + I).nvapi-...).Alternatively, run NVIDIA NIM: Manage NVIDIA NIM API Key from the Command Palette.
Pick any NVIDIA NIM model in Copilot Chat or Copilot Agent Mode.
NVIDIA NIM models also work in chat sessions run by the Copilot harness (VS Code's agent host) in the regular chat view. These sessions differ from Local ones; see Copilot vs Local Chat Sessions. The separate Agents window does not load the extension yet, so NVIDIA NIM models are not available there.
To enable BYOK models for the agent host:
settings.json (Preferences: Open User Settings (JSON) in Command Palette)."chat.agentHost.byokModels.enabled": true
z-ai/glm-5.3-flash for multi-step reasoning and deep codebase context."nvidia-nim.fallback.firstTokenTimeoutSeconds": 120 (or 180) to allow NVIDIA NIM time for KV-cache prefill on large prompts with multiple MCP tools."nvidia-nim.network.streamIdleTimeout": 120 (or 180) ensures stalled streams are cleanly aborted and failed over."nvidia-nim.fallback.maxChainRestarts": 2 automatically retries the model chain with backoff if upstream endpoints hit transient 503/529 overload.Open the Command Palette (Ctrl + Shift + P / Cmd + Shift + P).
| Command | Identifier | Description |
|---|---|---|
| Manage API Key | nvidia-nim.manage | Store or update your NVIDIA NIM API key in OS SecretStorage. |
| Refresh Models | nvidia-nim.refreshModels | Re-sync the available model list and invalidate the local cache. |
| Toggle Debug Logging | nvidia-nim.toggleDebugLogging | Toggle verbose diagnostic logs. |
| Open Debug Log | nvidia-nim.openDebugLog | Open the NVIDIA NIM Output channel. |
All requests go directly from your VS Code client to the official NVIDIA NIM API at https://integrate.api.nvidia.com/v1. There are no third-party telemetry endpoints or proxy gateways. The API key is encrypted in VS Code's OS-level SecretStorage. The extension stores no chat logs, file contents, or personal credentials.
Q: Do I need a paid NVIDIA subscription?
A: No. NVIDIA provides free API on build.nvidia.com for developers.
Q: Does it work with Copilot Agent Mode and Tools?
A: Yes. The supported chat models are tool-capable and support autonomous file editing, terminal execution, and MCP tools with automatic JSON repair.
Q: How do I check if NVIDIA NIM is busy or down?
A: While unofficial, try this page: https://nimstats.aathil.com/
npm install
npm run compile # produces the compiled output in ./out
npm test # runs Jest; all tests should pass
npm run package:vsix # compiles then packages the extension
The resulting .vsix file can be installed via Extensions → Install from VSIX… in VS Code.
This extension is maintained on a best-effort basis. Fixes for retired or changed NVIDIA NIM models still land, but replies to issues can take a while. Bug reports with the turn report file attached get priority: run NVIDIA NIM: Save Last Turn Report right after the failing turn and drag and drop the saved file into the issue. Reports without it are closed automatically.
If this extension saves you time and makes working with NVIDIA NIM in Copilot Chat smoother, you can support its maintenance on Ko-fi.
| Yes |
| No |
| Heavy multi-step reasoning, technical docs |
| Muse Glimmer | 6 | 131K | None to Max | Yes | Yes | Visual UX/UI work; default vision fallback |
| GLM 5.3 Flash | N/A | 1M | Low, High, Max | Yes | Yes | Fast multimodal reasoning, code generation, instant response in Low |
| Nemotron 3.5 Lightning | N/A | 1M | None, Medium, High, XHigh | Yes | No | Fast agentic turns; default text fallback and summarizer |