@hiper2d/ai-agents 0.26.2 → 0.27.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.d.mts CHANGED
@@ -390,6 +390,7 @@ declare const LLM_CONSTANTS: {
390
390
  MISTRAL_SMALL: string;
391
391
  GROK: string;
392
392
  KIMI: string;
393
+ KIMI_HIGHSPEED: string;
393
394
  GLM: string;
394
395
  GLM_FLASH: string;
395
396
  FUGU_MAX: string;
package/dist/index.d.ts CHANGED
@@ -390,6 +390,7 @@ declare const LLM_CONSTANTS: {
390
390
  MISTRAL_SMALL: string;
391
391
  GROK: string;
392
392
  KIMI: string;
393
+ KIMI_HIGHSPEED: string;
393
394
  GLM: string;
394
395
  GLM_FLASH: string;
395
396
  FUGU_MAX: string;
package/dist/index.js CHANGED
@@ -1024,6 +1024,9 @@ var LLM_CONSTANTS = {
1024
1024
  MISTRAL_SMALL: "mistral-small",
1025
1025
  GROK: "grok",
1026
1026
  KIMI: "kimi",
1027
+ // Kimi K3.1 Pro Highspeed: the same model served 2-3x faster at 2x the price (added
1028
+ // 2026-10-23). Version-free like `kimi`, so a K3.2 repoint keeps both ids.
1029
+ KIMI_HIGHSPEED: "kimi-highspeed",
1027
1030
  GLM: "glm",
1028
1031
  GLM_FLASH: "glm-flash",
1029
1032
  FUGU_MAX: "fugu-max",
@@ -1115,7 +1118,9 @@ var SupportedAiModels = {
1115
1118
  reasoningEffort: "low",
1116
1119
  // Reasoning tokens share the output budget, so leave room for both CoT and answer.
1117
1120
  maxOutputTokens: 65536,
1118
- tags: ["cheap"]
1121
+ // slow: werewolf prod 2026-10-21, 785 calls over 30 days, p50 10s, p90 31s, max 156s;
1122
+ // 7 of 79 bot turns past the 60s timeout in a 16-player game at days 8-9.
1123
+ tags: ["slow", "cheap"]
1119
1124
  },
1120
1125
  // Models with always-on reasoning
1121
1126
  // GPT-6 Astra (2026-09-03): OpenAI's frontier tier above Sol. No `none` reasoning effort;
@@ -1195,7 +1200,9 @@ var SupportedAiModels = {
1195
1200
  apiKeyName: API_KEY_CONSTANTS.GOOGLE,
1196
1201
  hasThinking: true,
1197
1202
  reasoningEffort: "medium",
1198
- tags: ["expensive"]
1203
+ // slow: werewolf prod 2026-10-21, 193 calls over 30 days, p50 12s, p90 34s, max 207s;
1204
+ // 3 of 50 night actions past the 60s timeout even at medium effort.
1205
+ tags: ["slow", "expensive"]
1199
1206
  },
1200
1207
  [LLM_CONSTANTS.GEMINI_PRO]: {
1201
1208
  displayName: "Gemini 3.1 Pro Preview",
@@ -1246,7 +1253,10 @@ var SupportedAiModels = {
1246
1253
  apiKeyName: API_KEY_CONSTANTS.GROK,
1247
1254
  hasThinking: true,
1248
1255
  reasoningEffort: "medium",
1249
- temperature: 0.7
1256
+ temperature: 0.7,
1257
+ // very-slow: werewolf prod 2026-10-21, 29 calls over 30 days, p50 48s, p90 192s, max 244s
1258
+ // at medium effort; the 15-character story pipeline took 213s on 2026-10-07.
1259
+ tags: ["very-slow"]
1250
1260
  },
1251
1261
  // Mistral models. One hybrid entry: reasoning is off by default on the API and switched on
1252
1262
  // per request with `reasoning_effort` (see mistral-agent.ts); the trace comes back as a
@@ -1284,21 +1294,40 @@ var SupportedAiModels = {
1284
1294
  reasoningEffort: "high",
1285
1295
  tags: ["very-fast", "cheap"]
1286
1296
  },
1287
- // Kimi models. Single always-reasoning entry: K3 reasons by default and the only way to stop
1288
- // it is the undocumented K2-era `thinking: disabled` toggle, which we no longer rely on.
1289
- // K3 always reasons at max effort; ~85-90% of its output tokens are reasoning tokens billed
1290
- // at the output rate, so real per-request cost runs well above the sticker output price.
1297
+ // Kimi models. Always-reasoning entries: K3-series models reason by default and the only way
1298
+ // to stop it is the undocumented K2-era `thinking: disabled` toggle, which we no longer rely on.
1299
+ // ~85-90% of output tokens are reasoning tokens billed at the output rate, so real
1300
+ // per-request cost runs well above the sticker output price.
1301
+ //
1302
+ // `kimi` repointed 2026-10-23 from kimi-k3 ($3/$15, 17-29s per turn, 146s for the
1303
+ // 15-character story pipeline) to Kimi K3.1 Pro ($2/$10, 1M context, same low|high|max
1304
+ // effort levels, default max). Live at high effort 2026-10-23: 3-sentence schema ask
1305
+ // 4.2-4.5s, 8-character scene (476-845 output tokens) 9.7-14.9s = 49-57 tok/s — the same
1306
+ // output speed as K3, so a full bot turn still lands in the 15-25s `slow` band.
1307
+ // Consumer policy (werewolf): 1 bot per free game (opt-in) until 100 turns are measured.
1291
1308
  [LLM_CONSTANTS.KIMI]: {
1292
- displayName: "Kimi K3",
1293
- modelApiName: "kimi-k3",
1309
+ displayName: "Kimi K3.1 Pro",
1310
+ modelApiName: "kimi-k3.1-pro",
1294
1311
  apiKeyName: API_KEY_CONSTANTS.MOONSHOT,
1295
1312
  hasThinking: true,
1296
- // Temperature is omitted from the request: kimi-k3 rejects any value other than 1.
1297
- // Speed samples: 17s (2026-08-04) and 28.9s (2026-08-05) — graded into the >25s tier.
1313
+ // Temperature is omitted from the request: K3 rejected any value other than 1.
1298
1314
  // Pinned 'high' 2026-09-22, down from Moonshot's 'max' default: K3 had no levels at
1299
1315
  // launch and the agent hardcoded max, so this is the first time the knob exists.
1300
1316
  reasoningEffort: "high",
1301
- tags: ["very-slow", "expensive"]
1317
+ tags: ["slow", "expensive"]
1318
+ },
1319
+ // Same model, Moonshot's high-speed serving tier ("roughly two to three times faster",
1320
+ // platform.kimi.ai K3.1 Pro quickstart, read 2026-10-23) at 2x the price ($4/$20 — Opus 5.5
1321
+ // money). Live the same day: schema ask 1.9-2.4s, 8-character scene (789-982 output tokens)
1322
+ // 7.9-8.4s = 100-117 tok/s, twice Pro. No speed tag: that is the unlabeled 6-13s middle.
1323
+ // Consumer policy (werewolf): paid tier only, deliberately — the estimate is 5.2¢ a turn.
1324
+ [LLM_CONSTANTS.KIMI_HIGHSPEED]: {
1325
+ displayName: "Kimi K3.1 Pro Highspeed",
1326
+ modelApiName: "kimi-k3.1-pro-highspeed",
1327
+ apiKeyName: API_KEY_CONSTANTS.MOONSHOT,
1328
+ hasThinking: true,
1329
+ reasoningEffort: "high",
1330
+ tags: ["expensive"]
1302
1331
  },
1303
1332
  // Z.AI models — thinking-only entry (non-thinking variant retired 2026-08-05)
1304
1333
  // reasoningEffort MUST be set: GLM-5.3 forces reasoning on and defaults the effort to 'max',
@@ -1590,11 +1619,18 @@ var MODEL_PRICING = {
1590
1619
  cacheHitPrice: 0.022,
1591
1620
  peakPricing: DEEPSEEK_PEAK_SCHEDULE
1592
1621
  },
1593
- // Kimi/Moonshot models
1622
+ // Kimi/Moonshot models (platform.kimi.ai/docs/pricing/chat, 2026-10-23). Cache writes
1623
+ // ($2/$4 per M for 5m/1h on Pro, $4/$8 on Highspeed) are not modelled: Moonshot caches
1624
+ // automatically and only reports hits.
1594
1625
  [SupportedAiModels[LLM_CONSTANTS.KIMI].modelApiName]: {
1595
- inputPrice: 3,
1596
- outputPrice: 15,
1597
- cacheHitPrice: 0.3
1626
+ inputPrice: 2,
1627
+ outputPrice: 10,
1628
+ cacheHitPrice: 0.2
1629
+ },
1630
+ [SupportedAiModels[LLM_CONSTANTS.KIMI_HIGHSPEED].modelApiName]: {
1631
+ inputPrice: 4,
1632
+ outputPrice: 20,
1633
+ cacheHitPrice: 0.2
1598
1634
  },
1599
1635
  // Z.AI models
1600
1636
  [SupportedAiModels[LLM_CONSTANTS.GLM].modelApiName]: {
@@ -5608,6 +5644,7 @@ var AgentFactory = class {
5608
5644
  case LLM_CONSTANTS.MISTRAL_SMALL:
5609
5645
  return new MistralAgent(name, instruction, model.modelApiName, key, shouldEnableThinking);
5610
5646
  case LLM_CONSTANTS.KIMI:
5647
+ case LLM_CONSTANTS.KIMI_HIGHSPEED:
5611
5648
  return new KimiAgent(name, instruction, model.modelApiName, key, 0, shouldEnableThinking);
5612
5649
  // Z.AI models — thinking-only since 2026-08-05
5613
5650
  case LLM_CONSTANTS.GLM: