@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.mjs
CHANGED
|
@@ -827,9 +827,13 @@ var SupportedAiModels = {
|
|
|
827
827
|
tags: ["expensive"]
|
|
828
828
|
},
|
|
829
829
|
// Claude models — thinking-only entries (non-thinking variants retired 2026-08-05)
|
|
830
|
+
// Opus moved 5 → 5.5 on 2026-09-22 (`claude-opus-5-5`, verified against GET /v1/models).
|
|
831
|
+
// Cheaper than Opus 5 ($4/$20 vs $5/$25) and the same 1M context / 128K output. Thinking is
|
|
832
|
+
// always on, as on Opus 5. Its API default effort is `medium`, but we keep the catalog-wide
|
|
833
|
+
// `high` pin so bot answers don't get shallower than every other model in the lobby.
|
|
830
834
|
[LLM_CONSTANTS.CLAUDE_OPUS]: {
|
|
831
|
-
displayName: "Claude 5 Opus",
|
|
832
|
-
modelApiName: "claude-opus-5",
|
|
835
|
+
displayName: "Claude 5.5 Opus",
|
|
836
|
+
modelApiName: "claude-opus-5-5",
|
|
833
837
|
apiKeyName: API_KEY_CONSTANTS.ANTHROPIC,
|
|
834
838
|
hasThinking: true,
|
|
835
839
|
reasoningEffort: "high",
|
|
@@ -890,11 +894,15 @@ var SupportedAiModels = {
|
|
|
890
894
|
temperature: 1,
|
|
891
895
|
tags: ["expensive"]
|
|
892
896
|
},
|
|
893
|
-
// GPT-
|
|
894
|
-
//
|
|
897
|
+
// Sol and Luna moved to GPT-6 on 2026-09-22 (both ids verified against GET /v1/models).
|
|
898
|
+
// GPT-6 ships Astra, Sol and Luna only — there is NO gpt-6-terra, so the Terra slot stays on
|
|
899
|
+
// gpt-5.6-terra, which OpenAI still serves. Both moves are big price cuts: Sol halved
|
|
900
|
+
// ($4/$20 → $2/$10) and Luna halved ($0.20/$1.20 → $0.10/$0.50). Note GPT-6 Sol now
|
|
901
|
+
// undercuts GPT-5.6 Terra ($2/$12) on output at the same input rate, which makes the Terra
|
|
902
|
+
// slot largely redundant — retiring it is a product call, not a catalog one.
|
|
895
903
|
[LLM_CONSTANTS.GPT_SOL]: {
|
|
896
|
-
displayName: "GPT-
|
|
897
|
-
modelApiName: "gpt-
|
|
904
|
+
displayName: "GPT-6 Sol",
|
|
905
|
+
modelApiName: "gpt-6-sol",
|
|
898
906
|
apiKeyName: API_KEY_CONSTANTS.OPENAI,
|
|
899
907
|
hasThinking: true,
|
|
900
908
|
temperature: 1,
|
|
@@ -909,8 +917,8 @@ var SupportedAiModels = {
|
|
|
909
917
|
tags: ["fast", "expensive"]
|
|
910
918
|
},
|
|
911
919
|
[LLM_CONSTANTS.GPT_MINI]: {
|
|
912
|
-
displayName: "GPT-
|
|
913
|
-
modelApiName: "gpt-
|
|
920
|
+
displayName: "GPT-6 Luna",
|
|
921
|
+
modelApiName: "gpt-6-luna",
|
|
914
922
|
apiKeyName: API_KEY_CONSTANTS.OPENAI,
|
|
915
923
|
hasThinking: true,
|
|
916
924
|
temperature: 1,
|
|
@@ -1222,17 +1230,20 @@ var MODEL_PRICING = {
|
|
|
1222
1230
|
extendedContextCacheHitPrice: 2,
|
|
1223
1231
|
extendedContextThresholdTokens: 272e3
|
|
1224
1232
|
},
|
|
1225
|
-
// OpenAI GPT-
|
|
1226
|
-
//
|
|
1227
|
-
// $
|
|
1228
|
-
//
|
|
1233
|
+
// OpenAI GPT-6 Sol and GPT-6 Luna (developers.openai.com/api/docs/pricing, read 2026-09-22),
|
|
1234
|
+
// plus GPT-5.6 Terra, which has no GPT-6 successor and keeps its old rates.
|
|
1235
|
+
// Sol: $2/$10 short, $4/$15 long, cache hits $0.20/$0.40 — half what GPT-5.6 Sol cost.
|
|
1236
|
+
// Luna: $0.10/$0.50 short, $0.20/$0.75 long, cache hits $0.01/$0.02 — also halved.
|
|
1237
|
+
// As with Astra, OpenAI's table doesn't restate the short/long boundary, so we keep the
|
|
1238
|
+
// 272k threshold the 5.6 siblings use. Cache WRITES (Sol $2.50/$5, Luna $0.125/$0.25) are
|
|
1239
|
+
// not modelled: OpenAI caching is automatic and the API only reports hits.
|
|
1229
1240
|
[SupportedAiModels[LLM_CONSTANTS.GPT_SOL].modelApiName]: {
|
|
1230
|
-
inputPrice:
|
|
1231
|
-
outputPrice:
|
|
1232
|
-
cacheHitPrice: 0.
|
|
1233
|
-
extendedContextInputPrice:
|
|
1234
|
-
extendedContextOutputPrice:
|
|
1235
|
-
extendedContextCacheHitPrice: 0.
|
|
1241
|
+
inputPrice: 2,
|
|
1242
|
+
outputPrice: 10,
|
|
1243
|
+
cacheHitPrice: 0.2,
|
|
1244
|
+
extendedContextInputPrice: 4,
|
|
1245
|
+
extendedContextOutputPrice: 15,
|
|
1246
|
+
extendedContextCacheHitPrice: 0.4,
|
|
1236
1247
|
extendedContextThresholdTokens: 272e3
|
|
1237
1248
|
},
|
|
1238
1249
|
[SupportedAiModels[LLM_CONSTANTS.GPT].modelApiName]: {
|
|
@@ -1245,12 +1256,12 @@ var MODEL_PRICING = {
|
|
|
1245
1256
|
extendedContextThresholdTokens: 272e3
|
|
1246
1257
|
},
|
|
1247
1258
|
[SupportedAiModels[LLM_CONSTANTS.GPT_MINI].modelApiName]: {
|
|
1248
|
-
inputPrice: 0.
|
|
1249
|
-
outputPrice:
|
|
1250
|
-
cacheHitPrice: 0.
|
|
1251
|
-
extendedContextInputPrice: 0.
|
|
1252
|
-
extendedContextOutputPrice:
|
|
1253
|
-
extendedContextCacheHitPrice: 0.
|
|
1259
|
+
inputPrice: 0.1,
|
|
1260
|
+
outputPrice: 0.5,
|
|
1261
|
+
cacheHitPrice: 0.01,
|
|
1262
|
+
extendedContextInputPrice: 0.2,
|
|
1263
|
+
extendedContextOutputPrice: 0.75,
|
|
1264
|
+
extendedContextCacheHitPrice: 0.02,
|
|
1254
1265
|
extendedContextThresholdTokens: 272e3
|
|
1255
1266
|
},
|
|
1256
1267
|
// DeepSeek V4 models
|
|
@@ -1302,9 +1313,13 @@ var MODEL_PRICING = {
|
|
|
1302
1313
|
cacheHitPrice: 0.25
|
|
1303
1314
|
},
|
|
1304
1315
|
[SupportedAiModels[LLM_CONSTANTS.CLAUDE_OPUS].modelApiName]: {
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1316
|
+
// Opus 5.5 (2026-09-22): $4/$20, down from Opus 5's $5/$25. Cache reads are 5% of input
|
|
1317
|
+
// here, not the usual 10% — $0.20, not $0.40. Cache WRITES ($5 at 5m, $8 at 1h) are not
|
|
1318
|
+
// modelled: calculateCost bills every uncached prompt token at inputPrice, so a write is
|
|
1319
|
+
// under-billed by the 1.25x/2x premium. Pre-existing for every Anthropic model.
|
|
1320
|
+
inputPrice: 4,
|
|
1321
|
+
outputPrice: 20,
|
|
1322
|
+
cacheHitPrice: 0.2
|
|
1308
1323
|
},
|
|
1309
1324
|
[SupportedAiModels[LLM_CONSTANTS.CLAUDE_SONNET].modelApiName]: {
|
|
1310
1325
|
inputPrice: 2,
|
|
@@ -2462,6 +2477,7 @@ ${instruction}`);
|
|
|
2462
2477
|
|
|
2463
2478
|
// src/agents/anthropic-agent.ts
|
|
2464
2479
|
import { Anthropic } from "@anthropic-ai/sdk";
|
|
2480
|
+
var rejectsDisabledThinking = (model) => model.includes("fable") || model.includes("opus-5-5");
|
|
2465
2481
|
var ClaudeAgent = class extends AbstractAgent {
|
|
2466
2482
|
client;
|
|
2467
2483
|
/**
|
|
@@ -2678,7 +2694,9 @@ ${schemaDescription}`;
|
|
|
2678
2694
|
params.temperature = 1;
|
|
2679
2695
|
}
|
|
2680
2696
|
} else if (usesAdaptiveThinking) {
|
|
2681
|
-
|
|
2697
|
+
if (!rejectsDisabledThinking(this.model)) {
|
|
2698
|
+
params.thinking = { type: "disabled" };
|
|
2699
|
+
}
|
|
2682
2700
|
} else {
|
|
2683
2701
|
params.temperature = this.temperature;
|
|
2684
2702
|
}
|
|
@@ -2772,7 +2790,9 @@ ${schemaDescription}`;
|
|
|
2772
2790
|
params.temperature = 1;
|
|
2773
2791
|
}
|
|
2774
2792
|
} else if (usesAdaptiveThinking) {
|
|
2775
|
-
|
|
2793
|
+
if (!rejectsDisabledThinking(this.model)) {
|
|
2794
|
+
params.thinking = { type: "disabled" };
|
|
2795
|
+
}
|
|
2776
2796
|
} else {
|
|
2777
2797
|
params.temperature = this.temperature;
|
|
2778
2798
|
}
|