@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.d.mts CHANGED
@@ -502,7 +502,7 @@ declare function calculateModelCost(modelApiName: string, inputTokens: number, o
502
502
  /**
503
503
  * Returns provider-specific signature fields based on the model's API name prefix.
504
504
  * Used when storing messages with thinking signatures from different providers.
505
- * @param aiType - The model API name (e.g. "claude-sonnet-5", "gemini-3.7-flash")
505
+ * @param aiType - The model API name (e.g. "claude-sonnet-5-5", "gemini-3.7-flash")
506
506
  * @param signature - The thinking signature from the API response (may be undefined)
507
507
  * @returns Object with appropriate signature fields for the message
508
508
  */
package/dist/index.d.ts CHANGED
@@ -502,7 +502,7 @@ declare function calculateModelCost(modelApiName: string, inputTokens: number, o
502
502
  /**
503
503
  * Returns provider-specific signature fields based on the model's API name prefix.
504
504
  * Used when storing messages with thinking signatures from different providers.
505
- * @param aiType - The model API name (e.g. "claude-sonnet-5", "gemini-3.7-flash")
505
+ * @param aiType - The model API name (e.g. "claude-sonnet-5-5", "gemini-3.7-flash")
506
506
  * @param signature - The thinking signature from the API response (may be undefined)
507
507
  * @returns Object with appropriate signature fields for the message
508
508
  */
package/dist/index.js CHANGED
@@ -1015,9 +1015,14 @@ var SupportedAiModels = {
1015
1015
  reasoningEffort: "high",
1016
1016
  tags: ["expensive"]
1017
1017
  },
1018
+ // Sonnet moved 5 → 5.5 on 2026-09-28 (`claude-sonnet-5-5`, verified live with the platform key).
1019
+ // Same price, 1M context / 128K output. Adaptive thinking, API default effort `high` (effort
1020
+ // levels were recalibrated vs Sonnet 5 — same pin, not necessarily the same thinking depth).
1021
+ // It rejects `thinking: {type: "disabled"}`; ClaudeAgent sends `between_tools` instead. It
1022
+ // reads Sonnet 5 thinking blocks, so games moving onto it keep the bots' earlier reasoning.
1018
1023
  [LLM_CONSTANTS.CLAUDE_SONNET]: {
1019
- displayName: "Claude 5 Sonnet",
1020
- modelApiName: "claude-sonnet-5",
1024
+ displayName: "Claude 5.5 Sonnet",
1025
+ modelApiName: "claude-sonnet-5-5",
1021
1026
  apiKeyName: API_KEY_CONSTANTS.ANTHROPIC,
1022
1027
  hasThinking: true,
1023
1028
  reasoningEffort: "high",
@@ -1521,6 +1526,7 @@ var MODEL_PRICING = {
1521
1526
  cacheHitPrice: 0.2
1522
1527
  },
1523
1528
  [SupportedAiModels[LLM_CONSTANTS.CLAUDE_SONNET].modelApiName]: {
1529
+ // Sonnet 5.5 (2026-09-28): same $2/$10 and $0.20 cache reads as Sonnet 5.
1524
1530
  inputPrice: 2,
1525
1531
  outputPrice: 10,
1526
1532
  cacheHitPrice: 0.2
@@ -2770,6 +2776,7 @@ ${instruction}`);
2770
2776
  // src/agents/anthropic-agent.ts
2771
2777
  var import_sdk = require("@anthropic-ai/sdk");
2772
2778
  var rejectsDisabledThinking = (model) => model.includes("fable") || model.includes("opus-5-5");
2779
+ var usesBetweenToolsForOff = (model) => model.includes("sonnet-5-5");
2773
2780
  var ClaudeAgent = class extends AbstractAgent {
2774
2781
  client;
2775
2782
  /**
@@ -2986,7 +2993,9 @@ ${schemaDescription}`;
2986
2993
  params.temperature = 1;
2987
2994
  }
2988
2995
  } else if (usesAdaptiveThinking) {
2989
- if (!rejectsDisabledThinking(this.model)) {
2996
+ if (usesBetweenToolsForOff(this.model)) {
2997
+ params.thinking = { type: "between_tools" };
2998
+ } else if (!rejectsDisabledThinking(this.model)) {
2990
2999
  params.thinking = { type: "disabled" };
2991
3000
  }
2992
3001
  } else {
@@ -3082,7 +3091,9 @@ ${schemaDescription}`;
3082
3091
  params.temperature = 1;
3083
3092
  }
3084
3093
  } else if (usesAdaptiveThinking) {
3085
- if (!rejectsDisabledThinking(this.model)) {
3094
+ if (usesBetweenToolsForOff(this.model)) {
3095
+ params.thinking = { type: "between_tools" };
3096
+ } else if (!rejectsDisabledThinking(this.model)) {
3086
3097
  params.thinking = { type: "disabled" };
3087
3098
  }
3088
3099
  } else {