@molecule/api-resource-ai-models 1.2.7 → 1.4.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-08-28T08:14:50.991Z
6
+ Generated: 2026-09-01T19:40:01.931Z
7
7
  -->
8
8
 
9
9
  # @molecule/api-resource-ai-models
@@ -255,9 +255,19 @@ interface ModelDefinition {
255
255
  *
256
256
  * Windows are minutes-since-midnight UTC, half-open `[start, end)`; a window
257
257
  * may wrap midnight (`start > end`).
258
+ *
259
+ * `daysOfWeekUtc` restricts a window to certain UTC weekdays (`0` = Sunday …
260
+ * `6` = Saturday); omitted means every day. A provider that prices its peak
261
+ * by BUSINESS hours qualifies them by day, and a day-less window over-bills
262
+ * every weekend hour inside it at the full multiplier — DeepSeek's card
263
+ * carried no day qualifier when these windows landed on 2026-08-16 and added
264
+ * "Monday through Friday" by 2026-08-31, which is exactly the 2× weekend
265
+ * over-bill this field exists to prevent. A wrapping window belongs to the
266
+ * day it STARTS on, so its post-midnight tail is still matched against the
267
+ * previous day.
258
268
  */
259
269
  peakPricing?: {
260
- windows: { startMinuteUtc: number; endMinuteUtc: number }[]
270
+ windows: { startMinuteUtc: number; endMinuteUtc: number; daysOfWeekUtc?: number[] }[]
261
271
  multiplier: number
262
272
  }
263
273
  /**
@@ -305,7 +315,7 @@ interface ModelDefinition {
305
315
  cacheWritePricePerMTok: number
306
316
  /** Peak-hour pricing from `effectiveFrom` (omitted → existing windows carry through). */
307
317
  peakPricing?: {
308
- windows: { startMinuteUtc: number; endMinuteUtc: number }[]
318
+ windows: { startMinuteUtc: number; endMinuteUtc: number; daysOfWeekUtc?: number[] }[]
309
319
  multiplier: number
310
320
  }
311
321
  /** Where the change was announced, for the re-verify pass after it lands. */
@@ -529,7 +539,12 @@ leaves the existing windows in force), else the model's own `peakPricing`.
529
539
  function effectivePeakPricing(
530
540
  modelDef: ModelDefinition,
531
541
  at?: Date,
532
- ): { windows: { startMinuteUtc: number; endMinuteUtc: number }[]; multiplier: number } | undefined
542
+ ):
543
+ | {
544
+ windows: { startMinuteUtc: number; endMinuteUtc: number; daysOfWeekUtc?: number[] }[]
545
+ multiplier: number
546
+ }
547
+ | undefined
533
548
  ```
534
549
 
535
550
  - `modelDef` — The model definition.
@@ -647,7 +662,8 @@ function modelRegionRates(modelDef: ModelDefinition, requested?: string, at?: Da
647
662
  The price multiplier in effect for a model at a given instant, in a region.
648
663
 
649
664
  Consults the model's {@link ModelDefinition.peakPricing} windows (UTC,
650
- half-open, may wrap midnight). Metering MUST call this with each request's
665
+ half-open, may wrap midnight, optionally restricted to certain UTC weekdays
666
+ via `daysOfWeekUtc`). Metering MUST call this with each request's
651
667
  own timestamp so peak-hour usage bills at the provider's real rate — pricing
652
668
  everything at the flat rate silently under-meters peak traffic.
653
669
 
@@ -777,6 +793,29 @@ Sources (verified 2026-07-28; OpenAI re-verified 2026-07-31 after the
777
793
  (re-verified 2026-08-06: added opus-4-7 — legacy but Active, $5/$25,
778
794
  cache $0.50/$6.25, 1M ctx / 128K out per the overview + pricing pages;
779
795
  models.dev first listed it 2026-08-06)
796
+ (re-verified 2026-09-01 on /docs/en/about-claude/pricing: sonnet-5's
797
+ $2/$10 launch pricing is now the STANDARD price — that page's own note
798
+ reads "The previously scheduled increase to $3/$15 per million input/output
799
+ tokens on September 1, 2026 will not occur." Catalog moved off the
800
+ never-under-charge $3/$15 to $2/$10, cache $0.20/$2.50, and the
801
+ KNOWN_DIVERGENCES entry was deleted. Every other Anthropic entry on that
802
+ page is unchanged: fable-5 $10/$50 ($1/$12.50), opus-5 / opus-4-8 /
803
+ opus-4-7 / opus-4-6 $5/$25 ($0.50/$6.25), sonnet-4-6 $3/$15 ($0.30/$3.75),
804
+ haiku-4-5 $1/$5 ($0.10/$1.25).)
805
+ (re-verified 2026-09-01 — ADDED claude-fable-5-1, released that day and
806
+ listed as "Active (latest)" on /docs/en/models/fable-5-1/overview, which
807
+ moves claude-fable-5 to "Legacy models (still available)" → superseded.
808
+ Same tier and same $10/$50 as fable-5, 1M ctx / 128K out, adaptive
809
+ thinking always on, effort low|medium|high|xhigh|max default high, vision
810
+ - tools + caching, reliable knowledge cutoff Jun 2026. The one price that
811
+ is NOT the fleet ratio: cache read is $0.25/MTok — the pricing page
812
+ footnotes fable-5-1 / mythos-5-1 as 0.025× input where every other model
813
+ is 0.1×; cache write is the usual 1.25× ($12.50). Not modeled: the beta
814
+ per-message effort / turn-scoped system messages / `display: "updates"`,
815
+ and the three fable-5 → fable-5-1 breaking changes (forced tool_choice
816
+ any/tool now 400s, thinking blocks are model-bound, editing earlier turns
817
+ invalidates them) — Synthase sends tool_choice auto and is append-only,
818
+ and the pre-commit dispatch probe covers the entry as sent.)
780
819
  - OpenAI: https://developers.openai.com/api/docs/pricing (GPT-5.6 family GA
781
820
  2026-07-09; REPRICED 2026-07-30: -luna cut 80% to $0.20/$1.20, -terra cut
782
821
  20% to $2/$12, -sol unchanged $5/$30; cache read 0.1× input; gpt-5.5/
@@ -813,12 +852,16 @@ Sources (verified 2026-07-28; OpenAI re-verified 2026-07-31 after the
813
852
  grok-4.3 still served at $1.25/$2.50 with the bigger 1M window;
814
853
  grok-code-fast-1 no longer listed — retires 2026-08-15)
815
854
  - DeepSeek: https://api-docs.deepseek.com/quick_start/pricing (verified
816
- 2026-08-18; legacy deepseek-chat/-reasoner ids fully retired 2026-07-24 —
855
+ 2026-08-31; legacy deepseek-chat/-reasoner ids fully retired 2026-07-24 —
817
856
  never in this catalog. The V4-Pro-GA price RISE effective 2026-08-16T16:00Z
818
857
  has LANDED and is folded into the base fields, along with the peak-hour 2×
819
- the same card introduced. The rate card gives the peak windows as
820
- "01:00 - 04:00 and 06:00 - 10:00 UTC (all other hours are off-peak)" with
821
- no day qualifier — DAILY, as `peakPricing` models them.)
858
+ the same card introduced; every rate re-read on the card 2026-08-31 and
859
+ unchanged. The card now qualifies the windows BY DAY — "01:00 - 04:00 and
860
+ 06:00 - 10:00 UTC, Monday through Friday (all other hours are off-peak)" —
861
+ where on 2026-08-18 it carried no day qualifier at all, so the windows are
862
+ `daysOfWeekUtc`-restricted rather than daily. `deepseek-v4-flash-vision-exp`
863
+ also appears on the card at flash's rates: EXPERIMENTAL and vision-only-new,
864
+ deliberately not catalogued.)
822
865
  - Moonshot: https://platform.kimi.ai/docs/models + DeepInfra's model API for
823
866
  the US re-host (kimi-k3 flagship 2026-07-16
824
867
  — 2.8T MoE, 1M ctx, $3/$15 — NOT added: thinking is forced-on with
@@ -851,6 +894,16 @@ Sources (verified 2026-07-28; OpenAI re-verified 2026-07-31 after the
851
894
  $1.65/$4.951), so nothing would ever select it — and carrying both would
852
895
  put two selectable Alibaba flagships in one family. Revisit only if Alibaba
853
896
  publishes it as a distinct first-party DashScope model id.)
897
+ (re-verified 2026-08-28 on the per-model pages, which publish USD rates per
898
+ region directly — a better source than the CNY pricing table: qwen3.8-max's
899
+ Singapore implicit-cache rate is $0.25, NOT the 20%/$0.40 the ZH cache doc's
900
+ standard table implies. That doc names qwen3.8-max, qwen3.8-flash and
901
+ qwen3.8-2.4t-a95b as exceptions and defers to the console; the model pages
902
+ are the console's figures. qwen3.7-max's $0.50 (20%) is confirmed unchanged.
903
+ qwen3.8-flash (2026-08-26) ADDED: $0.15/$0.47, implicit cache $0.016, 1M ctx
904
+ / 131,072 out, Image+Text+Video input, tools, hybrid thinking ON by default
905
+ with thinking_budget. It is cn-region-only — api.deepinfra.com has no
906
+ Qwen/Qwen3.8-Flash — so ALIBABA_US_MODEL_MAP needs no entry.)
854
907
  - Zhipu: https://docs.z.ai/guides/overview/pricing + docs.z.ai/guides/llm/
855
908
  glm-5.3 (verified 2026-08-26: glm-5.3 shipped 2026-08-14 and IS in the
856
909
  catalog — $1.40/$4.40, cached $0.26, i.e. glm-5.2's card unchanged, 1M ctx,
package/dist/lookup.d.ts CHANGED
@@ -111,7 +111,8 @@ export declare function withEffectivePricing(modelDef: ModelDefinition, at?: Dat
111
111
  * The price multiplier in effect for a model at a given instant, in a region.
112
112
  *
113
113
  * Consults the model's {@link ModelDefinition.peakPricing} windows (UTC,
114
- * half-open, may wrap midnight). Metering MUST call this with each request's
114
+ * half-open, may wrap midnight, optionally restricted to certain UTC weekdays
115
+ * via `daysOfWeekUtc`). Metering MUST call this with each request's
115
116
  * own timestamp so peak-hour usage bills at the provider's real rate — pricing
116
117
  * everything at the flat rate silently under-meters peak traffic.
117
118
  *
@@ -1 +1 @@
1
- {"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../src/lookup.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAE/D;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,cAAc,CAAC,GACxD,OAAO,CAET;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CASvE;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,MAAM,CAEzC,CAAA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAEhE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,YAAY,GAAG,SAAS,eAAe,EAAE,CAEtF;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,kBAAkB,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,SAAS,YAAY,EAAE,GAC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,EAAE,eAAe,GAAG,SAAS,EACrC,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAGR;AAED,2DAA2D;AAC3D,MAAM,WAAW,eAAe;IAC9B,sDAAsD;IACtD,iBAAiB,EAAE,MAAM,CAAA;IACzB,8CAA8C;IAC9C,kBAAkB,EAAE,MAAM,CAAA;IAC1B,yDAAyD;IACzD,qBAAqB,EAAE,MAAM,CAAA;IAC7B,0DAA0D;IAC1D,sBAAsB,EAAE,MAAM,CAAA;CAC/B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,eAAe,EACzB,SAAS,CAAC,EAAE,MAAM,EAClB,EAAE,GAAE,IAAiB,GACpB,eAAe,CAYjB"}
package/dist/lookup.js CHANGED
@@ -181,7 +181,8 @@ export function withEffectivePricing(modelDef, at = new Date()) {
181
181
  * The price multiplier in effect for a model at a given instant, in a region.
182
182
  *
183
183
  * Consults the model's {@link ModelDefinition.peakPricing} windows (UTC,
184
- * half-open, may wrap midnight). Metering MUST call this with each request's
184
+ * half-open, may wrap midnight, optionally restricted to certain UTC weekdays
185
+ * via `daysOfWeekUtc`). Metering MUST call this with each request's
185
186
  * own timestamp so peak-hour usage bills at the provider's real rate — pricing
186
187
  * everything at the flat rate silently under-meters peak traffic.
187
188
  *
@@ -210,11 +211,21 @@ export function priceMultiplierAt(modelDef, at, region) {
210
211
  return 1;
211
212
  const minute = at.getUTCHours() * 60 + at.getUTCMinutes();
212
213
  for (const w of peak.windows) {
213
- const inWindow = w.startMinuteUtc <= w.endMinuteUtc
214
- ? minute >= w.startMinuteUtc && minute < w.endMinuteUtc
215
- : minute >= w.startMinuteUtc || minute < w.endMinuteUtc;
216
- if (inWindow)
217
- return peak.multiplier;
214
+ const wraps = w.startMinuteUtc > w.endMinuteUtc;
215
+ const inWindow = wraps
216
+ ? minute >= w.startMinuteUtc || minute < w.endMinuteUtc
217
+ : minute >= w.startMinuteUtc && minute < w.endMinuteUtc;
218
+ if (!inWindow)
219
+ continue;
220
+ if (w.daysOfWeekUtc && w.daysOfWeekUtc.length > 0) {
221
+ // A wrapping window belongs to the day it STARTED on, so its
222
+ // post-midnight tail is matched against the previous UTC day — a
223
+ // Friday-only 23:00-02:00 window must still be peak at Saturday 00:30.
224
+ const day = wraps && minute < w.endMinuteUtc ? (at.getUTCDay() + 6) % 7 : at.getUTCDay();
225
+ if (!w.daysOfWeekUtc.includes(day))
226
+ continue;
227
+ }
228
+ return peak.multiplier;
218
229
  }
219
230
  return 1;
220
231
  }
package/dist/models.d.ts CHANGED
@@ -61,6 +61,29 @@ import type { ModelDefinition } from './types.js';
61
61
  * (re-verified 2026-08-06: added opus-4-7 — legacy but Active, $5/$25,
62
62
  * cache $0.50/$6.25, 1M ctx / 128K out per the overview + pricing pages;
63
63
  * models.dev first listed it 2026-08-06)
64
+ * (re-verified 2026-09-01 on /docs/en/about-claude/pricing: sonnet-5's
65
+ * $2/$10 launch pricing is now the STANDARD price — that page's own note
66
+ * reads "The previously scheduled increase to $3/$15 per million input/output
67
+ * tokens on September 1, 2026 will not occur." Catalog moved off the
68
+ * never-under-charge $3/$15 to $2/$10, cache $0.20/$2.50, and the
69
+ * KNOWN_DIVERGENCES entry was deleted. Every other Anthropic entry on that
70
+ * page is unchanged: fable-5 $10/$50 ($1/$12.50), opus-5 / opus-4-8 /
71
+ * opus-4-7 / opus-4-6 $5/$25 ($0.50/$6.25), sonnet-4-6 $3/$15 ($0.30/$3.75),
72
+ * haiku-4-5 $1/$5 ($0.10/$1.25).)
73
+ * (re-verified 2026-09-01 — ADDED claude-fable-5-1, released that day and
74
+ * listed as "Active (latest)" on /docs/en/models/fable-5-1/overview, which
75
+ * moves claude-fable-5 to "Legacy models (still available)" → superseded.
76
+ * Same tier and same $10/$50 as fable-5, 1M ctx / 128K out, adaptive
77
+ * thinking always on, effort low|medium|high|xhigh|max default high, vision
78
+ * + tools + caching, reliable knowledge cutoff Jun 2026. The one price that
79
+ * is NOT the fleet ratio: cache read is $0.25/MTok — the pricing page
80
+ * footnotes fable-5-1 / mythos-5-1 as 0.025× input where every other model
81
+ * is 0.1×; cache write is the usual 1.25× ($12.50). Not modeled: the beta
82
+ * per-message effort / turn-scoped system messages / `display: "updates"`,
83
+ * and the three fable-5 → fable-5-1 breaking changes (forced tool_choice
84
+ * any/tool now 400s, thinking blocks are model-bound, editing earlier turns
85
+ * invalidates them) — Synthase sends tool_choice auto and is append-only,
86
+ * and the pre-commit dispatch probe covers the entry as sent.)
64
87
  * - OpenAI: https://developers.openai.com/api/docs/pricing (GPT-5.6 family GA
65
88
  * 2026-07-09; REPRICED 2026-07-30: -luna cut 80% to $0.20/$1.20, -terra cut
66
89
  * 20% to $2/$12, -sol unchanged $5/$30; cache read 0.1× input; gpt-5.5/
@@ -97,12 +120,16 @@ import type { ModelDefinition } from './types.js';
97
120
  * grok-4.3 still served at $1.25/$2.50 with the bigger 1M window;
98
121
  * grok-code-fast-1 no longer listed — retires 2026-08-15)
99
122
  * - DeepSeek: https://api-docs.deepseek.com/quick_start/pricing (verified
100
- * 2026-08-18; legacy deepseek-chat/-reasoner ids fully retired 2026-07-24 —
123
+ * 2026-08-31; legacy deepseek-chat/-reasoner ids fully retired 2026-07-24 —
101
124
  * never in this catalog. The V4-Pro-GA price RISE effective 2026-08-16T16:00Z
102
125
  * has LANDED and is folded into the base fields, along with the peak-hour 2×
103
- * the same card introduced. The rate card gives the peak windows as
104
- * "01:00 - 04:00 and 06:00 - 10:00 UTC (all other hours are off-peak)" with
105
- * no day qualifier — DAILY, as `peakPricing` models them.)
126
+ * the same card introduced; every rate re-read on the card 2026-08-31 and
127
+ * unchanged. The card now qualifies the windows BY DAY — "01:00 - 04:00 and
128
+ * 06:00 - 10:00 UTC, Monday through Friday (all other hours are off-peak)" —
129
+ * where on 2026-08-18 it carried no day qualifier at all, so the windows are
130
+ * `daysOfWeekUtc`-restricted rather than daily. `deepseek-v4-flash-vision-exp`
131
+ * also appears on the card at flash's rates: EXPERIMENTAL and vision-only-new,
132
+ * deliberately not catalogued.)
106
133
  * - Moonshot: https://platform.kimi.ai/docs/models + DeepInfra's model API for
107
134
  * the US re-host (kimi-k3 flagship 2026-07-16
108
135
  * — 2.8T MoE, 1M ctx, $3/$15 — NOT added: thinking is forced-on with
@@ -135,6 +162,16 @@ import type { ModelDefinition } from './types.js';
135
162
  * $1.65/$4.951), so nothing would ever select it — and carrying both would
136
163
  * put two selectable Alibaba flagships in one family. Revisit only if Alibaba
137
164
  * publishes it as a distinct first-party DashScope model id.)
165
+ * (re-verified 2026-08-28 on the per-model pages, which publish USD rates per
166
+ * region directly — a better source than the CNY pricing table: qwen3.8-max's
167
+ * Singapore implicit-cache rate is $0.25, NOT the 20%/$0.40 the ZH cache doc's
168
+ * standard table implies. That doc names qwen3.8-max, qwen3.8-flash and
169
+ * qwen3.8-2.4t-a95b as exceptions and defers to the console; the model pages
170
+ * are the console's figures. qwen3.7-max's $0.50 (20%) is confirmed unchanged.
171
+ * qwen3.8-flash (2026-08-26) ADDED: $0.15/$0.47, implicit cache $0.016, 1M ctx
172
+ * / 131,072 out, Image+Text+Video input, tools, hybrid thinking ON by default
173
+ * with thinking_budget. It is cn-region-only — api.deepinfra.com has no
174
+ * Qwen/Qwen3.8-Flash — so ALIBABA_US_MODEL_MAP needs no entry.)
138
175
  * - Zhipu: https://docs.z.ai/guides/overview/pricing + docs.z.ai/guides/llm/
139
176
  * glm-5.3 (verified 2026-08-26: glm-5.3 shipped 2026-08-14 and IS in the
140
177
  * 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;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmJG;AACH,eAAO,MAAM,MAAM,EAAE,SAAS,eAAe,EAsjDnC,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;AAQjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwLG;AACH,eAAO,MAAM,MAAM,EAAE,SAAS,eAAe,EAupDnC,CAAA"}
package/dist/models.js CHANGED
@@ -7,6 +7,11 @@
7
7
  *
8
8
  * @module
9
9
  */
10
+ /**
11
+ * Monday–Friday as UTC weekday numbers, for `peakPricing` windows a provider
12
+ * prices by business day rather than by hour alone.
13
+ */
14
+ const WEEKDAYS_UTC = [1, 2, 3, 4, 5];
10
15
  /**
11
16
  * All available AI models, grouped by provider, ordered from most to least capable.
12
17
  *
@@ -60,6 +65,29 @@
60
65
  * (re-verified 2026-08-06: added opus-4-7 — legacy but Active, $5/$25,
61
66
  * cache $0.50/$6.25, 1M ctx / 128K out per the overview + pricing pages;
62
67
  * models.dev first listed it 2026-08-06)
68
+ * (re-verified 2026-09-01 on /docs/en/about-claude/pricing: sonnet-5's
69
+ * $2/$10 launch pricing is now the STANDARD price — that page's own note
70
+ * reads "The previously scheduled increase to $3/$15 per million input/output
71
+ * tokens on September 1, 2026 will not occur." Catalog moved off the
72
+ * never-under-charge $3/$15 to $2/$10, cache $0.20/$2.50, and the
73
+ * KNOWN_DIVERGENCES entry was deleted. Every other Anthropic entry on that
74
+ * page is unchanged: fable-5 $10/$50 ($1/$12.50), opus-5 / opus-4-8 /
75
+ * opus-4-7 / opus-4-6 $5/$25 ($0.50/$6.25), sonnet-4-6 $3/$15 ($0.30/$3.75),
76
+ * haiku-4-5 $1/$5 ($0.10/$1.25).)
77
+ * (re-verified 2026-09-01 — ADDED claude-fable-5-1, released that day and
78
+ * listed as "Active (latest)" on /docs/en/models/fable-5-1/overview, which
79
+ * moves claude-fable-5 to "Legacy models (still available)" → superseded.
80
+ * Same tier and same $10/$50 as fable-5, 1M ctx / 128K out, adaptive
81
+ * thinking always on, effort low|medium|high|xhigh|max default high, vision
82
+ * + tools + caching, reliable knowledge cutoff Jun 2026. The one price that
83
+ * is NOT the fleet ratio: cache read is $0.25/MTok — the pricing page
84
+ * footnotes fable-5-1 / mythos-5-1 as 0.025× input where every other model
85
+ * is 0.1×; cache write is the usual 1.25× ($12.50). Not modeled: the beta
86
+ * per-message effort / turn-scoped system messages / `display: "updates"`,
87
+ * and the three fable-5 → fable-5-1 breaking changes (forced tool_choice
88
+ * any/tool now 400s, thinking blocks are model-bound, editing earlier turns
89
+ * invalidates them) — Synthase sends tool_choice auto and is append-only,
90
+ * and the pre-commit dispatch probe covers the entry as sent.)
63
91
  * - OpenAI: https://developers.openai.com/api/docs/pricing (GPT-5.6 family GA
64
92
  * 2026-07-09; REPRICED 2026-07-30: -luna cut 80% to $0.20/$1.20, -terra cut
65
93
  * 20% to $2/$12, -sol unchanged $5/$30; cache read 0.1× input; gpt-5.5/
@@ -96,12 +124,16 @@
96
124
  * grok-4.3 still served at $1.25/$2.50 with the bigger 1M window;
97
125
  * grok-code-fast-1 no longer listed — retires 2026-08-15)
98
126
  * - DeepSeek: https://api-docs.deepseek.com/quick_start/pricing (verified
99
- * 2026-08-18; legacy deepseek-chat/-reasoner ids fully retired 2026-07-24 —
127
+ * 2026-08-31; legacy deepseek-chat/-reasoner ids fully retired 2026-07-24 —
100
128
  * never in this catalog. The V4-Pro-GA price RISE effective 2026-08-16T16:00Z
101
129
  * has LANDED and is folded into the base fields, along with the peak-hour 2×
102
- * the same card introduced. The rate card gives the peak windows as
103
- * "01:00 - 04:00 and 06:00 - 10:00 UTC (all other hours are off-peak)" with
104
- * no day qualifier — DAILY, as `peakPricing` models them.)
130
+ * the same card introduced; every rate re-read on the card 2026-08-31 and
131
+ * unchanged. The card now qualifies the windows BY DAY — "01:00 - 04:00 and
132
+ * 06:00 - 10:00 UTC, Monday through Friday (all other hours are off-peak)" —
133
+ * where on 2026-08-18 it carried no day qualifier at all, so the windows are
134
+ * `daysOfWeekUtc`-restricted rather than daily. `deepseek-v4-flash-vision-exp`
135
+ * also appears on the card at flash's rates: EXPERIMENTAL and vision-only-new,
136
+ * deliberately not catalogued.)
105
137
  * - Moonshot: https://platform.kimi.ai/docs/models + DeepInfra's model API for
106
138
  * the US re-host (kimi-k3 flagship 2026-07-16
107
139
  * — 2.8T MoE, 1M ctx, $3/$15 — NOT added: thinking is forced-on with
@@ -134,6 +166,16 @@
134
166
  * $1.65/$4.951), so nothing would ever select it — and carrying both would
135
167
  * put two selectable Alibaba flagships in one family. Revisit only if Alibaba
136
168
  * publishes it as a distinct first-party DashScope model id.)
169
+ * (re-verified 2026-08-28 on the per-model pages, which publish USD rates per
170
+ * region directly — a better source than the CNY pricing table: qwen3.8-max's
171
+ * Singapore implicit-cache rate is $0.25, NOT the 20%/$0.40 the ZH cache doc's
172
+ * standard table implies. That doc names qwen3.8-max, qwen3.8-flash and
173
+ * qwen3.8-2.4t-a95b as exceptions and defers to the console; the model pages
174
+ * are the console's figures. qwen3.7-max's $0.50 (20%) is confirmed unchanged.
175
+ * qwen3.8-flash (2026-08-26) ADDED: $0.15/$0.47, implicit cache $0.016, 1M ctx
176
+ * / 131,072 out, Image+Text+Video input, tools, hybrid thinking ON by default
177
+ * with thinking_budget. It is cn-region-only — api.deepinfra.com has no
178
+ * Qwen/Qwen3.8-Flash — so ALIBABA_US_MODEL_MAP needs no entry.)
137
179
  * - Zhipu: https://docs.z.ai/guides/overview/pricing + docs.z.ai/guides/llm/
138
180
  * glm-5.3 (verified 2026-08-26: glm-5.3 shipped 2026-08-14 and IS in the
139
181
  * catalog — $1.40/$4.40, cached $0.26, i.e. glm-5.2's card unchanged, 1M ctx,
@@ -164,6 +206,41 @@ export const MODELS = [
164
206
  // budget_tokens is REJECTED (400) on fable-5 / opus-4-8 / sonnet-5 and
165
207
  // deprecated on the 4.6 family. Only Haiku 4.5 still uses budget_tokens.
166
208
  // ---------------------------------------------------------------------------
209
+ {
210
+ id: 'claude-fable-5-1',
211
+ provider: 'anthropic',
212
+ label: 'Claude Fable 5.1',
213
+ description: 'Most capable Anthropic — frontier reasoning & long-horizon agents',
214
+ contextWindow: 1_000_000,
215
+ maxOutputTokens: 128_000,
216
+ supportsThinking: true,
217
+ thinkingBudgetTokens: 16_000,
218
+ thinkingConfigurable: true,
219
+ supportedEffortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
220
+ defaultEffortLevel: 'high',
221
+ // Thinking is ALWAYS ON (adaptive); effort is the only depth control, and
222
+ // all five levels are supported (effort docs, verified 2026-09-01).
223
+ // Default/recommended is high; xhigh/max for the most capability-sensitive
224
+ // agentic work, medium/low for routine work.
225
+ supportsVision: true,
226
+ supportsPromptCaching: true,
227
+ supportsTools: true,
228
+ webSearchToolType: 'web_search_20260209',
229
+ // Dynamic-filtering server tools, same as the rest of the 4.6+ Anthropic
230
+ // fleet. Not currently sent by Synthase beyond webSearchToolType
231
+ // (request-shape.ts forwards only that one).
232
+ codeExecutionToolType: 'code_execution_20260521',
233
+ webFetchToolType: 'web_fetch_20260209',
234
+ inputPricePerMTok: 10,
235
+ outputPricePerMTok: 50,
236
+ // Cache write is the standard 1.25× input. Cache READ is the documented
237
+ // exception to Anthropic's 0.1× rule: 0.025× input on fable-5-1 /
238
+ // mythos-5-1 only ("$0.25 / MTok", pricing page footnote 1).
239
+ cacheReadPricePerMTok: 0.25,
240
+ cacheWritePricePerMTok: 12.5,
241
+ // Reliable knowledge cutoff Jun 2026 (model page "Specifications").
242
+ knowledgeCutoff: '2026-06-01',
243
+ },
167
244
  {
168
245
  id: 'claude-fable-5',
169
246
  provider: 'anthropic',
@@ -196,6 +273,11 @@ export const MODELS = [
196
273
  cacheReadPricePerMTok: 1,
197
274
  cacheWritePricePerMTok: 12.5,
198
275
  knowledgeCutoff: '2026-01-01',
276
+ // Superseded by claude-fable-5-1 (same tier, same $10/$50 input/output,
277
+ // cheaper cache reads); Anthropic now lists it under "Legacy models (still
278
+ // available)". Still served and priceable, just not OFFERED.
279
+ deprecatedAt: '2026-09-01',
280
+ supersededBy: 'claude-fable-5-1',
199
281
  },
200
282
  {
201
283
  id: 'claude-opus-5',
@@ -304,13 +386,14 @@ export const MODELS = [
304
386
  // Synthase (request-shape.ts forwards only webSearchToolType).
305
387
  codeExecutionToolType: 'code_execution_20260521',
306
388
  webFetchToolType: 'web_fetch_20260209',
307
- // Standard pricing. Intro pricing ($2/$10) applies through 2026-08-31 —
308
- // billed here at standard so metering never under-charges; revisit after.
309
- inputPricePerMTok: 3,
310
- outputPricePerMTok: 15,
389
+ // The launch "intro" pricing IS the standard price as of 2026-09-01 — the
390
+ // pricing page's own note says the scheduled 2026-09-01 rise to $3/$15
391
+ // will not occur (verified 2026-09-01).
392
+ inputPricePerMTok: 2,
393
+ outputPricePerMTok: 10,
311
394
  // Anthropic 5-minute prompt cache: read 0.1× input, write 1.25× input.
312
- cacheReadPricePerMTok: 0.3,
313
- cacheWritePricePerMTok: 3.75,
395
+ cacheReadPricePerMTok: 0.2,
396
+ cacheWritePricePerMTok: 2.5,
314
397
  knowledgeCutoff: '2026-01-01',
315
398
  },
316
399
  {
@@ -716,7 +799,7 @@ export const MODELS = [
716
799
  // "New Stable" 2026-08-13. LIST price $1.50/$7.50 — same as 3.6-flash.
717
800
  // Google runs a launch promo ($0.75/$3.75, cache read $0.075) through
718
801
  // 2026-12-31; billed here at standard list so metering never under-charges
719
- // (same policy as claude-sonnet-5's intro pricing — see the matching
802
+ // (same policy as gpt-5.6-sol's promo card — see the matching
720
803
  // KNOWN_DIVERGENCES entry in scripts/check-model-freshness.mjs, expiring
721
804
  // 2026-12-31).
722
805
  inputPricePerMTok: 1.5,
@@ -1019,12 +1102,16 @@ export const MODELS = [
1019
1102
  // input cost rose far more than the list prices suggest. Both are free-tier
1020
1103
  // models (flash is `freeTier`, pro is the free-tier planner).
1021
1104
  // The two post-landing re-verifications, both settled 2026-08-18:
1022
- // 1. WEEKDAYS OR DAILY — DAILY. The rate card still says only "Peak hours
1023
- // are 01:00 - 04:00 and 06:00 - 10:00 UTC (all other hours are
1024
- // off-peak)" with no day qualifier (press coverage had described them as
1025
- // weekday-only). `peakPricing` has no day-of-week concept, so if the
1026
- // provider ever qualifies these by day this over-bills every weekend
1027
- // peak window and needs the FIELD extended, not the numbers nudged.
1105
+ // 1. WEEKDAYS OR DAILY — DAILY on 2026-08-18, WEEKDAYS as of 2026-08-31.
1106
+ // The card now reads "Peak hours are 01:00 - 04:00 and 06:00 - 10:00
1107
+ // UTC, Monday through Friday (all other hours are off-peak)"; on
1108
+ // 2026-08-18 the same sentence carried no day qualifier (press coverage
1109
+ // had described them as weekday-only, and it turned out to be right, or
1110
+ // to have become right). That is the case the 2026-08-18 note said would
1111
+ // need the FIELD extended rather than the numbers nudged — so
1112
+ // `peakPricing` windows gained `daysOfWeekUtc` and both entries carry
1113
+ // WEEKDAYS_UTC. Modeling them as daily bills a 2× on ~29 weekend hours a
1114
+ // week that DeepSeek does not charge.
1028
1115
  // 2. THE CN-VS-US DEFAULT — settled per model, and they differ. Post-rise
1029
1116
  // DeepInfra's US flash rates (0.08/0.18/0.016) are BELOW CN's off-peak
1030
1117
  // on both input and output, so Flash defaults US; Pro's US re-host still
@@ -1090,14 +1177,15 @@ export const MODELS = [
1090
1177
  },
1091
1178
  // The peak-hour 2× surcharge is ON the rate card and LIVE since
1092
1179
  // 2026-08-16T16:00Z. Peak = 01:00-04:00 and 06:00-10:00 UTC (Beijing
1093
- // business hours), daily, at exactly 2× the off-peak rates above. Windows
1094
- // like these were once pre-wired ahead of the card and over-billed every
1095
- // peak-window turn for weeks — hence the rule that they only exist here
1096
- // once the provider's own page shows them, which it now does.
1180
+ // business hours) MONDAY THROUGH FRIDAY, at exactly 2× the off-peak rates
1181
+ // above. Windows like these were once pre-wired ahead of the card and
1182
+ // over-billed every peak-window turn for weeks — hence the rule that they
1183
+ // only exist here once the provider's own page shows them, which it now
1184
+ // does.
1097
1185
  peakPricing: {
1098
1186
  windows: [
1099
- { startMinuteUtc: 60, endMinuteUtc: 240 },
1100
- { startMinuteUtc: 360, endMinuteUtc: 600 },
1187
+ { startMinuteUtc: 60, endMinuteUtc: 240, daysOfWeekUtc: WEEKDAYS_UTC },
1188
+ { startMinuteUtc: 360, endMinuteUtc: 600, daysOfWeekUtc: WEEKDAYS_UTC },
1101
1189
  ],
1102
1190
  multiplier: 2,
1103
1191
  },
@@ -1151,13 +1239,13 @@ export const MODELS = [
1151
1239
  regionPricing: {
1152
1240
  us: { inputPricePerMTok: 0.08, outputPricePerMTok: 0.18, cacheReadPricePerMTok: 0.016 },
1153
1241
  },
1154
- // Peak-hour surcharge live since 2026-08-16T16:00Z (see deepseek-v4-pro).
1155
- // It applies to the NATIVE CN card only — this model defaults to the US
1156
- // re-host, which is flat, so most turns never take it.
1242
+ // Peak-hour surcharge live since 2026-08-16T16:00Z, Mon-Fri (see
1243
+ // deepseek-v4-pro). It applies to the NATIVE CN card only — this model
1244
+ // defaults to the US re-host, which is flat, so most turns never take it.
1157
1245
  peakPricing: {
1158
1246
  windows: [
1159
- { startMinuteUtc: 60, endMinuteUtc: 240 },
1160
- { startMinuteUtc: 360, endMinuteUtc: 600 },
1247
+ { startMinuteUtc: 60, endMinuteUtc: 240, daysOfWeekUtc: WEEKDAYS_UTC },
1248
+ { startMinuteUtc: 360, endMinuteUtc: 600, daysOfWeekUtc: WEEKDAYS_UTC },
1161
1249
  ],
1162
1250
  multiplier: 2,
1163
1251
  },
@@ -1469,16 +1557,24 @@ export const MODELS = [
1469
1557
  supportedEffortLevels: ['4K', '8K', '16K', '32K'],
1470
1558
  defaultEffortLevel: '8K',
1471
1559
  effortBudgetTokens: { '4K': 4000, '8K': 8000, '16K': 16000, '32K': 32000 },
1472
- // models.dev claims image+video input, but Alibaba's own model catalog
1473
- // lists qwen3.8-max under text generation (VL remains a separate line) —
1474
- // false until the provider's page says otherwise.
1560
+ // The provider's own model page DOES list Image/Text/Video input (checked
1561
+ // 2026-08-28, superseding the earlier "text generation only" reading of the
1562
+ // model catalog page). Kept false anyway: this model's DEFAULT region is the
1563
+ // DeepInfra US re-host, which serves it as `text-generation` — vision is not
1564
+ // offerable where it actually dispatches. Native-only qwen3.8-flash below
1565
+ // carries the flag.
1475
1566
  supportsVision: false,
1476
1567
  supportsPromptCaching: true,
1477
1568
  supportsTools: true,
1478
1569
  inputPricePerMTok: 2,
1479
1570
  outputPricePerMTok: 6,
1480
- // Implicit context cache: read = 20% of input, no write premium.
1481
- cacheReadPricePerMTok: 0.4,
1571
+ // Implicit context cache. The ZH cache doc's standard 20% does NOT apply
1572
+ // here: that doc names qwen3.8-max as an exception and points at the
1573
+ // console, and the model page publishes the real Singapore rate — $0.25,
1574
+ // i.e. 12.5% of input (verified 2026-08-28 on
1575
+ // alibabacloud.com/help/en/model-studio/qwen3-8-max). Implicit creation is
1576
+ // not billed beyond input, so write stays 1× input.
1577
+ cacheReadPricePerMTok: 0.25,
1482
1578
  cacheWritePricePerMTok: 2,
1483
1579
  regions: ['us', 'cn'],
1484
1580
  // US = DeepInfra (Qwen/Qwen3.8-Max), verified 2026-08-14 against
@@ -1492,6 +1588,49 @@ export const MODELS = [
1492
1588
  // Not published by Alibaba — best-effort estimate.
1493
1589
  knowledgeCutoff: '2026-04-01',
1494
1590
  },
1591
+ {
1592
+ id: 'qwen3.8-flash',
1593
+ provider: 'alibaba',
1594
+ label: 'Qwen3.8 Flash',
1595
+ description: 'Alibaba cheap tier — 1M context, multimodal, hybrid thinking',
1596
+ // Model page: context window 1,000,000; max input 991,808 (983,616 in
1597
+ // thinking mode); max chain-of-thought 262,144; max output 131,072.
1598
+ contextWindow: 1_000_000,
1599
+ maxOutputTokens: 131_072,
1600
+ // Same hybrid-thinking mechanism as qwen3.8-max — the deep-thinking doc
1601
+ // lists the "Qwen3.8 Flash series" as hybrid with thinking ON by default,
1602
+ // and thinking_budget applies — so effort scales the budget identically.
1603
+ supportsThinking: true,
1604
+ thinkingBudgetTokens: 8_000,
1605
+ thinkingConfigurable: true,
1606
+ supportedEffortLevels: ['4K', '8K', '16K', '32K'],
1607
+ defaultEffortLevel: '8K',
1608
+ effortBudgetTokens: { '4K': 4000, '8K': 8000, '16K': 16000, '32K': 32000 },
1609
+ // Model page lists Image / Text / Video input. Unlike qwen3.8-max this one
1610
+ // has no US re-host to lose it to — it only ever dispatches to the native
1611
+ // host, which serves the multimodal surface.
1612
+ supportsVision: true,
1613
+ supportsPromptCaching: true,
1614
+ supportsTools: true,
1615
+ // Singapore International list card, published in USD on the model page:
1616
+ // $0.15 / $0.47, implicit cache $0.016. (Beijing is cheaper at
1617
+ // $0.113/$0.382/$0.014; the bond calls the international endpoint.)
1618
+ inputPricePerMTok: 0.15,
1619
+ outputPricePerMTok: 0.47,
1620
+ // Implicit context cache. Like qwen3.8-max this model is an explicit
1621
+ // exception to the ZH doc's standard 20%; the published rate is $0.016
1622
+ // (~10.7% of input). Creation is not billed beyond input → write = 1×.
1623
+ cacheReadPricePerMTok: 0.016,
1624
+ cacheWritePricePerMTok: 0.15,
1625
+ // No US re-host exists — DeepInfra serves Qwen3.8-Max, Qwen3.8-27B and
1626
+ // Qwen3.8-2.4T-A95B but returns "model not found" for Qwen/Qwen3.8-Flash
1627
+ // (checked 2026-08-28), so this is pinned to the native host and bills the
1628
+ // card above. ALIBABA_US_MODEL_MAP therefore needs no entry.
1629
+ regions: ['cn'],
1630
+ // Not published by Alibaba — best-effort estimate, same 3.8 generation as
1631
+ // qwen3.8-max.
1632
+ knowledgeCutoff: '2026-04-01',
1633
+ },
1495
1634
  {
1496
1635
  id: 'qwen3.7-max',
1497
1636
  provider: 'alibaba',
package/dist/types.d.ts CHANGED
@@ -224,11 +224,22 @@ export interface ModelDefinition {
224
224
  *
225
225
  * Windows are minutes-since-midnight UTC, half-open `[start, end)`; a window
226
226
  * may wrap midnight (`start > end`).
227
+ *
228
+ * `daysOfWeekUtc` restricts a window to certain UTC weekdays (`0` = Sunday …
229
+ * `6` = Saturday); omitted means every day. A provider that prices its peak
230
+ * by BUSINESS hours qualifies them by day, and a day-less window over-bills
231
+ * every weekend hour inside it at the full multiplier — DeepSeek's card
232
+ * carried no day qualifier when these windows landed on 2026-08-16 and added
233
+ * "Monday through Friday" by 2026-08-31, which is exactly the 2× weekend
234
+ * over-bill this field exists to prevent. A wrapping window belongs to the
235
+ * day it STARTS on, so its post-midnight tail is still matched against the
236
+ * previous day.
227
237
  */
228
238
  peakPricing?: {
229
239
  windows: {
230
240
  startMinuteUtc: number;
231
241
  endMinuteUtc: number;
242
+ daysOfWeekUtc?: number[];
232
243
  }[];
233
244
  multiplier: number;
234
245
  };
@@ -280,6 +291,7 @@ export interface ModelDefinition {
280
291
  windows: {
281
292
  startMinuteUtc: number;
282
293
  endMinuteUtc: number;
294
+ daysOfWeekUtc?: number[];
283
295
  }[];
284
296
  multiplier: number;
285
297
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,UAAU,GACV,MAAM,GACN,UAAU,GACV,SAAS,GACT,SAAS,GACT,OAAO;AACT;;;;;GAKG;GACD,QAAQ,CAAA;AAEZ;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAA;AAEhC;;;GAGG;AAC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AAA;KAChB,CAAA;IACD;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE;QACZ,gEAAgE;QAChE,iBAAiB,EAAE,MAAM,CAAA;QACzB,wDAAwD;QACxD,kBAAkB,EAAE,MAAM,CAAA;QAC1B,mEAAmE;QACnE,qBAAqB,EAAE,MAAM,CAAA;QAC7B,oEAAoE;QACpE,sBAAsB,EAAE,MAAM,CAAA;KAC/B,CAAA;IACD,mDAAmD;IACnD,eAAe,EAAE,MAAM,CAAA;IACvB;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAA;IACZ,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAA;IACf,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAA;IACd,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,eAAe,EAAE,CAAA;IACzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAC7B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/api-resource-ai-models",
3
- "version": "1.2.7",
3
+ "version": "1.4.0",
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",