@hiper2d/ai-agents 0.26.3 → 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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +43 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
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",
|
|
@@ -1291,21 +1294,40 @@ var SupportedAiModels = {
|
|
|
1291
1294
|
reasoningEffort: "high",
|
|
1292
1295
|
tags: ["very-fast", "cheap"]
|
|
1293
1296
|
},
|
|
1294
|
-
// Kimi models.
|
|
1295
|
-
// it is the undocumented K2-era `thinking: disabled` toggle, which we no longer rely on.
|
|
1296
|
-
//
|
|
1297
|
-
//
|
|
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.
|
|
1298
1308
|
[LLM_CONSTANTS.KIMI]: {
|
|
1299
|
-
displayName: "Kimi K3",
|
|
1300
|
-
modelApiName: "kimi-k3",
|
|
1309
|
+
displayName: "Kimi K3.1 Pro",
|
|
1310
|
+
modelApiName: "kimi-k3.1-pro",
|
|
1301
1311
|
apiKeyName: API_KEY_CONSTANTS.MOONSHOT,
|
|
1302
1312
|
hasThinking: true,
|
|
1303
|
-
// Temperature is omitted from the request:
|
|
1304
|
-
// 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.
|
|
1305
1314
|
// Pinned 'high' 2026-09-22, down from Moonshot's 'max' default: K3 had no levels at
|
|
1306
1315
|
// launch and the agent hardcoded max, so this is the first time the knob exists.
|
|
1307
1316
|
reasoningEffort: "high",
|
|
1308
|
-
tags: ["
|
|
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"]
|
|
1309
1331
|
},
|
|
1310
1332
|
// Z.AI models — thinking-only entry (non-thinking variant retired 2026-08-05)
|
|
1311
1333
|
// reasoningEffort MUST be set: GLM-5.3 forces reasoning on and defaults the effort to 'max',
|
|
@@ -1597,11 +1619,18 @@ var MODEL_PRICING = {
|
|
|
1597
1619
|
cacheHitPrice: 0.022,
|
|
1598
1620
|
peakPricing: DEEPSEEK_PEAK_SCHEDULE
|
|
1599
1621
|
},
|
|
1600
|
-
// 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.
|
|
1601
1625
|
[SupportedAiModels[LLM_CONSTANTS.KIMI].modelApiName]: {
|
|
1602
|
-
inputPrice:
|
|
1603
|
-
outputPrice:
|
|
1604
|
-
cacheHitPrice: 0.
|
|
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
|
|
1605
1634
|
},
|
|
1606
1635
|
// Z.AI models
|
|
1607
1636
|
[SupportedAiModels[LLM_CONSTANTS.GLM].modelApiName]: {
|
|
@@ -5615,6 +5644,7 @@ var AgentFactory = class {
|
|
|
5615
5644
|
case LLM_CONSTANTS.MISTRAL_SMALL:
|
|
5616
5645
|
return new MistralAgent(name, instruction, model.modelApiName, key, shouldEnableThinking);
|
|
5617
5646
|
case LLM_CONSTANTS.KIMI:
|
|
5647
|
+
case LLM_CONSTANTS.KIMI_HIGHSPEED:
|
|
5618
5648
|
return new KimiAgent(name, instruction, model.modelApiName, key, 0, shouldEnableThinking);
|
|
5619
5649
|
// Z.AI models — thinking-only since 2026-08-05
|
|
5620
5650
|
case LLM_CONSTANTS.GLM:
|