@molecule/api-resource-ai-models 1.19.2 → 1.20.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/dist/models.d.ts CHANGED
@@ -224,6 +224,23 @@ import type { ModelDefinition } from './types.js';
224
224
  * unpublished by Google — models.dev lead 2026-03. Does NOT supersede
225
225
  * 3.8-flash: different tier — flash is the $1.50/$7.50 fast/agentic line
226
226
  * Google still recommends, and no Gemini 4 flash id exists yet.)
227
+ * (verified 2026-11-12: gemini-4-hydrogen "Stable" — ADDED, the flash-tier
228
+ * successor (the what's-new page: "Recommended upgrade from Gemini 3.8
229
+ * Flash and earlier Gemini 3 and 2.5 models"), so gemini-3.8-flash is now
230
+ * superseded and 3.7/3.6/3.5 repointed one hop. Verified on the provider's
231
+ * own pages: /docs/pricing §Gemini 4 Hydrogen Standard $1.50/$7.50,
232
+ * implicit cache read $0.075 (0.05× input, the Gemini 4 ratio; explicit
233
+ * caching unsupported, no write premium), search grounding $14/1k after the
234
+ * shared 5,000/month free allowance, NO launch-promo row (unlike the 3.x
235
+ * flash launches — flat list rates, no KNOWN_DIVERGENCES needed);
236
+ * /docs/models/gemini-4-hydrogen: 1M unified ctx / 65,536 synchronous out,
237
+ * text+image+video+audio+PDF input, function calling + search grounding +
238
+ * code execution + URL context, Stable id; /docs/thinking: thinking_level
239
+ * low|medium|high|xhigh DEFAULT HIGH — hydrogen introduces xhigh, minimal
240
+ * unsupported on Gemini 4. Knowledge cutoff unpublished by Google (model
241
+ * page, what's-new page and model card all silent) — models.dev lead
242
+ * 2026-03, same policy as argon. gemini-4-carbon ($2/$10, 2026-11-10) also
243
+ * exists but was NOT approved for the catalog.)
227
244
  * - xAI: https://docs.x.ai/developers/models + /developers/grok-4-7 +
228
245
  * /developers/model-capabilities/text/reasoning (re-read 2026-09-30:
229
246
  * grok-4.7 flagship: $2/$6, cached $0.50, 500K ctx, ≥200K prompts bill 2× —
@@ -1 +1 @@
1
- {"version":3,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqaG;AACH,eAAO,MAAM,MAAM,EAAE,SAAS,eAAe,EAqrFnC,CAAA"}
package/dist/models.js CHANGED
@@ -276,6 +276,23 @@ const CHINA_PUBLIC_HOLIDAYS = [
276
276
  * unpublished by Google — models.dev lead 2026-03. Does NOT supersede
277
277
  * 3.8-flash: different tier — flash is the $1.50/$7.50 fast/agentic line
278
278
  * Google still recommends, and no Gemini 4 flash id exists yet.)
279
+ * (verified 2026-11-12: gemini-4-hydrogen "Stable" — ADDED, the flash-tier
280
+ * successor (the what's-new page: "Recommended upgrade from Gemini 3.8
281
+ * Flash and earlier Gemini 3 and 2.5 models"), so gemini-3.8-flash is now
282
+ * superseded and 3.7/3.6/3.5 repointed one hop. Verified on the provider's
283
+ * own pages: /docs/pricing §Gemini 4 Hydrogen Standard $1.50/$7.50,
284
+ * implicit cache read $0.075 (0.05× input, the Gemini 4 ratio; explicit
285
+ * caching unsupported, no write premium), search grounding $14/1k after the
286
+ * shared 5,000/month free allowance, NO launch-promo row (unlike the 3.x
287
+ * flash launches — flat list rates, no KNOWN_DIVERGENCES needed);
288
+ * /docs/models/gemini-4-hydrogen: 1M unified ctx / 65,536 synchronous out,
289
+ * text+image+video+audio+PDF input, function calling + search grounding +
290
+ * code execution + URL context, Stable id; /docs/thinking: thinking_level
291
+ * low|medium|high|xhigh DEFAULT HIGH — hydrogen introduces xhigh, minimal
292
+ * unsupported on Gemini 4. Knowledge cutoff unpublished by Google (model
293
+ * page, what's-new page and model card all silent) — models.dev lead
294
+ * 2026-03, same policy as argon. gemini-4-carbon ($2/$10, 2026-11-10) also
295
+ * exists but was NOT approved for the catalog.)
279
296
  * - xAI: https://docs.x.ai/developers/models + /developers/grok-4-7 +
280
297
  * /developers/model-capabilities/text/reasoning (re-read 2026-09-30:
281
298
  * grok-4.7 flagship: $2/$6, cached $0.50, 500K ctx, ≥200K prompts bill 2× —
@@ -1454,13 +1471,58 @@ export const MODELS = [
1454
1471
  // Verified: https://ai.google.dev/gemini-api/docs/models
1455
1472
  // https://ai.google.dev/gemini-api/docs/pricing
1456
1473
  // https://ai.google.dev/gemini-api/docs/thinking
1457
- // Reasoning control is `thinking_level` (minimal|low|medium|high — cannot be
1458
- // fully off on 3.x; combining with legacy thinking_budget returns 400).
1474
+ // Reasoning control is `thinking_level` (minimal|low|medium|high on 3.x —
1475
+ // cannot be fully off; Gemini 4 adds xhigh and drops minimal. Combining with
1476
+ // legacy thinking_budget returns 400).
1459
1477
  // NOTE: the previous catalog carried a fictional "gemini-3.1-pro" GA id — no
1460
1478
  // such model exists; the pro tier is (still) gemini-3.1-pro-preview. Safe to
1461
1479
  // replace outright: the google bond has never been implemented/wired, so no
1462
1480
  // historical usage can reference the old ids.
1463
1481
  // ---------------------------------------------------------------------------
1482
+ {
1483
+ id: 'gemini-4-hydrogen',
1484
+ provider: 'google',
1485
+ label: 'Gemini 4 Hydrogen',
1486
+ description: 'Google fast agentic model — everyday coding & tool-using agents',
1487
+ // Verified against /docs/models/gemini-4-hydrogen + /docs/pricing +
1488
+ // /docs/thinking + /docs/whats-new-gemini-4-hydrogen (2026-11-12).
1489
+ contextWindow: 1_048_576,
1490
+ // "65,536 (default synchronous) / up to 1,048,576" via the long-decode
1491
+ // feature Synthase never requests — the synchronous default is what a
1492
+ // maxOutputTokens cap can rely on (same policy as gemini-4-argon).
1493
+ maxOutputTokens: 65_536,
1494
+ supportsThinking: true,
1495
+ thinkingBudgetTokens: 10_000,
1496
+ thinkingConfigurable: true,
1497
+ // thinking_level low|medium|high|xhigh, DEFAULT HIGH — hydrogen is the
1498
+ // model that introduces xhigh; minimal is not supported on Gemini 4
1499
+ // (/docs/thinking, verified 2026-11-12).
1500
+ supportedEffortLevels: ['low', 'medium', 'high', 'xhigh'],
1501
+ defaultEffortLevel: 'high',
1502
+ supportsVision: true,
1503
+ supportsPromptCaching: true,
1504
+ supportsTools: true,
1505
+ webSearchToolType: 'google_search',
1506
+ webSearchPricePer1k: 14,
1507
+ codeExecutionToolType: 'code_execution',
1508
+ webFetchToolType: 'url_context',
1509
+ // "Stable" 2026-11-12 at $1.50/$7.50 — the flash-tier successor: Google's
1510
+ // own what's-new page calls it the "Recommended upgrade from Gemini 3.8
1511
+ // Flash and earlier Gemini 3 and 2.5 models". Implicit cache reads at
1512
+ // $0.075 (0.05× input, the same Gemini 4 ratio as argon); explicit caching
1513
+ // is UNSUPPORTED (implicit only); no write premium and no hourly storage
1514
+ // fee. NO launch promo this time — the pricing page lists these as the
1515
+ // flat rates (unlike the 3.x-flash launches), so no KNOWN_DIVERGENCES
1516
+ // entry is needed.
1517
+ inputPricePerMTok: 1.5,
1518
+ outputPricePerMTok: 7.5,
1519
+ cacheReadPricePerMTok: 0.075,
1520
+ cacheWritePricePerMTok: 1.5,
1521
+ // Published by neither Google's model page nor /docs/thinking — models.dev
1522
+ // reports 2026-03 (lead, not authority), same carry-forward estimate policy
1523
+ // as gemini-4-argon.
1524
+ knowledgeCutoff: '2026-03-01',
1525
+ },
1464
1526
  {
1465
1527
  id: 'gemini-4-argon',
1466
1528
  provider: 'google',
@@ -1500,10 +1562,11 @@ export const MODELS = [
1500
1562
  // reports 2026-03 (lead, not authority), same carry-forward estimate policy
1501
1563
  // as the 3.7/3.8-flash entries.
1502
1564
  knowledgeCutoff: '2026-03-01',
1503
- // NOT superseding gemini-3.8-flash: argon is the flagship-REASONING tier
1504
- // ($4/$20 list, 2.7× flash) and Gemini 4 ships no flash id, so the flash
1505
- // tier stays the fast/cheap option Google itself still recommends — see
1506
- // INTENTIONAL_FAMILY_OVERLAPS in lookup.test.ts (same-tier rule).
1565
+ // NOT superseding anything: argon is the flagship-REASONING tier ($4/$20
1566
+ // list, 2.7× the flash card). The flash tier's successor is
1567
+ // gemini-4-hydrogen — same version 4, different tier, no family conflict;
1568
+ // hydrogen supersedes 3.8-flash. See INTENTIONAL_FAMILY_OVERLAPS in
1569
+ // lookup.test.ts for the surviving pro-tier exception (same-tier rule).
1507
1570
  },
1508
1571
  {
1509
1572
  id: 'gemini-3.8-flash',
@@ -1542,6 +1605,12 @@ export const MODELS = [
1542
1605
  // Published by neither Google's model page nor models.dev for this id —
1543
1606
  // carried from 3.7-flash (same generation) as a best-effort estimate.
1544
1607
  knowledgeCutoff: '2026-03-01',
1608
+ // Superseded by gemini-4-hydrogen (2026-11-12) — the flash-tier successor
1609
+ // at the same $1.50/$7.50 list price with four thinking levels; Google's
1610
+ // own what's-new page names it the "Recommended upgrade from Gemini 3.8
1611
+ // Flash". Still served upstream, so it stays priceable.
1612
+ deprecatedAt: '2026-11-12',
1613
+ supersededBy: 'gemini-4-hydrogen',
1545
1614
  },
1546
1615
  {
1547
1616
  id: 'gemini-3.7-flash',
@@ -1578,11 +1647,12 @@ export const MODELS = [
1578
1647
  cacheWritePricePerMTok: 1.5,
1579
1648
  // Not on Google's docs — models.dev reports 2026-03 (lead, not authority).
1580
1649
  knowledgeCutoff: '2026-03-01',
1581
- // Superseded by gemini-3.8-flash (2026-09-02) — same flash tier, same list
1582
- // price; Google's own models page now calls 3.7 "previous-generation".
1583
- // Still served upstream, so it stays priceable.
1650
+ // Superseded within the flash tier (first by 3.8-flash on 2026-09-02, now
1651
+ // pointed one hop to gemini-4-hydrogen — supersededBy must target a
1652
+ // SELECTABLE model, never a chain). Still served upstream, so it stays
1653
+ // priceable.
1584
1654
  deprecatedAt: '2026-09-02',
1585
- supersededBy: 'gemini-3.8-flash',
1655
+ supersededBy: 'gemini-4-hydrogen',
1586
1656
  },
1587
1657
  {
1588
1658
  id: 'gemini-3.6-flash',
@@ -1625,10 +1695,10 @@ export const MODELS = [
1625
1695
  // Superseded by gemini-3.7-flash (2026-08-13) — same flash tier, same list
1626
1696
  // price; Google's own models page now calls 3.6 "previous-generation".
1627
1697
  // Still served upstream, so it stays priceable. Re-pointed to
1628
- // gemini-3.8-flash on 2026-09-02 when 3.7 was itself deprecated —
1698
+ // gemini-4-hydrogen on 2026-11-12 when 3.8-flash was itself superseded —
1629
1699
  // supersededBy must target a SELECTABLE model, never a chain.
1630
1700
  deprecatedAt: '2026-08-13',
1631
- supersededBy: 'gemini-3.8-flash',
1701
+ supersededBy: 'gemini-4-hydrogen',
1632
1702
  },
1633
1703
  {
1634
1704
  id: 'gemini-3.5-flash',
@@ -1660,11 +1730,11 @@ export const MODELS = [
1660
1730
  cacheWritePricePerMTok: 1.5,
1661
1731
  knowledgeCutoff: '2025-01-01',
1662
1732
  // Superseded within the flash tier (first by 3.6-flash on 2026-07-21, now
1663
- // pointed one hop to gemini-3.8-flash — supersededBy must target a
1733
+ // pointed one hop to gemini-4-hydrogen — supersededBy must target a
1664
1734
  // SELECTABLE model, never a chain). Still served upstream, so it stays
1665
1735
  // priceable.
1666
1736
  deprecatedAt: '2026-07-21',
1667
- supersededBy: 'gemini-3.8-flash',
1737
+ supersededBy: 'gemini-4-hydrogen',
1668
1738
  },
1669
1739
  {
1670
1740
  id: 'gemini-3.1-pro-preview',
@@ -2220,7 +2290,8 @@ export const MODELS = [
2220
2290
  // DeepSeek charges no cache-write premium — write bills at input.
2221
2291
  cacheWritePricePerMTok: 0.15,
2222
2292
  // Native first (the default region); the DeepInfra US re-host
2223
- // (`deepseek-ai/DeepSeek-V4.1-Flash`, molecule-dev region-model-maps.ts)
2293
+ // (`deepseek-ai/DeepSeek-V4.1-Flash-1017` since 2026-11-12, was the undated
2294
+ // `deepseek-ai/DeepSeek-V4.1-Flash`; molecule-dev region-model-maps.ts)
2224
2295
  // is offered as a SECOND region since 2026-09-14, when the native endpoint
2225
2296
  // queued every completion for hours (SSE keep-alives, no token, three
2226
2297
  // Synthase turns lost) while DeepInfra answered at once. Its card, read
@@ -2233,6 +2304,9 @@ export const MODELS = [
2233
2304
  // not upgrade weights in place) at IDENTICAL rates — 0.00002/0.00006
2234
2305
  // cents, cache 3% — so bumping the us modelMap to it moves no price here;
2235
2306
  // a weights decision, not a pricing one (same as V4-Pro's `-0813`).
2307
+ // Re-verified 2026-11-12 on both ids: still identical ($0.20/$0.60, cache
2308
+ // 3%); the map moved to -1017, the weights DeepSeek's card says native
2309
+ // `deepseek-flash` serves.
2236
2310
  regions: ['cn', 'us'],
2237
2311
  regionPricing: {
2238
2312
  us: { inputPricePerMTok: 0.2, outputPricePerMTok: 0.6, cacheReadPricePerMTok: 0.006 },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/api-resource-ai-models",
3
- "version": "1.19.2",
3
+ "version": "1.20.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",
@@ -29,7 +29,7 @@
29
29
  "devDependencies": {
30
30
  "@molecule/api-bond": "1.0.4",
31
31
  "@molecule/api-i18n": "1.0.5",
32
- "@molecule/api-resource": "1.0.7",
32
+ "@molecule/api-resource": "1.1.1",
33
33
  "@types/node": "26.6.5",
34
34
  "typescript": "6.0.3",
35
35
  "vitest": "4.1.12"