@gtrabanco/pi-nan-provider 1.5.4 → 1.5.6

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.
@@ -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-11-12T22:42:17.308Z
4
+ // Source: https://models.dev/api.json (provider "nan"), fetched 2026-11-17T01:04:35.527Z
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.
@@ -14,7 +14,7 @@ import type { GeneratedModelEntry } from "../src/fetch-models.ts";
14
14
  export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
15
15
  {
16
16
  "id": "deepseek-v4-flash",
17
- "name": "DeepSeek V4.1 Flash",
17
+ "name": "DeepSeek V4.1 Flash 1017",
18
18
  "reasoning": true,
19
19
  "input": [
20
20
  "text",
@@ -29,10 +29,18 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
29
29
  "contextWindow": 1048576,
30
30
  "maxTokens": 32768,
31
31
  "reasoningEffortValues": [
32
- "none"
32
+ "none",
33
+ "minimal",
34
+ "low",
35
+ "medium",
36
+ "high",
37
+ "xhigh",
38
+ "max"
33
39
  ],
34
40
  "thinkingLevelMap": {
35
- "off": "none"
41
+ "off": "none",
42
+ "xhigh": "xhigh",
43
+ "max": "max"
36
44
  },
37
45
  "compat": {
38
46
  "supportsDeveloperRole": false,
@@ -43,12 +51,13 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
43
51
  },
44
52
  "notes": [
45
53
  "compat matches the maintainer's working ~/.pi/agent/models.json LiteLLM config for api.nan.builders (2026-09-04): supportsDeveloperRole false, supportsReasoningEffort true, maxTokensField max_tokens. NaN's docs example sets only supportsDeveloperRole: true and is not battle-tested. supportsFinishReason true (2026-09-13, issue #2): the LiteLLM gateway intermittently closes SSE streams before emitting finish_reason; with true pi-ai raises 'Stream ended without finish_reason', which matches pi-ai's retryable-provider pattern ('ended without') and is retried automatically, whereas false silently synthesized stop/toolUse and stalled the turn mid-answer. supportsUsageInStreaming true (2026-09-16, issue #7): NaN's published schema is silent about stream_options, but the live gateway honors it — two identical streaming calls per model, differing only in stream_options: { include_usage: true }, returned 0 usage chunks without it and exactly 1 with it (prompt/completion/reasoning/cached token counts) on deepseek-v4-flash, glm5.3-flash, qwen3.6, mimo-v2.5 and gemma4, and a real pi session then recorded token counts where it recorded zeros. pi-ai only sends stream_options when this is not false, and the sanitizer forwards it when the model declares true, so chat models opt in by default and usage is reported (issue #4). A model that does not report streaming usage can still opt out per model with a models.json compat override (supportsUsageInStreaming: false); the sanitizer then strips stream_options and the payload stays strict.",
46
- "contextWindow 1,048,576: NaN docs state '1M token context' for this model (https://nan.builders/docs/models, checked 2026-10-14). models.dev lists 1,000,000, a rounded form of the same window; the docs value is authoritative (maintainer instruction: docs win over models.dev, which a user updates later). input includes image: NaN serves the Vision-Exp variant ('takes images as input', https://nan.builders/docs/models; the image_url content-parts in https://nan.builders/openapi.json list deepseek-v4-flash among the vision models). models.dev provider nan also lists text+image now (DeepSeek V4.1 Flash entry, checked 2026-09-13), so this stays a pin for the vision capability rather than a divergence. maxTokens 32768 per the official NaN pi docs (https://nan.builders/docs/pi, 'the same set the NaN CLI writes', checked 2026-10-02) closing issue #20 — the gateway now rejects max_tokens above ~256k for this model with 403 permission_error (measured 2026-10-02: 256,000 → 200; 262,143 → 403), and the previous models.dev-derived 384000 made every pi request fail since pi-ai sends max_tokens = model.maxTokens when no cap is set. models.dev still lists 384000, so this override pins the documented value. reasoning_effort_values=[\"none\"] (issue #16, measured 2026-09-27 against live gateway, repro included in the issue): only \"none\" deterministically disables reasoning (0 reasoning tokens, answer produced). Every other value leaves 13-14K reasoning tokens and causes runaway reasoning (finish_reason:\"length\" with ZERO answer text). The catalog declares only [\"none\"] because the remaining values are useless noise. docs vs measurement (re-probed live 2026-10-14): https://nan.builders/docs/models#controlling-reasoning documents the parameter as 'any value (no effect) — the model decides per request', but the live gateway contradicts that: `none` gave 0 reasoning tokens / 0 reasoning chars / a 134-char answer, while `low` gave 57 reasoning tokens and omitting the parameter gave 63 (`minimal` gave 109). The docs are stale here; the measurement wins (maintainer instruction), so the measured behavior is kept. thinkingLevelMap { off: \"none\" } (issue #16, measured 2026-09-27): when pi maps reasoning:\"off\" to reasoningEffort:undefined, the thinkingLevelMap.off=\"none\" supplies the effort so the gateway receives reasoning_effort:\"none\" and does NOT enter runaway reasoning mode."
54
+ "cost 0 on every model: NaN bills a credit pool (1 credit ≈ 0.026 €) rather than per-token USD, so pi's per-token cost estimate does not apply. models.dev provider nan started publishing a derived USD conversion on 2026-11-17; it is not a price NaN charges, so it is not adopted (delete NAN_CATALOG_COST in scripts/generate-models.ts to adopt it).",
55
+ "contextWindow 1,048,576: NaN docs state '1M token context' for this model (https://nan.builders/docs/models, checked 2026-11-17). models.dev lists 1,000,000, a rounded form of the same window; the docs value is authoritative (maintainer instruction: docs win over models.dev, which a user updates later). input includes image: NaN serves the Vision-Exp variant ('takes images as input', https://nan.builders/docs/models; the image_url content-parts in https://nan.builders/openapi.json list deepseek-v4-flash among the vision models). models.dev provider nan also lists text+image, so this stays a pin for the vision capability rather than a divergence. maxTokens 32768 per the official NaN pi docs (https://nan.builders/docs/pi, 'the same set the NaN CLI writes', checked 2026-10-02) closing issue #20 — the gateway rejects max_tokens above ~256k for this model with 403 permission_error (measured 2026-10-02: 256,000 → 200; 262,143 → 403), and the previous models.dev-derived 384000 made every pi request fail because pi-ai sends max_tokens = model.maxTokens by default. models.dev still lists 384000, so this override pins the documented value. reasoningEffortValues: the docs say 'none turns it off · minimal to max' and the contract table says the other values 'steer how much it reasons. They are hints the model follows, not hard caps' (https://nan.builders/docs/models#controlling-reasoning, checked 2026-11-17), so the documented ladder is declared. The measurement behind issue #16 stays the load-bearing fact and is unchanged: only \"none\" suppresses reasoning (0 reasoning tokens with a full answer; `low` 57, omitted 63, `minimal` 109 — re-probed live 2026-10-14), which is why thinkingLevelMap.off is \"none\". thinkingLevelMap { off: \"none\" } (issue #16, measured 2026-09-27): when pi maps reasoning:\"off\" to reasoningEffort:undefined, the thinkingLevelMap.off=\"none\" supplies the effort so the gateway receives reasoning_effort:\"none\" and does NOT enter runaway reasoning mode."
47
56
  ],
48
57
  "extras": {
49
58
  "id": "deepseek-v4-flash",
50
- "name": "DeepSeek V4.1 Flash",
51
- "description": "DeepSeek V4.1 Flash model for reasoning and agentic coding",
59
+ "name": "DeepSeek V4.1 Flash 1017",
60
+ "description": "October 17 update of DeepSeek V4.1 Flash with improved reasoning, coding, agentic tasks, and visual understanding",
52
61
  "family": "deepseek-flash",
53
62
  "attachment": true,
54
63
  "reasoning": true,
@@ -70,8 +79,8 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
70
79
  "structured_output": true,
71
80
  "temperature": true,
72
81
  "knowledge": "2025-05",
73
- "release_date": "2026-09-10",
74
- "last_updated": "2026-09-10",
82
+ "release_date": "2026-10-17",
83
+ "last_updated": "2026-10-17",
75
84
  "modalities": {
76
85
  "input": [
77
86
  "text",
@@ -87,10 +96,11 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
87
96
  "output": 384000
88
97
  },
89
98
  "cost": {
90
- "input": 0,
91
- "output": 0
99
+ "input": 0.29484,
100
+ "output": 1.17936,
101
+ "cache_read": 0.0058968
92
102
  },
93
- "canonical_model_id": "deepseek/deepseek-v4.1-flash"
103
+ "canonical_model_id": "deepseek/deepseek-v4.1-flash-1017"
94
104
  }
95
105
  },
96
106
  {
@@ -107,7 +117,7 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
107
117
  "cacheWrite": 0
108
118
  },
109
119
  "contextWindow": 1048576,
110
- "maxTokens": 32768,
120
+ "maxTokens": 393216,
111
121
  "reasoningEffortValues": [],
112
122
  "compat": {
113
123
  "supportsDeveloperRole": false,
@@ -118,10 +128,52 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
118
128
  },
119
129
  "notes": [
120
130
  "compat matches the maintainer's working ~/.pi/agent/models.json LiteLLM config for api.nan.builders (2026-09-04): supportsDeveloperRole false, supportsReasoningEffort true, maxTokensField max_tokens. NaN's docs example sets only supportsDeveloperRole: true and is not battle-tested. supportsFinishReason true (2026-09-13, issue #2): the LiteLLM gateway intermittently closes SSE streams before emitting finish_reason; with true pi-ai raises 'Stream ended without finish_reason', which matches pi-ai's retryable-provider pattern ('ended without') and is retried automatically, whereas false silently synthesized stop/toolUse and stalled the turn mid-answer. supportsUsageInStreaming true (2026-09-16, issue #7): NaN's published schema is silent about stream_options, but the live gateway honors it — two identical streaming calls per model, differing only in stream_options: { include_usage: true }, returned 0 usage chunks without it and exactly 1 with it (prompt/completion/reasoning/cached token counts) on deepseek-v4-flash, glm5.3-flash, qwen3.6, mimo-v2.5 and gemma4, and a real pi session then recorded token counts where it recorded zeros. pi-ai only sends stream_options when this is not false, and the sanitizer forwards it when the model declares true, so chat models opt in by default and usage is reported (issue #4). A model that does not report streaming usage can still opt out per model with a models.json compat override (supportsUsageInStreaming: false); the sanitizer then strips stream_options and the payload stays strict.",
121
- "manual-only: \"deepseek-v4-pro\" not yet on models.dev provider nan (NaN external-provider model launched 2026-11-10, listed by the live GET /v1/models but absent from models.dev provider nan and the NaN docs).",
122
- "NaN external-provider model launched 2026-11-10 (NaN pricing page name 'DeepSeek V4-Pro (0813 version)'). contextWindow 1,048,576: NaN pricing page card '1M context' (maintainer screenshot, 2026-11-10) with NaN's 1M = 1,048,576 convention (https://nan.builders/docs/pi). maxTokens 32,768: https://nan.builders/docs/pi declares 32768 for every 1M-context NaN model (vendor limit 393,216 on models.dev provider deepseek). input text only per models.dev provider deepseek (deepseek-v4-pro), reasoning model per the vendor. Existence: live GET https://api.nan.builders/v1/models (checked 2026-11-10); the docs https://nan.builders/docs/models, https://nan.builders/docs/pi and https://nan.builders/openapi.json do not list it yet. reasoningEffortValues [] and no thinkingLevelMap: the gateway's reasoning_effort handling for external providers is unmeasured. cost 0 per maintainer decision."
131
+ "cost 0 on every model: NaN bills a credit pool (1 credit ≈ 0.026 €) rather than per-token USD, so pi's per-token cost estimate does not apply. models.dev provider nan started publishing a derived USD conversion on 2026-11-17; it is not a price NaN charges, so it is not adopted (delete NAN_CATALOG_COST in scripts/generate-models.ts to adopt it).",
132
+ "DeepSeek V4-Pro (0813 version), documented in https://nan.builders/docs/models (checked 2026-11-17; models.dev provider nan lists it since 2026-11-10). contextWindow 1,048,576 ('1M token context'). maxTokens 393,216: the card says 'Max answer 393K tokens', the same 393,216 the docs clamp deepseek-v4-flash to; models.dev nan reports 384,000, so the docs value wins (maintainer instruction: docs are the source of truth). input text only per the card ('text generation & chat · reasoning'). Reasoning: the card only says 'Reasoning model', and the docs state the `none` aliases are NOT mapped on this model, so no reasoningEffortValues and no thinkingLevelMap are declared. Cost 0 per maintainer decision (NaN bills credits, not per-token USD).",
133
+ "manual-only: \"deepseek-v4-pro\" skipped: models.dev provider \"nan\" now lists it, so the manual-only entry is not emitted and the models.dev values are used (NaN larger model documented in https://nan.builders/docs/models (checked 2026-11-17) and listed by the live GET https://api.nan.builders/v1/models (checked 2026-11-17), but absent from models.dev provider nan)"
123
134
  ],
124
- "extras": {}
135
+ "extras": {
136
+ "id": "deepseek-v4-pro",
137
+ "name": "DeepSeek V4 Pro 0813",
138
+ "description": "DeepSeek V4 Pro snapshot with million-token context and support for thinking and non-thinking modes",
139
+ "family": "deepseek-thinking",
140
+ "attachment": false,
141
+ "reasoning": true,
142
+ "reasoning_options": [
143
+ {
144
+ "type": "effort",
145
+ "values": [
146
+ "none",
147
+ "low",
148
+ "high",
149
+ "max"
150
+ ]
151
+ }
152
+ ],
153
+ "tool_call": true,
154
+ "temperature": true,
155
+ "release_date": "2026-08-13",
156
+ "last_updated": "2026-08-22",
157
+ "modalities": {
158
+ "input": [
159
+ "text"
160
+ ],
161
+ "output": [
162
+ "text"
163
+ ]
164
+ },
165
+ "open_weights": true,
166
+ "limit": {
167
+ "context": 1000000,
168
+ "output": 384000
169
+ },
170
+ "cost": {
171
+ "input": 1.85328,
172
+ "output": 5.55984,
173
+ "cache_read": 0.061776
174
+ },
175
+ "canonical_model_id": "deepseek/deepseek-v4-pro-0813"
176
+ }
125
177
  },
126
178
  {
127
179
  "id": "gemma4",
@@ -145,10 +197,13 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
145
197
  "low",
146
198
  "medium",
147
199
  "high",
200
+ "xhigh",
148
201
  "max"
149
202
  ],
150
203
  "thinkingLevelMap": {
151
- "off": "none"
204
+ "off": "none",
205
+ "xhigh": "xhigh",
206
+ "max": "max"
152
207
  },
153
208
  "compat": {
154
209
  "supportsDeveloperRole": false,
@@ -159,7 +214,8 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
159
214
  },
160
215
  "notes": [
161
216
  "compat matches the maintainer's working ~/.pi/agent/models.json LiteLLM config for api.nan.builders (2026-09-04): supportsDeveloperRole false, supportsReasoningEffort true, maxTokensField max_tokens. NaN's docs example sets only supportsDeveloperRole: true and is not battle-tested. supportsFinishReason true (2026-09-13, issue #2): the LiteLLM gateway intermittently closes SSE streams before emitting finish_reason; with true pi-ai raises 'Stream ended without finish_reason', which matches pi-ai's retryable-provider pattern ('ended without') and is retried automatically, whereas false silently synthesized stop/toolUse and stalled the turn mid-answer. supportsUsageInStreaming true (2026-09-16, issue #7): NaN's published schema is silent about stream_options, but the live gateway honors it — two identical streaming calls per model, differing only in stream_options: { include_usage: true }, returned 0 usage chunks without it and exactly 1 with it (prompt/completion/reasoning/cached token counts) on deepseek-v4-flash, glm5.3-flash, qwen3.6, mimo-v2.5 and gemma4, and a real pi session then recorded token counts where it recorded zeros. pi-ai only sends stream_options when this is not false, and the sanitizer forwards it when the model declares true, so chat models opt in by default and usage is reported (issue #4). A model that does not report streaming usage can still opt out per model with a models.json compat override (supportsUsageInStreaming: false); the sanitizer then strips stream_options and the payload stays strict.",
162
- "thinkingLevelMap { off: \"none\" } (issue #16): NaN docs state that with no reasoning_effort parameter gemma4 defaults to reasoning ON (16,384-token budget), while `none`/`minimal` skip reasoning entirely (https://nan.builders/docs/models#controlling-reasoning, checked 2026-10-01). pi maps reasoning:\"off\" to reasoningEffort:undefined, so without this map `thinking: off` sent no parameter and the model reasoned anyway; the map sends reasoning_effort:\"none\" and actually disables reasoning."
217
+ "cost 0 on every model: NaN bills a credit pool (1 credit ≈ 0.026 €) rather than per-token USD, so pi's per-token cost estimate does not apply. models.dev provider nan started publishing a derived USD conversion on 2026-11-17; it is not a price NaN charges, so it is not adopted (delete NAN_CATALOG_COST in scripts/generate-models.ts to adopt it).",
218
+ "thinkingLevelMap { off: \"none\" } (issue #16): NaN docs state that with no reasoning_effort parameter gemma4 defaults to reasoning ON (16,384-token budget), while `none`/`minimal` skip reasoning entirely (https://nan.builders/docs/models#controlling-reasoning, checked 2026-11-17). pi maps reasoning:\"off\" to reasoningEffort:undefined, so without this map `thinking: off` sent no parameter and the model reasoned anyway; the map sends reasoning_effort:\"none\" and actually disables reasoning. reasoningEffortValues: the contract table documents the whole ladder (low 2,048, medium 8,192, high 16,384, xhigh and max 32,768 reasoning tokens on Chat Completions)."
163
219
  ],
164
220
  "extras": {
165
221
  "id": "gemma4",
@@ -178,6 +234,11 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
178
234
  "high",
179
235
  "max"
180
236
  ]
237
+ },
238
+ {
239
+ "type": "budget_tokens",
240
+ "min": 0,
241
+ "max": 32768
181
242
  }
182
243
  ],
183
244
  "tool_call": true,
@@ -211,8 +272,7 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
211
272
  "name": "GLM 5.3",
212
273
  "reasoning": true,
213
274
  "input": [
214
- "text",
215
- "image"
275
+ "text"
216
276
  ],
217
277
  "cost": {
218
278
  "input": 0,
@@ -223,13 +283,17 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
223
283
  "contextWindow": 1048576,
224
284
  "maxTokens": 131072,
225
285
  "reasoningEffortValues": [
286
+ "minimal",
226
287
  "low",
227
288
  "medium",
228
289
  "high",
290
+ "xhigh",
229
291
  "max"
230
292
  ],
231
293
  "thinkingLevelMap": {
232
- "off": "low"
294
+ "off": "minimal",
295
+ "xhigh": "xhigh",
296
+ "max": "max"
233
297
  },
234
298
  "compat": {
235
299
  "supportsDeveloperRole": false,
@@ -240,7 +304,8 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
240
304
  },
241
305
  "notes": [
242
306
  "compat matches the maintainer's working ~/.pi/agent/models.json LiteLLM config for api.nan.builders (2026-09-04): supportsDeveloperRole false, supportsReasoningEffort true, maxTokensField max_tokens. NaN's docs example sets only supportsDeveloperRole: true and is not battle-tested. supportsFinishReason true (2026-09-13, issue #2): the LiteLLM gateway intermittently closes SSE streams before emitting finish_reason; with true pi-ai raises 'Stream ended without finish_reason', which matches pi-ai's retryable-provider pattern ('ended without') and is retried automatically, whereas false silently synthesized stop/toolUse and stalled the turn mid-answer. supportsUsageInStreaming true (2026-09-16, issue #7): NaN's published schema is silent about stream_options, but the live gateway honors it — two identical streaming calls per model, differing only in stream_options: { include_usage: true }, returned 0 usage chunks without it and exactly 1 with it (prompt/completion/reasoning/cached token counts) on deepseek-v4-flash, glm5.3-flash, qwen3.6, mimo-v2.5 and gemma4, and a real pi session then recorded token counts where it recorded zeros. pi-ai only sends stream_options when this is not false, and the sanitizer forwards it when the model declares true, so chat models opt in by default and usage is reported (issue #4). A model that does not report streaming usage can still opt out per model with a models.json compat override (supportsUsageInStreaming: false); the sanitizer then strips stream_options and the payload stays strict.",
243
- "general catalog model since 2026-11-10: NaN announced it no longer has tier-exclusive models ('a partir de ahora ya NO habrá modelos exclusivos por tier'), and the live GET https://api.nan.builders/v1/models lists glm5.3 for a non-premium key (checked 2026-11-10); it used to be premium live-only. The values are the ones it carried as live-only, from https://nan.builders/docs/models (checked 2026-10-14; docs win over models.dev): contextWindow 1,048,576 ('1M token context'; models.dev lists the rounded 1,000,000); input text+image (multimodal; pi represents only text and image — models.dev lists text only, a stale divergence); maxTokens 131,072 (the confirmed maximum models.dev documents; the docs give the same 131K figure for glm5.3-flash and no lower bound); reasoningEffortValues low/medium/high/max per the docs' effort list; name 'GLM 5.3' per the docs (models.dev says 'GLM-5.3'). thinkingLevelMap { off: \"low\" }: the docs list low as the shallowest level, so `thinking: off` sends the shallowest supported effort; glm5.3 itself was never measured (issue #16 covered glm5.3-flash, whose shallowest effective value is 'minimal'), 'low' is the documented floor."
307
+ "cost 0 on every model: NaN bills a credit pool (1 credit ≈ 0.026 €) rather than per-token USD, so pi's per-token cost estimate does not apply. models.dev provider nan started publishing a derived USD conversion on 2026-11-17; it is not a price NaN charges, so it is not adopted (delete NAN_CATALOG_COST in scripts/generate-models.ts to adopt it).",
308
+ "general catalog model since 2026-11-10: NaN announced it no longer has tier-exclusive models ('a partir de ahora ya NO habrá modelos exclusivos por tier'), and the live GET https://api.nan.builders/v1/models lists glm5.3 for a non-premium key (checked 2026-11-10). input text only: the model card says 'Text only: text in, text out, with no image, audio, video or file input; a request carrying one answers 400, earlier turns of the conversation included', and https://nan.builders/docs/pi declares the same 'input': ['text'] (https://nan.builders/docs/models, checked 2026-11-17). The earlier override declared text+image from the 2026-10-14 card; models.dev also lists it text-only now, so this is a correction of a stale value, not a divergence. contextWindow 1,048,576 ('1M token context'). maxTokens 131,072: models.dev's documented maximum; the docs' own pi/OpenCode blocks publish 32,768 and describe that field as 'a client-side budget rather than a server cap' (https://nan.builders/docs/opencode), so the larger model maximum stays. reasoningEffortValues minimal..max and thinkingLevelMap { off: 'minimal' }: the card says 'reasoning_effort: minimal to max; always reasons, none is applied as minimal' (checked 2026-11-17), so `thinking: off` sends the shortest reasoning the gateway honours. The previous map sent 'low' because the stale docs listed low as the floor. name 'GLM 5.3' per the docs (models.dev says 'GLM-5.3')."
244
309
  ],
245
310
  "extras": {
246
311
  "id": "glm5.3",
@@ -281,8 +346,9 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
281
346
  "output": 131072
282
347
  },
283
348
  "cost": {
284
- "input": 0,
285
- "output": 0
349
+ "input": 1.37592,
350
+ "output": 4.32432,
351
+ "cache_read": 0.029484
286
352
  },
287
353
  "canonical_model_id": "zhipuai/glm-5.3"
288
354
  }
@@ -308,10 +374,13 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
308
374
  "low",
309
375
  "medium",
310
376
  "high",
377
+ "xhigh",
311
378
  "max"
312
379
  ],
313
380
  "thinkingLevelMap": {
314
- "off": "minimal"
381
+ "off": "minimal",
382
+ "xhigh": "xhigh",
383
+ "max": "max"
315
384
  },
316
385
  "compat": {
317
386
  "supportsDeveloperRole": false,
@@ -322,7 +391,8 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
322
391
  },
323
392
  "notes": [
324
393
  "compat matches the maintainer's working ~/.pi/agent/models.json LiteLLM config for api.nan.builders (2026-09-04): supportsDeveloperRole false, supportsReasoningEffort true, maxTokensField max_tokens. NaN's docs example sets only supportsDeveloperRole: true and is not battle-tested. supportsFinishReason true (2026-09-13, issue #2): the LiteLLM gateway intermittently closes SSE streams before emitting finish_reason; with true pi-ai raises 'Stream ended without finish_reason', which matches pi-ai's retryable-provider pattern ('ended without') and is retried automatically, whereas false silently synthesized stop/toolUse and stalled the turn mid-answer. supportsUsageInStreaming true (2026-09-16, issue #7): NaN's published schema is silent about stream_options, but the live gateway honors it — two identical streaming calls per model, differing only in stream_options: { include_usage: true }, returned 0 usage chunks without it and exactly 1 with it (prompt/completion/reasoning/cached token counts) on deepseek-v4-flash, glm5.3-flash, qwen3.6, mimo-v2.5 and gemma4, and a real pi session then recorded token counts where it recorded zeros. pi-ai only sends stream_options when this is not false, and the sanitizer forwards it when the model declares true, so chat models opt in by default and usage is reported (issue #4). A model that does not report streaming usage can still opt out per model with a models.json compat override (supportsUsageInStreaming: false); the sanitizer then strips stream_options and the payload stays strict.",
325
- "contextWindow 1,048,576: NaN docs state '1M token context' for this model (https://nan.builders/docs/models, checked 2026-10-14). models.dev lists 1,000,000, a rounded form of the same window; the docs value is authoritative (maintainer instruction: docs win over models.dev, which a user updates later). thinkingLevelMap { off: \"minimal\" } (issue #16, measured 2026-09-27 against live gateway, repro included in the issue): when pi maps reasoning:\"off\" to reasoningEffort:undefined, the thinkingLevelMap.off=\"minimal\" supplies the effort so the gateway receives reasoning_effort:\"minimal\" (38 reasoning tokens + answer). Note: \"none\" does NOT suppress reasoning on glm5.3-flash (13,382 tokens) — only \"minimal\" was measured to be effective. reasoning_effort_values includes \"minimal\" (the docs' glm row lists low/medium/high/max, but the 2026-09-27 measurement shows minimal is accepted and effective, issue #16)."
394
+ "cost 0 on every model: NaN bills a credit pool (1 credit ≈ 0.026 €) rather than per-token USD, so pi's per-token cost estimate does not apply. models.dev provider nan started publishing a derived USD conversion on 2026-11-17; it is not a price NaN charges, so it is not adopted (delete NAN_CATALOG_COST in scripts/generate-models.ts to adopt it).",
395
+ "contextWindow 1,048,576 ('1M token context') and maxTokens 131,072: the docs state that an output budget above this model's maximum is lowered to 131072, so 131,072 is its documented ceiling (https://nan.builders/docs/models, checked 2026-11-17); models.dev lists the rounded 1,000,000 window. thinkingLevelMap { off: \"minimal\" }: the card says 'reasoning_effort: minimal to max; always reasons, none is applied as minimal' — the gateway never stops reasoning on this model. issue #16 measured the same effect on 2026-09-27: 'minimal' yields ~38 reasoning tokens with an answer, while 'none' does not suppress it (13,382 tokens). reasoningEffortValues minimal..max per the card, xhigh included (the docs' value ladder runs none, minimal, low, medium, high, xhigh, max)."
326
396
  ],
327
397
  "extras": {
328
398
  "id": "glm5.3-flash",
@@ -364,8 +434,9 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
364
434
  "output": 131072
365
435
  },
366
436
  "cost": {
367
- "input": 0,
368
- "output": 0
437
+ "input": 0.14742,
438
+ "output": 0.4914,
439
+ "cache_read": 0.029484
369
440
  },
370
441
  "canonical_model_id": "zhipuai/glm-5.3-flash"
371
442
  }
@@ -385,8 +456,92 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
385
456
  "cacheWrite": 0
386
457
  },
387
458
  "contextWindow": 1048576,
388
- "maxTokens": 32768,
389
- "reasoningEffortValues": [],
459
+ "maxTokens": 65536,
460
+ "reasoningEffortValues": [
461
+ "none"
462
+ ],
463
+ "thinkingLevelMap": {
464
+ "off": "none"
465
+ },
466
+ "compat": {
467
+ "supportsDeveloperRole": false,
468
+ "supportsReasoningEffort": true,
469
+ "supportsUsageInStreaming": true,
470
+ "supportsFinishReason": true,
471
+ "maxTokensField": "max_tokens"
472
+ },
473
+ "notes": [
474
+ "compat matches the maintainer's working ~/.pi/agent/models.json LiteLLM config for api.nan.builders (2026-09-04): supportsDeveloperRole false, supportsReasoningEffort true, maxTokensField max_tokens. NaN's docs example sets only supportsDeveloperRole: true and is not battle-tested. supportsFinishReason true (2026-09-13, issue #2): the LiteLLM gateway intermittently closes SSE streams before emitting finish_reason; with true pi-ai raises 'Stream ended without finish_reason', which matches pi-ai's retryable-provider pattern ('ended without') and is retried automatically, whereas false silently synthesized stop/toolUse and stalled the turn mid-answer. supportsUsageInStreaming true (2026-09-16, issue #7): NaN's published schema is silent about stream_options, but the live gateway honors it — two identical streaming calls per model, differing only in stream_options: { include_usage: true }, returned 0 usage chunks without it and exactly 1 with it (prompt/completion/reasoning/cached token counts) on deepseek-v4-flash, glm5.3-flash, qwen3.6, mimo-v2.5 and gemma4, and a real pi session then recorded token counts where it recorded zeros. pi-ai only sends stream_options when this is not false, and the sanitizer forwards it when the model declares true, so chat models opt in by default and usage is reported (issue #4). A model that does not report streaming usage can still opt out per model with a models.json compat override (supportsUsageInStreaming: false); the sanitizer then strips stream_options and the payload stays strict.",
475
+ "cost 0 on every model: NaN bills a credit pool (1 credit ≈ 0.026 €) rather than per-token USD, so pi's per-token cost estimate does not apply. models.dev provider nan started publishing a derived USD conversion on 2026-11-17; it is not a price NaN charges, so it is not adopted (delete NAN_CATALOG_COST in scripts/generate-models.ts to adopt it).",
476
+ "Hy4, Tencent's Hunyuan 4, documented in https://nan.builders/docs/models (checked 2026-11-17; models.dev provider nan lists it since 2026-11-10). contextWindow 1,048,576 ('1M token context'). maxTokens 65,536: the card says 'Max answer 64K tokens' and models.dev provider nan reports the same 65,536, so it is no longer the flat 32,768 default. input text+image, reasoning true. Reasoning: the card says 'Reasons by default; if you send no reasoning_effort (nor an alias) we apply low, and your own value always wins', and the aliases ARE mapped on this model, so thinkingLevelMap { off: 'none' } supplies the documented off switch ('To turn reasoning off, send none ... it works on every model except GLM'). No other level is documented for it, so reasoningEffortValues declares only 'none'. Cost 0 per maintainer decision (NaN bills credits, not per-token USD).",
477
+ "manual-only: \"hy4\" skipped: models.dev provider \"nan\" now lists it, so the manual-only entry is not emitted and the models.dev values are used (NaN larger model documented in https://nan.builders/docs/models (checked 2026-11-17) and listed by the live GET https://api.nan.builders/v1/models (checked 2026-11-17), but absent from models.dev provider nan)"
478
+ ],
479
+ "extras": {
480
+ "id": "hy4",
481
+ "name": "Hy4",
482
+ "description": "A next-generation multimodal productivity model with significantly enhanced Agent and complex task execution capabilities.",
483
+ "family": "Hy",
484
+ "attachment": true,
485
+ "reasoning": true,
486
+ "reasoning_options": [
487
+ {
488
+ "type": "effort",
489
+ "values": [
490
+ "none",
491
+ "low",
492
+ "high"
493
+ ]
494
+ }
495
+ ],
496
+ "tool_call": true,
497
+ "temperature": true,
498
+ "release_date": "2026-11-04",
499
+ "last_updated": "2026-11-04",
500
+ "modalities": {
501
+ "input": [
502
+ "text",
503
+ "image"
504
+ ],
505
+ "output": [
506
+ "text"
507
+ ]
508
+ },
509
+ "open_weights": false,
510
+ "limit": {
511
+ "context": 1048576,
512
+ "input": 983010,
513
+ "output": 65536
514
+ },
515
+ "cost": {
516
+ "input": 1.170936,
517
+ "output": 3.511404,
518
+ "cache_read": 0.058968
519
+ },
520
+ "canonical_model_id": "tencent/hy4"
521
+ }
522
+ },
523
+ {
524
+ "id": "hy4-flash",
525
+ "name": "Hy4 Flash",
526
+ "reasoning": true,
527
+ "input": [
528
+ "text",
529
+ "image"
530
+ ],
531
+ "cost": {
532
+ "input": 0,
533
+ "output": 0,
534
+ "cacheRead": 0,
535
+ "cacheWrite": 0
536
+ },
537
+ "contextWindow": 1048576,
538
+ "maxTokens": 65536,
539
+ "reasoningEffortValues": [
540
+ "none"
541
+ ],
542
+ "thinkingLevelMap": {
543
+ "off": "none"
544
+ },
390
545
  "compat": {
391
546
  "supportsDeveloperRole": false,
392
547
  "supportsReasoningEffort": true,
@@ -396,8 +551,9 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
396
551
  },
397
552
  "notes": [
398
553
  "compat matches the maintainer's working ~/.pi/agent/models.json LiteLLM config for api.nan.builders (2026-09-04): supportsDeveloperRole false, supportsReasoningEffort true, maxTokensField max_tokens. NaN's docs example sets only supportsDeveloperRole: true and is not battle-tested. supportsFinishReason true (2026-09-13, issue #2): the LiteLLM gateway intermittently closes SSE streams before emitting finish_reason; with true pi-ai raises 'Stream ended without finish_reason', which matches pi-ai's retryable-provider pattern ('ended without') and is retried automatically, whereas false silently synthesized stop/toolUse and stalled the turn mid-answer. supportsUsageInStreaming true (2026-09-16, issue #7): NaN's published schema is silent about stream_options, but the live gateway honors it — two identical streaming calls per model, differing only in stream_options: { include_usage: true }, returned 0 usage chunks without it and exactly 1 with it (prompt/completion/reasoning/cached token counts) on deepseek-v4-flash, glm5.3-flash, qwen3.6, mimo-v2.5 and gemma4, and a real pi session then recorded token counts where it recorded zeros. pi-ai only sends stream_options when this is not false, and the sanitizer forwards it when the model declares true, so chat models opt in by default and usage is reported (issue #4). A model that does not report streaming usage can still opt out per model with a models.json compat override (supportsUsageInStreaming: false); the sanitizer then strips stream_options and the payload stays strict.",
399
- "manual-only: \"hy4\" not yet on models.dev provider nan (NaN external-provider model launched 2026-11-10, listed by the live GET /v1/models but absent from models.dev provider nan and the NaN docs).",
400
- "NaN external-provider model launched 2026-11-10. contextWindow 1,048,576: NaN pricing page card '1M context' (maintainer screenshot, 2026-11-10) with NaN's 1M = 1,048,576 convention (https://nan.builders/docs/pi). maxTokens 32,768: https://nan.builders/docs/pi declares 32768 for every 1M-context NaN model (vendor limit 65,536 on models.dev provider tencent-tokenhub). input text+image per models.dev provider tencent-tokenhub (hy4), reasoning model per the vendor. Existence: live GET https://api.nan.builders/v1/models (checked 2026-11-10); the docs https://nan.builders/docs/models, https://nan.builders/docs/pi and https://nan.builders/openapi.json do not list it yet. reasoningEffortValues [] and no thinkingLevelMap: the gateway's reasoning_effort handling for external providers is unmeasured. cost 0 per maintainer decision."
554
+ "cost 0 on every model: NaN bills a credit pool (1 credit ≈ 0.026 €) rather than per-token USD, so pi's per-token cost estimate does not apply. models.dev provider nan started publishing a derived USD conversion on 2026-11-17; it is not a price NaN charges, so it is not adopted (delete NAN_CATALOG_COST in scripts/generate-models.ts to adopt it).",
555
+ "manual-only: \"hy4-flash\" not yet on models.dev provider nan (NaN larger model documented in https://nan.builders/docs/models (checked 2026-11-17) and listed by the live GET https://api.nan.builders/v1/models (checked 2026-11-17), but absent from models.dev provider nan).",
556
+ "Hy4 Flash, Tencent's fast Hunyuan 4, documented in https://nan.builders/docs/models (checked 2026-11-17) and listed by the live GET https://api.nan.builders/v1/models (checked 2026-11-17); models.dev provider nan does not list it, so it enters as a manual-only entry. contextWindow 1,048,576: the card says '1M token context' and NaN's 1M convention is 1,048,576 (https://nan.builders/docs/pi), which the first-party models.dev entry openrouter/tencent/hy4-flash also reports. maxTokens 65,536: the card says 'Max answer 64K tokens' (64K = 65,536), and its reasoning section says 'max_tokens bounds reasoning plus answer, up to 64,000', so the classic max_tokens field stays. input text+image and reasoning true per the card ('Tool calling and reasoning'). The docs keep this model out of the effort table ('Reasons by default, with no default level applied ... To turn reasoning off send reasoning_effort: none; the model ignores enable_thinking on its own'), so reasoningEffortValues declares only the documented off value and thinkingLevelMap { off: 'none' } puts it on the wire. Cost 0 per maintainer decision (NaN bills credits, not per-token USD)."
401
557
  ],
402
558
  "extras": {}
403
559
  },
@@ -416,7 +572,7 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
416
572
  "cacheWrite": 0
417
573
  },
418
574
  "contextWindow": 1048576,
419
- "maxTokens": 32768,
575
+ "maxTokens": 1048576,
420
576
  "reasoningEffortValues": [],
421
577
  "compat": {
422
578
  "supportsDeveloperRole": false,
@@ -427,10 +583,53 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
427
583
  },
428
584
  "notes": [
429
585
  "compat matches the maintainer's working ~/.pi/agent/models.json LiteLLM config for api.nan.builders (2026-09-04): supportsDeveloperRole false, supportsReasoningEffort true, maxTokensField max_tokens. NaN's docs example sets only supportsDeveloperRole: true and is not battle-tested. supportsFinishReason true (2026-09-13, issue #2): the LiteLLM gateway intermittently closes SSE streams before emitting finish_reason; with true pi-ai raises 'Stream ended without finish_reason', which matches pi-ai's retryable-provider pattern ('ended without') and is retried automatically, whereas false silently synthesized stop/toolUse and stalled the turn mid-answer. supportsUsageInStreaming true (2026-09-16, issue #7): NaN's published schema is silent about stream_options, but the live gateway honors it — two identical streaming calls per model, differing only in stream_options: { include_usage: true }, returned 0 usage chunks without it and exactly 1 with it (prompt/completion/reasoning/cached token counts) on deepseek-v4-flash, glm5.3-flash, qwen3.6, mimo-v2.5 and gemma4, and a real pi session then recorded token counts where it recorded zeros. pi-ai only sends stream_options when this is not false, and the sanitizer forwards it when the model declares true, so chat models opt in by default and usage is reported (issue #4). A model that does not report streaming usage can still opt out per model with a models.json compat override (supportsUsageInStreaming: false); the sanitizer then strips stream_options and the payload stays strict.",
430
- "manual-only: \"kimi-k3.1-pro\" not yet on models.dev provider nan (NaN external-provider model launched 2026-11-10, listed by the live GET /v1/models but absent from models.dev provider nan and the NaN docs).",
431
- "NaN external-provider model launched 2026-11-10. contextWindow 1,048,576: NaN pricing page card '1M context' (maintainer screenshot, 2026-11-10) with NaN's 1M = 1,048,576 convention (https://nan.builders/docs/pi). maxTokens 32,768: https://nan.builders/docs/pi declares 32768 for every 1M-context NaN model (vendor limit 1,048,576 on models.dev provider moonshotai). input text+image per models.dev provider moonshotai (kimi-k3.1-pro), reasoning model per the vendor. Existence: live GET https://api.nan.builders/v1/models (checked 2026-11-10); the docs https://nan.builders/docs/models, https://nan.builders/docs/pi and https://nan.builders/openapi.json do not list it yet. reasoningEffortValues [] and no thinkingLevelMap: the gateway's reasoning_effort handling for external providers is unmeasured. cost 0 per maintainer decision."
586
+ "cost 0 on every model: NaN bills a credit pool (1 credit ≈ 0.026 €) rather than per-token USD, so pi's per-token cost estimate does not apply. models.dev provider nan started publishing a derived USD conversion on 2026-11-17; it is not a price NaN charges, so it is not adopted (delete NAN_CATALOG_COST in scripts/generate-models.ts to adopt it).",
587
+ "Kimi K3.1 Pro, documented in https://nan.builders/docs/models (checked 2026-11-17; models.dev provider nan lists it since 2026-11-10). contextWindow 1,048,576 ('1M token context') and maxTokens 1,048,576 ('Max answer 1M tokens', which models.dev nan reports as limit.output) — pi-ai clamps the outgoing budget with clampMaxTokensToContext, so declaring the documented maximum never sends an over-context max_tokens. input text+image per the card. Reasoning: the card only says 'Reasoning model', and the docs keep this model out of the effort contract while stating that the `none` aliases are NOT mapped on it, so no reasoningEffortValues and no thinkingLevelMap are declared: pi sends no reasoning_effort and the model's own behaviour decides. Cost 0 per maintainer decision (NaN bills credits, not per-token USD).",
588
+ "manual-only: \"kimi-k3.1-pro\" skipped: models.dev provider \"nan\" now lists it, so the manual-only entry is not emitted and the models.dev values are used (NaN larger model documented in https://nan.builders/docs/models (checked 2026-11-17) and listed by the live GET https://api.nan.builders/v1/models (checked 2026-11-17), but absent from models.dev provider nan)"
432
589
  ],
433
- "extras": {}
590
+ "extras": {
591
+ "id": "kimi-k3.1-pro",
592
+ "name": "Kimi K3.1 Pro",
593
+ "description": "Multimodal Kimi model with a 1M-token context window and always-on reasoning, for coding, 3D creation and financial research",
594
+ "family": "kimi-k3",
595
+ "attachment": true,
596
+ "reasoning": true,
597
+ "reasoning_options": [
598
+ {
599
+ "type": "effort",
600
+ "values": [
601
+ "low",
602
+ "high",
603
+ "max"
604
+ ]
605
+ }
606
+ ],
607
+ "tool_call": true,
608
+ "temperature": false,
609
+ "release_date": "2026-10-23",
610
+ "last_updated": "2026-10-23",
611
+ "modalities": {
612
+ "input": [
613
+ "text",
614
+ "image"
615
+ ],
616
+ "output": [
617
+ "text"
618
+ ]
619
+ },
620
+ "open_weights": true,
621
+ "limit": {
622
+ "context": 1048576,
623
+ "output": 1048576
624
+ },
625
+ "cost": {
626
+ "input": 2.808,
627
+ "output": 14.04,
628
+ "cache_read": 0.2808,
629
+ "cache_write": 2.808
630
+ },
631
+ "canonical_model_id": "moonshotai/kimi-k3.1-pro"
632
+ }
434
633
  },
435
634
  {
436
635
  "id": "mimo-v2.6-flash",
@@ -448,9 +647,17 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
448
647
  },
449
648
  "contextWindow": 1048576,
450
649
  "maxTokens": 131072,
451
- "reasoningEffortValues": [],
650
+ "reasoningEffortValues": [
651
+ "none",
652
+ "low",
653
+ "medium",
654
+ "high",
655
+ "max"
656
+ ],
452
657
  "thinkingLevelMap": {
453
- "off": "none"
658
+ "off": "none",
659
+ "xhigh": "xhigh",
660
+ "max": "max"
454
661
  },
455
662
  "compat": {
456
663
  "supportsDeveloperRole": false,
@@ -461,7 +668,8 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
461
668
  },
462
669
  "notes": [
463
670
  "compat matches the maintainer's working ~/.pi/agent/models.json LiteLLM config for api.nan.builders (2026-09-04): supportsDeveloperRole false, supportsReasoningEffort true, maxTokensField max_tokens. NaN's docs example sets only supportsDeveloperRole: true and is not battle-tested. supportsFinishReason true (2026-09-13, issue #2): the LiteLLM gateway intermittently closes SSE streams before emitting finish_reason; with true pi-ai raises 'Stream ended without finish_reason', which matches pi-ai's retryable-provider pattern ('ended without') and is retried automatically, whereas false silently synthesized stop/toolUse and stalled the turn mid-answer. supportsUsageInStreaming true (2026-09-16, issue #7): NaN's published schema is silent about stream_options, but the live gateway honors it — two identical streaming calls per model, differing only in stream_options: { include_usage: true }, returned 0 usage chunks without it and exactly 1 with it (prompt/completion/reasoning/cached token counts) on deepseek-v4-flash, glm5.3-flash, qwen3.6, mimo-v2.5 and gemma4, and a real pi session then recorded token counts where it recorded zeros. pi-ai only sends stream_options when this is not false, and the sanitizer forwards it when the model declares true, so chat models opt in by default and usage is reported (issue #4). A model that does not report streaming usage can still opt out per model with a models.json compat override (supportsUsageInStreaming: false); the sanitizer then strips stream_options and the payload stays strict.",
464
- "thinkingLevelMap { off: \"none\" } (live re-probe 2026-10-14): the docs list this model as 'accepted, depth not adjustable', but the gateway makes the parameter effective at the off end — `none` gave 0 reasoning tokens / a full answer, while `low` gave 22 reasoning tokens and omitting the parameter gave 17. Measured behavior wins over the docs, so `thinking: off` now sends reasoning_effort:\"none\" and actually disables reasoning. No other level was sampled, so only `off` is mapped.",
671
+ "cost 0 on every model: NaN bills a credit pool (1 credit ≈ 0.026 €) rather than per-token USD, so pi's per-token cost estimate does not apply. models.dev provider nan started publishing a derived USD conversion on 2026-11-17; it is not a price NaN charges, so it is not adopted (delete NAN_CATALOG_COST in scripts/generate-models.ts to adopt it).",
672
+ "reasoningEffortValues none/low/medium/high/max: the card says 'reasoning_effort: none turns it off · low to max', and the contract table says 'minimal is applied as low and xhigh as max' (https://nan.builders/docs/models#controlling-reasoning, checked 2026-11-17), so only the values with their own meaning are declared. thinkingLevelMap { off: \"none\" } (live re-probe 2026-10-14): the 2026-10-14 docs called the parameter 'accepted, depth not adjustable', but the gateway makes it effective at the off end — `none` gave 0 reasoning tokens / a full answer, while `low` gave 22 reasoning tokens and omitting the parameter gave 17. Measured behavior wins over the docs, so `thinking: off` sends reasoning_effort:\"none\" and actually disables reasoning.",
465
673
  "manual-only: \"mimo-v2.6-flash\" skipped: models.dev provider \"nan\" now lists it, so the manual-only entry is not emitted and the models.dev values are used (omnimodal model (text, image, audio input) served by NaN; limits and modalities from https://nan.builders/docs/models#mimo-v2-6-flash (checked 2026-09-25, quotas re-checked 2026-09-29): 1,048,576 context / 131,072 max output / 1.0B monthly quota per member. Tool calling: yes. Streaming: yes. Input modalities (pi-representable): text, image (audio not representable in pi's Model type). Fallback entry: emitted only while models.dev provider nan does not list the model — models.dev started listing it on 2026-09-29, so the generator then keeps the models.dev values and attaches this note to that entry instead of emitting a second one.)"
466
674
  ],
467
675
  "extras": {
@@ -473,14 +681,7 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
473
681
  "reasoning": true,
474
682
  "reasoning_options": [
475
683
  {
476
- "type": "effort",
477
- "values": [
478
- "none",
479
- "low",
480
- "medium",
481
- "high",
482
- "max"
483
- ]
684
+ "type": "toggle"
484
685
  }
485
686
  ],
486
687
  "tool_call": true,
@@ -503,8 +704,9 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
503
704
  "output": 131072
504
705
  },
505
706
  "cost": {
506
- "input": 0,
507
- "output": 0
707
+ "input": 0.19656,
708
+ "output": 0.39312,
709
+ "cache_read": 0.0039312
508
710
  },
509
711
  "canonical_model_id": "xiaomi/mimo-v2.6-flash"
510
712
  }
@@ -531,10 +733,13 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
531
733
  "low",
532
734
  "medium",
533
735
  "high",
736
+ "xhigh",
534
737
  "max"
535
738
  ],
536
739
  "thinkingLevelMap": {
537
- "off": "none"
740
+ "off": "none",
741
+ "xhigh": "xhigh",
742
+ "max": "max"
538
743
  },
539
744
  "compat": {
540
745
  "supportsDeveloperRole": false,
@@ -545,7 +750,8 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
545
750
  },
546
751
  "notes": [
547
752
  "compat matches the maintainer's working ~/.pi/agent/models.json LiteLLM config for api.nan.builders (2026-09-04): supportsDeveloperRole false, supportsReasoningEffort true, maxTokensField max_tokens. NaN's docs example sets only supportsDeveloperRole: true and is not battle-tested. supportsFinishReason true (2026-09-13, issue #2): the LiteLLM gateway intermittently closes SSE streams before emitting finish_reason; with true pi-ai raises 'Stream ended without finish_reason', which matches pi-ai's retryable-provider pattern ('ended without') and is retried automatically, whereas false silently synthesized stop/toolUse and stalled the turn mid-answer. supportsUsageInStreaming true (2026-09-16, issue #7): NaN's published schema is silent about stream_options, but the live gateway honors it — two identical streaming calls per model, differing only in stream_options: { include_usage: true }, returned 0 usage chunks without it and exactly 1 with it (prompt/completion/reasoning/cached token counts) on deepseek-v4-flash, glm5.3-flash, qwen3.6, mimo-v2.5 and gemma4, and a real pi session then recorded token counts where it recorded zeros. pi-ai only sends stream_options when this is not false, and the sanitizer forwards it when the model declares true, so chat models opt in by default and usage is reported (issue #4). A model that does not report streaming usage can still opt out per model with a models.json compat override (supportsUsageInStreaming: false); the sanitizer then strips stream_options and the payload stays strict.",
548
- "thinkingLevelMap { off: \"none\" } (issue #16): NaN docs state that with no reasoning_effort parameter every model uses its own default and that default is reasoning ON for qwen3.6 (16,384-token budget), while `none` and `minimal` skip the reasoning phase entirely (https://nan.builders/docs/models#controlling-reasoning, checked 2026-10-01). pi maps reasoning:\"off\" to reasoningEffort:undefined, so without this map `thinking: off` sent no parameter and the model reasoned anyway; the map sends reasoning_effort:\"none\" and actually disables reasoning."
753
+ "cost 0 on every model: NaN bills a credit pool (1 credit ≈ 0.026 €) rather than per-token USD, so pi's per-token cost estimate does not apply. models.dev provider nan started publishing a derived USD conversion on 2026-11-17; it is not a price NaN charges, so it is not adopted (delete NAN_CATALOG_COST in scripts/generate-models.ts to adopt it).",
754
+ "thinkingLevelMap { off: \"none\" } (issue #16): NaN docs state that with no reasoning_effort parameter every model uses its own default and that default is reasoning ON for qwen3.6 (16,384-token budget), while `none` and `minimal` skip the reasoning phase entirely (https://nan.builders/docs/models#controlling-reasoning, checked 2026-11-17). pi maps reasoning:\"off\" to reasoningEffort:undefined, so without this map `thinking: off` sent no parameter and the model reasoned anyway; the map sends reasoning_effort:\"none\" and actually disables reasoning. reasoningEffortValues: the contract table documents the whole ladder (low 2,048, medium 8,192, high 16,384, xhigh and max 32,768 reasoning tokens on Chat Completions)."
549
755
  ],
550
756
  "extras": {
551
757
  "id": "qwen3.6",
@@ -564,6 +770,11 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
564
770
  "high",
565
771
  "max"
566
772
  ]
773
+ },
774
+ {
775
+ "type": "budget_tokens",
776
+ "min": 0,
777
+ "max": 32768
567
778
  }
568
779
  ],
569
780
  "tool_call": true,
@@ -608,7 +819,20 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
608
819
  },
609
820
  "contextWindow": 1048576,
610
821
  "maxTokens": 131072,
611
- "reasoningEffortValues": [],
822
+ "reasoningEffortValues": [
823
+ "none",
824
+ "minimal",
825
+ "low",
826
+ "medium",
827
+ "high",
828
+ "xhigh",
829
+ "max"
830
+ ],
831
+ "thinkingLevelMap": {
832
+ "off": "none",
833
+ "xhigh": "xhigh",
834
+ "max": "max"
835
+ },
612
836
  "compat": {
613
837
  "supportsDeveloperRole": false,
614
838
  "supportsReasoningEffort": true,
@@ -618,7 +842,8 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
618
842
  },
619
843
  "notes": [
620
844
  "compat matches the maintainer's working ~/.pi/agent/models.json LiteLLM config for api.nan.builders (2026-09-04): supportsDeveloperRole false, supportsReasoningEffort true, maxTokensField max_tokens. NaN's docs example sets only supportsDeveloperRole: true and is not battle-tested. supportsFinishReason true (2026-09-13, issue #2): the LiteLLM gateway intermittently closes SSE streams before emitting finish_reason; with true pi-ai raises 'Stream ended without finish_reason', which matches pi-ai's retryable-provider pattern ('ended without') and is retried automatically, whereas false silently synthesized stop/toolUse and stalled the turn mid-answer. supportsUsageInStreaming true (2026-09-16, issue #7): NaN's published schema is silent about stream_options, but the live gateway honors it — two identical streaming calls per model, differing only in stream_options: { include_usage: true }, returned 0 usage chunks without it and exactly 1 with it (prompt/completion/reasoning/cached token counts) on deepseek-v4-flash, glm5.3-flash, qwen3.6, mimo-v2.5 and gemma4, and a real pi session then recorded token counts where it recorded zeros. pi-ai only sends stream_options when this is not false, and the sanitizer forwards it when the model declares true, so chat models opt in by default and usage is reported (issue #4). A model that does not report streaming usage can still opt out per model with a models.json compat override (supportsUsageInStreaming: false); the sanitizer then strips stream_options and the payload stays strict.",
621
- "contextWindow 1,048,576: NaN docs state '1M token context (1,048,576 tokens)' and 'Max answer 131K tokens' (https://nan.builders/docs/models, checked 2026-10-14) — models.dev still lists 262,144. The earlier override was withdrawn 2026-09-07 when the docs read '262K token context, the model's native window'; the docs now state 1M and they are the source of truth (maintainer instruction: docs win over models.dev, which a user updates later). maxTokens stays 131,072, which models.dev already matches and the docs confirm as the 131K max answer. maxTokensField 'max_completion_tokens' (issue #34, NaN maintainer confirmation received 2026-11-11, quoted verbatim in the issue): on this model max_tokens does NOT bound the reasoning phase, the excess bills against the quota (it explained the 796M tokens against the 500M cap in the 2026-09-27 /v1/usage survey), and max_completion_tokens IS respected as the interim bound. The published OpenAPI schema still documents only max_tokens, so the strict-schema sanitizer exempts this model from its max_completion_tokens→max_tokens rename at request time (SanitizerOptions.preserveMaxCompletionTokens, wired from compat.maxTokensField in src/provider-factory.ts). REVERT: once NaN ships their prepared gateway fix, remove this override — test/issue-34-max-completion-tokens.test.ts fails on purpose until it is removed; accepting max_completion_tokens on the other flash models is unverified live (permission-gated probe needed), so the scope stays this one model."
845
+ "cost 0 on every model: NaN bills a credit pool (1 credit ≈ 0.026 €) rather than per-token USD, so pi's per-token cost estimate does not apply. models.dev provider nan started publishing a derived USD conversion on 2026-11-17; it is not a price NaN charges, so it is not adopted (delete NAN_CATALOG_COST in scripts/generate-models.ts to adopt it).",
846
+ "contextWindow 1,048,576: NaN docs state '1M token context (1,048,576 tokens)' and 'Max answer 131K tokens' (https://nan.builders/docs/models, checked 2026-11-17) — models.dev still lists 262,144. The earlier override was withdrawn 2026-09-07 when the docs read '262K token context, the model's native window'; the docs now state 1M and they are the source of truth (maintainer instruction: docs win over models.dev, which a user updates later). maxTokens stays 131,072, which models.dev already matches and the docs confirm as the 131K max answer. maxTokensField 'max_completion_tokens' (issue #34, NaN maintainer confirmation received 2026-11-11, quoted verbatim in the issue): on this model max_tokens does NOT bound the reasoning phase, the excess bills against the quota (it explained the 796M tokens against the 500M cap in the 2026-09-27 /v1/usage survey), and max_completion_tokens IS respected as the interim bound. The published OpenAPI schema still documents only max_tokens, so the strict-schema sanitizer exempts this model from its max_completion_tokens→max_tokens rename at request time (SanitizerOptions.preserveMaxCompletionTokens, wired from compat.maxTokensField in src/provider-factory.ts). REVERT: once NaN ships their prepared gateway fix, remove this override — test/issue-34-max-completion-tokens.test.ts is the tripwire. reasoningEffortValues none..max and thinkingLevelMap { off: 'none' }: the card says 'Reasoning on by default (reasoning_effort: none turns it off · minimal to max)' and the contract table says 'Off. No reasoning tokens' for `none` (https://nan.builders/docs/models, checked 2026-11-17), so `thinking: off` now actually disables reasoning. The earlier note said the parameter was 'accepted, depth not adjustable' with no map, which was true of the 2026-10-14 docs; the model card and the contract table now state the opposite and the docs win."
622
847
  ],
623
848
  "extras": {
624
849
  "id": "qwen3.8-flash",
@@ -639,6 +864,11 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
639
864
  "xhigh",
640
865
  "max"
641
866
  ]
867
+ },
868
+ {
869
+ "type": "budget_tokens",
870
+ "min": 0,
871
+ "max": 32768
642
872
  }
643
873
  ],
644
874
  "tool_call": true,
@@ -661,8 +891,9 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
661
891
  "output": 131072
662
892
  },
663
893
  "cost": {
664
- "input": 0,
665
- "output": 0
894
+ "input": 0.2106,
895
+ "output": 0.65988,
896
+ "cache_read": 0.022464
666
897
  },
667
898
  "canonical_model_id": "alibaba/qwen3.8-flash"
668
899
  }
@@ -682,8 +913,100 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
682
913
  "cacheWrite": 0
683
914
  },
684
915
  "contextWindow": 1000000,
685
- "maxTokens": 32768,
686
- "reasoningEffortValues": [],
916
+ "maxTokens": 131072,
917
+ "reasoningEffortValues": [
918
+ "none"
919
+ ],
920
+ "thinkingLevelMap": {
921
+ "off": "none"
922
+ },
923
+ "compat": {
924
+ "supportsDeveloperRole": false,
925
+ "supportsReasoningEffort": true,
926
+ "supportsUsageInStreaming": true,
927
+ "supportsFinishReason": true,
928
+ "maxTokensField": "max_completion_tokens"
929
+ },
930
+ "notes": [
931
+ "compat matches the maintainer's working ~/.pi/agent/models.json LiteLLM config for api.nan.builders (2026-09-04): supportsDeveloperRole false, supportsReasoningEffort true, maxTokensField max_tokens. NaN's docs example sets only supportsDeveloperRole: true and is not battle-tested. supportsFinishReason true (2026-09-13, issue #2): the LiteLLM gateway intermittently closes SSE streams before emitting finish_reason; with true pi-ai raises 'Stream ended without finish_reason', which matches pi-ai's retryable-provider pattern ('ended without') and is retried automatically, whereas false silently synthesized stop/toolUse and stalled the turn mid-answer. supportsUsageInStreaming true (2026-09-16, issue #7): NaN's published schema is silent about stream_options, but the live gateway honors it — two identical streaming calls per model, differing only in stream_options: { include_usage: true }, returned 0 usage chunks without it and exactly 1 with it (prompt/completion/reasoning/cached token counts) on deepseek-v4-flash, glm5.3-flash, qwen3.6, mimo-v2.5 and gemma4, and a real pi session then recorded token counts where it recorded zeros. pi-ai only sends stream_options when this is not false, and the sanitizer forwards it when the model declares true, so chat models opt in by default and usage is reported (issue #4). A model that does not report streaming usage can still opt out per model with a models.json compat override (supportsUsageInStreaming: false); the sanitizer then strips stream_options and the payload stays strict.",
932
+ "cost 0 on every model: NaN bills a credit pool (1 credit ≈ 0.026 €) rather than per-token USD, so pi's per-token cost estimate does not apply. models.dev provider nan started publishing a derived USD conversion on 2026-11-17; it is not a price NaN charges, so it is not adopted (delete NAN_CATALOG_COST in scripts/generate-models.ts to adopt it).",
933
+ "Qwen3.8 Max, documented in https://nan.builders/docs/models (checked 2026-11-17; models.dev provider nan lists it since 2026-11-10). contextWindow 1,000,000: the card says '1M token context' and the first-party vendor value on models.dev provider alibaba (qwen3.8-max) is 1,000,000 — the smaller of that and NaN's 1M = 1,048,576 convention (https://nan.builders/docs/pi). maxTokens 131,072: the card says 'Max answer 131K tokens'. maxTokensField 'max_completion_tokens': the docs state that on this model 'max_tokens only bounds the visible answer: the reasoning comes on top of it. To cap the total (reasoning plus answer, and so the cost) use max_completion_tokens' — the quota blowout issue #34 fixed for qwen3.8-flash, same fix, same sanitizer exemption (SanitizerOptions.preserveMaxCompletionTokens, wired from compat.maxTokensField in src/provider-factory.ts). input text+image per the card. Reasoning: the docs say 'none turns it off' for this model, so reasoningEffortValues declares 'none' and thinkingLevelMap { off: 'none' } sends it when pi maps reasoning:'off' to undefined. Cost 0 per maintainer decision (NaN bills credits, not per-token USD).",
934
+ "manual-only: \"qwen3.8-max\" skipped: models.dev provider \"nan\" now lists it, so the manual-only entry is not emitted and the models.dev values are used (NaN larger model documented in https://nan.builders/docs/models (checked 2026-11-17) and listed by the live GET https://api.nan.builders/v1/models (checked 2026-11-17), but absent from models.dev provider nan)"
935
+ ],
936
+ "extras": {
937
+ "id": "qwen3.8-max",
938
+ "name": "Qwen3.8 Max",
939
+ "description": "2.4-trillion-parameter MoE flagship for coding, professional work, multimodal understanding, and long-horizon agentic workflows",
940
+ "family": "qwen",
941
+ "attachment": true,
942
+ "reasoning": true,
943
+ "reasoning_options": [
944
+ {
945
+ "type": "effort",
946
+ "values": [
947
+ "none",
948
+ "low",
949
+ "medium",
950
+ "xhigh"
951
+ ]
952
+ }
953
+ ],
954
+ "tool_call": true,
955
+ "temperature": true,
956
+ "release_date": "2026-08-03",
957
+ "last_updated": "2026-08-03",
958
+ "modalities": {
959
+ "input": [
960
+ "text",
961
+ "image"
962
+ ],
963
+ "output": [
964
+ "text"
965
+ ]
966
+ },
967
+ "open_weights": false,
968
+ "limit": {
969
+ "context": 1000000,
970
+ "output": 131072
971
+ },
972
+ "cost": {
973
+ "input": 2.808,
974
+ "output": 8.424,
975
+ "cache_read": 0.351
976
+ },
977
+ "canonical_model_id": "alibaba/qwen3.8-max"
978
+ }
979
+ },
980
+ {
981
+ "id": "qwen4-max",
982
+ "name": "Qwen4 Max",
983
+ "reasoning": true,
984
+ "input": [
985
+ "text",
986
+ "image"
987
+ ],
988
+ "cost": {
989
+ "input": 0,
990
+ "output": 0,
991
+ "cacheRead": 0,
992
+ "cacheWrite": 0
993
+ },
994
+ "contextWindow": 1000000,
995
+ "maxTokens": 131072,
996
+ "reasoningEffortValues": [
997
+ "none",
998
+ "minimal",
999
+ "low",
1000
+ "medium",
1001
+ "high",
1002
+ "xhigh",
1003
+ "max"
1004
+ ],
1005
+ "thinkingLevelMap": {
1006
+ "off": "none",
1007
+ "xhigh": "xhigh",
1008
+ "max": "max"
1009
+ },
687
1010
  "compat": {
688
1011
  "supportsDeveloperRole": false,
689
1012
  "supportsReasoningEffort": true,
@@ -693,8 +1016,9 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
693
1016
  },
694
1017
  "notes": [
695
1018
  "compat matches the maintainer's working ~/.pi/agent/models.json LiteLLM config for api.nan.builders (2026-09-04): supportsDeveloperRole false, supportsReasoningEffort true, maxTokensField max_tokens. NaN's docs example sets only supportsDeveloperRole: true and is not battle-tested. supportsFinishReason true (2026-09-13, issue #2): the LiteLLM gateway intermittently closes SSE streams before emitting finish_reason; with true pi-ai raises 'Stream ended without finish_reason', which matches pi-ai's retryable-provider pattern ('ended without') and is retried automatically, whereas false silently synthesized stop/toolUse and stalled the turn mid-answer. supportsUsageInStreaming true (2026-09-16, issue #7): NaN's published schema is silent about stream_options, but the live gateway honors it — two identical streaming calls per model, differing only in stream_options: { include_usage: true }, returned 0 usage chunks without it and exactly 1 with it (prompt/completion/reasoning/cached token counts) on deepseek-v4-flash, glm5.3-flash, qwen3.6, mimo-v2.5 and gemma4, and a real pi session then recorded token counts where it recorded zeros. pi-ai only sends stream_options when this is not false, and the sanitizer forwards it when the model declares true, so chat models opt in by default and usage is reported (issue #4). A model that does not report streaming usage can still opt out per model with a models.json compat override (supportsUsageInStreaming: false); the sanitizer then strips stream_options and the payload stays strict.",
696
- "manual-only: \"qwen3.8-max\" not yet on models.dev provider nan (NaN external-provider model launched 2026-11-10, listed by the live GET /v1/models but absent from models.dev provider nan and the NaN docs).",
697
- "NaN external-provider model launched 2026-11-10. contextWindow 1,000,000: NaN pricing page card says '1M context' (maintainer screenshot, 2026-11-10); the first-party vendor value on models.dev provider alibaba (qwen3.8-max) is 1,000,000, the smaller of it and NaN's 1M = 1,048,576 convention (https://nan.builders/docs/pi), so the vendor value is used. maxTokens 32,768: https://nan.builders/docs/pi declares 32768 for every 1M-context NaN model (vendor limit 131,072 on models.dev provider alibaba). input text+image per models.dev provider alibaba (qwen3.8-max), reasoning model per the vendor. Existence: live GET https://api.nan.builders/v1/models (checked 2026-11-10); the docs https://nan.builders/docs/models, https://nan.builders/docs/pi and https://nan.builders/openapi.json do not list it yet. reasoningEffortValues [] and no thinkingLevelMap: the gateway's reasoning_effort handling for external providers is unmeasured. cost 0 per maintainer decision."
1019
+ "cost 0 on every model: NaN bills a credit pool (1 credit ≈ 0.026 €) rather than per-token USD, so pi's per-token cost estimate does not apply. models.dev provider nan started publishing a derived USD conversion on 2026-11-17; it is not a price NaN charges, so it is not adopted (delete NAN_CATALOG_COST in scripts/generate-models.ts to adopt it).",
1020
+ "manual-only: \"qwen4-max\" not yet on models.dev provider nan (NaN larger model documented in https://nan.builders/docs/models (checked 2026-11-17) and listed by the live GET https://api.nan.builders/v1/models (checked 2026-11-17), but absent from models.dev provider nan).",
1021
+ "Qwen4 Max, Alibaba's Qwen 4 flagship, documented in https://nan.builders/docs/models (checked 2026-11-17) and listed by the live GET https://api.nan.builders/v1/models (checked 2026-11-17); models.dev provider nan does not list it, so it enters as a manual-only entry. contextWindow 1,000,000: the card says '1M token context' and both first-party vendor entries on models.dev (vercel/alibaba/qwen4-max and openrouter/qwen/qwen4-max) say 1,000,000 — the smaller of that and NaN's 1M = 1,048,576 convention (https://nan.builders/docs/pi), the same rule qwen3.8-max follows. maxTokens 131,072: the card says 'Max answer 131K tokens' and the reasoning section says 'max_tokens bounds the total, reasoning plus answer, up to 131,000'. input text+image and reasoning true per the card. Reasoning: the card says 'reasoning_effort: none turns it off · minimal to max', and the reasoning section repeats that none turns it off on this model, so reasoningEffortValues declares the documented ladder and thinkingLevelMap { off: 'none' } supplies the off switch when pi maps reasoning:'off' to undefined. Cost 0 per maintainer decision (NaN bills credits, not per-token USD)."
698
1022
  ],
699
1023
  "extras": {}
700
1024
  }
@@ -703,11 +1027,10 @@ export const NAN_GENERATED_MODELS: readonly GeneratedModelEntry[] = [
703
1027
  export const GENERATED_CATALOG_META = {
704
1028
  source: "https://models.dev/api.json",
705
1029
  modelsDevProvider: "nan",
706
- fetchedAt: "2026-11-12T22:42:17.308Z",
707
- modelCount: 11,
708
- models: ["deepseek-v4-flash","deepseek-v4-pro","gemma4","glm5.3","glm5.3-flash","hy4","kimi-k3.1-pro","mimo-v2.6-flash","qwen3.6","qwen3.8-flash","qwen3.8-max"],
1030
+ fetchedAt: "2026-11-17T01:04:35.527Z",
1031
+ modelCount: 13,
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"],
709
1033
  notes: [
710
- "non-chat: \"qwen-image-2.1\" excluded from the chat catalog (image-generation model (text→image; output modality image) documented in https://nan.builders/docs/models and https://nan.builders/openapi.json (checked 2026-09-29) — not a chat model, out of the static chat catalog (models.dev reports limit.output 0))",
711
1034
  "provider-removed: \"glm5.2\" excluded from the catalog (removed by NaN (2026-09-05); absent from the official chat model list in https://nan.builders/openapi.json and https://nan.builders/docs/models (checked 2026-09-07) while models.dev provider nan still listed it — excluded so regeneration does not resurrect it)",
712
1035
  "provider-removed: \"mimo-v2.5\" excluded from the catalog (removed by NaN (checked 2026-09-29): zero mentions in https://nan.builders/docs/models and in the model param description of https://nan.builders/openapi.json, and models.dev provider nan dropped it as well — superseded by mimo-v2.6-flash; excluded so regeneration does not resurrect it)",
713
1036
  "non-chat: \"qwen3-embedding\" excluded from the chat catalog (embedding endpoint (https://nan.builders/docs/models, checked 2026-10-01) — not a chat model)",
@@ -715,23 +1038,29 @@ export const GENERATED_CATALOG_META = {
715
1038
  "non-chat: \"kokoro\" excluded from the chat catalog (text-to-speech (TTS) endpoint (https://nan.builders/docs/models, checked 2026-10-01) — not a chat model)",
716
1039
  "non-chat: \"whisper\" excluded from the chat catalog (speech-to-text (STT) endpoint (https://nan.builders/docs/models, checked 2026-10-01) — not a chat model)",
717
1040
  "non-chat: \"flux-2-klein\" excluded from the chat catalog (image generation endpoint (https://nan.builders/docs/models, checked 2026-10-01) — not a chat model)",
1041
+ "non-chat: \"qwen-image-2.1\" excluded from the chat catalog (image-generation model (text→image; output modality image) documented in https://nan.builders/docs/models and https://nan.builders/openapi.json (checked 2026-09-29) — not a chat model, out of the static chat catalog (models.dev reports limit.output 0))",
718
1042
  "non-chat: \"minimax-h3\" excluded from the chat catalog (video-generation model (output modality video): listed by the live GET https://api.nan.builders/v1/models with owned_by \"nan\" (checked 2026-11-10) next to flux-2-klein and qwen-image-2.1, and models.dev (vercel/minimax/minimax-h3, \"MiniMax H3\", https://models.dev/api.json, checked 2026-11-10) reports output video — not a chat model)",
719
1043
  "compat matches the maintainer's working ~/.pi/agent/models.json LiteLLM config for api.nan.builders (2026-09-04): supportsDeveloperRole false, supportsReasoningEffort true, maxTokensField max_tokens. NaN's docs example sets only supportsDeveloperRole: true and is not battle-tested. supportsFinishReason true (2026-09-13, issue #2): the LiteLLM gateway intermittently closes SSE streams before emitting finish_reason; with true pi-ai raises 'Stream ended without finish_reason', which matches pi-ai's retryable-provider pattern ('ended without') and is retried automatically, whereas false silently synthesized stop/toolUse and stalled the turn mid-answer. supportsUsageInStreaming true (2026-09-16, issue #7): NaN's published schema is silent about stream_options, but the live gateway honors it — two identical streaming calls per model, differing only in stream_options: { include_usage: true }, returned 0 usage chunks without it and exactly 1 with it (prompt/completion/reasoning/cached token counts) on deepseek-v4-flash, glm5.3-flash, qwen3.6, mimo-v2.5 and gemma4, and a real pi session then recorded token counts where it recorded zeros. pi-ai only sends stream_options when this is not false, and the sanitizer forwards it when the model declares true, so chat models opt in by default and usage is reported (issue #4). A model that does not report streaming usage can still opt out per model with a models.json compat override (supportsUsageInStreaming: false); the sanitizer then strips stream_options and the payload stays strict.",
720
- "contextWindow 1,048,576: NaN docs state '1M token context' for this model (https://nan.builders/docs/models, checked 2026-10-14). models.dev lists 1,000,000, a rounded form of the same window; the docs value is authoritative (maintainer instruction: docs win over models.dev, which a user updates later). input includes image: NaN serves the Vision-Exp variant ('takes images as input', https://nan.builders/docs/models; the image_url content-parts in https://nan.builders/openapi.json list deepseek-v4-flash among the vision models). models.dev provider nan also lists text+image now (DeepSeek V4.1 Flash entry, checked 2026-09-13), so this stays a pin for the vision capability rather than a divergence. maxTokens 32768 per the official NaN pi docs (https://nan.builders/docs/pi, 'the same set the NaN CLI writes', checked 2026-10-02) closing issue #20 — the gateway now rejects max_tokens above ~256k for this model with 403 permission_error (measured 2026-10-02: 256,000 → 200; 262,143 → 403), and the previous models.dev-derived 384000 made every pi request fail since pi-ai sends max_tokens = model.maxTokens when no cap is set. models.dev still lists 384000, so this override pins the documented value. reasoning_effort_values=[\"none\"] (issue #16, measured 2026-09-27 against live gateway, repro included in the issue): only \"none\" deterministically disables reasoning (0 reasoning tokens, answer produced). Every other value leaves 13-14K reasoning tokens and causes runaway reasoning (finish_reason:\"length\" with ZERO answer text). The catalog declares only [\"none\"] because the remaining values are useless noise. docs vs measurement (re-probed live 2026-10-14): https://nan.builders/docs/models#controlling-reasoning documents the parameter as 'any value (no effect) — the model decides per request', but the live gateway contradicts that: `none` gave 0 reasoning tokens / 0 reasoning chars / a 134-char answer, while `low` gave 57 reasoning tokens and omitting the parameter gave 63 (`minimal` gave 109). The docs are stale here; the measurement wins (maintainer instruction), so the measured behavior is kept. thinkingLevelMap { off: \"none\" } (issue #16, measured 2026-09-27): when pi maps reasoning:\"off\" to reasoningEffort:undefined, the thinkingLevelMap.off=\"none\" supplies the effort so the gateway receives reasoning_effort:\"none\" and does NOT enter runaway reasoning mode.",
721
- "manual-only: \"deepseek-v4-pro\" not yet on models.dev provider nan (NaN external-provider model launched 2026-11-10, listed by the live GET /v1/models but absent from models.dev provider nan and the NaN docs).",
722
- "NaN external-provider model launched 2026-11-10 (NaN pricing page name 'DeepSeek V4-Pro (0813 version)'). contextWindow 1,048,576: NaN pricing page card '1M context' (maintainer screenshot, 2026-11-10) with NaN's 1M = 1,048,576 convention (https://nan.builders/docs/pi). maxTokens 32,768: https://nan.builders/docs/pi declares 32768 for every 1M-context NaN model (vendor limit 393,216 on models.dev provider deepseek). input text only per models.dev provider deepseek (deepseek-v4-pro), reasoning model per the vendor. Existence: live GET https://api.nan.builders/v1/models (checked 2026-11-10); the docs https://nan.builders/docs/models, https://nan.builders/docs/pi and https://nan.builders/openapi.json do not list it yet. reasoningEffortValues [] and no thinkingLevelMap: the gateway's reasoning_effort handling for external providers is unmeasured. cost 0 per maintainer decision.",
723
- "thinkingLevelMap { off: \"none\" } (issue #16): NaN docs state that with no reasoning_effort parameter gemma4 defaults to reasoning ON (16,384-token budget), while `none`/`minimal` skip reasoning entirely (https://nan.builders/docs/models#controlling-reasoning, checked 2026-10-01). pi maps reasoning:\"off\" to reasoningEffort:undefined, so without this map `thinking: off` sent no parameter and the model reasoned anyway; the map sends reasoning_effort:\"none\" and actually disables reasoning.",
724
- "general catalog model since 2026-11-10: NaN announced it no longer has tier-exclusive models ('a partir de ahora ya NO habrá modelos exclusivos por tier'), and the live GET https://api.nan.builders/v1/models lists glm5.3 for a non-premium key (checked 2026-11-10); it used to be premium live-only. The values are the ones it carried as live-only, from https://nan.builders/docs/models (checked 2026-10-14; docs win over models.dev): contextWindow 1,048,576 ('1M token context'; models.dev lists the rounded 1,000,000); input text+image (multimodal; pi represents only text and image — models.dev lists text only, a stale divergence); maxTokens 131,072 (the confirmed maximum models.dev documents; the docs give the same 131K figure for glm5.3-flash and no lower bound); reasoningEffortValues low/medium/high/max per the docs' effort list; name 'GLM 5.3' per the docs (models.dev says 'GLM-5.3'). thinkingLevelMap { off: \"low\" }: the docs list low as the shallowest level, so `thinking: off` sends the shallowest supported effort; glm5.3 itself was never measured (issue #16 covered glm5.3-flash, whose shallowest effective value is 'minimal'), 'low' is the documented floor.",
725
- "contextWindow 1,048,576: NaN docs state '1M token context' for this model (https://nan.builders/docs/models, checked 2026-10-14). models.dev lists 1,000,000, a rounded form of the same window; the docs value is authoritative (maintainer instruction: docs win over models.dev, which a user updates later). thinkingLevelMap { off: \"minimal\" } (issue #16, measured 2026-09-27 against live gateway, repro included in the issue): when pi maps reasoning:\"off\" to reasoningEffort:undefined, the thinkingLevelMap.off=\"minimal\" supplies the effort so the gateway receives reasoning_effort:\"minimal\" (38 reasoning tokens + answer). Note: \"none\" does NOT suppress reasoning on glm5.3-flash (13,382 tokens) — only \"minimal\" was measured to be effective. reasoning_effort_values includes \"minimal\" (the docs' glm row lists low/medium/high/max, but the 2026-09-27 measurement shows minimal is accepted and effective, issue #16).",
726
- "manual-only: \"hy4\" not yet on models.dev provider nan (NaN external-provider model launched 2026-11-10, listed by the live GET /v1/models but absent from models.dev provider nan and the NaN docs).",
727
- "NaN external-provider model launched 2026-11-10. contextWindow 1,048,576: NaN pricing page card '1M context' (maintainer screenshot, 2026-11-10) with NaN's 1M = 1,048,576 convention (https://nan.builders/docs/pi). maxTokens 32,768: https://nan.builders/docs/pi declares 32768 for every 1M-context NaN model (vendor limit 65,536 on models.dev provider tencent-tokenhub). input text+image per models.dev provider tencent-tokenhub (hy4), reasoning model per the vendor. Existence: live GET https://api.nan.builders/v1/models (checked 2026-11-10); the docs https://nan.builders/docs/models, https://nan.builders/docs/pi and https://nan.builders/openapi.json do not list it yet. reasoningEffortValues [] and no thinkingLevelMap: the gateway's reasoning_effort handling for external providers is unmeasured. cost 0 per maintainer decision.",
728
- "manual-only: \"kimi-k3.1-pro\" not yet on models.dev provider nan (NaN external-provider model launched 2026-11-10, listed by the live GET /v1/models but absent from models.dev provider nan and the NaN docs).",
729
- "NaN external-provider model launched 2026-11-10. contextWindow 1,048,576: NaN pricing page card '1M context' (maintainer screenshot, 2026-11-10) with NaN's 1M = 1,048,576 convention (https://nan.builders/docs/pi). maxTokens 32,768: https://nan.builders/docs/pi declares 32768 for every 1M-context NaN model (vendor limit 1,048,576 on models.dev provider moonshotai). input text+image per models.dev provider moonshotai (kimi-k3.1-pro), reasoning model per the vendor. Existence: live GET https://api.nan.builders/v1/models (checked 2026-11-10); the docs https://nan.builders/docs/models, https://nan.builders/docs/pi and https://nan.builders/openapi.json do not list it yet. reasoningEffortValues [] and no thinkingLevelMap: the gateway's reasoning_effort handling for external providers is unmeasured. cost 0 per maintainer decision.",
730
- "thinkingLevelMap { off: \"none\" } (live re-probe 2026-10-14): the docs list this model as 'accepted, depth not adjustable', but the gateway makes the parameter effective at the off end — `none` gave 0 reasoning tokens / a full answer, while `low` gave 22 reasoning tokens and omitting the parameter gave 17. Measured behavior wins over the docs, so `thinking: off` now sends reasoning_effort:\"none\" and actually disables reasoning. No other level was sampled, so only `off` is mapped.",
1044
+ "cost 0 on every model: NaN bills a credit pool (1 credit ≈ 0.026 €) rather than per-token USD, so pi's per-token cost estimate does not apply. models.dev provider nan started publishing a derived USD conversion on 2026-11-17; it is not a price NaN charges, so it is not adopted (delete NAN_CATALOG_COST in scripts/generate-models.ts to adopt it).",
1045
+ "contextWindow 1,048,576: NaN docs state '1M token context' for this model (https://nan.builders/docs/models, checked 2026-11-17). models.dev lists 1,000,000, a rounded form of the same window; the docs value is authoritative (maintainer instruction: docs win over models.dev, which a user updates later). input includes image: NaN serves the Vision-Exp variant ('takes images as input', https://nan.builders/docs/models; the image_url content-parts in https://nan.builders/openapi.json list deepseek-v4-flash among the vision models). models.dev provider nan also lists text+image, so this stays a pin for the vision capability rather than a divergence. maxTokens 32768 per the official NaN pi docs (https://nan.builders/docs/pi, 'the same set the NaN CLI writes', checked 2026-10-02) closing issue #20 — the gateway rejects max_tokens above ~256k for this model with 403 permission_error (measured 2026-10-02: 256,000 → 200; 262,143 → 403), and the previous models.dev-derived 384000 made every pi request fail because pi-ai sends max_tokens = model.maxTokens by default. models.dev still lists 384000, so this override pins the documented value. reasoningEffortValues: the docs say 'none turns it off · minimal to max' and the contract table says the other values 'steer how much it reasons. They are hints the model follows, not hard caps' (https://nan.builders/docs/models#controlling-reasoning, checked 2026-11-17), so the documented ladder is declared. The measurement behind issue #16 stays the load-bearing fact and is unchanged: only \"none\" suppresses reasoning (0 reasoning tokens with a full answer; `low` 57, omitted 63, `minimal` 109 — re-probed live 2026-10-14), which is why thinkingLevelMap.off is \"none\". thinkingLevelMap { off: \"none\" } (issue #16, measured 2026-09-27): when pi maps reasoning:\"off\" to reasoningEffort:undefined, the thinkingLevelMap.off=\"none\" supplies the effort so the gateway receives reasoning_effort:\"none\" and does NOT enter runaway reasoning mode.",
1046
+ "DeepSeek V4-Pro (0813 version), documented in https://nan.builders/docs/models (checked 2026-11-17; models.dev provider nan lists it since 2026-11-10). contextWindow 1,048,576 ('1M token context'). maxTokens 393,216: the card says 'Max answer 393K tokens', the same 393,216 the docs clamp deepseek-v4-flash to; models.dev nan reports 384,000, so the docs value wins (maintainer instruction: docs are the source of truth). input text only per the card ('text generation & chat · reasoning'). Reasoning: the card only says 'Reasoning model', and the docs state the `none` aliases are NOT mapped on this model, so no reasoningEffortValues and no thinkingLevelMap are declared. Cost 0 per maintainer decision (NaN bills credits, not per-token USD).",
1047
+ "manual-only: \"deepseek-v4-pro\" skipped: models.dev provider \"nan\" now lists it, so the manual-only entry is not emitted and the models.dev values are used (NaN larger model documented in https://nan.builders/docs/models (checked 2026-11-17) and listed by the live GET https://api.nan.builders/v1/models (checked 2026-11-17), but absent from models.dev provider nan)",
1048
+ "thinkingLevelMap { off: \"none\" } (issue #16): NaN docs state that with no reasoning_effort parameter gemma4 defaults to reasoning ON (16,384-token budget), while `none`/`minimal` skip reasoning entirely (https://nan.builders/docs/models#controlling-reasoning, checked 2026-11-17). pi maps reasoning:\"off\" to reasoningEffort:undefined, so without this map `thinking: off` sent no parameter and the model reasoned anyway; the map sends reasoning_effort:\"none\" and actually disables reasoning. reasoningEffortValues: the contract table documents the whole ladder (low 2,048, medium 8,192, high 16,384, xhigh and max 32,768 reasoning tokens on Chat Completions).",
1049
+ "general catalog model since 2026-11-10: NaN announced it no longer has tier-exclusive models ('a partir de ahora ya NO habrá modelos exclusivos por tier'), and the live GET https://api.nan.builders/v1/models lists glm5.3 for a non-premium key (checked 2026-11-10). input text only: the model card says 'Text only: text in, text out, with no image, audio, video or file input; a request carrying one answers 400, earlier turns of the conversation included', and https://nan.builders/docs/pi declares the same 'input': ['text'] (https://nan.builders/docs/models, checked 2026-11-17). The earlier override declared text+image from the 2026-10-14 card; models.dev also lists it text-only now, so this is a correction of a stale value, not a divergence. contextWindow 1,048,576 ('1M token context'). maxTokens 131,072: models.dev's documented maximum; the docs' own pi/OpenCode blocks publish 32,768 and describe that field as 'a client-side budget rather than a server cap' (https://nan.builders/docs/opencode), so the larger model maximum stays. reasoningEffortValues minimal..max and thinkingLevelMap { off: 'minimal' }: the card says 'reasoning_effort: minimal to max; always reasons, none is applied as minimal' (checked 2026-11-17), so `thinking: off` sends the shortest reasoning the gateway honours. The previous map sent 'low' because the stale docs listed low as the floor. name 'GLM 5.3' per the docs (models.dev says 'GLM-5.3').",
1050
+ "contextWindow 1,048,576 ('1M token context') and maxTokens 131,072: the docs state that an output budget above this model's maximum is lowered to 131072, so 131,072 is its documented ceiling (https://nan.builders/docs/models, checked 2026-11-17); models.dev lists the rounded 1,000,000 window. thinkingLevelMap { off: \"minimal\" }: the card says 'reasoning_effort: minimal to max; always reasons, none is applied as minimal' — the gateway never stops reasoning on this model. issue #16 measured the same effect on 2026-09-27: 'minimal' yields ~38 reasoning tokens with an answer, while 'none' does not suppress it (13,382 tokens). reasoningEffortValues minimal..max per the card, xhigh included (the docs' value ladder runs none, minimal, low, medium, high, xhigh, max).",
1051
+ "Hy4, Tencent's Hunyuan 4, documented in https://nan.builders/docs/models (checked 2026-11-17; models.dev provider nan lists it since 2026-11-10). contextWindow 1,048,576 ('1M token context'). maxTokens 65,536: the card says 'Max answer 64K tokens' and models.dev provider nan reports the same 65,536, so it is no longer the flat 32,768 default. input text+image, reasoning true. Reasoning: the card says 'Reasons by default; if you send no reasoning_effort (nor an alias) we apply low, and your own value always wins', and the aliases ARE mapped on this model, so thinkingLevelMap { off: 'none' } supplies the documented off switch ('To turn reasoning off, send none ... it works on every model except GLM'). No other level is documented for it, so reasoningEffortValues declares only 'none'. Cost 0 per maintainer decision (NaN bills credits, not per-token USD).",
1052
+ "manual-only: \"hy4\" skipped: models.dev provider \"nan\" now lists it, so the manual-only entry is not emitted and the models.dev values are used (NaN larger model documented in https://nan.builders/docs/models (checked 2026-11-17) and listed by the live GET https://api.nan.builders/v1/models (checked 2026-11-17), but absent from models.dev provider nan)",
1053
+ "manual-only: \"hy4-flash\" not yet on models.dev provider nan (NaN larger model documented in https://nan.builders/docs/models (checked 2026-11-17) and listed by the live GET https://api.nan.builders/v1/models (checked 2026-11-17), but absent from models.dev provider nan).",
1054
+ "Hy4 Flash, Tencent's fast Hunyuan 4, documented in https://nan.builders/docs/models (checked 2026-11-17) and listed by the live GET https://api.nan.builders/v1/models (checked 2026-11-17); models.dev provider nan does not list it, so it enters as a manual-only entry. contextWindow 1,048,576: the card says '1M token context' and NaN's 1M convention is 1,048,576 (https://nan.builders/docs/pi), which the first-party models.dev entry openrouter/tencent/hy4-flash also reports. maxTokens 65,536: the card says 'Max answer 64K tokens' (64K = 65,536), and its reasoning section says 'max_tokens bounds reasoning plus answer, up to 64,000', so the classic max_tokens field stays. input text+image and reasoning true per the card ('Tool calling and reasoning'). The docs keep this model out of the effort table ('Reasons by default, with no default level applied ... To turn reasoning off send reasoning_effort: none; the model ignores enable_thinking on its own'), so reasoningEffortValues declares only the documented off value and thinkingLevelMap { off: 'none' } puts it on the wire. Cost 0 per maintainer decision (NaN bills credits, not per-token USD).",
1055
+ "Kimi K3.1 Pro, documented in https://nan.builders/docs/models (checked 2026-11-17; models.dev provider nan lists it since 2026-11-10). contextWindow 1,048,576 ('1M token context') and maxTokens 1,048,576 ('Max answer 1M tokens', which models.dev nan reports as limit.output) — pi-ai clamps the outgoing budget with clampMaxTokensToContext, so declaring the documented maximum never sends an over-context max_tokens. input text+image per the card. Reasoning: the card only says 'Reasoning model', and the docs keep this model out of the effort contract while stating that the `none` aliases are NOT mapped on it, so no reasoningEffortValues and no thinkingLevelMap are declared: pi sends no reasoning_effort and the model's own behaviour decides. Cost 0 per maintainer decision (NaN bills credits, not per-token USD).",
1056
+ "manual-only: \"kimi-k3.1-pro\" skipped: models.dev provider \"nan\" now lists it, so the manual-only entry is not emitted and the models.dev values are used (NaN larger model documented in https://nan.builders/docs/models (checked 2026-11-17) and listed by the live GET https://api.nan.builders/v1/models (checked 2026-11-17), but absent from models.dev provider nan)",
1057
+ "reasoningEffortValues none/low/medium/high/max: the card says 'reasoning_effort: none turns it off · low to max', and the contract table says 'minimal is applied as low and xhigh as max' (https://nan.builders/docs/models#controlling-reasoning, checked 2026-11-17), so only the values with their own meaning are declared. thinkingLevelMap { off: \"none\" } (live re-probe 2026-10-14): the 2026-10-14 docs called the parameter 'accepted, depth not adjustable', but the gateway makes it effective at the off end — `none` gave 0 reasoning tokens / a full answer, while `low` gave 22 reasoning tokens and omitting the parameter gave 17. Measured behavior wins over the docs, so `thinking: off` sends reasoning_effort:\"none\" and actually disables reasoning.",
731
1058
  "manual-only: \"mimo-v2.6-flash\" skipped: models.dev provider \"nan\" now lists it, so the manual-only entry is not emitted and the models.dev values are used (omnimodal model (text, image, audio input) served by NaN; limits and modalities from https://nan.builders/docs/models#mimo-v2-6-flash (checked 2026-09-25, quotas re-checked 2026-09-29): 1,048,576 context / 131,072 max output / 1.0B monthly quota per member. Tool calling: yes. Streaming: yes. Input modalities (pi-representable): text, image (audio not representable in pi's Model type). Fallback entry: emitted only while models.dev provider nan does not list the model — models.dev started listing it on 2026-09-29, so the generator then keeps the models.dev values and attaches this note to that entry instead of emitting a second one.)",
732
- "thinkingLevelMap { off: \"none\" } (issue #16): NaN docs state that with no reasoning_effort parameter every model uses its own default and that default is reasoning ON for qwen3.6 (16,384-token budget), while `none` and `minimal` skip the reasoning phase entirely (https://nan.builders/docs/models#controlling-reasoning, checked 2026-10-01). pi maps reasoning:\"off\" to reasoningEffort:undefined, so without this map `thinking: off` sent no parameter and the model reasoned anyway; the map sends reasoning_effort:\"none\" and actually disables reasoning.",
733
- "contextWindow 1,048,576: NaN docs state '1M token context (1,048,576 tokens)' and 'Max answer 131K tokens' (https://nan.builders/docs/models, checked 2026-10-14) — models.dev still lists 262,144. The earlier override was withdrawn 2026-09-07 when the docs read '262K token context, the model's native window'; the docs now state 1M and they are the source of truth (maintainer instruction: docs win over models.dev, which a user updates later). maxTokens stays 131,072, which models.dev already matches and the docs confirm as the 131K max answer. maxTokensField 'max_completion_tokens' (issue #34, NaN maintainer confirmation received 2026-11-11, quoted verbatim in the issue): on this model max_tokens does NOT bound the reasoning phase, the excess bills against the quota (it explained the 796M tokens against the 500M cap in the 2026-09-27 /v1/usage survey), and max_completion_tokens IS respected as the interim bound. The published OpenAPI schema still documents only max_tokens, so the strict-schema sanitizer exempts this model from its max_completion_tokens→max_tokens rename at request time (SanitizerOptions.preserveMaxCompletionTokens, wired from compat.maxTokensField in src/provider-factory.ts). REVERT: once NaN ships their prepared gateway fix, remove this override — test/issue-34-max-completion-tokens.test.ts fails on purpose until it is removed; accepting max_completion_tokens on the other flash models is unverified live (permission-gated probe needed), so the scope stays this one model.",
734
- "manual-only: \"qwen3.8-max\" not yet on models.dev provider nan (NaN external-provider model launched 2026-11-10, listed by the live GET /v1/models but absent from models.dev provider nan and the NaN docs).",
735
- "NaN external-provider model launched 2026-11-10. contextWindow 1,000,000: NaN pricing page card says '1M context' (maintainer screenshot, 2026-11-10); the first-party vendor value on models.dev provider alibaba (qwen3.8-max) is 1,000,000, the smaller of it and NaN's 1M = 1,048,576 convention (https://nan.builders/docs/pi), so the vendor value is used. maxTokens 32,768: https://nan.builders/docs/pi declares 32768 for every 1M-context NaN model (vendor limit 131,072 on models.dev provider alibaba). input text+image per models.dev provider alibaba (qwen3.8-max), reasoning model per the vendor. Existence: live GET https://api.nan.builders/v1/models (checked 2026-11-10); the docs https://nan.builders/docs/models, https://nan.builders/docs/pi and https://nan.builders/openapi.json do not list it yet. reasoningEffortValues [] and no thinkingLevelMap: the gateway's reasoning_effort handling for external providers is unmeasured. cost 0 per maintainer decision."
1059
+ "thinkingLevelMap { off: \"none\" } (issue #16): NaN docs state that with no reasoning_effort parameter every model uses its own default and that default is reasoning ON for qwen3.6 (16,384-token budget), while `none` and `minimal` skip the reasoning phase entirely (https://nan.builders/docs/models#controlling-reasoning, checked 2026-11-17). pi maps reasoning:\"off\" to reasoningEffort:undefined, so without this map `thinking: off` sent no parameter and the model reasoned anyway; the map sends reasoning_effort:\"none\" and actually disables reasoning. reasoningEffortValues: the contract table documents the whole ladder (low 2,048, medium 8,192, high 16,384, xhigh and max 32,768 reasoning tokens on Chat Completions).",
1060
+ "contextWindow 1,048,576: NaN docs state '1M token context (1,048,576 tokens)' and 'Max answer 131K tokens' (https://nan.builders/docs/models, checked 2026-11-17) — models.dev still lists 262,144. The earlier override was withdrawn 2026-09-07 when the docs read '262K token context, the model's native window'; the docs now state 1M and they are the source of truth (maintainer instruction: docs win over models.dev, which a user updates later). maxTokens stays 131,072, which models.dev already matches and the docs confirm as the 131K max answer. maxTokensField 'max_completion_tokens' (issue #34, NaN maintainer confirmation received 2026-11-11, quoted verbatim in the issue): on this model max_tokens does NOT bound the reasoning phase, the excess bills against the quota (it explained the 796M tokens against the 500M cap in the 2026-09-27 /v1/usage survey), and max_completion_tokens IS respected as the interim bound. The published OpenAPI schema still documents only max_tokens, so the strict-schema sanitizer exempts this model from its max_completion_tokens→max_tokens rename at request time (SanitizerOptions.preserveMaxCompletionTokens, wired from compat.maxTokensField in src/provider-factory.ts). REVERT: once NaN ships their prepared gateway fix, remove this override — test/issue-34-max-completion-tokens.test.ts is the tripwire. reasoningEffortValues none..max and thinkingLevelMap { off: 'none' }: the card says 'Reasoning on by default (reasoning_effort: none turns it off · minimal to max)' and the contract table says 'Off. No reasoning tokens' for `none` (https://nan.builders/docs/models, checked 2026-11-17), so `thinking: off` now actually disables reasoning. The earlier note said the parameter was 'accepted, depth not adjustable' with no map, which was true of the 2026-10-14 docs; the model card and the contract table now state the opposite and the docs win.",
1061
+ "Qwen3.8 Max, documented in https://nan.builders/docs/models (checked 2026-11-17; models.dev provider nan lists it since 2026-11-10). contextWindow 1,000,000: the card says '1M token context' and the first-party vendor value on models.dev provider alibaba (qwen3.8-max) is 1,000,000 — the smaller of that and NaN's 1M = 1,048,576 convention (https://nan.builders/docs/pi). maxTokens 131,072: the card says 'Max answer 131K tokens'. maxTokensField 'max_completion_tokens': the docs state that on this model 'max_tokens only bounds the visible answer: the reasoning comes on top of it. To cap the total (reasoning plus answer, and so the cost) use max_completion_tokens' — the quota blowout issue #34 fixed for qwen3.8-flash, same fix, same sanitizer exemption (SanitizerOptions.preserveMaxCompletionTokens, wired from compat.maxTokensField in src/provider-factory.ts). input text+image per the card. Reasoning: the docs say 'none turns it off' for this model, so reasoningEffortValues declares 'none' and thinkingLevelMap { off: 'none' } sends it when pi maps reasoning:'off' to undefined. Cost 0 per maintainer decision (NaN bills credits, not per-token USD).",
1062
+ "manual-only: \"qwen3.8-max\" skipped: models.dev provider \"nan\" now lists it, so the manual-only entry is not emitted and the models.dev values are used (NaN larger model documented in https://nan.builders/docs/models (checked 2026-11-17) and listed by the live GET https://api.nan.builders/v1/models (checked 2026-11-17), but absent from models.dev provider nan)",
1063
+ "manual-only: \"qwen4-max\" not yet on models.dev provider nan (NaN larger model documented in https://nan.builders/docs/models (checked 2026-11-17) and listed by the live GET https://api.nan.builders/v1/models (checked 2026-11-17), but absent from models.dev provider nan).",
1064
+ "Qwen4 Max, Alibaba's Qwen 4 flagship, documented in https://nan.builders/docs/models (checked 2026-11-17) and listed by the live GET https://api.nan.builders/v1/models (checked 2026-11-17); models.dev provider nan does not list it, so it enters as a manual-only entry. contextWindow 1,000,000: the card says '1M token context' and both first-party vendor entries on models.dev (vercel/alibaba/qwen4-max and openrouter/qwen/qwen4-max) say 1,000,000 — the smaller of that and NaN's 1M = 1,048,576 convention (https://nan.builders/docs/pi), the same rule qwen3.8-max follows. maxTokens 131,072: the card says 'Max answer 131K tokens' and the reasoning section says 'max_tokens bounds the total, reasoning plus answer, up to 131,000'. input text+image and reasoning true per the card. Reasoning: the card says 'reasoning_effort: none turns it off · minimal to max', and the reasoning section repeats that none turns it off on this model, so reasoningEffortValues declares the documented ladder and thinkingLevelMap { off: 'none' } supplies the off switch when pi maps reasoning:'off' to undefined. Cost 0 per maintainer decision (NaN bills credits, not per-token USD)."
736
1065
  ],
737
1066
  } as const;