@hiper2d/ai-agents 0.4.0 → 0.4.2

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 CHANGED
@@ -1023,9 +1023,11 @@ var SupportedAiModels = {
1023
1023
  // knob exists) both models emitted ~8 reasoning tokens per answer token in prod
1024
1024
  // (requestStats 30d: flash p50 8.9s / p90 36s, pro p50 18.9s / p90 56s) and a 15-bot story
1025
1025
  // took 68-105s. Latency tracks reasoning length ~linearly, so effort is the only lever.
1026
+ // Flash moved to V4.1 2026-09-12: the API id is now the version-free alias `deepseek-flash`
1027
+ // (the retired `deepseek-v4-flash` still resolves to V4.1 server-side at the Flash price).
1026
1028
  [LLM_CONSTANTS.DEEPSEEK_FLASH]: {
1027
- displayName: "DeepSeek V4 Flash",
1028
- modelApiName: "deepseek-v4-flash",
1029
+ displayName: "DeepSeek V4.1 Flash",
1030
+ modelApiName: "deepseek-flash",
1029
1031
  apiKeyName: API_KEY_CONSTANTS.DEEPSEEK,
1030
1032
  hasThinking: true,
1031
1033
  reasoningEffort: "low",
@@ -1273,14 +1275,18 @@ var SupportedAiModels = {
1273
1275
  // encrypted reasoning items replayed across turns like Grok. 'medium' is pinned as the
1274
1276
  // game default: turns are short and every reasoning token bills as output.
1275
1277
  // Temperature: Meta documents the model as tuned to its 1.0 default.
1276
- // Speed/tags: unmeasured until the first live run no tag rather than a guess.
1278
+ // Speed: measured 2026-09-12 at medium effort9.6s on a full-context day-2 vote, 4-8s on
1279
+ // short turns (reasoning ≈ 90% of output tokens). That is the untagged middle band by the
1280
+ // grading above; tagged 'slow' anyway by decision so players expect a wait. Price-wise it
1281
+ // is neither cheap nor expensive.
1277
1282
  [LLM_CONSTANTS.MUSE_SPARK]: {
1278
1283
  displayName: "Muse Spark 1.3",
1279
1284
  modelApiName: "muse-spark-1.3",
1280
1285
  apiKeyName: API_KEY_CONSTANTS.META,
1281
1286
  hasThinking: true,
1282
1287
  temperature: 1,
1283
- reasoningEffort: "medium"
1288
+ reasoningEffort: "medium",
1289
+ tags: ["slow"]
1284
1290
  }
1285
1291
  };
1286
1292
  function createCatalog(overrides = {}) {
@@ -1392,10 +1398,12 @@ var MODEL_PRICING = {
1392
1398
  // (api-docs.deepseek.com/quick_start/pricing, fetched 2026-08-13; rates re-confirmed
1393
1399
  // 2026-08-30). Since 2026-08-23 00:00 Beijing (UTC+8) the surcharge is weekdays-only:
1394
1400
  // Saturday and Sunday Beijing time bill at the off-peak rate all day (DeepSeek notice email).
1401
+ // 2026-09-12: Flash is V4.1 at lower rates ($0.15 / $0.60, cache hit $0.003 off-peak);
1402
+ // Pro rates unchanged and DeepSeek confirmed Pro stays available past 2026-09-14.
1395
1403
  [SupportedAiModels[LLM_CONSTANTS.DEEPSEEK_FLASH].modelApiName]: {
1396
- inputPrice: 0.22,
1397
- outputPrice: 0.66,
1398
- cacheHitPrice: 7e-3,
1404
+ inputPrice: 0.15,
1405
+ outputPrice: 0.6,
1406
+ cacheHitPrice: 3e-3,
1399
1407
  peakPricing: DEEPSEEK_PEAK_SCHEDULE
1400
1408
  },
1401
1409
  [SupportedAiModels[LLM_CONSTANTS.DEEPSEEK_PRO].modelApiName]: {
@@ -3298,7 +3306,7 @@ var GoogleAgent = class extends AbstractAgent {
3298
3306
 
3299
3307
  // src/agents/mistral-agent.ts
3300
3308
  var import_mistralai = require("@mistralai/mistralai");
3301
- var import_http = require("@mistralai/mistralai/lib/http");
3309
+ var import_http = require("@mistralai/mistralai/lib/http.js");
3302
3310
  var MistralAgent = class extends AbstractAgent {
3303
3311
  client;
3304
3312
  // A getter, not a field: `maxOutputTokens` can be raised after construction, and a field
@@ -5022,7 +5030,16 @@ ${schemaDescription}`;
5022
5030
  try {
5023
5031
  const reasoningItems = JSON.parse(msg.metaEncryptedReasoning);
5024
5032
  if (Array.isArray(reasoningItems)) {
5025
- input.push(...reasoningItems);
5033
+ for (const item of reasoningItems) {
5034
+ if (item?.encrypted_content) {
5035
+ input.push({
5036
+ type: "reasoning",
5037
+ ...item.id ? { id: item.id } : {},
5038
+ summary: Array.isArray(item.summary) ? item.summary : [],
5039
+ encrypted_content: item.encrypted_content
5040
+ });
5041
+ }
5042
+ }
5026
5043
  }
5027
5044
  } catch {
5028
5045
  this.logger(`Failed to parse stored encrypted reasoning, replaying message without it`);