@hiper2d/ai-agents 0.16.0 → 0.17.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.mjs CHANGED
@@ -839,9 +839,14 @@ var SupportedAiModels = {
839
839
  reasoningEffort: "high",
840
840
  tags: ["expensive"]
841
841
  },
842
+ // Sonnet moved 5 → 5.5 on 2026-09-28 (`claude-sonnet-5-5`, verified live with the platform key).
843
+ // Same price, 1M context / 128K output. Adaptive thinking, API default effort `high` (effort
844
+ // levels were recalibrated vs Sonnet 5 — same pin, not necessarily the same thinking depth).
845
+ // It rejects `thinking: {type: "disabled"}`; ClaudeAgent sends `between_tools` instead. It
846
+ // reads Sonnet 5 thinking blocks, so games moving onto it keep the bots' earlier reasoning.
842
847
  [LLM_CONSTANTS.CLAUDE_SONNET]: {
843
- displayName: "Claude 5 Sonnet",
844
- modelApiName: "claude-sonnet-5",
848
+ displayName: "Claude 5.5 Sonnet",
849
+ modelApiName: "claude-sonnet-5-5",
845
850
  apiKeyName: API_KEY_CONSTANTS.ANTHROPIC,
846
851
  hasThinking: true,
847
852
  reasoningEffort: "high",
@@ -1345,6 +1350,7 @@ var MODEL_PRICING = {
1345
1350
  cacheHitPrice: 0.2
1346
1351
  },
1347
1352
  [SupportedAiModels[LLM_CONSTANTS.CLAUDE_SONNET].modelApiName]: {
1353
+ // Sonnet 5.5 (2026-09-28): same $2/$10 and $0.20 cache reads as Sonnet 5.
1348
1354
  inputPrice: 2,
1349
1355
  outputPrice: 10,
1350
1356
  cacheHitPrice: 0.2
@@ -2594,6 +2600,7 @@ ${instruction}`);
2594
2600
  // src/agents/anthropic-agent.ts
2595
2601
  import { Anthropic } from "@anthropic-ai/sdk";
2596
2602
  var rejectsDisabledThinking = (model) => model.includes("fable") || model.includes("opus-5-5");
2603
+ var usesBetweenToolsForOff = (model) => model.includes("sonnet-5-5");
2597
2604
  var ClaudeAgent = class extends AbstractAgent {
2598
2605
  client;
2599
2606
  /**
@@ -2810,7 +2817,9 @@ ${schemaDescription}`;
2810
2817
  params.temperature = 1;
2811
2818
  }
2812
2819
  } else if (usesAdaptiveThinking) {
2813
- if (!rejectsDisabledThinking(this.model)) {
2820
+ if (usesBetweenToolsForOff(this.model)) {
2821
+ params.thinking = { type: "between_tools" };
2822
+ } else if (!rejectsDisabledThinking(this.model)) {
2814
2823
  params.thinking = { type: "disabled" };
2815
2824
  }
2816
2825
  } else {
@@ -2906,7 +2915,9 @@ ${schemaDescription}`;
2906
2915
  params.temperature = 1;
2907
2916
  }
2908
2917
  } else if (usesAdaptiveThinking) {
2909
- if (!rejectsDisabledThinking(this.model)) {
2918
+ if (usesBetweenToolsForOff(this.model)) {
2919
+ params.thinking = { type: "between_tools" };
2920
+ } else if (!rejectsDisabledThinking(this.model)) {
2910
2921
  params.thinking = { type: "disabled" };
2911
2922
  }
2912
2923
  } else {