pi-nvidia-nim 1.1.19 → 1.1.21

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.ts +11 -3
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # pi-nvidia-nim
2
2
 
3
- NVIDIA NIM API provider extension for [pi coding agent](https://github.com/badlogic/pi-mono) - access 100+ models from [build.nvidia.com](https://build.nvidia.com) including DeepSeek V4 Flash/Pro, DeepSeek V3.2, Kimi K2.6, MiniMax M2.1, GLM-5, GLM-4.7, Qwen3, Llama 4, and many more.
3
+ NVIDIA NIM API provider extension for [pi coding agent](https://github.com/earendil-works/pi-mono) - access 100+ models from [build.nvidia.com](https://build.nvidia.com) including DeepSeek V4 Flash/Pro, DeepSeek V3.2, Kimi K2.6, MiniMax M2.1, GLM-5, GLM-4.7, Qwen3, Llama 4, and many more.
4
4
 
5
5
  https://github.com/user-attachments/assets/f44773e4-9bf8-4bb5-a9c0-d5938030701c
6
6
 
package/index.ts CHANGED
@@ -42,9 +42,9 @@ import type {
42
42
  Context,
43
43
  Model,
44
44
  SimpleStreamOptions,
45
- } from "@mariozechner/pi-ai";
46
- import { streamSimpleOpenAICompletions } from "@mariozechner/pi-ai";
47
- import { getAgentDir, type ExtensionAPI } from "@mariozechner/pi-coding-agent";
45
+ } from "@earendil-works/pi-ai";
46
+ import { streamSimpleOpenAICompletions } from "@earendil-works/pi-ai";
47
+ import { getAgentDir, type ExtensionAPI } from "@earendil-works/pi-coding-agent";
48
48
 
49
49
  // =============================================================================
50
50
  // Constants
@@ -620,6 +620,14 @@ function nimStreamSimple(
620
620
  context: Context,
621
621
  options?: SimpleStreamOptions,
622
622
  ): AssistantMessageEventStream {
623
+ // pi-coding-agent registers streamSimple globally per `api` type (not per provider).
624
+ // This streamer is invoked for ALL openai-completions providers (e.g. openrouter, openai),
625
+ // not just nvidia-nim. Pass non-NIM calls through unchanged so we don't leak the
626
+ // NVIDIA_NIM_API_KEY into other providers' Authorization headers.
627
+ if (model.provider !== PROVIDER_NAME) {
628
+ return streamSimpleOpenAICompletions(model as Model<"openai-completions">, context, options);
629
+ }
630
+
623
631
  const thinkingConfig = THINKING_CONFIGS[model.id];
624
632
  const reasoning = options?.reasoning;
625
633
  const isThinkingEnabled = !!reasoning;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-nvidia-nim",
3
- "version": "1.1.19",
3
+ "version": "1.1.21",
4
4
  "description": "NVIDIA NIM API provider extension for pi coding agent — access 100+ models from build.nvidia.com",
5
5
  "type": "module",
6
6
  "files": [
@@ -23,8 +23,8 @@
23
23
  "test": "node --test test/*.test.mjs"
24
24
  },
25
25
  "devDependencies": {
26
- "@mariozechner/pi-coding-agent": "^0.52.9",
27
- "@mariozechner/pi-ai": "^0.52.9",
26
+ "@earendil-works/pi-ai": "^0.74.0",
27
+ "@earendil-works/pi-coding-agent": "^0.74.0",
28
28
  "@types/node": "^22.0.0"
29
29
  },
30
30
  "repository": {