@hiper2d/ai-agents 0.7.0 → 0.8.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 +20 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -7
- 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",
|
|
@@ -1302,9 +1306,13 @@ var MODEL_PRICING = {
|
|
|
1302
1306
|
cacheHitPrice: 0.25
|
|
1303
1307
|
},
|
|
1304
1308
|
[SupportedAiModels[LLM_CONSTANTS.CLAUDE_OPUS].modelApiName]: {
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1309
|
+
// Opus 5.5 (2026-09-22): $4/$20, down from Opus 5's $5/$25. Cache reads are 5% of input
|
|
1310
|
+
// here, not the usual 10% — $0.20, not $0.40. Cache WRITES ($5 at 5m, $8 at 1h) are not
|
|
1311
|
+
// modelled: calculateCost bills every uncached prompt token at inputPrice, so a write is
|
|
1312
|
+
// under-billed by the 1.25x/2x premium. Pre-existing for every Anthropic model.
|
|
1313
|
+
inputPrice: 4,
|
|
1314
|
+
outputPrice: 20,
|
|
1315
|
+
cacheHitPrice: 0.2
|
|
1308
1316
|
},
|
|
1309
1317
|
[SupportedAiModels[LLM_CONSTANTS.CLAUDE_SONNET].modelApiName]: {
|
|
1310
1318
|
inputPrice: 2,
|
|
@@ -2462,6 +2470,7 @@ ${instruction}`);
|
|
|
2462
2470
|
|
|
2463
2471
|
// src/agents/anthropic-agent.ts
|
|
2464
2472
|
import { Anthropic } from "@anthropic-ai/sdk";
|
|
2473
|
+
var rejectsDisabledThinking = (model) => model.includes("fable") || model.includes("opus-5-5");
|
|
2465
2474
|
var ClaudeAgent = class extends AbstractAgent {
|
|
2466
2475
|
client;
|
|
2467
2476
|
/**
|
|
@@ -2678,7 +2687,9 @@ ${schemaDescription}`;
|
|
|
2678
2687
|
params.temperature = 1;
|
|
2679
2688
|
}
|
|
2680
2689
|
} else if (usesAdaptiveThinking) {
|
|
2681
|
-
|
|
2690
|
+
if (!rejectsDisabledThinking(this.model)) {
|
|
2691
|
+
params.thinking = { type: "disabled" };
|
|
2692
|
+
}
|
|
2682
2693
|
} else {
|
|
2683
2694
|
params.temperature = this.temperature;
|
|
2684
2695
|
}
|
|
@@ -2772,7 +2783,9 @@ ${schemaDescription}`;
|
|
|
2772
2783
|
params.temperature = 1;
|
|
2773
2784
|
}
|
|
2774
2785
|
} else if (usesAdaptiveThinking) {
|
|
2775
|
-
|
|
2786
|
+
if (!rejectsDisabledThinking(this.model)) {
|
|
2787
|
+
params.thinking = { type: "disabled" };
|
|
2788
|
+
}
|
|
2776
2789
|
} else {
|
|
2777
2790
|
params.temperature = this.temperature;
|
|
2778
2791
|
}
|