@hiper2d/ai-agents 0.19.0 → 0.19.1
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 +5 -7
- package/dist/index.d.ts +5 -7
- package/dist/index.js +33 -61
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -61
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -375,14 +375,12 @@ declare const LLM_CONSTANTS: {
|
|
|
375
375
|
GEMINI_PRO: string;
|
|
376
376
|
GEMINI_FLASH: string;
|
|
377
377
|
GEMINI_LITE: string;
|
|
378
|
-
MISTRAL_LARGE: string;
|
|
379
378
|
MISTRAL_MEDIUM: string;
|
|
380
379
|
MISTRAL_SMALL: string;
|
|
381
380
|
GROK: string;
|
|
382
381
|
KIMI: string;
|
|
383
382
|
GLM: string;
|
|
384
383
|
GLM_FLASH: string;
|
|
385
|
-
FUGU_ULTRA: string;
|
|
386
384
|
FUGU_MAX: string;
|
|
387
385
|
QWEN_MAX: string;
|
|
388
386
|
QWEN_FLASH: string;
|
|
@@ -553,11 +551,11 @@ declare function getProviderSignatureFields(aiType: string, signature?: string):
|
|
|
553
551
|
* exactly that enum). The server default is xhigh for fugu-ultra and high for the rest.
|
|
554
552
|
* - Meta Muse Spark (verified 2026-09-12): minimal|low|medium|high|xhigh|max ("none" → 400; max is
|
|
555
553
|
* Standard tier only)
|
|
556
|
-
* - Mistral Small 4 / Medium 3.5
|
|
557
|
-
* none|minimal|low|medium|high|xhigh,
|
|
558
|
-
*
|
|
559
|
-
*
|
|
560
|
-
*
|
|
554
|
+
* - Mistral Small 4 / Medium 3.5 / Large 4: the documented API enum is
|
|
555
|
+
* none|minimal|low|medium|high|xhigh, but every model we run accepts only "none" and "high"
|
|
556
|
+
* (each other value is a 400 "not supported for this model, supported values: [high, none]",
|
|
557
|
+
* checked on all three 2026-10-06). Reasoning is OFF unless the field is sent; "none" means
|
|
558
|
+
* "don't reason", which an agent expresses by omitting the field, so the slice is just high.
|
|
561
559
|
* - xAI Grok 4.7 (docs.x.ai/developers/model-capabilities/text/reasoning, 2026-09-22):
|
|
562
560
|
* low|medium|high|xhigh, default high, sent on the Responses API as `reasoning: {effort}`.
|
|
563
561
|
* Chat Completions has no equivalent. Grok 4.6 and earlier had no knob at all.
|
package/dist/index.d.ts
CHANGED
|
@@ -375,14 +375,12 @@ declare const LLM_CONSTANTS: {
|
|
|
375
375
|
GEMINI_PRO: string;
|
|
376
376
|
GEMINI_FLASH: string;
|
|
377
377
|
GEMINI_LITE: string;
|
|
378
|
-
MISTRAL_LARGE: string;
|
|
379
378
|
MISTRAL_MEDIUM: string;
|
|
380
379
|
MISTRAL_SMALL: string;
|
|
381
380
|
GROK: string;
|
|
382
381
|
KIMI: string;
|
|
383
382
|
GLM: string;
|
|
384
383
|
GLM_FLASH: string;
|
|
385
|
-
FUGU_ULTRA: string;
|
|
386
384
|
FUGU_MAX: string;
|
|
387
385
|
QWEN_MAX: string;
|
|
388
386
|
QWEN_FLASH: string;
|
|
@@ -553,11 +551,11 @@ declare function getProviderSignatureFields(aiType: string, signature?: string):
|
|
|
553
551
|
* exactly that enum). The server default is xhigh for fugu-ultra and high for the rest.
|
|
554
552
|
* - Meta Muse Spark (verified 2026-09-12): minimal|low|medium|high|xhigh|max ("none" → 400; max is
|
|
555
553
|
* Standard tier only)
|
|
556
|
-
* - Mistral Small 4 / Medium 3.5
|
|
557
|
-
* none|minimal|low|medium|high|xhigh,
|
|
558
|
-
*
|
|
559
|
-
*
|
|
560
|
-
*
|
|
554
|
+
* - Mistral Small 4 / Medium 3.5 / Large 4: the documented API enum is
|
|
555
|
+
* none|minimal|low|medium|high|xhigh, but every model we run accepts only "none" and "high"
|
|
556
|
+
* (each other value is a 400 "not supported for this model, supported values: [high, none]",
|
|
557
|
+
* checked on all three 2026-10-06). Reasoning is OFF unless the field is sent; "none" means
|
|
558
|
+
* "don't reason", which an agent expresses by omitting the field, so the slice is just high.
|
|
561
559
|
* - xAI Grok 4.7 (docs.x.ai/developers/model-capabilities/text/reasoning, 2026-09-22):
|
|
562
560
|
* low|medium|high|xhigh, default high, sent on the Responses API as `reasoning: {effort}`.
|
|
563
561
|
* Chat Completions has no equivalent. Grok 4.6 and earlier had no knob at all.
|
package/dist/index.js
CHANGED
|
@@ -984,16 +984,12 @@ var LLM_CONSTANTS = {
|
|
|
984
984
|
GEMINI_PRO: "gemini-pro",
|
|
985
985
|
GEMINI_FLASH: "gemini-flash",
|
|
986
986
|
GEMINI_LITE: "gemini-lite",
|
|
987
|
-
// Reused 2026-10-06 for Mistral Large 4: the old id (Large 3) was retired 2026-09-18 and
|
|
988
|
-
// consumers had mapped it away, so the version-free id was free again.
|
|
989
|
-
MISTRAL_LARGE: "mistral-large",
|
|
990
987
|
MISTRAL_MEDIUM: "mistral-medium",
|
|
991
988
|
MISTRAL_SMALL: "mistral-small",
|
|
992
989
|
GROK: "grok",
|
|
993
990
|
KIMI: "kimi",
|
|
994
991
|
GLM: "glm",
|
|
995
992
|
GLM_FLASH: "glm-flash",
|
|
996
|
-
FUGU_ULTRA: "fugu-ultra",
|
|
997
993
|
FUGU_MAX: "fugu-max",
|
|
998
994
|
// Qwen (QwenCloud/DashScope). Stable picker ids without the version, matching the gpt/gemini
|
|
999
995
|
// pattern, so future repoints don't orphan persisted ids.
|
|
@@ -1166,16 +1162,20 @@ var SupportedAiModels = {
|
|
|
1166
1162
|
},
|
|
1167
1163
|
// Always-on reasoning — no non-thinking sibling. Bumped 4.6 → 4.7 on 2026-09-22 (id verified
|
|
1168
1164
|
// against GET /v1/models). Same price, same 200K extended-context boundary; the context
|
|
1169
|
-
// window is 500K.
|
|
1170
|
-
//
|
|
1171
|
-
//
|
|
1172
|
-
//
|
|
1165
|
+
// window is 500K. 4.7 accepts `reasoning: {effort}` (low | medium | high | xhigh, default
|
|
1166
|
+
// high) where 4.6 had no knob at all; GrokAgent sends the pin below.
|
|
1167
|
+
//
|
|
1168
|
+
// Pinned medium 2026-10-06. At high, production day summaries ran ~2 min and the werewolf
|
|
1169
|
+
// day-2 fixture measured votes 27-55s and summaries 44-55s (1.5-3k output tokens) — too
|
|
1170
|
+
// close to the 60s per-call timeout. At medium the same prompts took votes 5-8s and
|
|
1171
|
+
// summaries 23-25s (3-5x fewer output tokens) with the same vote target and summaries just
|
|
1172
|
+
// as specific.
|
|
1173
1173
|
[LLM_CONSTANTS.GROK]: {
|
|
1174
1174
|
displayName: "Grok 4.7",
|
|
1175
1175
|
modelApiName: "grok-4.7",
|
|
1176
1176
|
apiKeyName: API_KEY_CONSTANTS.GROK,
|
|
1177
1177
|
hasThinking: true,
|
|
1178
|
-
reasoningEffort: "
|
|
1178
|
+
reasoningEffort: "medium",
|
|
1179
1179
|
temperature: 0.7
|
|
1180
1180
|
},
|
|
1181
1181
|
// Mistral models. Two hybrid entries since 2026-09-18: reasoning is off by default on the
|
|
@@ -1195,20 +1195,12 @@ var SupportedAiModels = {
|
|
|
1195
1195
|
// `magistral-medium-latest` as one entry — so Magistral seats had silently become Medium
|
|
1196
1196
|
// seats already. Consumers map both retired ids onto the surviving pair.
|
|
1197
1197
|
//
|
|
1198
|
-
// Mistral Large 4
|
|
1199
|
-
//
|
|
1200
|
-
//
|
|
1201
|
-
// a
|
|
1202
|
-
//
|
|
1203
|
-
|
|
1204
|
-
displayName: "Mistral Large 4",
|
|
1205
|
-
// `mistral-large-4-0` is the same entry; `mistral-large-latest` still points at Large 3.
|
|
1206
|
-
modelApiName: "mistral-large-4",
|
|
1207
|
-
apiKeyName: API_KEY_CONSTANTS.MISTRAL,
|
|
1208
|
-
hasThinking: true,
|
|
1209
|
-
reasoningEffort: "high",
|
|
1210
|
-
tags: ["slow", "cheap"]
|
|
1211
|
-
},
|
|
1198
|
+
// Mistral Large 4 (`mistral-large-4`, $0.68/$2.09, $0.07 cached) was added in 0.19.0 and
|
|
1199
|
+
// removed in 0.19.1 (2026-10-06/07): too slow to play. Like Small/Medium it accepts only
|
|
1200
|
+
// reasoning_effort high|none, and unlike them it reasons when the field is omitted. At high
|
|
1201
|
+
// a realistic day-2 vote took 25-154s (half past the 60s timeout) and its parallel story
|
|
1202
|
+
// batches finished ~100s apart (Mistral served them one at a time: ~6 min per story). Off,
|
|
1203
|
+
// it answers in ~1s with no trace. Re-test before re-adding.
|
|
1212
1204
|
[LLM_CONSTANTS.MISTRAL_MEDIUM]: {
|
|
1213
1205
|
displayName: "Mistral Medium 3.5",
|
|
1214
1206
|
// The docs' explicit 3.5 id. It was `mistral-medium-3` until 2026-09-18, which Mistral
|
|
@@ -1293,9 +1285,9 @@ var SupportedAiModels = {
|
|
|
1293
1285
|
// real against $0.85 tracked, a 5.7x undercharge. It is a router with no published price,
|
|
1294
1286
|
// so the rate is not even guaranteed stable, and its cache hit rate was 9.3% — effectively
|
|
1295
1287
|
// zero, since every hit came from a duplicate call seconds apart rather than turn-to-turn
|
|
1296
|
-
// prefix reuse.
|
|
1288
|
+
// prefix reuse.
|
|
1297
1289
|
//
|
|
1298
|
-
// reasoningEffort
|
|
1290
|
+
// reasoningEffort was PINNED on both entries because the server default differs per model:
|
|
1299
1291
|
// fugu-ultra defaults to `xhigh` (console.sakana.ai/models), fugu-max to `high`. Until
|
|
1300
1292
|
// 2026-09-20 the agent sent no effort at all, so every Ultra turn ran at xhigh. Measured that
|
|
1301
1293
|
// day on a 2k-token three-day game prompt (two samples each, chat completions, json mode):
|
|
@@ -1305,17 +1297,17 @@ var SupportedAiModels = {
|
|
|
1305
1297
|
// max xhigh 41s / 47s $0.02
|
|
1306
1298
|
// `max_tokens` is not a latency lever for Ultra: Sakana applies it to the final response only,
|
|
1307
1299
|
// the orchestrator "still uses maximum token limit". Effort is the only knob.
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
},
|
|
1300
|
+
//
|
|
1301
|
+
// Fugu Ultra (`fugu-ultra`, $5/$30, $0.50 cached; ×~2 above 272K) was REMOVED in 0.19.1
|
|
1302
|
+
// (2026-10-07): too slow and too expensive for what it played. At `high` a day-2 vote took
|
|
1303
|
+
// 39s and a turn 65-78s (past the 60s request timeout), and as Game Master its four parallel
|
|
1304
|
+
// story batches ran past 240s each. It also billed "orchestration" tokens (its internal expert
|
|
1305
|
+
// calls) on top of the visible counts; FuguAgent still folds those in, in case Max ever
|
|
1306
|
+
// reports them. Consumers map the id to Max.
|
|
1316
1307
|
// Fugu Max (2026-09-20, fugu-max → fugu-max-v1.0): Sakana's "largest pool of models on the
|
|
1317
|
-
// cost–performance Pareto frontier" —
|
|
1318
|
-
//
|
|
1308
|
+
// cost–performance Pareto frontier" — 5x less than Ultra's output rate and a fraction of its
|
|
1309
|
+
// latency; the only Fugu since 0.19.1. Live 2026-10-06: day-2 vote 11s, 15-character story
|
|
1310
|
+
// pipeline 100s. It reasons (reasoning_tokens 80-500 a turn) but, like
|
|
1319
1311
|
// Ultra, never returns reasoning_content, hence hasThinking: false. No orchestration
|
|
1320
1312
|
// tokens observed on any call.
|
|
1321
1313
|
[LLM_CONSTANTS.FUGU_MAX]: {
|
|
@@ -1598,13 +1590,7 @@ var MODEL_PRICING = {
|
|
|
1598
1590
|
// Mistral models (mistral.ai/pricing/api, verified 2026-09-18). Cached tokens bill at 10% of
|
|
1599
1591
|
// the input price (documented on the prompt_cache_key param; no per-model cached prices
|
|
1600
1592
|
// published). Reasoning tokens are counted inside completion_tokens — no separate
|
|
1601
|
-
// reasoning_tokens field — so the output rate already covers the trace.
|
|
1602
|
-
// 2026-10-06 at its published rates ($0.07 cached, not an exact 10%).
|
|
1603
|
-
[SupportedAiModels[LLM_CONSTANTS.MISTRAL_LARGE].modelApiName]: {
|
|
1604
|
-
inputPrice: 0.68,
|
|
1605
|
-
outputPrice: 2.09,
|
|
1606
|
-
cacheHitPrice: 0.07
|
|
1607
|
-
},
|
|
1593
|
+
// reasoning_tokens field — so the output rate already covers the trace.
|
|
1608
1594
|
[SupportedAiModels[LLM_CONSTANTS.MISTRAL_MEDIUM].modelApiName]: {
|
|
1609
1595
|
inputPrice: 1.5,
|
|
1610
1596
|
outputPrice: 7.5,
|
|
@@ -1628,21 +1614,10 @@ var MODEL_PRICING = {
|
|
|
1628
1614
|
extendedContextCacheHitPrice: 1,
|
|
1629
1615
|
extendedContextThresholdTokens: 2e5
|
|
1630
1616
|
},
|
|
1631
|
-
// Sakana Fugu
|
|
1632
|
-
//
|
|
1633
|
-
//
|
|
1634
|
-
//
|
|
1635
|
-
// completion_tokens_details, billed at these same input/output rates — FuguAgent folds them
|
|
1636
|
-
// into the token counts before pricing.
|
|
1637
|
-
[SupportedAiModels[LLM_CONSTANTS.FUGU_ULTRA].modelApiName]: {
|
|
1638
|
-
inputPrice: 5,
|
|
1639
|
-
outputPrice: 30,
|
|
1640
|
-
cacheHitPrice: 0.5,
|
|
1641
|
-
extendedContextInputPrice: 10,
|
|
1642
|
-
extendedContextOutputPrice: 45,
|
|
1643
|
-
extendedContextCacheHitPrice: 1,
|
|
1644
|
-
extendedContextThresholdTokens: 272e3
|
|
1645
|
-
},
|
|
1617
|
+
// Sakana Fugu (console.sakana.ai/pricing, read 2026-09-20). Base `fugu` (retired 2026-08-04)
|
|
1618
|
+
// and `fugu-ultra` (removed 0.19.1) have no entries. Any "orchestration" tokens reported in
|
|
1619
|
+
// prompt_tokens_details / completion_tokens_details bill at these same rates — FuguAgent
|
|
1620
|
+
// folds them into the token counts before pricing.
|
|
1646
1621
|
// fugu-max: flat rates, no context tiers.
|
|
1647
1622
|
[SupportedAiModels[LLM_CONSTANTS.FUGU_MAX].modelApiName]: {
|
|
1648
1623
|
inputPrice: 2,
|
|
@@ -1702,7 +1677,6 @@ var HYBRID_THINKING_API_NAMES = /* @__PURE__ */ new Set([
|
|
|
1702
1677
|
SupportedAiModels[LLM_CONSTANTS.MINIMAX].modelApiName,
|
|
1703
1678
|
// Mistral reasons only when asked (`reasoning_effort`), and we always ask — hybrid by the
|
|
1704
1679
|
// same definition as Qwen. Added 2026-09-18 when the two entries went thinking-on.
|
|
1705
|
-
SupportedAiModels[LLM_CONSTANTS.MISTRAL_LARGE].modelApiName,
|
|
1706
1680
|
SupportedAiModels[LLM_CONSTANTS.MISTRAL_MEDIUM].modelApiName,
|
|
1707
1681
|
SupportedAiModels[LLM_CONSTANTS.MISTRAL_SMALL].modelApiName
|
|
1708
1682
|
]);
|
|
@@ -1771,7 +1745,7 @@ var GLM_REASONING_EFFORTS = ["low", "high", "max"];
|
|
|
1771
1745
|
var DEEPSEEK_REASONING_EFFORTS = ["low", "high", "max"];
|
|
1772
1746
|
var FUGU_REASONING_EFFORTS = ["high", "xhigh", "max"];
|
|
1773
1747
|
var META_REASONING_EFFORTS = ["minimal", "low", "medium", "high", "xhigh", "max"];
|
|
1774
|
-
var MISTRAL_REASONING_EFFORTS = ["
|
|
1748
|
+
var MISTRAL_REASONING_EFFORTS = ["high"];
|
|
1775
1749
|
var XAI_REASONING_EFFORTS = ["low", "medium", "high", "xhigh"];
|
|
1776
1750
|
var KIMI_REASONING_EFFORTS = ["low", "high", "max"];
|
|
1777
1751
|
function clampReasoningEffort(effort, allowed) {
|
|
@@ -5524,7 +5498,6 @@ var AgentFactory = class {
|
|
|
5524
5498
|
case LLM_CONSTANTS.DEEPSEEK_PRO:
|
|
5525
5499
|
return new DeepSeekV2Agent(name, instruction, model.modelApiName, key, model.temperature ?? 0, shouldEnableThinking);
|
|
5526
5500
|
// Mistral models
|
|
5527
|
-
case LLM_CONSTANTS.MISTRAL_LARGE:
|
|
5528
5501
|
case LLM_CONSTANTS.MISTRAL_MEDIUM:
|
|
5529
5502
|
case LLM_CONSTANTS.MISTRAL_SMALL:
|
|
5530
5503
|
return new MistralAgent(name, instruction, model.modelApiName, key, shouldEnableThinking);
|
|
@@ -5535,7 +5508,6 @@ var AgentFactory = class {
|
|
|
5535
5508
|
case LLM_CONSTANTS.GLM_FLASH:
|
|
5536
5509
|
return new GlmAgent(name, instruction, model.modelApiName, key, model.temperature, shouldEnableThinking);
|
|
5537
5510
|
// Sakana Fugu models — always-on reasoning, no temperature (ignored by the model)
|
|
5538
|
-
case LLM_CONSTANTS.FUGU_ULTRA:
|
|
5539
5511
|
case LLM_CONSTANTS.FUGU_MAX:
|
|
5540
5512
|
return new FuguAgent(name, instruction, model.modelApiName, key, shouldEnableThinking);
|
|
5541
5513
|
// Qwen models — thinking-only (enable_thinking always sent)
|