@molecule/api-resource-ai-models 1.3.0 → 1.5.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-28T19:44:44.140Z
6
+ Generated: 2026-09-02T19:41:05.247Z
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/
@@ -807,18 +846,31 @@ Sources (verified 2026-07-28; OpenAI re-verified 2026-07-31 after the
807
846
  at the post-promo list rate ($1.50/$7.50, cache read $0.15) under the same
808
847
  never-under-charge policy, each with a KNOWN_DIVERGENCES entry expiring
809
848
  2026-12-31. gemini-3.5-flash carries no promo: still $1.50/$9.00, $0.15)
849
+ (re-verified 2026-09-02: gemini-3.8-flash "New Stable" — supersedes
850
+ 3.7-flash, which the models page now calls "previous-generation". THIRD id
851
+ on the same flash-tier promo row, verbatim "$0.75 through December 31,
852
+ 2026. $1.50 starting January 1, 2027." / "$3.75 … $7.50" / "$0.075 …
853
+ $0.15", so it too is cataloged at list with a KNOWN_DIVERGENCES entry.
854
+ Specs from /docs/models/gemini-3.8-flash: 1M ctx / 65,536 out, thinking
855
+ low|medium|high, vision, tools, caching, search grounding, code execution,
856
+ url context — identical surface to 3.7-flash. Knowledge cutoff is published
857
+ by neither Google nor models.dev for this id)
810
858
  - xAI: https://docs.x.ai/developers/models + /developers/grok-4-5
811
859
  (grok-4.5 flagship 2026-07-08: $2/$6, 500K ctx, ≥200K prompts bill 2× —
812
860
  not modeled; reasoning_effort low|medium|high default high, image input;
813
861
  grok-4.3 still served at $1.25/$2.50 with the bigger 1M window;
814
862
  grok-code-fast-1 no longer listed — retires 2026-08-15)
815
863
  - DeepSeek: https://api-docs.deepseek.com/quick_start/pricing (verified
816
- 2026-08-18; legacy deepseek-chat/-reasoner ids fully retired 2026-07-24 —
864
+ 2026-08-31; legacy deepseek-chat/-reasoner ids fully retired 2026-07-24 —
817
865
  never in this catalog. The V4-Pro-GA price RISE effective 2026-08-16T16:00Z
818
866
  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.)
867
+ the same card introduced; every rate re-read on the card 2026-08-31 and
868
+ unchanged. The card now qualifies the windows BY DAY — "01:00 - 04:00 and
869
+ 06:00 - 10:00 UTC, Monday through Friday (all other hours are off-peak)" —
870
+ where on 2026-08-18 it carried no day qualifier at all, so the windows are
871
+ `daysOfWeekUtc`-restricted rather than daily. `deepseek-v4-flash-vision-exp`
872
+ also appears on the card at flash's rates: EXPERIMENTAL and vision-only-new,
873
+ deliberately not catalogued.)
822
874
  - Moonshot: https://platform.kimi.ai/docs/models + DeepInfra's model API for
823
875
  the US re-host (kimi-k3 flagship 2026-07-16
824
876
  — 2.8T MoE, 1M ctx, $3/$15 — NOT added: thinking is forced-on with
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,GACtE,SAAS,eAAe,EAAE,CAI5B;AAoBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,EAAE,GAAE,IAAiB,GACpB,eAAe,CAgBjB;AAED;;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,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/
@@ -91,18 +114,31 @@ import type { ModelDefinition } from './types.js';
91
114
  * at the post-promo list rate ($1.50/$7.50, cache read $0.15) under the same
92
115
  * never-under-charge policy, each with a KNOWN_DIVERGENCES entry expiring
93
116
  * 2026-12-31. gemini-3.5-flash carries no promo: still $1.50/$9.00, $0.15)
117
+ * (re-verified 2026-09-02: gemini-3.8-flash "New Stable" — supersedes
118
+ * 3.7-flash, which the models page now calls "previous-generation". THIRD id
119
+ * on the same flash-tier promo row, verbatim "$0.75 through December 31,
120
+ * 2026. $1.50 starting January 1, 2027." / "$3.75 … $7.50" / "$0.075 …
121
+ * $0.15", so it too is cataloged at list with a KNOWN_DIVERGENCES entry.
122
+ * Specs from /docs/models/gemini-3.8-flash: 1M ctx / 65,536 out, thinking
123
+ * low|medium|high, vision, tools, caching, search grounding, code execution,
124
+ * url context — identical surface to 3.7-flash. Knowledge cutoff is published
125
+ * by neither Google nor models.dev for this id)
94
126
  * - xAI: https://docs.x.ai/developers/models + /developers/grok-4-5
95
127
  * (grok-4.5 flagship 2026-07-08: $2/$6, 500K ctx, ≥200K prompts bill 2× —
96
128
  * not modeled; reasoning_effort low|medium|high default high, image input;
97
129
  * grok-4.3 still served at $1.25/$2.50 with the bigger 1M window;
98
130
  * grok-code-fast-1 no longer listed — retires 2026-08-15)
99
131
  * - DeepSeek: https://api-docs.deepseek.com/quick_start/pricing (verified
100
- * 2026-08-18; legacy deepseek-chat/-reasoner ids fully retired 2026-07-24 —
132
+ * 2026-08-31; legacy deepseek-chat/-reasoner ids fully retired 2026-07-24 —
101
133
  * never in this catalog. The V4-Pro-GA price RISE effective 2026-08-16T16:00Z
102
134
  * 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.)
135
+ * the same card introduced; every rate re-read on the card 2026-08-31 and
136
+ * unchanged. The card now qualifies the windows BY DAY — "01:00 - 04:00 and
137
+ * 06:00 - 10:00 UTC, Monday through Friday (all other hours are off-peak)" —
138
+ * where on 2026-08-18 it carried no day qualifier at all, so the windows are
139
+ * `daysOfWeekUtc`-restricted rather than daily. `deepseek-v4-flash-vision-exp`
140
+ * also appears on the card at flash's rates: EXPERIMENTAL and vision-only-new,
141
+ * deliberately not catalogued.)
106
142
  * - Moonshot: https://platform.kimi.ai/docs/models + DeepInfra's model API for
107
143
  * the US re-host (kimi-k3 flagship 2026-07-16
108
144
  * — 2.8T MoE, 1M ctx, $3/$15 — NOT added: thinking is forced-on with
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6JG;AACH,eAAO,MAAM,MAAM,EAAE,SAAS,eAAe,EAymDnC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiMG;AACH,eAAO,MAAM,MAAM,EAAE,SAAS,eAAe,EAusDnC,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/
@@ -90,18 +118,31 @@
90
118
  * at the post-promo list rate ($1.50/$7.50, cache read $0.15) under the same
91
119
  * never-under-charge policy, each with a KNOWN_DIVERGENCES entry expiring
92
120
  * 2026-12-31. gemini-3.5-flash carries no promo: still $1.50/$9.00, $0.15)
121
+ * (re-verified 2026-09-02: gemini-3.8-flash "New Stable" — supersedes
122
+ * 3.7-flash, which the models page now calls "previous-generation". THIRD id
123
+ * on the same flash-tier promo row, verbatim "$0.75 through December 31,
124
+ * 2026. $1.50 starting January 1, 2027." / "$3.75 … $7.50" / "$0.075 …
125
+ * $0.15", so it too is cataloged at list with a KNOWN_DIVERGENCES entry.
126
+ * Specs from /docs/models/gemini-3.8-flash: 1M ctx / 65,536 out, thinking
127
+ * low|medium|high, vision, tools, caching, search grounding, code execution,
128
+ * url context — identical surface to 3.7-flash. Knowledge cutoff is published
129
+ * by neither Google nor models.dev for this id)
93
130
  * - xAI: https://docs.x.ai/developers/models + /developers/grok-4-5
94
131
  * (grok-4.5 flagship 2026-07-08: $2/$6, 500K ctx, ≥200K prompts bill 2× —
95
132
  * not modeled; reasoning_effort low|medium|high default high, image input;
96
133
  * grok-4.3 still served at $1.25/$2.50 with the bigger 1M window;
97
134
  * grok-code-fast-1 no longer listed — retires 2026-08-15)
98
135
  * - DeepSeek: https://api-docs.deepseek.com/quick_start/pricing (verified
99
- * 2026-08-18; legacy deepseek-chat/-reasoner ids fully retired 2026-07-24 —
136
+ * 2026-08-31; legacy deepseek-chat/-reasoner ids fully retired 2026-07-24 —
100
137
  * never in this catalog. The V4-Pro-GA price RISE effective 2026-08-16T16:00Z
101
138
  * 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.)
139
+ * the same card introduced; every rate re-read on the card 2026-08-31 and
140
+ * unchanged. The card now qualifies the windows BY DAY — "01:00 - 04:00 and
141
+ * 06:00 - 10:00 UTC, Monday through Friday (all other hours are off-peak)" —
142
+ * where on 2026-08-18 it carried no day qualifier at all, so the windows are
143
+ * `daysOfWeekUtc`-restricted rather than daily. `deepseek-v4-flash-vision-exp`
144
+ * also appears on the card at flash's rates: EXPERIMENTAL and vision-only-new,
145
+ * deliberately not catalogued.)
105
146
  * - Moonshot: https://platform.kimi.ai/docs/models + DeepInfra's model API for
106
147
  * the US re-host (kimi-k3 flagship 2026-07-16
107
148
  * — 2.8T MoE, 1M ctx, $3/$15 — NOT added: thinking is forced-on with
@@ -174,6 +215,41 @@ export const MODELS = [
174
215
  // budget_tokens is REJECTED (400) on fable-5 / opus-4-8 / sonnet-5 and
175
216
  // deprecated on the 4.6 family. Only Haiku 4.5 still uses budget_tokens.
176
217
  // ---------------------------------------------------------------------------
218
+ {
219
+ id: 'claude-fable-5-1',
220
+ provider: 'anthropic',
221
+ label: 'Claude Fable 5.1',
222
+ description: 'Most capable Anthropic — frontier reasoning & long-horizon agents',
223
+ contextWindow: 1_000_000,
224
+ maxOutputTokens: 128_000,
225
+ supportsThinking: true,
226
+ thinkingBudgetTokens: 16_000,
227
+ thinkingConfigurable: true,
228
+ supportedEffortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
229
+ defaultEffortLevel: 'high',
230
+ // Thinking is ALWAYS ON (adaptive); effort is the only depth control, and
231
+ // all five levels are supported (effort docs, verified 2026-09-01).
232
+ // Default/recommended is high; xhigh/max for the most capability-sensitive
233
+ // agentic work, medium/low for routine work.
234
+ supportsVision: true,
235
+ supportsPromptCaching: true,
236
+ supportsTools: true,
237
+ webSearchToolType: 'web_search_20260209',
238
+ // Dynamic-filtering server tools, same as the rest of the 4.6+ Anthropic
239
+ // fleet. Not currently sent by Synthase beyond webSearchToolType
240
+ // (request-shape.ts forwards only that one).
241
+ codeExecutionToolType: 'code_execution_20260521',
242
+ webFetchToolType: 'web_fetch_20260209',
243
+ inputPricePerMTok: 10,
244
+ outputPricePerMTok: 50,
245
+ // Cache write is the standard 1.25× input. Cache READ is the documented
246
+ // exception to Anthropic's 0.1× rule: 0.025× input on fable-5-1 /
247
+ // mythos-5-1 only ("$0.25 / MTok", pricing page footnote 1).
248
+ cacheReadPricePerMTok: 0.25,
249
+ cacheWritePricePerMTok: 12.5,
250
+ // Reliable knowledge cutoff Jun 2026 (model page "Specifications").
251
+ knowledgeCutoff: '2026-06-01',
252
+ },
177
253
  {
178
254
  id: 'claude-fable-5',
179
255
  provider: 'anthropic',
@@ -206,6 +282,11 @@ export const MODELS = [
206
282
  cacheReadPricePerMTok: 1,
207
283
  cacheWritePricePerMTok: 12.5,
208
284
  knowledgeCutoff: '2026-01-01',
285
+ // Superseded by claude-fable-5-1 (same tier, same $10/$50 input/output,
286
+ // cheaper cache reads); Anthropic now lists it under "Legacy models (still
287
+ // available)". Still served and priceable, just not OFFERED.
288
+ deprecatedAt: '2026-09-01',
289
+ supersededBy: 'claude-fable-5-1',
209
290
  },
210
291
  {
211
292
  id: 'claude-opus-5',
@@ -314,13 +395,14 @@ export const MODELS = [
314
395
  // Synthase (request-shape.ts forwards only webSearchToolType).
315
396
  codeExecutionToolType: 'code_execution_20260521',
316
397
  webFetchToolType: 'web_fetch_20260209',
317
- // Standard pricing. Intro pricing ($2/$10) applies through 2026-08-31 —
318
- // billed here at standard so metering never under-charges; revisit after.
319
- inputPricePerMTok: 3,
320
- outputPricePerMTok: 15,
398
+ // The launch "intro" pricing IS the standard price as of 2026-09-01 — the
399
+ // pricing page's own note says the scheduled 2026-09-01 rise to $3/$15
400
+ // will not occur (verified 2026-09-01).
401
+ inputPricePerMTok: 2,
402
+ outputPricePerMTok: 10,
321
403
  // Anthropic 5-minute prompt cache: read 0.1× input, write 1.25× input.
322
- cacheReadPricePerMTok: 0.3,
323
- cacheWritePricePerMTok: 3.75,
404
+ cacheReadPricePerMTok: 0.2,
405
+ cacheWritePricePerMTok: 2.5,
324
406
  knowledgeCutoff: '2026-01-01',
325
407
  },
326
408
  {
@@ -703,11 +785,48 @@ export const MODELS = [
703
785
  // replace outright: the google bond has never been implemented/wired, so no
704
786
  // historical usage can reference the old ids.
705
787
  // ---------------------------------------------------------------------------
788
+ {
789
+ id: 'gemini-3.8-flash',
790
+ provider: 'google',
791
+ label: 'Gemini 3.8 Flash',
792
+ description: 'Google agentic flagship — long-horizon engineering & autonomous agents',
793
+ // Verified against /docs/models/gemini-3.8-flash (2026-09-02) — same limits
794
+ // and capability surface as 3.7-flash.
795
+ contextWindow: 1_048_576,
796
+ maxOutputTokens: 65_536,
797
+ supportsThinking: true,
798
+ thinkingBudgetTokens: 10_000,
799
+ thinkingConfigurable: true,
800
+ // thinking_level low|medium|high — minimal NOT supported on this model.
801
+ supportedEffortLevels: ['low', 'medium', 'high'],
802
+ defaultEffortLevel: 'medium',
803
+ supportsVision: true,
804
+ supportsPromptCaching: true,
805
+ supportsTools: true,
806
+ webSearchToolType: 'google_search',
807
+ codeExecutionToolType: 'code_execution',
808
+ webFetchToolType: 'url_context',
809
+ // "New Stable" 2026-09-02. LIST price $1.50/$7.50 — same card as 3.7- and
810
+ // 3.6-flash, and on the same flash-tier launch promo ($0.75/$3.75, cache
811
+ // read $0.075) through 2026-12-31; billed here at standard list so metering
812
+ // never under-charges (identical policy and expiry to the two entries
813
+ // below — see the matching KNOWN_DIVERGENCES entry in
814
+ // scripts/check-model-freshness.mjs).
815
+ inputPricePerMTok: 1.5,
816
+ outputPricePerMTok: 7.5,
817
+ // Gemini context cache: read $0.15/M (0.1× input), no write premium
818
+ // (storage billed separately per hour — not modeled).
819
+ cacheReadPricePerMTok: 0.15,
820
+ cacheWritePricePerMTok: 1.5,
821
+ // Published by neither Google's model page nor models.dev for this id —
822
+ // carried from 3.7-flash (same generation) as a best-effort estimate.
823
+ knowledgeCutoff: '2026-03-01',
824
+ },
706
825
  {
707
826
  id: 'gemini-3.7-flash',
708
827
  provider: 'google',
709
828
  label: 'Gemini 3.7 Flash',
710
- description: 'Google agentic flagship — complex coding & multi-step execution',
829
+ description: 'Previous Google agentic flagship — complex coding & multi-step execution',
711
830
  // Verified against /docs/models/gemini-3.7-flash (2026-08-13).
712
831
  contextWindow: 1_048_576,
713
832
  maxOutputTokens: 65_536,
@@ -726,7 +845,7 @@ export const MODELS = [
726
845
  // "New Stable" 2026-08-13. LIST price $1.50/$7.50 — same as 3.6-flash.
727
846
  // Google runs a launch promo ($0.75/$3.75, cache read $0.075) through
728
847
  // 2026-12-31; billed here at standard list so metering never under-charges
729
- // (same policy as claude-sonnet-5's intro pricing — see the matching
848
+ // (same policy as gpt-5.6-sol's promo card — see the matching
730
849
  // KNOWN_DIVERGENCES entry in scripts/check-model-freshness.mjs, expiring
731
850
  // 2026-12-31).
732
851
  inputPricePerMTok: 1.5,
@@ -737,6 +856,11 @@ export const MODELS = [
737
856
  cacheWritePricePerMTok: 1.5,
738
857
  // Not on Google's docs — models.dev reports 2026-03 (lead, not authority).
739
858
  knowledgeCutoff: '2026-03-01',
859
+ // Superseded by gemini-3.8-flash (2026-09-02) — same flash tier, same list
860
+ // price; Google's own models page now calls 3.7 "previous-generation".
861
+ // Still served upstream, so it stays priceable.
862
+ deprecatedAt: '2026-09-02',
863
+ supersededBy: 'gemini-3.8-flash',
740
864
  },
741
865
  {
742
866
  id: 'gemini-3.6-flash',
@@ -777,9 +901,11 @@ export const MODELS = [
777
901
  knowledgeCutoff: '2026-01-01',
778
902
  // Superseded by gemini-3.7-flash (2026-08-13) — same flash tier, same list
779
903
  // price; Google's own models page now calls 3.6 "previous-generation".
780
- // Still served upstream, so it stays priceable.
904
+ // Still served upstream, so it stays priceable. Re-pointed to
905
+ // gemini-3.8-flash on 2026-09-02 when 3.7 was itself deprecated —
906
+ // supersededBy must target a SELECTABLE model, never a chain.
781
907
  deprecatedAt: '2026-08-13',
782
- supersededBy: 'gemini-3.7-flash',
908
+ supersededBy: 'gemini-3.8-flash',
783
909
  },
784
910
  {
785
911
  id: 'gemini-3.5-flash',
@@ -810,11 +936,11 @@ export const MODELS = [
810
936
  cacheWritePricePerMTok: 1.5,
811
937
  knowledgeCutoff: '2025-01-01',
812
938
  // Superseded within the flash tier (first by 3.6-flash on 2026-07-21, now
813
- // pointed one hop to gemini-3.7-flash — supersededBy must target a
939
+ // pointed one hop to gemini-3.8-flash — supersededBy must target a
814
940
  // SELECTABLE model, never a chain). Still served upstream, so it stays
815
941
  // priceable.
816
942
  deprecatedAt: '2026-07-21',
817
- supersededBy: 'gemini-3.7-flash',
943
+ supersededBy: 'gemini-3.8-flash',
818
944
  },
819
945
  {
820
946
  id: 'gemini-3.1-pro-preview',
@@ -1029,12 +1155,16 @@ export const MODELS = [
1029
1155
  // input cost rose far more than the list prices suggest. Both are free-tier
1030
1156
  // models (flash is `freeTier`, pro is the free-tier planner).
1031
1157
  // The two post-landing re-verifications, both settled 2026-08-18:
1032
- // 1. WEEKDAYS OR DAILY — DAILY. The rate card still says only "Peak hours
1033
- // are 01:00 - 04:00 and 06:00 - 10:00 UTC (all other hours are
1034
- // off-peak)" with no day qualifier (press coverage had described them as
1035
- // weekday-only). `peakPricing` has no day-of-week concept, so if the
1036
- // provider ever qualifies these by day this over-bills every weekend
1037
- // peak window and needs the FIELD extended, not the numbers nudged.
1158
+ // 1. WEEKDAYS OR DAILY — DAILY on 2026-08-18, WEEKDAYS as of 2026-08-31.
1159
+ // The card now reads "Peak hours are 01:00 - 04:00 and 06:00 - 10:00
1160
+ // UTC, Monday through Friday (all other hours are off-peak)"; on
1161
+ // 2026-08-18 the same sentence carried no day qualifier (press coverage
1162
+ // had described them as weekday-only, and it turned out to be right, or
1163
+ // to have become right). That is the case the 2026-08-18 note said would
1164
+ // need the FIELD extended rather than the numbers nudged — so
1165
+ // `peakPricing` windows gained `daysOfWeekUtc` and both entries carry
1166
+ // WEEKDAYS_UTC. Modeling them as daily bills a 2× on ~29 weekend hours a
1167
+ // week that DeepSeek does not charge.
1038
1168
  // 2. THE CN-VS-US DEFAULT — settled per model, and they differ. Post-rise
1039
1169
  // DeepInfra's US flash rates (0.08/0.18/0.016) are BELOW CN's off-peak
1040
1170
  // on both input and output, so Flash defaults US; Pro's US re-host still
@@ -1100,14 +1230,15 @@ export const MODELS = [
1100
1230
  },
1101
1231
  // The peak-hour 2× surcharge is ON the rate card and LIVE since
1102
1232
  // 2026-08-16T16:00Z. Peak = 01:00-04:00 and 06:00-10:00 UTC (Beijing
1103
- // business hours), daily, at exactly 2× the off-peak rates above. Windows
1104
- // like these were once pre-wired ahead of the card and over-billed every
1105
- // peak-window turn for weeks — hence the rule that they only exist here
1106
- // once the provider's own page shows them, which it now does.
1233
+ // business hours) MONDAY THROUGH FRIDAY, at exactly 2× the off-peak rates
1234
+ // above. Windows like these were once pre-wired ahead of the card and
1235
+ // over-billed every peak-window turn for weeks — hence the rule that they
1236
+ // only exist here once the provider's own page shows them, which it now
1237
+ // does.
1107
1238
  peakPricing: {
1108
1239
  windows: [
1109
- { startMinuteUtc: 60, endMinuteUtc: 240 },
1110
- { startMinuteUtc: 360, endMinuteUtc: 600 },
1240
+ { startMinuteUtc: 60, endMinuteUtc: 240, daysOfWeekUtc: WEEKDAYS_UTC },
1241
+ { startMinuteUtc: 360, endMinuteUtc: 600, daysOfWeekUtc: WEEKDAYS_UTC },
1111
1242
  ],
1112
1243
  multiplier: 2,
1113
1244
  },
@@ -1161,13 +1292,13 @@ export const MODELS = [
1161
1292
  regionPricing: {
1162
1293
  us: { inputPricePerMTok: 0.08, outputPricePerMTok: 0.18, cacheReadPricePerMTok: 0.016 },
1163
1294
  },
1164
- // Peak-hour surcharge live since 2026-08-16T16:00Z (see deepseek-v4-pro).
1165
- // It applies to the NATIVE CN card only — this model defaults to the US
1166
- // re-host, which is flat, so most turns never take it.
1295
+ // Peak-hour surcharge live since 2026-08-16T16:00Z, Mon-Fri (see
1296
+ // deepseek-v4-pro). It applies to the NATIVE CN card only — this model
1297
+ // defaults to the US re-host, which is flat, so most turns never take it.
1167
1298
  peakPricing: {
1168
1299
  windows: [
1169
- { startMinuteUtc: 60, endMinuteUtc: 240 },
1170
- { startMinuteUtc: 360, endMinuteUtc: 600 },
1300
+ { startMinuteUtc: 60, endMinuteUtc: 240, daysOfWeekUtc: WEEKDAYS_UTC },
1301
+ { startMinuteUtc: 360, endMinuteUtc: 600, daysOfWeekUtc: WEEKDAYS_UTC },
1171
1302
  ],
1172
1303
  multiplier: 2,
1173
1304
  },
@@ -1665,9 +1796,13 @@ export const MODELS = [
1665
1796
  // GLM context cache: read ≈0.19× input, no write premium.
1666
1797
  cacheReadPricePerMTok: 0.26,
1667
1798
  cacheWritePricePerMTok: 1.4,
1668
- // No US re-host exists — DeepInfra serves GLM-5.2 and GLM-5.3-Flash but
1669
- // returns "model not found" for zai-org/GLM-5.3 (checked 2026-08-26), so
1670
- // this is pinned to the native host and bills the list card above.
1799
+ // Pinned to the native host, billing the list card above. DeepInfra has
1800
+ // since STARTED serving zai-org/GLM-5.3 (it 404'd when this was cataloged
1801
+ // on 2026-08-26; live 2026-09-02 at $1.20/$4.00, cache read 0.1× = $0.12,
1802
+ // i.e. below native). Adding 'us' here is not a catalog-only edit — it
1803
+ // needs a matching entry in molecule-dev's region-model-maps.ts and a
1804
+ // regionPricing block, moved together, or dispatch sends the canonical id
1805
+ // and 404s. Left as a human decision.
1671
1806
  regions: ['cn'],
1672
1807
  // Same base weights as glm-5.2, so the same best-effort estimate — Z.ai
1673
1808
  // publishes no cutoff.
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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CAAC;gBAAC,YAAY,EAAE,MAAM,CAAC;gBAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;aAAE,EAAE,CAAA;YACrF,UAAU,EAAE,MAAM,CAAA;SACnB,CAAA;QACD,6EAA6E;QAC7E,MAAM,CAAC,EAAE,MAAM,CAAA;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.3.0",
3
+ "version": "1.5.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",