@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.mjs
CHANGED
|
@@ -846,6 +846,9 @@ var LLM_CONSTANTS = {
|
|
|
846
846
|
MISTRAL_SMALL: "mistral-small",
|
|
847
847
|
GROK: "grok",
|
|
848
848
|
KIMI: "kimi",
|
|
849
|
+
// Kimi K3.1 Pro Highspeed: the same model served 2-3x faster at 2x the price (added
|
|
850
|
+
// 2026-10-23). Version-free like `kimi`, so a K3.2 repoint keeps both ids.
|
|
851
|
+
KIMI_HIGHSPEED: "kimi-highspeed",
|
|
849
852
|
GLM: "glm",
|
|
850
853
|
GLM_FLASH: "glm-flash",
|
|
851
854
|
FUGU_MAX: "fugu-max",
|
|
@@ -1113,21 +1116,40 @@ var SupportedAiModels = {
|
|
|
1113
1116
|
reasoningEffort: "high",
|
|
1114
1117
|
tags: ["very-fast", "cheap"]
|
|
1115
1118
|
},
|
|
1116
|
-
// Kimi models.
|
|
1117
|
-
// it is the undocumented K2-era `thinking: disabled` toggle, which we no longer rely on.
|
|
1118
|
-
//
|
|
1119
|
-
//
|
|
1119
|
+
// Kimi models. Always-reasoning entries: K3-series models reason by default and the only way
|
|
1120
|
+
// to stop it is the undocumented K2-era `thinking: disabled` toggle, which we no longer rely on.
|
|
1121
|
+
// ~85-90% of output tokens are reasoning tokens billed at the output rate, so real
|
|
1122
|
+
// per-request cost runs well above the sticker output price.
|
|
1123
|
+
//
|
|
1124
|
+
// `kimi` repointed 2026-10-23 from kimi-k3 ($3/$15, 17-29s per turn, 146s for the
|
|
1125
|
+
// 15-character story pipeline) to Kimi K3.1 Pro ($2/$10, 1M context, same low|high|max
|
|
1126
|
+
// effort levels, default max). Live at high effort 2026-10-23: 3-sentence schema ask
|
|
1127
|
+
// 4.2-4.5s, 8-character scene (476-845 output tokens) 9.7-14.9s = 49-57 tok/s — the same
|
|
1128
|
+
// output speed as K3, so a full bot turn still lands in the 15-25s `slow` band.
|
|
1129
|
+
// Consumer policy (werewolf): 1 bot per free game (opt-in) until 100 turns are measured.
|
|
1120
1130
|
[LLM_CONSTANTS.KIMI]: {
|
|
1121
|
-
displayName: "Kimi K3",
|
|
1122
|
-
modelApiName: "kimi-k3",
|
|
1131
|
+
displayName: "Kimi K3.1 Pro",
|
|
1132
|
+
modelApiName: "kimi-k3.1-pro",
|
|
1123
1133
|
apiKeyName: API_KEY_CONSTANTS.MOONSHOT,
|
|
1124
1134
|
hasThinking: true,
|
|
1125
|
-
// Temperature is omitted from the request:
|
|
1126
|
-
// Speed samples: 17s (2026-08-04) and 28.9s (2026-08-05) — graded into the >25s tier.
|
|
1135
|
+
// Temperature is omitted from the request: K3 rejected any value other than 1.
|
|
1127
1136
|
// Pinned 'high' 2026-09-22, down from Moonshot's 'max' default: K3 had no levels at
|
|
1128
1137
|
// launch and the agent hardcoded max, so this is the first time the knob exists.
|
|
1129
1138
|
reasoningEffort: "high",
|
|
1130
|
-
tags: ["
|
|
1139
|
+
tags: ["slow", "expensive"]
|
|
1140
|
+
},
|
|
1141
|
+
// Same model, Moonshot's high-speed serving tier ("roughly two to three times faster",
|
|
1142
|
+
// platform.kimi.ai K3.1 Pro quickstart, read 2026-10-23) at 2x the price ($4/$20 — Opus 5.5
|
|
1143
|
+
// money). Live the same day: schema ask 1.9-2.4s, 8-character scene (789-982 output tokens)
|
|
1144
|
+
// 7.9-8.4s = 100-117 tok/s, twice Pro. No speed tag: that is the unlabeled 6-13s middle.
|
|
1145
|
+
// Consumer policy (werewolf): paid tier only, deliberately — the estimate is 5.2¢ a turn.
|
|
1146
|
+
[LLM_CONSTANTS.KIMI_HIGHSPEED]: {
|
|
1147
|
+
displayName: "Kimi K3.1 Pro Highspeed",
|
|
1148
|
+
modelApiName: "kimi-k3.1-pro-highspeed",
|
|
1149
|
+
apiKeyName: API_KEY_CONSTANTS.MOONSHOT,
|
|
1150
|
+
hasThinking: true,
|
|
1151
|
+
reasoningEffort: "high",
|
|
1152
|
+
tags: ["expensive"]
|
|
1131
1153
|
},
|
|
1132
1154
|
// Z.AI models — thinking-only entry (non-thinking variant retired 2026-08-05)
|
|
1133
1155
|
// reasoningEffort MUST be set: GLM-5.3 forces reasoning on and defaults the effort to 'max',
|
|
@@ -1419,11 +1441,18 @@ var MODEL_PRICING = {
|
|
|
1419
1441
|
cacheHitPrice: 0.022,
|
|
1420
1442
|
peakPricing: DEEPSEEK_PEAK_SCHEDULE
|
|
1421
1443
|
},
|
|
1422
|
-
// Kimi/Moonshot models
|
|
1444
|
+
// Kimi/Moonshot models (platform.kimi.ai/docs/pricing/chat, 2026-10-23). Cache writes
|
|
1445
|
+
// ($2/$4 per M for 5m/1h on Pro, $4/$8 on Highspeed) are not modelled: Moonshot caches
|
|
1446
|
+
// automatically and only reports hits.
|
|
1423
1447
|
[SupportedAiModels[LLM_CONSTANTS.KIMI].modelApiName]: {
|
|
1424
|
-
inputPrice:
|
|
1425
|
-
outputPrice:
|
|
1426
|
-
cacheHitPrice: 0.
|
|
1448
|
+
inputPrice: 2,
|
|
1449
|
+
outputPrice: 10,
|
|
1450
|
+
cacheHitPrice: 0.2
|
|
1451
|
+
},
|
|
1452
|
+
[SupportedAiModels[LLM_CONSTANTS.KIMI_HIGHSPEED].modelApiName]: {
|
|
1453
|
+
inputPrice: 4,
|
|
1454
|
+
outputPrice: 20,
|
|
1455
|
+
cacheHitPrice: 0.2
|
|
1427
1456
|
},
|
|
1428
1457
|
// Z.AI models
|
|
1429
1458
|
[SupportedAiModels[LLM_CONSTANTS.GLM].modelApiName]: {
|
|
@@ -5437,6 +5466,7 @@ var AgentFactory = class {
|
|
|
5437
5466
|
case LLM_CONSTANTS.MISTRAL_SMALL:
|
|
5438
5467
|
return new MistralAgent(name, instruction, model.modelApiName, key, shouldEnableThinking);
|
|
5439
5468
|
case LLM_CONSTANTS.KIMI:
|
|
5469
|
+
case LLM_CONSTANTS.KIMI_HIGHSPEED:
|
|
5440
5470
|
return new KimiAgent(name, instruction, model.modelApiName, key, 0, shouldEnableThinking);
|
|
5441
5471
|
// Z.AI models — thinking-only since 2026-08-05
|
|
5442
5472
|
case LLM_CONSTANTS.GLM:
|