@hiper2d/ai-agents 0.39.0 → 0.41.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.mjs CHANGED
@@ -848,6 +848,7 @@ var LLM_CONSTANTS = {
848
848
  GPT: "gpt",
849
849
  GPT_MINI: "gpt-mini",
850
850
  // Gemini 4 Argon sits above Pro; version-free id so a later Argon repoint keeps persisted ids.
851
+ GEMINI_NEON: "gemini-neon",
851
852
  GEMINI_ARGON: "gemini-argon",
852
853
  GEMINI_PRO: "gemini-pro",
853
854
  GEMINI_FLASH: "gemini-flash",
@@ -966,8 +967,8 @@ var SupportedAiModels = {
966
967
  // OpenAI documents the default for Sol, Luna and the 5.6 family but never states Astra's.
967
968
  // Pinning it changes no behaviour today; it stops the default moving under us silently.
968
969
  [LLM_CONSTANTS.GPT_ASTRA]: {
969
- displayName: "GPT-6 Astra",
970
- modelApiName: "gpt-6-astra",
970
+ displayName: "GPT-6.2 Astra",
971
+ modelApiName: "gpt-6.2-astra",
971
972
  apiKeyName: API_KEY_CONSTANTS.OPENAI,
972
973
  reasoningEffort: "medium",
973
974
  hasThinking: true,
@@ -985,9 +986,12 @@ var SupportedAiModels = {
985
986
  // Terra → GPT-6.1 Terra on 2026-10-26 (id verified against GET /v1/models; gpt-5.6-terra is
986
987
  // still served). Half the price of 5.6 Terra ($2/$12 → $1/$5) and back in its place below
987
988
  // Sol. Its no-param default effort measures `medium`, like its siblings.
989
+ // Astra → GPT-6.2 Astra and Sol → GPT-6.2 Sol on 2026-11-17 (both ids verified against
990
+ // GET /v1/models; gpt-6-astra and gpt-6.1-sol are still served). Both no-param defaults
991
+ // measure `medium`. Astra got 20% cheaper; Sol kept its price.
988
992
  [LLM_CONSTANTS.GPT_SOL]: {
989
- displayName: "GPT-6.1 Sol",
990
- modelApiName: "gpt-6.1-sol",
993
+ displayName: "GPT-6.2 Sol",
994
+ modelApiName: "gpt-6.2-sol",
991
995
  apiKeyName: API_KEY_CONSTANTS.OPENAI,
992
996
  reasoningEffort: "medium",
993
997
  hasThinking: true,
@@ -1031,6 +1035,21 @@ var SupportedAiModels = {
1031
1035
  // werewolf day-2 vote fixture took 16-34s (380-415 output tokens). At medium the same
1032
1036
  // prompt took 4-11s (75-110 output tokens) with the same vote target and a reason just
1033
1037
  // as specific — the same trade Grok 4.7 made on 2026-10-06.
1038
+ // Gemini 4 Neon (added 2026-11-18, id verified against GET /v1beta/models): 1M in / 64K
1039
+ // out. Same thinkingLevel dialect — accepts low|medium|high, rejects 'minimal' and 'none'
1040
+ // (probed). Pinned LOW: it thinks even there (200-1,500 tokens a turn where Argon at medium
1041
+ // reports none). Werewolf day-3 prompt (10.5K tokens, cold cache, 2 runs, medians):
1042
+ // low = discussion 8.9s, vote 12.9s, night 10.7s, end-of-day notes 36s, 3.8-5.9¢ a turn;
1043
+ // medium = 15-16s on the short turns for no visible gain; high = 21-23s, notes 51s.
1044
+ // No `temperature` (see the Pro note). Speed tag owed until it has 100 production turns.
1045
+ [LLM_CONSTANTS.GEMINI_NEON]: {
1046
+ displayName: "Gemini 4 Neon",
1047
+ modelApiName: "gemini-4-neon",
1048
+ apiKeyName: API_KEY_CONSTANTS.GOOGLE,
1049
+ hasThinking: true,
1050
+ reasoningEffort: "low",
1051
+ tags: ["expensive"]
1052
+ },
1034
1053
  [LLM_CONSTANTS.GEMINI_ARGON]: {
1035
1054
  displayName: "Gemini 4 Argon",
1036
1055
  modelApiName: "gemini-4-argon",
@@ -1436,13 +1455,16 @@ var MODEL_PRICING = {
1436
1455
  // short context, $20/$75 cache-hit $2 long context. OpenAI's pricing table doesn't restate
1437
1456
  // the boundary; we assume the same 272k threshold as the GPT-5.6 siblings. Cache writes
1438
1457
  // ($12.50/$25) are not modelled — caching is automatic and we only see hits.
1458
+ // GPT-6.2 Astra (pricing page, read 2026-11-17, both Short and Long tabs): $8/$40 cache-hit
1459
+ // $0.40 short, $16/$60 cache-hit $0.80 long; cache writes $10/$20 (30m/12h), not modelled.
1460
+ // The cache hit is now 5% of input, like Sol and Terra (6 Astra was 10%).
1439
1461
  [SupportedAiModels[LLM_CONSTANTS.GPT_ASTRA].modelApiName]: {
1440
- inputPrice: 10,
1441
- outputPrice: 50,
1442
- cacheHitPrice: 1,
1443
- extendedContextInputPrice: 20,
1444
- extendedContextOutputPrice: 75,
1445
- extendedContextCacheHitPrice: 2,
1462
+ inputPrice: 8,
1463
+ outputPrice: 40,
1464
+ cacheHitPrice: 0.4,
1465
+ extendedContextInputPrice: 16,
1466
+ extendedContextOutputPrice: 60,
1467
+ extendedContextCacheHitPrice: 0.8,
1446
1468
  extendedContextThresholdTokens: 272e3
1447
1469
  },
1448
1470
  // OpenAI GPT-6 Sol and GPT-6 Luna (developers.openai.com/api/docs/pricing, read 2026-09-22).
@@ -1455,6 +1477,7 @@ var MODEL_PRICING = {
1455
1477
  // Re-read 2026-10-26 with the Terra launch: the page now lists Sol's cache hit at $0.10
1456
1478
  // (5% of input, the same share as Terra), not the $0.20 recorded on 2026-09-22; Astra and
1457
1479
  // Luna still show 10%. Followed the page.
1480
+ // GPT-6.2 Sol (read 2026-11-17, Short and Long tabs) is priced exactly like 6.1 Sol.
1458
1481
  [SupportedAiModels[LLM_CONSTANTS.GPT_SOL].modelApiName]: {
1459
1482
  inputPrice: 2,
1460
1483
  outputPrice: 10,
@@ -1572,6 +1595,14 @@ var MODEL_PRICING = {
1572
1595
  extendedContextThresholdTokens: 1e5
1573
1596
  },
1574
1597
  // Google models
1598
+ [SupportedAiModels[LLM_CONSTANTS.GEMINI_NEON].modelApiName]: {
1599
+ // ai.google.dev pricing page, read 2026-11-18: one flat tier over the whole 1M window
1600
+ // (no long-context rows). Implicit caching only, cached input at 5% of input. Not on
1601
+ // Google's free tier.
1602
+ inputPrice: 3,
1603
+ outputPrice: 15,
1604
+ cacheHitPrice: 0.15
1605
+ },
1575
1606
  [SupportedAiModels[LLM_CONSTANTS.GEMINI_ARGON].modelApiName]: {
1576
1607
  // Launch pricing (ai.google.dev pricing page, fetched 2026-10-13), one flat tier — no
1577
1608
  // >200K long-context rows, unlike 3.1 Pro. DOUBLES on 2026-12-01 to $4.00 / $20.00 /
@@ -5660,6 +5691,7 @@ var AgentFactory = class {
5660
5691
  case LLM_CONSTANTS.GPT:
5661
5692
  case LLM_CONSTANTS.GPT_MINI:
5662
5693
  return new Gpt5Agent(name, instruction, model.modelApiName, key, model.temperature, shouldEnableThinking);
5694
+ case LLM_CONSTANTS.GEMINI_NEON:
5663
5695
  case LLM_CONSTANTS.GEMINI_ARGON:
5664
5696
  case LLM_CONSTANTS.GEMINI_PRO:
5665
5697
  case LLM_CONSTANTS.GEMINI_FLASH: