@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.mjs
CHANGED
|
@@ -806,7 +806,6 @@ var LLM_CONSTANTS = {
|
|
|
806
806
|
GEMINI_PRO: "gemini-pro",
|
|
807
807
|
GEMINI_FLASH: "gemini-flash",
|
|
808
808
|
GEMINI_LITE: "gemini-lite",
|
|
809
|
-
MISTRAL_MEDIUM: "mistral-medium",
|
|
810
809
|
MISTRAL_SMALL: "mistral-small",
|
|
811
810
|
GROK: "grok",
|
|
812
811
|
KIMI: "kimi",
|
|
@@ -1012,14 +1011,18 @@ var SupportedAiModels = {
|
|
|
1012
1011
|
reasoningEffort: "medium",
|
|
1013
1012
|
temperature: 0.7
|
|
1014
1013
|
},
|
|
1015
|
-
// Mistral models.
|
|
1016
|
-
//
|
|
1017
|
-
//
|
|
1018
|
-
//
|
|
1019
|
-
//
|
|
1020
|
-
//
|
|
1021
|
-
//
|
|
1022
|
-
//
|
|
1014
|
+
// Mistral models. One hybrid entry: reasoning is off by default on the API and switched on
|
|
1015
|
+
// per request with `reasoning_effort` (see mistral-agent.ts); the trace comes back as a
|
|
1016
|
+
// `thinking` content chunk and works with json_schema structured output (verified live
|
|
1017
|
+
// 2026-09-18). Pinned to 'high' — the only level Mistral's docs describe ("full thinking
|
|
1018
|
+
// chunk before the final answer"); Small is cheap enough that the extra tokens don't
|
|
1019
|
+
// matter. Live 2026-09-18 (one short schema ask): 1.7s with a ~600-char trace.
|
|
1020
|
+
//
|
|
1021
|
+
// Mistral Medium 3.5 (`mistral-medium-3-5`, $1.5/$7.5, $0.15 cached) was removed in 0.21.0
|
|
1022
|
+
// (2026-10-10): too slow and too expensive at the only reasoning level it takes (high|none).
|
|
1023
|
+
// Production 2026-10-03..10: p50 15.9s, p90 35.1s, $0.036 a request (2x Gemini 3.1 Pro,
|
|
1024
|
+
// 19x Small; reasoning spiked to 15-24k tokens), ~6% of calls failed (60s timeouts, empty
|
|
1025
|
+
// replies, empty JSON), and a 15-player story pipeline took 277s. Wait for Medium 4.
|
|
1023
1026
|
//
|
|
1024
1027
|
// Mistral Large 3 and Magistral Medium 1.2 were dropped 2026-09-18. Large 3 was retired by
|
|
1025
1028
|
// Mistral on 2026-08-31 (the `-latest` alias still answered, but its capabilities say
|
|
@@ -1027,7 +1030,7 @@ var SupportedAiModels = {
|
|
|
1027
1030
|
// and `magistral-medium-latest` is now literally an alias of Medium 3.5 — the model list
|
|
1028
1031
|
// returns `mistral-medium-3-5`, `mistral-medium-3`, `mistral-medium-latest` and
|
|
1029
1032
|
// `magistral-medium-latest` as one entry — so Magistral seats had silently become Medium
|
|
1030
|
-
// seats already. Consumers map both retired ids onto
|
|
1033
|
+
// seats already. Consumers map both retired ids onto Small (Medium itself is gone since 0.21.0).
|
|
1031
1034
|
//
|
|
1032
1035
|
// Mistral Large 4 (`mistral-large-4`, $0.68/$2.09, $0.07 cached) was added in 0.19.0 and
|
|
1033
1036
|
// removed in 0.19.1 (2026-10-06/07): too slow to play. Like Small/Medium it accepts only
|
|
@@ -1035,16 +1038,6 @@ var SupportedAiModels = {
|
|
|
1035
1038
|
// a realistic day-2 vote took 25-154s (half past the 60s timeout) and its parallel story
|
|
1036
1039
|
// batches finished ~100s apart (Mistral served them one at a time: ~6 min per story). Off,
|
|
1037
1040
|
// it answers in ~1s with no trace. Re-test before re-adding.
|
|
1038
|
-
[LLM_CONSTANTS.MISTRAL_MEDIUM]: {
|
|
1039
|
-
displayName: "Mistral Medium 3.5",
|
|
1040
|
-
// The docs' explicit 3.5 id. It was `mistral-medium-3` until 2026-09-18, which Mistral
|
|
1041
|
-
// now serves as an alias of the same model (Medium 3 itself retired 2026-08-31).
|
|
1042
|
-
modelApiName: "mistral-medium-3-5",
|
|
1043
|
-
apiKeyName: API_KEY_CONSTANTS.MISTRAL,
|
|
1044
|
-
hasThinking: true,
|
|
1045
|
-
reasoningEffort: "high",
|
|
1046
|
-
tags: ["fast", "expensive"]
|
|
1047
|
-
},
|
|
1048
1041
|
[LLM_CONSTANTS.MISTRAL_SMALL]: {
|
|
1049
1042
|
displayName: "Mistral 4 Small",
|
|
1050
1043
|
// Resolves to mistral-small-2603 (Small 4), which also carries the magistral-small alias.
|
|
@@ -1432,11 +1425,6 @@ var MODEL_PRICING = {
|
|
|
1432
1425
|
// the input price (documented on the prompt_cache_key param; no per-model cached prices
|
|
1433
1426
|
// published). Reasoning tokens are counted inside completion_tokens — no separate
|
|
1434
1427
|
// reasoning_tokens field — so the output rate already covers the trace.
|
|
1435
|
-
[SupportedAiModels[LLM_CONSTANTS.MISTRAL_MEDIUM].modelApiName]: {
|
|
1436
|
-
inputPrice: 1.5,
|
|
1437
|
-
outputPrice: 7.5,
|
|
1438
|
-
cacheHitPrice: 0.15
|
|
1439
|
-
},
|
|
1440
1428
|
[SupportedAiModels[LLM_CONSTANTS.MISTRAL_SMALL].modelApiName]: {
|
|
1441
1429
|
inputPrice: 0.15,
|
|
1442
1430
|
outputPrice: 0.6,
|
|
@@ -1517,8 +1505,7 @@ var HYBRID_THINKING_API_NAMES = /* @__PURE__ */ new Set([
|
|
|
1517
1505
|
SupportedAiModels[LLM_CONSTANTS.QWEN_FLASH].modelApiName,
|
|
1518
1506
|
SupportedAiModels[LLM_CONSTANTS.MINIMAX].modelApiName,
|
|
1519
1507
|
// Mistral reasons only when asked (`reasoning_effort`), and we always ask — hybrid by the
|
|
1520
|
-
// same definition as Qwen. Added 2026-09-18 when the
|
|
1521
|
-
SupportedAiModels[LLM_CONSTANTS.MISTRAL_MEDIUM].modelApiName,
|
|
1508
|
+
// same definition as Qwen. Added 2026-09-18 when the Mistral entries went thinking-on.
|
|
1522
1509
|
SupportedAiModels[LLM_CONSTANTS.MISTRAL_SMALL].modelApiName
|
|
1523
1510
|
]);
|
|
1524
1511
|
function isHybridThinkingModel(modelApiName) {
|
|
@@ -5350,7 +5337,6 @@ var AgentFactory = class {
|
|
|
5350
5337
|
case LLM_CONSTANTS.DEEPSEEK_PRO:
|
|
5351
5338
|
return new DeepSeekV2Agent(name, instruction, model.modelApiName, key, model.temperature ?? 0, shouldEnableThinking);
|
|
5352
5339
|
// Mistral models
|
|
5353
|
-
case LLM_CONSTANTS.MISTRAL_MEDIUM:
|
|
5354
5340
|
case LLM_CONSTANTS.MISTRAL_SMALL:
|
|
5355
5341
|
return new MistralAgent(name, instruction, model.modelApiName, key, shouldEnableThinking);
|
|
5356
5342
|
case LLM_CONSTANTS.KIMI:
|