@molecule/api-resource-ai-models 1.17.4 → 1.18.2

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-10-22T22:44:54.731Z
6
+ Generated: 2026-10-26T04:23:44.190Z
7
7
  -->
8
8
 
9
9
  # @molecule/api-resource-ai-models
@@ -436,17 +436,7 @@ A model's peak-hour pricing in effect at a given instant: the staged
436
436
  leaves the existing windows in force), else the model's own `peakPricing`.
437
437
 
438
438
  ```typescript
439
- function effectivePeakPricing(
440
- modelDef: ModelDefinition,
441
- at?: Date,
442
- ):
443
- | {
444
- windows: { startMinuteUtc: number; endMinuteUtc: number; daysOfWeekUtc?: number[] }[]
445
- multiplier: number
446
- excludedDatesUtc?: string[]
447
- rule?: { url: string; text: string }
448
- }
449
- | undefined
439
+ function effectivePeakPricing(modelDef: ModelDefinition, at?: Date): ModelDefinition['peakPricing']
450
440
  ```
451
441
 
452
442
  - `modelDef` — The model definition.
@@ -472,15 +462,7 @@ resolving the static band against landed scheduled base rates would leave
472
462
  function effectiveLongContextPricing(
473
463
  modelDef: ModelDefinition,
474
464
  at?: Date,
475
- ):
476
- | {
477
- aboveInputTokens: number
478
- inputPricePerMTok: number
479
- outputPricePerMTok: number
480
- cacheReadPricePerMTok: number
481
- cacheWritePricePerMTok: number
482
- }
483
- | undefined
465
+ ): ModelDefinition['longContextPricing']
484
466
  ```
485
467
 
486
468
  - `modelDef` — The model definition.
package/dist/models.d.ts CHANGED
@@ -285,6 +285,17 @@ import type { ModelDefinition } from './types.js';
285
285
  * labeled Kimi-K3 — so kimi-k2.7-code is native-only (regions ['cn']) and
286
286
  * its US modelMap entry is gone. kimi-k3's US re-host is healthy, rates
287
287
  * unchanged.)
288
+ * (re-verified 2026-10-23 across platform.kimi.ai — docs/models,
289
+ * docs/pricing/chat (server-rendered table), docs/api/models-overview and
290
+ * docs/guide/kimi-k3-1-pro-quickstart: K3.1 series released —
291
+ * kimi-k3.1-pro-highspeed added ($4/$20, cached input $0.20, 5m cache
292
+ * writes $4 / 1h $8; reasoning_effort low|high|max; max_completion_tokens
293
+ * default 131072 / max 1048576 — also re-read for kimi-k3, whose 65K
294
+ * "conservative" cap was stale and is now the documented 131072). kimi-k3
295
+ * superseded by kimi-k3.1-pro-highspeed. DeepInfra lists NO K3.1 re-host
296
+ * (only Kimi-K3 / Kimi-K2.6), so the new model is native-only. Banner:
297
+ * K2-series stops for new signups 2026-10-31, full retirement planned end
298
+ * of December 2026 — kimi-k2.6/k2.7-code/k2.5 need a retirement pass then.)
288
299
  * - MiniMax: https://platform.minimax.io/docs/guides/pricing-paygo
289
300
  * (unchanged; minimax-m3 $0.30/$1.20 is a "permanent 50% off" list rate)
290
301
  * (re-verified 2026-10-19 across platform.minimax.io — pricing-paygo,
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgYG;AACH,eAAO,MAAM,MAAM,EAAE,SAAS,eAAe,EAm9EnC,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;AA2DjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2YG;AACH,eAAO,MAAM,MAAM,EAAE,SAAS,eAAe,EAqlFnC,CAAA"}
package/dist/models.js CHANGED
@@ -337,6 +337,17 @@ const CHINA_PUBLIC_HOLIDAYS = [
337
337
  * labeled Kimi-K3 — so kimi-k2.7-code is native-only (regions ['cn']) and
338
338
  * its US modelMap entry is gone. kimi-k3's US re-host is healthy, rates
339
339
  * unchanged.)
340
+ * (re-verified 2026-10-23 across platform.kimi.ai — docs/models,
341
+ * docs/pricing/chat (server-rendered table), docs/api/models-overview and
342
+ * docs/guide/kimi-k3-1-pro-quickstart: K3.1 series released —
343
+ * kimi-k3.1-pro-highspeed added ($4/$20, cached input $0.20, 5m cache
344
+ * writes $4 / 1h $8; reasoning_effort low|high|max; max_completion_tokens
345
+ * default 131072 / max 1048576 — also re-read for kimi-k3, whose 65K
346
+ * "conservative" cap was stale and is now the documented 131072). kimi-k3
347
+ * superseded by kimi-k3.1-pro-highspeed. DeepInfra lists NO K3.1 re-host
348
+ * (only Kimi-K3 / Kimi-K2.6), so the new model is native-only. Banner:
349
+ * K2-series stops for new signups 2026-10-31, full retirement planned end
350
+ * of December 2026 — kimi-k2.6/k2.7-code/k2.5 need a retirement pass then.)
340
351
  * - MiniMax: https://platform.minimax.io/docs/guides/pricing-paygo
341
352
  * (unchanged; minimax-m3 $0.30/$1.20 is a "permanent 50% off" list rate)
342
353
  * (re-verified 2026-10-19 across platform.minimax.io — pricing-paygo,
@@ -2195,8 +2206,23 @@ export const MODELS = [
2195
2206
  },
2196
2207
  // ---------------------------------------------------------------------------
2197
2208
  // Moonshot (Kimi)
2198
- // Verified: https://platform.kimi.ai/docs/models +
2199
- // /docs/guide/use-kimi-k2-thinking-model (2026-07-28).
2209
+ // Verified: https://platform.kimi.ai/docs/pricing/chat +
2210
+ // /docs/api/models-overview + /docs/guide/kimi-k3-1-pro-quickstart
2211
+ // (2026-10-23, kimi-k3.1-pro add: exact id; $2/$10, cache read
2212
+ // $0.20, cache write $2 (5m, default TTL) / $4 (1h); 1M context;
2213
+ // max_completion_tokens default 131072 / settable 1048576;
2214
+ // text+image+video input; reasoning_effort low|high|max default
2215
+ // max; temperature fixed 1.0; tool_choice 'required' supported;
2216
+ // DeepInfra live-checked — no K3.1 re-host). Earlier:
2217
+ // /docs/models + /docs/guide/use-kimi-k2-thinking-model
2218
+ // (2026-07-28).
2219
+ // 2026-10-23: K3.1 series released (kimi-k3.1-pro + the -highspeed speed
2220
+ // tier, same intelligence at 2-3× the speed). Both variants are cataloged
2221
+ // (owner ✅, one card each): the provider's Model Parameter Reference states
2222
+ // the k3.1 pair has the SAME constraints as kimi-k3 — reasoning_effort
2223
+ // low|high|max (default max), temperature/top_p/n/penalties fixed, and
2224
+ // tool_choice 'required' supported. Native-only for now (no DeepInfra
2225
+ // re-host yet).
2200
2226
  // The moonshot bond now supports PRESERVED THINKING (ChatMessage.reasoning →
2201
2227
  // reasoning_content replay through tool loops), which unblocked the two
2202
2228
  // previously-excluded models: kimi-k3 (2026-07-16 flagship — 2.8T MoE, 1M
@@ -2211,6 +2237,104 @@ export const MODELS = [
2211
2237
  // region-re-host coverage check fails on exactly that (a us-region moonshot
2212
2238
  // model missing from the bond's modelMap).
2213
2239
  // ---------------------------------------------------------------------------
2240
+ {
2241
+ id: 'kimi-k3.1-pro',
2242
+ provider: 'moonshot',
2243
+ // Same parameter constraints as kimi-k3 (provider's own Model Parameter
2244
+ // Reference, api/models-overview, names the k3.1 pair): temperature is
2245
+ // fixed at 1.0 upstream — "passing any other value returns an error" — so
2246
+ // callers omit it. tool_choice 'required' IS supported (their FAQ names
2247
+ // kimi-k3.1-pro, kimi-k3.1-pro-highspeed and kimi-k3 as supporting it),
2248
+ // so no rejectsForcedToolChoice.
2249
+ rejectsTemperature: true,
2250
+ label: 'Kimi K3.1 Pro',
2251
+ description: "Moonshot's most capable flagship — same intelligence as the highspeed tier at half the price",
2252
+ contextWindow: 1_000_000,
2253
+ // Docs (guide/kimi-k3-1-pro-quickstart): max_completion_tokens defaults to
2254
+ // 131072 and is settable up to 1048576 (the full window). Cap at the
2255
+ // documented default so a request never reserves the whole window for
2256
+ // output and leaves room for a real prompt.
2257
+ maxOutputTokens: 131_072,
2258
+ supportsThinking: true,
2259
+ thinkingBudgetTokens: 8_000,
2260
+ // Thinking is FORCED ON (K3 family); depth rides reasoning_effort
2261
+ // low|high|max, upstream default max — we default to high like kimi-k3 so
2262
+ // agentic loops aren't pinned to the slowest/most expensive tier.
2263
+ thinkingConfigurable: true,
2264
+ supportedEffortLevels: ['low', 'high', 'max'],
2265
+ defaultEffortLevel: 'high',
2266
+ // Text + image (base64 / ms:// file id) + video input — the quickstart's
2267
+ // vision section; the highspeed tier shares this API surface.
2268
+ supportsVision: true,
2269
+ supportsPromptCaching: true,
2270
+ supportsTools: true,
2271
+ // Verified 2026-10-23 on platform.kimi.ai/docs/pricing/chat (K3 series
2272
+ // table): $2/$10, cached input $0.20. Cache writes are billed by TTL —
2273
+ // $2 (5m, the default tier when no TTL is set) / $4 (1h);
2274
+ // cacheWritePricePerMTok carries the default 5m tier, matching the
2275
+ // kimi-k3 / kimi-k3.1-pro-highspeed entries' convention.
2276
+ inputPricePerMTok: 2,
2277
+ outputPricePerMTok: 10,
2278
+ cacheReadPricePerMTok: 0.2,
2279
+ cacheWritePricePerMTok: 2,
2280
+ // Native-only: released 2026-10-23 and DeepInfra (live
2281
+ // api.deepinfra.com/v1/openai/models, checked same day) still lists only
2282
+ // Kimi-K3 and Kimi-K2.6 — no K3.1 re-host, so no regionPricing and no
2283
+ // bond modelMap entry (a us-region moonshot model missing from the map
2284
+ // would 404 at dispatch).
2285
+ regions: ['cn'],
2286
+ // Not published — best-effort estimate (mirrors the highspeed entry: same
2287
+ // weights generation, same intelligence).
2288
+ knowledgeCutoff: '2026-05-01',
2289
+ },
2290
+ {
2291
+ id: 'kimi-k3.1-pro-highspeed',
2292
+ provider: 'moonshot',
2293
+ // Same parameter constraints as kimi-k3 (provider's own Model Parameter
2294
+ // Reference, api/models-overview, names the k3.1 pair): temperature is
2295
+ // fixed at 1.0 upstream — "passing any other value returns an error" — so
2296
+ // callers omit it. tool_choice 'required' IS supported (their FAQ names
2297
+ // kimi-k3.1-pro, kimi-k3.1-pro-highspeed and kimi-k3 as supporting it),
2298
+ // so no rejectsForcedToolChoice.
2299
+ rejectsTemperature: true,
2300
+ label: 'Kimi K3.1 Pro Highspeed',
2301
+ description: 'Newest Moonshot flagship, speed tier — same intelligence as K3.1 Pro at 2-3× the speed',
2302
+ contextWindow: 1_000_000,
2303
+ // Docs (guide/kimi-k3-1-pro-quickstart): max_completion_tokens defaults to
2304
+ // 131072 and is settable up to 1048576 (the full window). Cap at the
2305
+ // documented default so a request never reserves the whole window for
2306
+ // output and leaves room for a real prompt.
2307
+ maxOutputTokens: 131_072,
2308
+ supportsThinking: true,
2309
+ thinkingBudgetTokens: 8_000,
2310
+ // Thinking is FORCED ON (K3 family); depth rides reasoning_effort
2311
+ // low|high|max, upstream default max — we default to high like kimi-k3 so
2312
+ // agentic loops aren't pinned to the slowest/most expensive tier.
2313
+ thinkingConfigurable: true,
2314
+ supportedEffortLevels: ['low', 'high', 'max'],
2315
+ defaultEffortLevel: 'high',
2316
+ // Text + image + video input — same vision API surface as kimi-k3.1-pro
2317
+ // (the only documented difference of the highspeed tier is speed).
2318
+ supportsVision: true,
2319
+ supportsPromptCaching: true,
2320
+ supportsTools: true,
2321
+ // Verified 2026-10-23 on platform.kimi.ai/docs/pricing/chat: $4/$20,
2322
+ // cached input $0.20. Cache writes are billed by TTL — $4 (5m, the
2323
+ // default tier when no TTL is set) / $8 (1h); cacheWritePricePerMTok
2324
+ // carries the default 5m tier, matching the kimi-k3 entry's convention.
2325
+ inputPricePerMTok: 4,
2326
+ outputPricePerMTok: 20,
2327
+ cacheReadPricePerMTok: 0.2,
2328
+ cacheWritePricePerMTok: 4,
2329
+ // Native-only: released 2026-10-23 and DeepInfra (live
2330
+ // api.deepinfra.com/v1/openai/models, checked same day) still lists only
2331
+ // Kimi-K3 and Kimi-K2.6 — no K3.1 re-host, so no regionPricing and no
2332
+ // bond modelMap entry (a us-region moonshot model missing from the map
2333
+ // would 404 at dispatch).
2334
+ regions: ['cn'],
2335
+ // Not published — best-effort estimate.
2336
+ knowledgeCutoff: '2026-05-01',
2337
+ },
2214
2338
  {
2215
2339
  id: 'kimi-k3',
2216
2340
  provider: 'moonshot',
@@ -2220,8 +2344,10 @@ export const MODELS = [
2220
2344
  label: 'Kimi K3',
2221
2345
  description: 'Moonshot flagship — 2.8T open weights, 1M context, multimodal',
2222
2346
  contextWindow: 1_000_000,
2223
- // Max output not documented — conservative cap (matches the K2.x family).
2224
- maxOutputTokens: 65_535,
2347
+ // Docs (guide/kimi-k3-quickstart, re-read 2026-10-23): max_completion_tokens
2348
+ // defaults to 131072, settable up to 1048576 — the old "not documented"
2349
+ // 65K conservative cap was stale. Same cap as the k3.1 entries.
2350
+ maxOutputTokens: 131_072,
2225
2351
  supportsThinking: true,
2226
2352
  thinkingBudgetTokens: 8_000,
2227
2353
  // Thinking is FORCED ON; depth rides reasoning_effort (low|high|max). The
@@ -2258,6 +2384,14 @@ export const MODELS = [
2258
2384
  },
2259
2385
  // Not published — best-effort estimate.
2260
2386
  knowledgeCutoff: '2026-01-01',
2387
+ // Superseded by kimi-k3.1-pro (2026-10-23): the K3.1 series is the new
2388
+ // flagship generation — the provider's own models page calls kimi-k3 the
2389
+ // "prior flagship" and kimi-k3.1-pro "Kimi's most capable flagship to
2390
+ // date" (same intelligence as the highspeed tier at half the price, so the
2391
+ // base tier is the true successor of the old flagship). Kept priceable
2392
+ // and dispatchable on both regions.
2393
+ deprecatedAt: '2026-10-23',
2394
+ supersededBy: 'kimi-k3.1-pro',
2261
2395
  },
2262
2396
  {
2263
2397
  id: 'kimi-k2.7-code',
@@ -2307,6 +2441,11 @@ export const MODELS = [
2307
2441
  {
2308
2442
  id: 'kimi-k2.6',
2309
2443
  provider: 'moonshot',
2444
+ // Native Moonshot host moved K2.6 to fixed temperatures — the parameter
2445
+ // reference says "1.0 thinking / 0.6 non-thinking", and a live
2446
+ // 2026-10-23 probe of the plain shape (temperature 0) got 400 "invalid
2447
+ // temperature: only 0.6 is allowed for this model". Callers omit it.
2448
+ rejectsTemperature: true,
2310
2449
  label: 'Kimi K2.6',
2311
2450
  description: 'Multimodal agent — strong sequential tool use',
2312
2451
  contextWindow: 262_144,
@@ -2333,9 +2472,9 @@ export const MODELS = [
2333
2472
  us: { inputPricePerMTok: 0.75, outputPricePerMTok: 3.5, cacheReadPricePerMTok: 0.15 },
2334
2473
  },
2335
2474
  knowledgeCutoff: '2025-04-01',
2336
- // Superseded by kimi-k3 (same general-purpose line) — kept priceable.
2475
+ // Superseded by the current selectable Kimi flagship — kept priceable.
2337
2476
  deprecatedAt: '2026-07-28',
2338
- supersededBy: 'kimi-k3',
2477
+ supersededBy: 'kimi-k3.1-pro',
2339
2478
  },
2340
2479
  {
2341
2480
  id: 'kimi-k2.5',
@@ -2363,8 +2502,8 @@ export const MODELS = [
2363
2502
  },
2364
2503
  knowledgeCutoff: '2024-04-01',
2365
2504
  // Two generations behind. `supersededBy` names the current selectable Kimi
2366
- // (k3) rather than the also-superseded k2.6, so a saved selection resolves
2367
- // forward in one hop. Moonshot RETIRED kimi-k2.5 on 2026-08-31 —
2505
+ // flagship rather than the also-superseded k2.6/k3, so a saved selection
2506
+ // resolves forward in one hop. Moonshot RETIRED kimi-k2.5 on 2026-08-31 —
2368
2507
  // platform.kimi.ai/docs/models says calls 404, and a live 2026-09-10
2369
2508
  // dispatch probe confirmed the native host refusing it. The DeepInfra
2370
2509
  // re-host still answered inference on 2026-09-10 but is DELISTED from its
@@ -2373,7 +2512,7 @@ export const MODELS = [
2373
2512
  // selections still resolve forward.
2374
2513
  deprecatedAt: '2026-04-01',
2375
2514
  disabled: true,
2376
- supersededBy: 'kimi-k3',
2515
+ supersededBy: 'kimi-k3.1-pro',
2377
2516
  },
2378
2517
  // ---------------------------------------------------------------------------
2379
2518
  // MiniMax
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/api-resource-ai-models",
3
- "version": "1.17.4",
3
+ "version": "1.18.2",
4
4
  "description": "AI model catalog — server-side source of truth plus an authentication-gated discovery endpoint",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -27,10 +27,10 @@
27
27
  ],
28
28
  "license": "Apache-2.0",
29
29
  "devDependencies": {
30
- "@molecule/api-bond": "1.0.2",
31
- "@molecule/api-i18n": "1.0.3",
32
- "@molecule/api-resource": "1.0.5",
33
- "@types/node": "26.1.2",
30
+ "@molecule/api-bond": "1.0.4",
31
+ "@molecule/api-i18n": "1.0.5",
32
+ "@molecule/api-resource": "1.0.7",
33
+ "@types/node": "26.6.5",
34
34
  "typescript": "6.0.3",
35
35
  "vitest": "4.1.12"
36
36
  },