@hiper2d/ai-agents 0.38.0 → 0.40.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/index.js CHANGED
@@ -1149,8 +1149,8 @@ var SupportedAiModels = {
1149
1149
  // OpenAI documents the default for Sol, Luna and the 5.6 family but never states Astra's.
1150
1150
  // Pinning it changes no behaviour today; it stops the default moving under us silently.
1151
1151
  [LLM_CONSTANTS.GPT_ASTRA]: {
1152
- displayName: "GPT-6 Astra",
1153
- modelApiName: "gpt-6-astra",
1152
+ displayName: "GPT-6.2 Astra",
1153
+ modelApiName: "gpt-6.2-astra",
1154
1154
  apiKeyName: API_KEY_CONSTANTS.OPENAI,
1155
1155
  reasoningEffort: "medium",
1156
1156
  hasThinking: true,
@@ -1168,9 +1168,12 @@ var SupportedAiModels = {
1168
1168
  // Terra → GPT-6.1 Terra on 2026-10-26 (id verified against GET /v1/models; gpt-5.6-terra is
1169
1169
  // still served). Half the price of 5.6 Terra ($2/$12 → $1/$5) and back in its place below
1170
1170
  // Sol. Its no-param default effort measures `medium`, like its siblings.
1171
+ // Astra → GPT-6.2 Astra and Sol → GPT-6.2 Sol on 2026-11-17 (both ids verified against
1172
+ // GET /v1/models; gpt-6-astra and gpt-6.1-sol are still served). Both no-param defaults
1173
+ // measure `medium`. Astra got 20% cheaper; Sol kept its price.
1171
1174
  [LLM_CONSTANTS.GPT_SOL]: {
1172
- displayName: "GPT-6.1 Sol",
1173
- modelApiName: "gpt-6.1-sol",
1175
+ displayName: "GPT-6.2 Sol",
1176
+ modelApiName: "gpt-6.2-sol",
1174
1177
  apiKeyName: API_KEY_CONSTANTS.OPENAI,
1175
1178
  reasoningEffort: "medium",
1176
1179
  hasThinking: true,
@@ -1462,16 +1465,25 @@ var SupportedAiModels = {
1462
1465
  // Speed tags from the 2026-08-05 live measurements (two samples each): plus 17.4s/14.5s,
1463
1466
  // flash 14.3s/16.4s (both slow); max 30.6s/100.5s — its latency tracks how long it decides
1464
1467
  // to think (4.2K reasoning tokens on the slow run), hence the budget cap below.
1468
+ //
1469
+ // `qwen-max` repointed 2026-11-16 from qwen3.8-max ($2/$6, hits $0.25) to qwen4-max
1470
+ // ($1.50/$4.50, hits $0.075; not yet in GET /models, but the chat endpoint serves it and
1471
+ // echoes the name). Probe on a real day-4 prompt (32K-char system prompt, ~10K tokens in,
1472
+ // cold cache, budget 1024, one call at a time): discussion 7-9s vs 5-7s, vote 9s vs 24s
1473
+ // (3.8 Max spent ~1,000 output tokens on a vote, 4 Max ~220), night action 12s vs 17s,
1474
+ // end-of-day notes 33s vs 34s; every answer valid through the shared schema. Three
1475
+ // identical calls sent AT ONCE timed out on both models (night action, notes) — the account
1476
+ // under a burst, not the model. The 'slow' tag is 3.8 Max's production grade (p90 26.2s);
1477
+ // re-grade from production turns once 4 Max has 100+.
1465
1478
  [LLM_CONSTANTS.QWEN_MAX]: {
1466
- displayName: "Qwen3.8 Max",
1467
- modelApiName: "qwen3.8-max",
1479
+ displayName: "Qwen4 Max",
1480
+ modelApiName: "qwen4-max",
1468
1481
  apiKeyName: API_KEY_CONSTANTS.QWEN,
1469
1482
  hasThinking: true,
1470
1483
  temperature: 0.7,
1471
- // Caps `thinking_budget` to bound the 30–100s latency variance. The same knob works on
1472
- // the 3.7 models (verified live) — add it to their entries if they ever need taming.
1484
+ // Caps `thinking_budget` to bound the latency variance (3.8 Max swung 30–100s without
1485
+ // it). Uncapped, 4 Max's vote went 9s → 14s.
1473
1486
  thinkingBudgetTokens: 1024,
1474
- // Capped it measures 25-26s → the >25s tier.
1475
1487
  tags: ["slow"]
1476
1488
  },
1477
1489
  // qwen3.8-flash replaced qwen3.7-flash on 2026-08-30 (same 1M context, 128k max output);
@@ -1610,13 +1622,16 @@ var MODEL_PRICING = {
1610
1622
  // short context, $20/$75 cache-hit $2 long context. OpenAI's pricing table doesn't restate
1611
1623
  // the boundary; we assume the same 272k threshold as the GPT-5.6 siblings. Cache writes
1612
1624
  // ($12.50/$25) are not modelled — caching is automatic and we only see hits.
1625
+ // GPT-6.2 Astra (pricing page, read 2026-11-17, both Short and Long tabs): $8/$40 cache-hit
1626
+ // $0.40 short, $16/$60 cache-hit $0.80 long; cache writes $10/$20 (30m/12h), not modelled.
1627
+ // The cache hit is now 5% of input, like Sol and Terra (6 Astra was 10%).
1613
1628
  [SupportedAiModels[LLM_CONSTANTS.GPT_ASTRA].modelApiName]: {
1614
- inputPrice: 10,
1615
- outputPrice: 50,
1616
- cacheHitPrice: 1,
1617
- extendedContextInputPrice: 20,
1618
- extendedContextOutputPrice: 75,
1619
- extendedContextCacheHitPrice: 2,
1629
+ inputPrice: 8,
1630
+ outputPrice: 40,
1631
+ cacheHitPrice: 0.4,
1632
+ extendedContextInputPrice: 16,
1633
+ extendedContextOutputPrice: 60,
1634
+ extendedContextCacheHitPrice: 0.8,
1620
1635
  extendedContextThresholdTokens: 272e3
1621
1636
  },
1622
1637
  // OpenAI GPT-6 Sol and GPT-6 Luna (developers.openai.com/api/docs/pricing, read 2026-09-22).
@@ -1629,6 +1644,7 @@ var MODEL_PRICING = {
1629
1644
  // Re-read 2026-10-26 with the Terra launch: the page now lists Sol's cache hit at $0.10
1630
1645
  // (5% of input, the same share as Terra), not the $0.20 recorded on 2026-09-22; Astra and
1631
1646
  // Luna still show 10%. Followed the page.
1647
+ // GPT-6.2 Sol (read 2026-11-17, Short and Long tabs) is priced exactly like 6.1 Sol.
1632
1648
  [SupportedAiModels[LLM_CONSTANTS.GPT_SOL].modelApiName]: {
1633
1649
  inputPrice: 2,
1634
1650
  outputPrice: 10,
@@ -1825,10 +1841,11 @@ var MODEL_PRICING = {
1825
1841
  // $0.016. Neither has input-length tiers (the tier column is "-" for both). These
1826
1842
  // published cached rates supersede the 20%-of-input rule charged before 2026-08-30; we
1827
1843
  // still don't send explicit cache_control.
1844
+ // qwen4-max (2026-11-16, same page): $1.50/$4.50, implicit-cache hits $0.075, no tiers.
1828
1845
  [SupportedAiModels[LLM_CONSTANTS.QWEN_MAX].modelApiName]: {
1829
- inputPrice: 2,
1830
- outputPrice: 6,
1831
- cacheHitPrice: 0.25
1846
+ inputPrice: 1.5,
1847
+ outputPrice: 4.5,
1848
+ cacheHitPrice: 0.075
1832
1849
  },
1833
1850
  [SupportedAiModels[LLM_CONSTANTS.QWEN_FLASH].modelApiName]: {
1834
1851
  inputPrice: 0.15,