@molecule/api-resource-ai-models 1.20.1 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-11-04T14:19:59.553Z
6
+ Generated: 2026-11-18T16:18:51.959Z
7
7
  -->
8
8
 
9
9
  # @molecule/api-resource-ai-models
@@ -112,9 +112,15 @@ interface ModelDefinition {
112
112
  webSearchToolType?: string
113
113
  /** USD per 1,000 web searches the provider bills on top of tokens, applied to `TokenUsage.webSearchRequests`. */
114
114
  webSearchPricePer1k?: number
115
- /** Provider-specific server tool type for code execution (e.g. `'code_execution_20250825'`). */
115
+ /**
116
+ * Provider-specific server tool type for code execution (e.g. `'code_execution_20250825'`).
117
+ * Omit if the model / provider does not support native code execution.
118
+ */
116
119
  codeExecutionToolType?: string
117
- /** Provider-specific server tool type for web fetch / URL context (e.g. `'web_fetch_20260209'`). */
120
+ /**
121
+ * Provider-specific server tool type for web fetch / URL context (e.g. `'web_fetch_20260209'`).
122
+ * Omit if the model / provider does not support native web fetch.
123
+ */
118
124
  webFetchToolType?: string
119
125
  /** Whether this model is available on the free tier (only one model should be true). */
120
126
  freeTier?: boolean
@@ -170,7 +176,11 @@ interface ModelDefinition {
170
176
  excludedDatesUtc?: string[]
171
177
  rule?: { url: string; text: string }
172
178
  }
173
- /** Long-context band from `effectiveFrom` (omitted → the model's existing band carries through unchanged). */
179
+ /**
180
+ * Long-context band from `effectiveFrom` (omitted → the model's existing
181
+ * band carries through unchanged). Indexed off the model-level field so
182
+ * the two shapes can never drift apart.
183
+ */
174
184
  longContextPricing?: ModelDefinition['longContextPricing']
175
185
  /** Where the change was announced, for the re-verify pass after it lands. */
176
186
  source?: string
@@ -210,7 +220,7 @@ interface ModelDefinition {
210
220
  }
211
221
  ```
212
222
 
213
- _(Member comments are shortened to their first sentence to fit; the full declaration is in `node_modules/@molecule/api-resource-ai-models/dist/types.d.ts`.)_
223
+ _(The 21 longest member comments are shortened to their first sentence to fit; the full declaration is in `node_modules/@molecule/api-resource-ai-models/dist/types.d.ts`.)_
214
224
 
215
225
  #### `ModeModelDefaults`
216
226
 
package/dist/models.d.ts CHANGED
@@ -186,6 +186,28 @@ import type { ModelDefinition } from './types.js';
186
186
  * the Responses API" — the same shape as gpt-6.1-sol, served by the bond's
187
187
  * /v1/responses calls. Supersedes gpt-5.6-terra, same tier at $2/$12,
188
188
  * repointed from gpt-6.1-sol.)
189
+ * (verified 2026-11-18 on the pricing page + the gpt-6.2-astra model page:
190
+ * ADDED gpt-6.2-astra ($8/$40, cached $0.40 — 5% of input — cache writes
191
+ * $10; >272K band $16/$60, cached $0.80, writes $20 not modeled; 1.05M ctx /
192
+ * 128K out; image input; knowledge cutoff May 18 2026; effort
193
+ * low|medium|high|xhigh|max with NO 'none' — live-probed on /v1/responses
194
+ * with tools at every level 2026-11-18, and the 'none' rejection's error
195
+ * names exactly those five; temperature → 400; forced tool_choice → 200).
196
+ * It supersedes gpt-6-astra (the same flagship tier at $10/$50). The 5.6-sol
197
+ * promo footnote now reads "available until November 30, 2026" — the
198
+ * KNOWN_DIVERGENCES expiry in check-model-freshness.mjs was extended to
199
+ * match. Web search stays $10/1k calls on reasoning models.)
200
+ * (verified 2026-11-18 on the pricing page + the gpt-6.2-sol model page:
201
+ * ADDED gpt-6.2-sol ($2/$10, cached $0.10 — 5% of input — cache writes
202
+ * $2.50; >272K band $4/$15, cached $0.20, writes $5 not modeled; 1.05M ctx /
203
+ * 128K out; image input; knowledge cutoff Jun 1 2026; effort
204
+ * low|medium|high|xhigh|max with NO 'none' — the model page states the API
205
+ * rejects 'none', and all five levels were probed live with tools on
206
+ * /v1/responses 2026-11-18; temperature → 400; forced tool_choice → 200).
207
+ * It supersedes gpt-6.1-sol (same $2/$10 tier, newer generation); gpt-6-sol
208
+ * / 5.6-sol / 5.5 / 5.4 repointed one hop to it. No GPT-6.2 terra or luna id
209
+ * exists on either page. The 5.6-sol promo footnote ("until November 30,
210
+ * 2026") and web-search price are unchanged.)
189
211
  * - Google: https://ai.google.dev/gemini-api/docs/pricing (gemini-3.6-flash GA
190
212
  * 2026-07-21 $1.50/$7.50 supersedes 3.5-flash as the agentic flagship;
191
213
  * gemini-3.1-pro-preview still the pro tier — "3.5 Pro" has NOT shipped as
@@ -255,11 +277,17 @@ import type { ModelDefinition } from './types.js';
255
277
  * cataloged superseded by grok-4.7.
256
278
  * grok-4.5 still served at $2/$6, cached $0.30; grok-4.3 still served at
257
279
  * $1.25/$2.50 with the bigger 1M window; grok-code-fast-1 no longer listed)
258
- * - Chinese public holidays (DeepSeek's peak excludes them):
259
- * https://www.12371.gov.cn/web/article/web/content_1451614684968525824.html
260
- * (the State Council's 2026 notice; see CHINA_PUBLIC_HOLIDAYS)
280
+ * - Chinese public holidays (DeepSeek's peak excludes them): the State
281
+ * Council's notices — 2026 at
282
+ * https://www.12371.gov.cn/web/article/web/content_1451614684968525824.html,
283
+ * 2027 (published 2026-11-05, read 2026-11-17) at
284
+ * https://paper.people.com.cn/rmrb/pc/content/202611/06/content_30189674.html
285
+ * (see CHINA_PUBLIC_HOLIDAYS)
261
286
  * - DeepSeek: https://api-docs.deepseek.com/quick_start/pricing +
262
- * /updates/ (verified 2026-10-20 — the whole rate card RE-READ, unchanged:
287
+ * /updates/ (2026-11-17: the 2027 State Council holiday notice landed above —
288
+ * no DeepSeek card change; this morning's freshness-gate chunk read found the
289
+ * peak-rule sentence and every price unchanged, so the 2026-10-20
290
+ * verification stands. Earlier, verified 2026-10-20 — the whole rate card RE-READ, unchanged:
263
291
  * pro 0.66/1.98/0.022 off-peak ×2 peak, flash 0.15/0.6/0.003, peak windows
264
292
  * and the Chinese-public-holidays exclusion verbatim as before. The page is
265
293
  * now a client-rendered SPA — its HTML is an app shell and the card text
@@ -374,6 +402,24 @@ import type { ModelDefinition } from './types.js';
374
402
  * model page still describes it (docs lag the endpoint). The catalog entry
375
403
  * dropped its cn region and is now US/DeepInfra-only, whose rates re-verified
376
404
  * unchanged the same day: $0.30/$1, cache read 0.3333× input.)
405
+ * (re-verified 2026-11-17 across the provider's own pages: qwen4-max
406
+ * (released 2026-11-16) ADDED. alibabacloud.com/help/en/model-studio/
407
+ * qwen4-max + the EN model-pricing page: Singapore intl $1.5/$4.5 with
408
+ * explicit/implicit cache read $0.075 (5% of input) and every Global region
409
+ * at $1.413/$4.24 with cache read $0.071 — the ZH context-cache doc lists
410
+ * qwen4-max OUTSIDE its standard 20% cache-read table and defers to the
411
+ * console, whose per-region figures the pricing page publishes (explicit
412
+ * 5m creation 125%, 1h 200%; implicit creation 1× input). 1M ctx / 131,072
413
+ * out (262,144 thinking), Text+Image+Video input in every region, hybrid
414
+ * thinking ON by default (thinking_budget, native reasoning_effort
415
+ * low|high|xhigh exists but the bond sends the budget form), parallel tool
416
+ * calling. US = DeepInfra (Qwen/Qwen4-Max), read live the same day off
417
+ * api.deepinfra.com/models/Qwen/Qwen4-Max: $1.413/$4.24, cache read
418
+ * 0.0502477× input = $0.071, no write premium, multimodal + input-video
419
+ * tags, and the host's live list carries exactly one qwen4 id (no dated
420
+ * snapshot sibling). Knowledge cutoff: not published by either host —
421
+ * best-effort estimate. qwen4-max supersedes qwen3.8-max: same
422
+ * agentic-flagship tier, cheaper at list on both hosts.)
377
423
  * - Zhipu: https://docs.z.ai/guides/overview/pricing + docs.z.ai/guides/llm/
378
424
  * glm-5.3 (verified 2026-08-26: glm-5.3 shipped 2026-08-14 and IS in the
379
425
  * catalog — $1.40/$4.40, cached $0.26, i.e. glm-5.2's card unchanged, 1M ctx,
@@ -1 +1 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AA2DjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqaG;AACH,eAAO,MAAM,MAAM,EAAE,SAAS,eAAe,EAqrFnC,CAAA"}
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAwEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmdG;AACH,eAAO,MAAM,MAAM,EAAE,SAAS,eAAe,EAs1FnC,CAAA"}
package/dist/models.js CHANGED
@@ -44,8 +44,14 @@ function dateRange(from, to) {
44
44
  * 2026-09-23). Those windows are 09:00–12:00 and 14:00–18:00 Beijing time, so
45
45
  * the Beijing holiday date IS the UTC date of every window.
46
46
  *
47
- * Source — the State Council's notice for 2026 (国办发明电〔2025〕7号), read
48
- * 2026-09-23 at https://www.12371.gov.cn/web/article/web/content_1451614684968525824.html.
47
+ * Sources — the State Council's notices, 放假 ranges verbatim:
48
+ * - 2026 (国办发明电〔2025〕7号), read 2026-09-23 at
49
+ * https://www.12371.gov.cn/web/article/web/content_1451614684968525824.html
50
+ * - 2027 (published 2026-11-05), read 2026-11-17 at
51
+ * https://paper.people.com.cn/rmrb/pc/content/202611/06/content_30189674.html
52
+ * (People's Daily reproduction of the 新华社 dispatch; cross-checked against
53
+ * news.ifeng.com/c/8xoAMrtRK7T — all seven clauses and the 2026-11-05 date
54
+ * identical, and every 放假 weekday annotation matches the 2027 calendar).
49
55
  * Make-up working days (调休 weekends) need no entry: the peak is Mon–Fri only.
50
56
  *
51
57
  * ADD NEXT YEAR'S DATES when the State Council publishes them (each November);
@@ -59,6 +65,13 @@ const CHINA_PUBLIC_HOLIDAYS = [
59
65
  ...dateRange('2026-06-19', '2026-06-21'), // 端午节
60
66
  ...dateRange('2026-09-25', '2026-09-27'), // 中秋节
61
67
  ...dateRange('2026-10-01', '2026-10-07'), // 国庆节
68
+ ...dateRange('2027-01-01', '2027-01-03'), // 元旦
69
+ ...dateRange('2027-02-05', '2027-02-13'), // 春节 (除夕 to 正月初八, 9 days)
70
+ ...dateRange('2027-04-03', '2027-04-05'), // 清明节
71
+ ...dateRange('2027-05-01', '2027-05-05'), // 劳动节
72
+ ...dateRange('2027-06-09', '2027-06-09'), // 端午节 (single day)
73
+ ...dateRange('2027-09-15', '2027-09-15'), // 中秋节 (single day)
74
+ ...dateRange('2027-10-01', '2027-10-07'), // 国庆节
62
75
  ];
63
76
  /**
64
77
  * All available AI models, grouped by provider, ordered from most to least capable.
@@ -238,6 +251,28 @@ const CHINA_PUBLIC_HOLIDAYS = [
238
251
  * the Responses API" — the same shape as gpt-6.1-sol, served by the bond's
239
252
  * /v1/responses calls. Supersedes gpt-5.6-terra, same tier at $2/$12,
240
253
  * repointed from gpt-6.1-sol.)
254
+ * (verified 2026-11-18 on the pricing page + the gpt-6.2-astra model page:
255
+ * ADDED gpt-6.2-astra ($8/$40, cached $0.40 — 5% of input — cache writes
256
+ * $10; >272K band $16/$60, cached $0.80, writes $20 not modeled; 1.05M ctx /
257
+ * 128K out; image input; knowledge cutoff May 18 2026; effort
258
+ * low|medium|high|xhigh|max with NO 'none' — live-probed on /v1/responses
259
+ * with tools at every level 2026-11-18, and the 'none' rejection's error
260
+ * names exactly those five; temperature → 400; forced tool_choice → 200).
261
+ * It supersedes gpt-6-astra (the same flagship tier at $10/$50). The 5.6-sol
262
+ * promo footnote now reads "available until November 30, 2026" — the
263
+ * KNOWN_DIVERGENCES expiry in check-model-freshness.mjs was extended to
264
+ * match. Web search stays $10/1k calls on reasoning models.)
265
+ * (verified 2026-11-18 on the pricing page + the gpt-6.2-sol model page:
266
+ * ADDED gpt-6.2-sol ($2/$10, cached $0.10 — 5% of input — cache writes
267
+ * $2.50; >272K band $4/$15, cached $0.20, writes $5 not modeled; 1.05M ctx /
268
+ * 128K out; image input; knowledge cutoff Jun 1 2026; effort
269
+ * low|medium|high|xhigh|max with NO 'none' — the model page states the API
270
+ * rejects 'none', and all five levels were probed live with tools on
271
+ * /v1/responses 2026-11-18; temperature → 400; forced tool_choice → 200).
272
+ * It supersedes gpt-6.1-sol (same $2/$10 tier, newer generation); gpt-6-sol
273
+ * / 5.6-sol / 5.5 / 5.4 repointed one hop to it. No GPT-6.2 terra or luna id
274
+ * exists on either page. The 5.6-sol promo footnote ("until November 30,
275
+ * 2026") and web-search price are unchanged.)
241
276
  * - Google: https://ai.google.dev/gemini-api/docs/pricing (gemini-3.6-flash GA
242
277
  * 2026-07-21 $1.50/$7.50 supersedes 3.5-flash as the agentic flagship;
243
278
  * gemini-3.1-pro-preview still the pro tier — "3.5 Pro" has NOT shipped as
@@ -307,11 +342,17 @@ const CHINA_PUBLIC_HOLIDAYS = [
307
342
  * cataloged superseded by grok-4.7.
308
343
  * grok-4.5 still served at $2/$6, cached $0.30; grok-4.3 still served at
309
344
  * $1.25/$2.50 with the bigger 1M window; grok-code-fast-1 no longer listed)
310
- * - Chinese public holidays (DeepSeek's peak excludes them):
311
- * https://www.12371.gov.cn/web/article/web/content_1451614684968525824.html
312
- * (the State Council's 2026 notice; see CHINA_PUBLIC_HOLIDAYS)
345
+ * - Chinese public holidays (DeepSeek's peak excludes them): the State
346
+ * Council's notices — 2026 at
347
+ * https://www.12371.gov.cn/web/article/web/content_1451614684968525824.html,
348
+ * 2027 (published 2026-11-05, read 2026-11-17) at
349
+ * https://paper.people.com.cn/rmrb/pc/content/202611/06/content_30189674.html
350
+ * (see CHINA_PUBLIC_HOLIDAYS)
313
351
  * - DeepSeek: https://api-docs.deepseek.com/quick_start/pricing +
314
- * /updates/ (verified 2026-10-20 — the whole rate card RE-READ, unchanged:
352
+ * /updates/ (2026-11-17: the 2027 State Council holiday notice landed above —
353
+ * no DeepSeek card change; this morning's freshness-gate chunk read found the
354
+ * peak-rule sentence and every price unchanged, so the 2026-10-20
355
+ * verification stands. Earlier, verified 2026-10-20 — the whole rate card RE-READ, unchanged:
315
356
  * pro 0.66/1.98/0.022 off-peak ×2 peak, flash 0.15/0.6/0.003, peak windows
316
357
  * and the Chinese-public-holidays exclusion verbatim as before. The page is
317
358
  * now a client-rendered SPA — its HTML is an app shell and the card text
@@ -426,6 +467,24 @@ const CHINA_PUBLIC_HOLIDAYS = [
426
467
  * model page still describes it (docs lag the endpoint). The catalog entry
427
468
  * dropped its cn region and is now US/DeepInfra-only, whose rates re-verified
428
469
  * unchanged the same day: $0.30/$1, cache read 0.3333× input.)
470
+ * (re-verified 2026-11-17 across the provider's own pages: qwen4-max
471
+ * (released 2026-11-16) ADDED. alibabacloud.com/help/en/model-studio/
472
+ * qwen4-max + the EN model-pricing page: Singapore intl $1.5/$4.5 with
473
+ * explicit/implicit cache read $0.075 (5% of input) and every Global region
474
+ * at $1.413/$4.24 with cache read $0.071 — the ZH context-cache doc lists
475
+ * qwen4-max OUTSIDE its standard 20% cache-read table and defers to the
476
+ * console, whose per-region figures the pricing page publishes (explicit
477
+ * 5m creation 125%, 1h 200%; implicit creation 1× input). 1M ctx / 131,072
478
+ * out (262,144 thinking), Text+Image+Video input in every region, hybrid
479
+ * thinking ON by default (thinking_budget, native reasoning_effort
480
+ * low|high|xhigh exists but the bond sends the budget form), parallel tool
481
+ * calling. US = DeepInfra (Qwen/Qwen4-Max), read live the same day off
482
+ * api.deepinfra.com/models/Qwen/Qwen4-Max: $1.413/$4.24, cache read
483
+ * 0.0502477× input = $0.071, no write premium, multimodal + input-video
484
+ * tags, and the host's live list carries exactly one qwen4 id (no dated
485
+ * snapshot sibling). Knowledge cutoff: not published by either host —
486
+ * best-effort estimate. qwen4-max supersedes qwen3.8-max: same
487
+ * agentic-flagship tier, cheaper at list on both hosts.)
429
488
  * - Zhipu: https://docs.z.ai/guides/overview/pricing + docs.z.ai/guides/llm/
430
489
  * glm-5.3 (verified 2026-08-26: glm-5.3 shipped 2026-08-14 and IS in the
431
490
  * catalog — $1.40/$4.40, cached $0.26, i.e. glm-5.2's card unchanged, 1M ctx,
@@ -1065,7 +1124,58 @@ export const MODELS = [
1065
1124
  // /v1/responses calls, so it too needs no `toolsRequireReasoningOff` pin.
1066
1125
  // At $1/$5 it is 5.6-terra's tier at half the price, so 5.6-terra repoints
1067
1126
  // to it.
1127
+ //
1128
+ // gpt-6.2-astra (released 2026-11-17, added 2026-11-18) is astra's own
1129
+ // successor at $8/$40 with cached input at 5% of input (the 6.1-family
1130
+ // ratio, not the 10% GPT-6 carried). Like gpt-6-astra it has no 'none'
1131
+ // effort — the API rejects it and the error names low|medium|high|xhigh|max,
1132
+ // all five verified live with tools on /v1/responses (2026-11-18) —
1133
+ // temperature is rejected like the rest of the family, and a forced
1134
+ // tool_choice returns 200, so it needs no pins at all.
1135
+ //
1136
+ // gpt-6.2-sol (released 2026-11-17, added 2026-11-18) is sol's own successor:
1137
+ // the same $2/$10 list as gpt-6.1-sol with the same 5% cached-input ratio and
1138
+ // $2.50 cache writes, cutoff Jun 1 2026. Identical probe shape to
1139
+ // gpt-6.2-astra: no 'none' effort (the rejection's error names exactly
1140
+ // low|medium|high|xhigh|max), all five levels verified live with tools on
1141
+ // /v1/responses (2026-11-18), temperature → 400, forced tool_choice → 200 —
1142
+ // no pins. It supersedes gpt-6.1-sol (same tier, same price, newer
1143
+ // generation); no GPT-6.2 terra or luna id exists.
1068
1144
  // ---------------------------------------------------------------------------
1145
+ {
1146
+ id: 'gpt-6.2-astra',
1147
+ provider: 'openai',
1148
+ label: 'GPT-6.2 Astra',
1149
+ description: 'OpenAI flagship — the hardest reasoning & coding work',
1150
+ // Documented as 1.05M; floored to 1M like the other OpenAI entries.
1151
+ contextWindow: 1_000_000,
1152
+ maxOutputTokens: 128_000,
1153
+ supportsThinking: true,
1154
+ thinkingBudgetTokens: 16_000,
1155
+ thinkingConfigurable: true,
1156
+ // No 'none' on this model. All five levels verified accepted with tools on
1157
+ // /v1/responses (2026-11-18) — the 'none' rejection's own error message
1158
+ // lists exactly these values.
1159
+ supportedEffortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
1160
+ defaultEffortLevel: 'medium',
1161
+ // temperature → 400 "Unsupported parameter: 'temperature' is not supported
1162
+ // with this model" (probed live 2026-11-18).
1163
+ rejectsTemperature: true,
1164
+ supportsVision: true,
1165
+ supportsPromptCaching: true,
1166
+ supportsTools: true,
1167
+ webSearchToolType: 'web_search',
1168
+ // $10 per 1,000 web_search_call items (pricing page tool table, reasoning
1169
+ // models); search-result tokens bill as input.
1170
+ webSearchPricePer1k: 10,
1171
+ codeExecutionToolType: 'code_interpreter',
1172
+ // Standard tier; >272K band ($16/$60, cached $0.80, writes $20) not modeled.
1173
+ inputPricePerMTok: 8,
1174
+ outputPricePerMTok: 40,
1175
+ cacheReadPricePerMTok: 0.4,
1176
+ cacheWritePricePerMTok: 10,
1177
+ knowledgeCutoff: '2026-05-18',
1178
+ },
1069
1179
  {
1070
1180
  id: 'gpt-6-astra',
1071
1181
  provider: 'openai',
@@ -1098,6 +1208,47 @@ export const MODELS = [
1098
1208
  cacheReadPricePerMTok: 1,
1099
1209
  cacheWritePricePerMTok: 12.5,
1100
1210
  knowledgeCutoff: '2026-04-30',
1211
+ // Superseded by gpt-6.2-astra — the same flagship tier at $8/$40 with a
1212
+ // fifth of the cached-input rate. Still served and priceable — just not
1213
+ // offered in the picker.
1214
+ deprecatedAt: '2026-11-18',
1215
+ supersededBy: 'gpt-6.2-astra',
1216
+ },
1217
+ {
1218
+ id: 'gpt-6.2-sol',
1219
+ provider: 'openai',
1220
+ label: 'GPT-6.2 Sol',
1221
+ description: 'OpenAI for complex coding & agentic work',
1222
+ // Documented as 1.05M; floored to 1M like the other OpenAI entries.
1223
+ contextWindow: 1_000_000,
1224
+ maxOutputTokens: 128_000,
1225
+ supportsThinking: true,
1226
+ thinkingBudgetTokens: 16_000,
1227
+ thinkingConfigurable: true,
1228
+ // No 'none' on this model (model page: "The API rejects requests that set
1229
+ // reasoning effort to `none`."). All five levels verified accepted with
1230
+ // tools on /v1/responses (2026-11-18) — the 'none' rejection's own error
1231
+ // message lists exactly these values.
1232
+ supportedEffortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
1233
+ defaultEffortLevel: 'medium',
1234
+ // temperature → 400 "Unsupported parameter: 'temperature' is not supported
1235
+ // with this model" (probed live 2026-11-18).
1236
+ rejectsTemperature: true,
1237
+ supportsVision: true,
1238
+ supportsPromptCaching: true,
1239
+ supportsTools: true,
1240
+ webSearchToolType: 'web_search',
1241
+ // $10 per 1,000 web_search_call items (pricing page tool table, reasoning
1242
+ // models); search-result tokens bill as input.
1243
+ webSearchPricePer1k: 10,
1244
+ codeExecutionToolType: 'code_interpreter',
1245
+ // Standard tier. Cached input is 5% of input like the 6.1 family; >272K
1246
+ // band ($4/$15, cached $0.20, writes $5) not modeled.
1247
+ inputPricePerMTok: 2,
1248
+ outputPricePerMTok: 10,
1249
+ cacheReadPricePerMTok: 0.1,
1250
+ cacheWritePricePerMTok: 2.5,
1251
+ knowledgeCutoff: '2026-06-01',
1101
1252
  },
1102
1253
  {
1103
1254
  id: 'gpt-6.1-sol',
@@ -1129,6 +1280,11 @@ export const MODELS = [
1129
1280
  cacheReadPricePerMTok: 0.1,
1130
1281
  cacheWritePricePerMTok: 2.5,
1131
1282
  knowledgeCutoff: '2026-04-30',
1283
+ // Superseded by gpt-6.2-sol — the same $2/$10 tier with a newer
1284
+ // generation (cutoff Jun 1 2026 vs Apr 30 2026). Still served and
1285
+ // priceable — just not offered in the picker.
1286
+ deprecatedAt: '2026-11-18',
1287
+ supersededBy: 'gpt-6.2-sol',
1132
1288
  },
1133
1289
  {
1134
1290
  id: 'gpt-6.1-terra',
@@ -1195,10 +1351,11 @@ export const MODELS = [
1195
1351
  cacheReadPricePerMTok: 0.2,
1196
1352
  cacheWritePricePerMTok: 2.5,
1197
1353
  knowledgeCutoff: '2026-04-20',
1198
- // Superseded by gpt-6.1-sol (same $2/$10, cached input $0.10 vs $0.20).
1199
- // Still served and priceable — just not offered in the picker.
1354
+ // Superseded by gpt-6.2-sol (via gpt-6.1-sol: same $2/$10, cached input
1355
+ // $0.10 vs $0.20). Still served and priceable — just not offered in the
1356
+ // picker.
1200
1357
  deprecatedAt: '2026-09-30',
1201
- supersededBy: 'gpt-6.1-sol',
1358
+ supersededBy: 'gpt-6.2-sol',
1202
1359
  },
1203
1360
  {
1204
1361
  id: 'gpt-6-luna',
@@ -1260,10 +1417,11 @@ export const MODELS = [
1260
1417
  codeExecutionToolType: 'code_interpreter',
1261
1418
  // LIST price. OpenAI ran a >20% PROMO from 2026-08-22 ($4/$20, cache read
1262
1419
  // $0.40, cache write $5) — "GPT-5.6 Sol's promotional pricing is available
1263
- // at least through November 21, 2026" per the pricing page's own footnote.
1420
+ // until November 30, 2026" per the pricing page's own footnote (re-read
1421
+ // 2026-11-18; it previously said "at least through November 21, 2026").
1264
1422
  // Billed here at list so metering never under-charges when it lapses; same
1265
1423
  // policy as the gemini-flash and claude-sonnet-5 promos, and recorded in
1266
- // check-model-freshness.mjs KNOWN_DIVERGENCES (expires 2026-11-21).
1424
+ // check-model-freshness.mjs KNOWN_DIVERGENCES (expires 2026-11-30).
1267
1425
  inputPricePerMTok: 5,
1268
1426
  outputPricePerMTok: 30,
1269
1427
  // Cached input 0.1× input, cache write 1.25× input (see section note).
@@ -1272,10 +1430,10 @@ export const MODELS = [
1272
1430
  // Not published — best-effort estimate.
1273
1431
  knowledgeCutoff: '2026-03-01',
1274
1432
  // Superseded by gpt-6-sol ($2/$10 vs $5/$30 list); points one hop to
1275
- // gpt-6.1-sol since 2026-09-30, when gpt-6-sol was superseded. Still served and
1276
- // priceable — just not offered in the picker.
1433
+ // gpt-6.2-sol since 2026-11-18, when gpt-6.1-sol was itself superseded.
1434
+ // Still served and priceable — just not offered in the picker.
1277
1435
  deprecatedAt: '2026-09-23',
1278
- supersededBy: 'gpt-6.1-sol',
1436
+ supersededBy: 'gpt-6.2-sol',
1279
1437
  },
1280
1438
  {
1281
1439
  id: 'gpt-5.6-terra',
@@ -1389,11 +1547,11 @@ export const MODELS = [
1389
1547
  cacheWritePricePerMTok: 5,
1390
1548
  knowledgeCutoff: '2025-12-01',
1391
1549
  // Superseded by gpt-5.6-sol (same frontier tier, same $5/$30), and since
1392
- // 2026-09-23 points one hop to gpt-6-sol, 5.6-sol's own successor (gpt-6.1-sol
1393
- // since 2026-09-30). Still
1394
- // listed as current by OpenAI, so it stays priceable — just not offered.
1550
+ // 2026-09-23 points one hop to the sol line's current generation (gpt-6.2-sol
1551
+ // since 2026-11-18). Still listed as current by OpenAI, so it stays
1552
+ // priceable — just not offered.
1395
1553
  deprecatedAt: '2026-07-09',
1396
- supersededBy: 'gpt-6.1-sol',
1554
+ supersededBy: 'gpt-6.2-sol',
1397
1555
  },
1398
1556
  {
1399
1557
  id: 'gpt-5.4',
@@ -1427,9 +1585,9 @@ export const MODELS = [
1427
1585
  // offers only the 5.6 generation (this is OUR taxonomy, not OpenAI's
1428
1586
  // deprecations page; the model stays priceable). Points one hop to
1429
1587
  // gpt-6-sol since 2026-09-23, when 5.6-terra was itself superseded, and to
1430
- // gpt-6.1-sol since 2026-09-30.
1588
+ // the sol line's current generation since 2026-11-18.
1431
1589
  deprecatedAt: '2026-07-28',
1432
- supersededBy: 'gpt-6.1-sol',
1590
+ supersededBy: 'gpt-6.2-sol',
1433
1591
  },
1434
1592
  {
1435
1593
  id: 'gpt-5.4-mini',
@@ -2796,20 +2954,78 @@ export const MODELS = [
2796
2954
  // Verified: https://www.alibabacloud.com/help/en/model-studio/deep-thinking
2797
2955
  // https://www.alibabacloud.com/help/en/model-studio/qwen-coder
2798
2956
  // https://openrouter.ai/qwen/qwen3.7-max
2799
- // qwen3.8-max (2026-08-03) is the agentic flagship, succeeding qwen3.7-max —
2800
- // Alibaba's own Qwen-Coder docs now recommend the general-purpose models over
2801
- // Qwen-Coder. Their thinking
2802
- // uses enable_thinking (default ON for the 3.7 series) + thinking_budget
2803
- // (token cap) — a real budget param, so effort scales the budget. The
2804
- // qwen3-coder models are NON-thinking (previous catalog entry was wrong).
2957
+ // qwen4-max (2026-11-16) is the agentic flagship, succeeding qwen3.8-max —
2958
+ // multimodal (Text+Image+Video input) on BOTH hosts this generation. Hybrid
2959
+ // thinking uses enable_thinking (default ON) + thinking_budget (token cap) —
2960
+ // a real budget param, so effort scales the budget. (Qwen4-Max also exposes a
2961
+ // native reasoning_effort low|high|xhigh, but the alibaba bond speaks only
2962
+ // the budget form, so the catalog models effort as scaled budgets like the
2963
+ // 3.x flagships.) The qwen3-coder models are NON-thinking.
2805
2964
  // Prices are DashScope international list rates (the bond calls DashScope,
2806
- // not OpenRouter; a 50%-off promo currently applies — billed at list).
2965
+ // not OpenRouter; bill at list).
2807
2966
  // ---------------------------------------------------------------------------
2808
- // qwen3.8-max (GA 2026-08-03) succeeds qwen3.7-max as the agentic flagship,
2967
+ // qwen4-max (2026-11-16) succeeds qwen3.8-max as the agentic flagship,
2968
+ // priced BELOW it at $1.5/$4.5 on the Singapore international card (every
2969
+ // other native region and the US re-host bill $1.413/$4.24). Same hybrid
2970
+ // thinking mechanism as the 3.x series. Cache rates are published per region
2971
+ // on the model-pricing page — see the Sources block for the citation.
2972
+ {
2973
+ id: 'qwen4-max',
2974
+ provider: 'alibaba',
2975
+ label: 'Qwen4 Max',
2976
+ description: 'Alibaba agentic flagship — 1M context, multimodal, hybrid thinking',
2977
+ // Model page (verified 2026-11-17): context 1,000,000; max input 991,808
2978
+ // (983,616 thinking); max output 131,072 (262,144 in thinking mode); max
2979
+ // chain-of-thought 262,144. Kept at the non-thinking output figure —
2980
+ // understating only shortens completions.
2981
+ contextWindow: 1_000_000,
2982
+ maxOutputTokens: 131_072,
2983
+ supportsThinking: true,
2984
+ thinkingBudgetTokens: 8_000,
2985
+ thinkingConfigurable: true,
2986
+ supportedEffortLevels: ['4K', '8K', '16K', '32K'],
2987
+ defaultEffortLevel: '8K',
2988
+ effortBudgetTokens: { '4K': 4000, '8K': 8000, '16K': 16000, '32K': 32000 },
2989
+ // Multimodal on BOTH hosts this generation: the model page lists
2990
+ // Text/Image/Video input in every region, and the DeepInfra re-host's own
2991
+ // record tags the id multimodal + input-video (Qwen3.8-Max's re-host
2992
+ // carried no such tags — that is why vision stayed false there).
2993
+ supportsVision: true,
2994
+ supportsPromptCaching: true,
2995
+ supportsTools: true,
2996
+ // Singapore international list card (model page + model-pricing page,
2997
+ // verified 2026-11-17). The ZH context-cache doc lists qwen4-max among the
2998
+ // models OUTSIDE the standard 20% cache-read table and defers to the
2999
+ // console, whose figures the pricing page publishes per region: cache read
3000
+ // $0.075 in Singapore (5% of input; $0.071 in every Global region).
3001
+ // Implicit creation is billed at plain input (write 1×); the explicit 5m
3002
+ // creation premium is 125% = $1.875, which implicit-mode billing never
3003
+ // charges.
3004
+ inputPricePerMTok: 1.5,
3005
+ outputPricePerMTok: 4.5,
3006
+ cacheReadPricePerMTok: 0.075,
3007
+ cacheWritePricePerMTok: 1.5,
3008
+ regions: ['us', 'cn'],
3009
+ // US = DeepInfra (Qwen/Qwen4-Max), verified 2026-11-17 against
3010
+ // api.deepinfra.com/models/Qwen/Qwen4-Max: $1.413/$4.24, cache read
3011
+ // 0.0502477× input = $0.071, no write premium (omitted → region input).
3012
+ // The host's live model list carries exactly one qwen4 id — no dated
3013
+ // snapshot sibling — and the entry is not deprecated.
3014
+ regionPricing: {
3015
+ us: { inputPricePerMTok: 1.413, outputPricePerMTok: 4.24, cacheReadPricePerMTok: 0.071 },
3016
+ },
3017
+ // Not published by Alibaba — best-effort estimate for the Qwen4 generation
3018
+ // (released 2026-11-16).
3019
+ knowledgeCutoff: '2026-08-01',
3020
+ },
3021
+ // qwen3.8-max (GA 2026-08-03) succeeded qwen3.7-max as the agentic flagship,
2809
3022
  // priced BELOW it at $2/$6 (intl CNY 14.988/44.965, same fixed conversion).
2810
3023
  // Same hybrid thinking mechanism as the 3.7 series (enable_thinking default
2811
3024
  // ON + thinking_budget; preserve_thinking supported). Context cache uses the
2812
3025
  // standard implicit rates — see the Sources block for the ZH-doc citation.
3026
+ // Superseded by qwen4-max (2026-11-16): same tier at a LOWER list price on
3027
+ // both hosts. Still served upstream, so it stays priceable — just not
3028
+ // offered.
2813
3029
  {
2814
3030
  id: 'qwen3.8-max',
2815
3031
  provider: 'alibaba',
@@ -2856,6 +3072,8 @@ export const MODELS = [
2856
3072
  },
2857
3073
  // Not published by Alibaba — best-effort estimate.
2858
3074
  knowledgeCutoff: '2026-04-01',
3075
+ deprecatedAt: '2026-11-16',
3076
+ supersededBy: 'qwen4-max',
2859
3077
  },
2860
3078
  {
2861
3079
  id: 'qwen3.8-flash',
@@ -2933,11 +3151,13 @@ export const MODELS = [
2933
3151
  },
2934
3152
  // Not published by Alibaba — best-effort estimate.
2935
3153
  knowledgeCutoff: '2026-01-01',
2936
- // Superseded by qwen3.8-max (GA 2026-08-03): same tier and mechanism, and
2937
- // CHEAPER at list ($2/$6 vs $2.50/$7.50). Still served upstream (the 50%-off
2938
- // promo runs on this id), so it stays priceable — it is just not offered.
3154
+ // Superseded (GA 2026-08-03) and now pointed one hop forward at qwen4-max
3155
+ // (2026-11-16): same tier and mechanism, each generation CHEAPER at list
3156
+ // ($2/$6 then $1.5/$4.5, vs this id's $2.50/$7.50). Still served upstream
3157
+ // (the 50%-off promo runs on this id), so it stays priceable — it is just
3158
+ // not offered.
2939
3159
  deprecatedAt: '2026-08-03',
2940
- supersededBy: 'qwen3.8-max',
3160
+ supersededBy: 'qwen4-max',
2941
3161
  },
2942
3162
  {
2943
3163
  id: 'qwen3-coder-plus',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@molecule/api-resource-ai-models",
3
- "version": "1.20.1",
4
- "description": "AI model catalog — server-side source of truth plus an authentication-gated discovery endpoint",
3
+ "version": "1.22.0",
4
+ "description": "Server-side AI model catalog plus GET /ai/models endpoint",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -28,8 +28,8 @@
28
28
  "license": "Apache-2.0",
29
29
  "devDependencies": {
30
30
  "@molecule/api-bond": "1.0.4",
31
- "@molecule/api-i18n": "1.0.5",
32
- "@molecule/api-resource": "1.1.2",
31
+ "@molecule/api-i18n": "1.0.6",
32
+ "@molecule/api-resource": "1.1.3",
33
33
  "@types/node": "26.6.5",
34
34
  "typescript": "6.0.3",
35
35
  "vitest": "4.1.12"