@hiper2d/ai-agents 0.7.0 → 0.9.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.js +49 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +49 -29
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -998,9 +998,13 @@ var SupportedAiModels = {
|
|
|
998
998
|
tags: ["expensive"]
|
|
999
999
|
},
|
|
1000
1000
|
// Claude models — thinking-only entries (non-thinking variants retired 2026-08-05)
|
|
1001
|
+
// Opus moved 5 → 5.5 on 2026-09-22 (`claude-opus-5-5`, verified against GET /v1/models).
|
|
1002
|
+
// Cheaper than Opus 5 ($4/$20 vs $5/$25) and the same 1M context / 128K output. Thinking is
|
|
1003
|
+
// always on, as on Opus 5. Its API default effort is `medium`, but we keep the catalog-wide
|
|
1004
|
+
// `high` pin so bot answers don't get shallower than every other model in the lobby.
|
|
1001
1005
|
[LLM_CONSTANTS.CLAUDE_OPUS]: {
|
|
1002
|
-
displayName: "Claude 5 Opus",
|
|
1003
|
-
modelApiName: "claude-opus-5",
|
|
1006
|
+
displayName: "Claude 5.5 Opus",
|
|
1007
|
+
modelApiName: "claude-opus-5-5",
|
|
1004
1008
|
apiKeyName: API_KEY_CONSTANTS.ANTHROPIC,
|
|
1005
1009
|
hasThinking: true,
|
|
1006
1010
|
reasoningEffort: "high",
|
|
@@ -1061,11 +1065,15 @@ var SupportedAiModels = {
|
|
|
1061
1065
|
temperature: 1,
|
|
1062
1066
|
tags: ["expensive"]
|
|
1063
1067
|
},
|
|
1064
|
-
// GPT-
|
|
1065
|
-
//
|
|
1068
|
+
// Sol and Luna moved to GPT-6 on 2026-09-22 (both ids verified against GET /v1/models).
|
|
1069
|
+
// GPT-6 ships Astra, Sol and Luna only — there is NO gpt-6-terra, so the Terra slot stays on
|
|
1070
|
+
// gpt-5.6-terra, which OpenAI still serves. Both moves are big price cuts: Sol halved
|
|
1071
|
+
// ($4/$20 → $2/$10) and Luna halved ($0.20/$1.20 → $0.10/$0.50). Note GPT-6 Sol now
|
|
1072
|
+
// undercuts GPT-5.6 Terra ($2/$12) on output at the same input rate, which makes the Terra
|
|
1073
|
+
// slot largely redundant — retiring it is a product call, not a catalog one.
|
|
1066
1074
|
[LLM_CONSTANTS.GPT_SOL]: {
|
|
1067
|
-
displayName: "GPT-
|
|
1068
|
-
modelApiName: "gpt-
|
|
1075
|
+
displayName: "GPT-6 Sol",
|
|
1076
|
+
modelApiName: "gpt-6-sol",
|
|
1069
1077
|
apiKeyName: API_KEY_CONSTANTS.OPENAI,
|
|
1070
1078
|
hasThinking: true,
|
|
1071
1079
|
temperature: 1,
|
|
@@ -1080,8 +1088,8 @@ var SupportedAiModels = {
|
|
|
1080
1088
|
tags: ["fast", "expensive"]
|
|
1081
1089
|
},
|
|
1082
1090
|
[LLM_CONSTANTS.GPT_MINI]: {
|
|
1083
|
-
displayName: "GPT-
|
|
1084
|
-
modelApiName: "gpt-
|
|
1091
|
+
displayName: "GPT-6 Luna",
|
|
1092
|
+
modelApiName: "gpt-6-luna",
|
|
1085
1093
|
apiKeyName: API_KEY_CONSTANTS.OPENAI,
|
|
1086
1094
|
hasThinking: true,
|
|
1087
1095
|
temperature: 1,
|
|
@@ -1393,17 +1401,20 @@ var MODEL_PRICING = {
|
|
|
1393
1401
|
extendedContextCacheHitPrice: 2,
|
|
1394
1402
|
extendedContextThresholdTokens: 272e3
|
|
1395
1403
|
},
|
|
1396
|
-
// OpenAI GPT-
|
|
1397
|
-
//
|
|
1398
|
-
// $
|
|
1399
|
-
//
|
|
1404
|
+
// OpenAI GPT-6 Sol and GPT-6 Luna (developers.openai.com/api/docs/pricing, read 2026-09-22),
|
|
1405
|
+
// plus GPT-5.6 Terra, which has no GPT-6 successor and keeps its old rates.
|
|
1406
|
+
// Sol: $2/$10 short, $4/$15 long, cache hits $0.20/$0.40 — half what GPT-5.6 Sol cost.
|
|
1407
|
+
// Luna: $0.10/$0.50 short, $0.20/$0.75 long, cache hits $0.01/$0.02 — also halved.
|
|
1408
|
+
// As with Astra, OpenAI's table doesn't restate the short/long boundary, so we keep the
|
|
1409
|
+
// 272k threshold the 5.6 siblings use. Cache WRITES (Sol $2.50/$5, Luna $0.125/$0.25) are
|
|
1410
|
+
// not modelled: OpenAI caching is automatic and the API only reports hits.
|
|
1400
1411
|
[SupportedAiModels[LLM_CONSTANTS.GPT_SOL].modelApiName]: {
|
|
1401
|
-
inputPrice:
|
|
1402
|
-
outputPrice:
|
|
1403
|
-
cacheHitPrice: 0.
|
|
1404
|
-
extendedContextInputPrice:
|
|
1405
|
-
extendedContextOutputPrice:
|
|
1406
|
-
extendedContextCacheHitPrice: 0.
|
|
1412
|
+
inputPrice: 2,
|
|
1413
|
+
outputPrice: 10,
|
|
1414
|
+
cacheHitPrice: 0.2,
|
|
1415
|
+
extendedContextInputPrice: 4,
|
|
1416
|
+
extendedContextOutputPrice: 15,
|
|
1417
|
+
extendedContextCacheHitPrice: 0.4,
|
|
1407
1418
|
extendedContextThresholdTokens: 272e3
|
|
1408
1419
|
},
|
|
1409
1420
|
[SupportedAiModels[LLM_CONSTANTS.GPT].modelApiName]: {
|
|
@@ -1416,12 +1427,12 @@ var MODEL_PRICING = {
|
|
|
1416
1427
|
extendedContextThresholdTokens: 272e3
|
|
1417
1428
|
},
|
|
1418
1429
|
[SupportedAiModels[LLM_CONSTANTS.GPT_MINI].modelApiName]: {
|
|
1419
|
-
inputPrice: 0.
|
|
1420
|
-
outputPrice:
|
|
1421
|
-
cacheHitPrice: 0.
|
|
1422
|
-
extendedContextInputPrice: 0.
|
|
1423
|
-
extendedContextOutputPrice:
|
|
1424
|
-
extendedContextCacheHitPrice: 0.
|
|
1430
|
+
inputPrice: 0.1,
|
|
1431
|
+
outputPrice: 0.5,
|
|
1432
|
+
cacheHitPrice: 0.01,
|
|
1433
|
+
extendedContextInputPrice: 0.2,
|
|
1434
|
+
extendedContextOutputPrice: 0.75,
|
|
1435
|
+
extendedContextCacheHitPrice: 0.02,
|
|
1425
1436
|
extendedContextThresholdTokens: 272e3
|
|
1426
1437
|
},
|
|
1427
1438
|
// DeepSeek V4 models
|
|
@@ -1473,9 +1484,13 @@ var MODEL_PRICING = {
|
|
|
1473
1484
|
cacheHitPrice: 0.25
|
|
1474
1485
|
},
|
|
1475
1486
|
[SupportedAiModels[LLM_CONSTANTS.CLAUDE_OPUS].modelApiName]: {
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1487
|
+
// Opus 5.5 (2026-09-22): $4/$20, down from Opus 5's $5/$25. Cache reads are 5% of input
|
|
1488
|
+
// here, not the usual 10% — $0.20, not $0.40. Cache WRITES ($5 at 5m, $8 at 1h) are not
|
|
1489
|
+
// modelled: calculateCost bills every uncached prompt token at inputPrice, so a write is
|
|
1490
|
+
// under-billed by the 1.25x/2x premium. Pre-existing for every Anthropic model.
|
|
1491
|
+
inputPrice: 4,
|
|
1492
|
+
outputPrice: 20,
|
|
1493
|
+
cacheHitPrice: 0.2
|
|
1479
1494
|
},
|
|
1480
1495
|
[SupportedAiModels[LLM_CONSTANTS.CLAUDE_SONNET].modelApiName]: {
|
|
1481
1496
|
inputPrice: 2,
|
|
@@ -2633,6 +2648,7 @@ ${instruction}`);
|
|
|
2633
2648
|
|
|
2634
2649
|
// src/agents/anthropic-agent.ts
|
|
2635
2650
|
var import_sdk = require("@anthropic-ai/sdk");
|
|
2651
|
+
var rejectsDisabledThinking = (model) => model.includes("fable") || model.includes("opus-5-5");
|
|
2636
2652
|
var ClaudeAgent = class extends AbstractAgent {
|
|
2637
2653
|
client;
|
|
2638
2654
|
/**
|
|
@@ -2849,7 +2865,9 @@ ${schemaDescription}`;
|
|
|
2849
2865
|
params.temperature = 1;
|
|
2850
2866
|
}
|
|
2851
2867
|
} else if (usesAdaptiveThinking) {
|
|
2852
|
-
|
|
2868
|
+
if (!rejectsDisabledThinking(this.model)) {
|
|
2869
|
+
params.thinking = { type: "disabled" };
|
|
2870
|
+
}
|
|
2853
2871
|
} else {
|
|
2854
2872
|
params.temperature = this.temperature;
|
|
2855
2873
|
}
|
|
@@ -2943,7 +2961,9 @@ ${schemaDescription}`;
|
|
|
2943
2961
|
params.temperature = 1;
|
|
2944
2962
|
}
|
|
2945
2963
|
} else if (usesAdaptiveThinking) {
|
|
2946
|
-
|
|
2964
|
+
if (!rejectsDisabledThinking(this.model)) {
|
|
2965
|
+
params.thinking = { type: "disabled" };
|
|
2966
|
+
}
|
|
2947
2967
|
} else {
|
|
2948
2968
|
params.temperature = this.temperature;
|
|
2949
2969
|
}
|