@hiper2d/ai-agents 0.20.0 → 0.21.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 +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +14 -28
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -28
- 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
|
@@ -984,7 +984,6 @@ var LLM_CONSTANTS = {
|
|
|
984
984
|
GEMINI_PRO: "gemini-pro",
|
|
985
985
|
GEMINI_FLASH: "gemini-flash",
|
|
986
986
|
GEMINI_LITE: "gemini-lite",
|
|
987
|
-
MISTRAL_MEDIUM: "mistral-medium",
|
|
988
987
|
MISTRAL_SMALL: "mistral-small",
|
|
989
988
|
GROK: "grok",
|
|
990
989
|
KIMI: "kimi",
|
|
@@ -1190,14 +1189,18 @@ var SupportedAiModels = {
|
|
|
1190
1189
|
reasoningEffort: "medium",
|
|
1191
1190
|
temperature: 0.7
|
|
1192
1191
|
},
|
|
1193
|
-
// Mistral models.
|
|
1194
|
-
//
|
|
1195
|
-
//
|
|
1196
|
-
//
|
|
1197
|
-
//
|
|
1198
|
-
//
|
|
1199
|
-
//
|
|
1200
|
-
//
|
|
1192
|
+
// Mistral models. One hybrid entry: reasoning is off by default on the API and switched on
|
|
1193
|
+
// per request with `reasoning_effort` (see mistral-agent.ts); the trace comes back as a
|
|
1194
|
+
// `thinking` content chunk and works with json_schema structured output (verified live
|
|
1195
|
+
// 2026-09-18). Pinned to 'high' — the only level Mistral's docs describe ("full thinking
|
|
1196
|
+
// chunk before the final answer"); Small is cheap enough that the extra tokens don't
|
|
1197
|
+
// matter. Live 2026-09-18 (one short schema ask): 1.7s with a ~600-char trace.
|
|
1198
|
+
//
|
|
1199
|
+
// Mistral Medium 3.5 (`mistral-medium-3-5`, $1.5/$7.5, $0.15 cached) was removed in 0.21.0
|
|
1200
|
+
// (2026-10-10): too slow and too expensive at the only reasoning level it takes (high|none).
|
|
1201
|
+
// Production 2026-10-03..10: p50 15.9s, p90 35.1s, $0.036 a request (2x Gemini 3.1 Pro,
|
|
1202
|
+
// 19x Small; reasoning spiked to 15-24k tokens), ~6% of calls failed (60s timeouts, empty
|
|
1203
|
+
// replies, empty JSON), and a 15-player story pipeline took 277s. Wait for Medium 4.
|
|
1201
1204
|
//
|
|
1202
1205
|
// Mistral Large 3 and Magistral Medium 1.2 were dropped 2026-09-18. Large 3 was retired by
|
|
1203
1206
|
// Mistral on 2026-08-31 (the `-latest` alias still answered, but its capabilities say
|
|
@@ -1205,7 +1208,7 @@ var SupportedAiModels = {
|
|
|
1205
1208
|
// and `magistral-medium-latest` is now literally an alias of Medium 3.5 — the model list
|
|
1206
1209
|
// returns `mistral-medium-3-5`, `mistral-medium-3`, `mistral-medium-latest` and
|
|
1207
1210
|
// `magistral-medium-latest` as one entry — so Magistral seats had silently become Medium
|
|
1208
|
-
// seats already. Consumers map both retired ids onto
|
|
1211
|
+
// seats already. Consumers map both retired ids onto Small (Medium itself is gone since 0.21.0).
|
|
1209
1212
|
//
|
|
1210
1213
|
// Mistral Large 4 (`mistral-large-4`, $0.68/$2.09, $0.07 cached) was added in 0.19.0 and
|
|
1211
1214
|
// removed in 0.19.1 (2026-10-06/07): too slow to play. Like Small/Medium it accepts only
|
|
@@ -1213,16 +1216,6 @@ var SupportedAiModels = {
|
|
|
1213
1216
|
// a realistic day-2 vote took 25-154s (half past the 60s timeout) and its parallel story
|
|
1214
1217
|
// batches finished ~100s apart (Mistral served them one at a time: ~6 min per story). Off,
|
|
1215
1218
|
// it answers in ~1s with no trace. Re-test before re-adding.
|
|
1216
|
-
[LLM_CONSTANTS.MISTRAL_MEDIUM]: {
|
|
1217
|
-
displayName: "Mistral Medium 3.5",
|
|
1218
|
-
// The docs' explicit 3.5 id. It was `mistral-medium-3` until 2026-09-18, which Mistral
|
|
1219
|
-
// now serves as an alias of the same model (Medium 3 itself retired 2026-08-31).
|
|
1220
|
-
modelApiName: "mistral-medium-3-5",
|
|
1221
|
-
apiKeyName: API_KEY_CONSTANTS.MISTRAL,
|
|
1222
|
-
hasThinking: true,
|
|
1223
|
-
reasoningEffort: "high",
|
|
1224
|
-
tags: ["fast", "expensive"]
|
|
1225
|
-
},
|
|
1226
1219
|
[LLM_CONSTANTS.MISTRAL_SMALL]: {
|
|
1227
1220
|
displayName: "Mistral 4 Small",
|
|
1228
1221
|
// Resolves to mistral-small-2603 (Small 4), which also carries the magistral-small alias.
|
|
@@ -1610,11 +1603,6 @@ var MODEL_PRICING = {
|
|
|
1610
1603
|
// the input price (documented on the prompt_cache_key param; no per-model cached prices
|
|
1611
1604
|
// published). Reasoning tokens are counted inside completion_tokens — no separate
|
|
1612
1605
|
// reasoning_tokens field — so the output rate already covers the trace.
|
|
1613
|
-
[SupportedAiModels[LLM_CONSTANTS.MISTRAL_MEDIUM].modelApiName]: {
|
|
1614
|
-
inputPrice: 1.5,
|
|
1615
|
-
outputPrice: 7.5,
|
|
1616
|
-
cacheHitPrice: 0.15
|
|
1617
|
-
},
|
|
1618
1606
|
[SupportedAiModels[LLM_CONSTANTS.MISTRAL_SMALL].modelApiName]: {
|
|
1619
1607
|
inputPrice: 0.15,
|
|
1620
1608
|
outputPrice: 0.6,
|
|
@@ -1695,8 +1683,7 @@ var HYBRID_THINKING_API_NAMES = /* @__PURE__ */ new Set([
|
|
|
1695
1683
|
SupportedAiModels[LLM_CONSTANTS.QWEN_FLASH].modelApiName,
|
|
1696
1684
|
SupportedAiModels[LLM_CONSTANTS.MINIMAX].modelApiName,
|
|
1697
1685
|
// Mistral reasons only when asked (`reasoning_effort`), and we always ask — hybrid by the
|
|
1698
|
-
// same definition as Qwen. Added 2026-09-18 when the
|
|
1699
|
-
SupportedAiModels[LLM_CONSTANTS.MISTRAL_MEDIUM].modelApiName,
|
|
1686
|
+
// same definition as Qwen. Added 2026-09-18 when the Mistral entries went thinking-on.
|
|
1700
1687
|
SupportedAiModels[LLM_CONSTANTS.MISTRAL_SMALL].modelApiName
|
|
1701
1688
|
]);
|
|
1702
1689
|
function isHybridThinkingModel(modelApiName) {
|
|
@@ -5528,7 +5515,6 @@ var AgentFactory = class {
|
|
|
5528
5515
|
case LLM_CONSTANTS.DEEPSEEK_PRO:
|
|
5529
5516
|
return new DeepSeekV2Agent(name, instruction, model.modelApiName, key, model.temperature ?? 0, shouldEnableThinking);
|
|
5530
5517
|
// Mistral models
|
|
5531
|
-
case LLM_CONSTANTS.MISTRAL_MEDIUM:
|
|
5532
5518
|
case LLM_CONSTANTS.MISTRAL_SMALL:
|
|
5533
5519
|
return new MistralAgent(name, instruction, model.modelApiName, key, shouldEnableThinking);
|
|
5534
5520
|
case LLM_CONSTANTS.KIMI:
|