@gtrabanco/pi-nan-provider 1.7.2 → 1.8.0
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.
- package/AGENTS.md +59 -3
- package/README.es.md +5 -2
- package/README.md +5 -2
- package/package.json +3 -3
- package/scripts/models.generated.ts +2 -2
package/AGENTS.md
CHANGED
|
@@ -463,8 +463,64 @@ Since 1.0.0 the package version **aligns its MAJOR.MINOR with the pi release lin
|
|
|
463
463
|
`src/reasoning-only-stream-guard.ts` (issue #21) keys on that marker;
|
|
464
464
|
earlier comment/message text said "60,000 characters" and was corrected to
|
|
465
465
|
the documented figures.
|
|
466
|
-
- **pi 1.
|
|
467
|
-
baseline; devDependencies 1.
|
|
466
|
+
- **pi 1.8.0 / pi-ai 1.8.0 compat** (verified 2026-12-03, the current verified
|
|
467
|
+
baseline; devDependencies 1.7.0 → 1.8.0, package 1.7.2 → 1.8.0, peer range
|
|
468
|
+
unchanged at `^1.4.0` because nothing here needs 1.8.0). **No `src/` change,
|
|
469
|
+
no `scripts/` change:** every symbol `src/` imports still exists, and a
|
|
470
|
+
tarball diff (`npm pack`, 1.7.0 vs 1.8.0) shows `dist/compat.js`,
|
|
471
|
+
`dist/index.js`, `dist/models.js`, `dist/api/simple-options.js` and
|
|
472
|
+
`dist/utils/transcript.js` byte-identical, while pi-ai's `compat.d.ts`,
|
|
473
|
+
`api/openai-completions.d.ts` and `index.d.ts` are byte-identical too. What
|
|
474
|
+
DID move, and why it does or does not touch this package:
|
|
475
|
+
- `dist/api/openai-completions.js` changes 7 lines: streamed
|
|
476
|
+
`reasoning_details` deltas now go through `parseOpenAIReasoningDetail`
|
|
477
|
+
(signature-only `reasoning.text` becomes `text: ""`) and merge only when
|
|
478
|
+
the `index` matches — OpenRouter/Bifrost shaping. NaN replays
|
|
479
|
+
`reasoning_content`, untouched.
|
|
480
|
+
- `RETRYABLE_PROVIDER_ERROR_PATTERN` gains `upstream.?sse.?stream.?failed`
|
|
481
|
+
(#12605, "upstream_error: upstream SSE stream failed"),
|
|
482
|
+
`^throttling error:` (Bedrock's `ThrottlingException` prefix, anchored and
|
|
483
|
+
case-insensitive) and `provider stopped with: malformed_response` (#12622,
|
|
484
|
+
Gemini). The first is **directly relevant**: NaN's LiteLLM gateway closes
|
|
485
|
+
SSE streams mid-turn (issue #2), so that drop is now retried with no
|
|
486
|
+
package change; the NaN-facing pins live in
|
|
487
|
+
`test/pi-ai-1-8-0-contract.test.ts`. The deterministic NaN 400 stays
|
|
488
|
+
non-retryable and the truncated-stream error stays retryable.
|
|
489
|
+
- `utils/overflow.js` gains one pattern, `/decoded body exceeds \d+ bytes/i`
|
|
490
|
+
(OpenCode Go byte-size limit). It does not capture a NaN message, so the
|
|
491
|
+
#3/#18 classifiers are untouched and still needed.
|
|
492
|
+
- `dist/types.d.ts` adds `KnownImageApi "openrouter-chat-images"` (the old
|
|
493
|
+
`openrouter-images` stays) and `sessionId?` on
|
|
494
|
+
`ProviderRequestOptions`/`ImagesOptions`; `pi-coding-agent`'s
|
|
495
|
+
`dist/index.d.ts` only ADDS `UsageRecord`, `SHELL_COMMAND_ENV_VAR` and
|
|
496
|
+
`ShellConfig`. Both are additive for `nan-images` and the extension API.
|
|
497
|
+
- **MCP config types are re-derived from the published `mcp.json` schema**
|
|
498
|
+
(`core/mcp-servers.d.ts` → `mcp-config-schema.ts`: `MCP_EXPOSURES` gains
|
|
499
|
+
`deferred`/`hidden`, `MCP_EXPOSURE_ALIASES` added). `description`,
|
|
500
|
+
`timeout` and `exposure` are unchanged, so `pi.registerMcpServer("nan-media", …)`
|
|
501
|
+
compiles and registers as before; `core/model-runtime.d.ts` and
|
|
502
|
+
`core/sdk.d.ts` are identical.
|
|
503
|
+
- **`supportsMidConvoSystemMessages` is NOT new in 1.8.0** — the compat key,
|
|
504
|
+
`resolveTranscript(context, getCompat(model).supportsMidConvoSystemMessages)`
|
|
505
|
+
(`api/openai-completions.js:80`) and `collapseSystemMessages` exist on
|
|
506
|
+
1.7.0 too. 1.8.0 only moves the value inside its own
|
|
507
|
+
`providers/data/deepseek.json` (`chat:deepseek-v4-pro` true → absent,
|
|
508
|
+
`chat:deepseek-flash` absent → true). NaN models declare no such compat
|
|
509
|
+
key, so the default stays *collapse every system message into the head*,
|
|
510
|
+
and issue #56 §4 (adopting the flag) remains gated on a live gateway
|
|
511
|
+
measurement the maintainer must approve; the mechanism is pinned offline in
|
|
512
|
+
`test/pi-ai-1-8-0-contract.test.ts` (flag absent → one leading system
|
|
513
|
+
message carrying the later text; flag set → the later message stays in
|
|
514
|
+
place).
|
|
515
|
+
- `mcp.json` `$schema`: pi 1.8.0 prescribes
|
|
516
|
+
`"$schema": "https://pi.dev/schemas/mcp.schema.json"` and ships
|
|
517
|
+
`schemas/mcp.schema.json` with that `$id`, but the URL answered **404** on
|
|
518
|
+
2026-12-03 while `schemas/theme.schema.json` and
|
|
519
|
+
`schemas/settings.schema.json` answered 200 — a pi.dev publish gap, not a
|
|
520
|
+
wrong id. Both READMEs document the line as pi does.
|
|
521
|
+
Regression test: `test/pi-ai-1-8-0-contract.test.ts`. Issue #56.
|
|
522
|
+
- **pi 1.7.0 / pi-ai 1.7.0 compat** (verified 2026-11-28, the baseline before
|
|
523
|
+
1.8.0; devDependencies 1.6.0 → 1.7.0, package 1.6.4 → 1.7.0, peer range
|
|
468
524
|
unchanged at `^1.4.0` because only the image options are new and they are
|
|
469
525
|
read defensively). pi-ai `index.d.ts` only ADDS `PiImage*`/`PiDecision*` type
|
|
470
526
|
re-exports, `compat.d.ts` and `api/openai-completions.d.ts` are byte-identical
|
|
@@ -782,7 +838,7 @@ uno cite una versión o requisito que el otro no lleve.
|
|
|
782
838
|
5. **Cita el peer floor real, no la historia.** El peer range se actualiza con cada
|
|
783
839
|
release de pi: lee `package.json` peerDependencies, no AGENTS.md (que documenta
|
|
784
840
|
releases históricos y puede quedar obsoleto). Para este paquete: el floor es
|
|
785
|
-
`^1.4.0` (desde package 1.5.0), verificado contra pi 1.
|
|
841
|
+
`^1.4.0` (desde package 1.5.0), verificado contra pi 1.8.0 / pi-ai 1.8.0.
|
|
786
842
|
6. **Las cifras de catálogo van contra `scripts/models.generated.ts`, no contra AGENTS.md.**
|
|
787
843
|
AGENTS.md es documentación de releases y puede contener floor o ranges ya antiguos;
|
|
788
844
|
el catálogo generado es la fuente viva de `contextWindow`/`maxTokens`/`reasoningEffortValues`
|
package/README.es.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @gtrabanco/𝜋-nan-provider
|
|
2
2
|
|
|
3
3
|
[](https://opensource.org/licenses/MIT)
|
|
4
|
-
[](https://github.com/gtrabanco/pi-nan-provider/releases)
|
|
5
5
|
[](https://cloud.nan.builders/r/7GK06FX8)
|
|
6
6
|
|
|
7
7
|
[NaN Builders](https://cloud.nan.builders/r/7GK06FX8) model provider + MCP nativo para [pi](https://github.com/earendil-works/pi).
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
Registra el proveedor `nan` vía `pi.registerProvider()` usando la API OpenAI-compatible de NaN (`https://api.nan.builders/v1`), y registra el servidor MCP de media de la comunidad con `pi.registerMcpServer()`.
|
|
10
10
|
|
|
11
11
|
> [!NOTE]
|
|
12
|
-
> **Requisitos:** pi **≥ 1.4.0** (rango peer `^1.4.0`). El paquete está verificado contra **pi 1.
|
|
12
|
+
> **Requisitos:** pi **≥ 1.4.0** (rango peer `^1.4.0`). El paquete está verificado contra **pi 1.8.0 / pi-ai 1.8.0**; el floor del rango peer solo sube con los re-aligns de menor de pi.
|
|
13
13
|
|
|
14
14
|
## ✨ Funciones
|
|
15
15
|
|
|
@@ -171,6 +171,7 @@ El puente de media está **activado por defecto** (por sesión, visible en `/mcp
|
|
|
171
171
|
>
|
|
172
172
|
> ```json
|
|
173
173
|
> {
|
|
174
|
+
> "$schema": "https://pi.dev/schemas/mcp.schema.json",
|
|
174
175
|
> "mcpServers": {
|
|
175
176
|
> "fetch": { "command": "uvx", "args": ["mcp-server-fetch"] },
|
|
176
177
|
> "web-search": {
|
|
@@ -182,6 +183,8 @@ El puente de media está **activado por defecto** (por sesión, visible en `/mcp
|
|
|
182
183
|
> }
|
|
183
184
|
> ```
|
|
184
185
|
>
|
|
186
|
+
> La línea `"$schema"` (pi ≥ 1.8.0) da validación y autocompletado del fichero en el editor.
|
|
187
|
+
>
|
|
185
188
|
> Vuelve a comprobar `https://api.nan.builders/mcp` periódicamente: si NaN publica herramientas otra
|
|
186
189
|
> vez, este paquete puede restaurar el puente.
|
|
187
190
|
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @gtrabanco/𝜋-nan-provider
|
|
2
2
|
|
|
3
3
|
[](https://opensource.org/licenses/MIT)
|
|
4
|
-
[](https://github.com/gtrabanco/pi-nan-provider/releases)
|
|
5
5
|
[](https://cloud.nan.builders/r/7GK06FX8)
|
|
6
6
|
|
|
7
7
|
[NaN Builders](https://cloud.nan.builders/r/7GK06FX8) model provider + a native MCP server for [pi](https://github.com/earendil-works/pi).
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
Registers the `nan` provider via `pi.registerProvider()` using NaN's OpenAI-compatible API (`https://api.nan.builders/v1`), and registers the community media MCP server via pi's native `pi.registerMcpServer()`.
|
|
10
10
|
|
|
11
11
|
> [!NOTE]
|
|
12
|
-
> **Requirements:** pi **≥ 1.4.0** (peer range `^1.4.0`). The package is verified against **pi 1.
|
|
12
|
+
> **Requirements:** pi **≥ 1.4.0** (peer range `^1.4.0`). The package is verified against **pi 1.8.0 / pi-ai 1.8.0**; the peer floor only rises on pi minor realigns.
|
|
13
13
|
|
|
14
14
|
## ✨ Features
|
|
15
15
|
|
|
@@ -171,6 +171,7 @@ The media bridge is **enabled by default** (session-scoped, visible in `/mcp`).
|
|
|
171
171
|
>
|
|
172
172
|
> ```json
|
|
173
173
|
> {
|
|
174
|
+
> "$schema": "https://pi.dev/schemas/mcp.schema.json",
|
|
174
175
|
> "mcpServers": {
|
|
175
176
|
> "fetch": { "command": "uvx", "args": ["mcp-server-fetch"] },
|
|
176
177
|
> "web-search": {
|
|
@@ -182,6 +183,8 @@ The media bridge is **enabled by default** (session-scoped, visible in `/mcp`).
|
|
|
182
183
|
> }
|
|
183
184
|
> ```
|
|
184
185
|
>
|
|
186
|
+
> The `"$schema"` line (pi ≥ 1.8.0) gives editors validation and completion for the file.
|
|
187
|
+
>
|
|
185
188
|
> Re-check `https://api.nan.builders/mcp` periodically: if NaN publishes tools again, this package can
|
|
186
189
|
> restore the bridge.
|
|
187
190
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gtrabanco/pi-nan-provider",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "NaN Builders (api.nan.builders) model provider for pi - OpenAI-compatible registration with a models.dev-generated fallback, tier-aware live catalog, and an optional community media MCP bridge",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"@earendil-works/pi-coding-agent": "^1.4.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@earendil-works/pi-ai": "1.
|
|
51
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
50
|
+
"@earendil-works/pi-ai": "1.8.0",
|
|
51
|
+
"@earendil-works/pi-coding-agent": "1.8.0",
|
|
52
52
|
"@types/bun": "1.4",
|
|
53
53
|
"typescript": "7"
|
|
54
54
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by scripts/generate-models.ts
|
|
2
2
|
// Do not edit manually — run `bun run generate-models` to update.
|
|
3
3
|
//
|
|
4
|
-
// Source: https://models.dev/api.json (provider "nan"), fetched 2026-
|
|
4
|
+
// Source: https://models.dev/api.json (provider "nan"), fetched 2026-12-03T17:15:57.368Z
|
|
5
5
|
// Provenance: every contextWindow/maxTokens/input/cost value traces to
|
|
6
6
|
// models.dev or to the per-entry notes below. Nothing is invented; entries
|
|
7
7
|
// models.dev documents incompletely are omitted and flagged instead.
|
|
@@ -1027,7 +1027,7 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
|
|
|
1027
1027
|
export const GENERATED_CATALOG_META = {
|
|
1028
1028
|
source: "https://models.dev/api.json",
|
|
1029
1029
|
modelsDevProvider: "nan",
|
|
1030
|
-
fetchedAt: "2026-
|
|
1030
|
+
fetchedAt: "2026-12-03T17:15:57.368Z",
|
|
1031
1031
|
modelCount: 13,
|
|
1032
1032
|
models: ["deepseek-v4-flash","deepseek-v4-pro","gemma4","glm5.3","glm5.3-flash","hy4","hy4-flash","kimi-k3.1-pro","mimo-v2.6-flash","qwen3.6","qwen3.8-flash","qwen3.8-max","qwen4-max"],
|
|
1033
1033
|
notes: [
|