@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 +26 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -855,9 +855,11 @@ var SupportedAiModels = {
|
|
|
855
855
|
// knob exists) both models emitted ~8 reasoning tokens per answer token in prod
|
|
856
856
|
// (requestStats 30d: flash p50 8.9s / p90 36s, pro p50 18.9s / p90 56s) and a 15-bot story
|
|
857
857
|
// took 68-105s. Latency tracks reasoning length ~linearly, so effort is the only lever.
|
|
858
|
+
// Flash moved to V4.1 2026-09-12: the API id is now the version-free alias `deepseek-flash`
|
|
859
|
+
// (the retired `deepseek-v4-flash` still resolves to V4.1 server-side at the Flash price).
|
|
858
860
|
[LLM_CONSTANTS.DEEPSEEK_FLASH]: {
|
|
859
|
-
displayName: "DeepSeek V4 Flash",
|
|
860
|
-
modelApiName: "deepseek-
|
|
861
|
+
displayName: "DeepSeek V4.1 Flash",
|
|
862
|
+
modelApiName: "deepseek-flash",
|
|
861
863
|
apiKeyName: API_KEY_CONSTANTS.DEEPSEEK,
|
|
862
864
|
hasThinking: true,
|
|
863
865
|
reasoningEffort: "low",
|
|
@@ -1105,14 +1107,18 @@ var SupportedAiModels = {
|
|
|
1105
1107
|
// encrypted reasoning items replayed across turns like Grok. 'medium' is pinned as the
|
|
1106
1108
|
// game default: turns are short and every reasoning token bills as output.
|
|
1107
1109
|
// Temperature: Meta documents the model as tuned to its 1.0 default.
|
|
1108
|
-
// Speed
|
|
1110
|
+
// Speed: measured 2026-09-12 at medium effort — 9.6s on a full-context day-2 vote, 4-8s on
|
|
1111
|
+
// short turns (reasoning ≈ 90% of output tokens). That is the untagged middle band by the
|
|
1112
|
+
// grading above; tagged 'slow' anyway by decision so players expect a wait. Price-wise it
|
|
1113
|
+
// is neither cheap nor expensive.
|
|
1109
1114
|
[LLM_CONSTANTS.MUSE_SPARK]: {
|
|
1110
1115
|
displayName: "Muse Spark 1.3",
|
|
1111
1116
|
modelApiName: "muse-spark-1.3",
|
|
1112
1117
|
apiKeyName: API_KEY_CONSTANTS.META,
|
|
1113
1118
|
hasThinking: true,
|
|
1114
1119
|
temperature: 1,
|
|
1115
|
-
reasoningEffort: "medium"
|
|
1120
|
+
reasoningEffort: "medium",
|
|
1121
|
+
tags: ["slow"]
|
|
1116
1122
|
}
|
|
1117
1123
|
};
|
|
1118
1124
|
function createCatalog(overrides = {}) {
|
|
@@ -1224,10 +1230,12 @@ var MODEL_PRICING = {
|
|
|
1224
1230
|
// (api-docs.deepseek.com/quick_start/pricing, fetched 2026-08-13; rates re-confirmed
|
|
1225
1231
|
// 2026-08-30). Since 2026-08-23 00:00 Beijing (UTC+8) the surcharge is weekdays-only:
|
|
1226
1232
|
// Saturday and Sunday Beijing time bill at the off-peak rate all day (DeepSeek notice email).
|
|
1233
|
+
// 2026-09-12: Flash is V4.1 at lower rates ($0.15 / $0.60, cache hit $0.003 off-peak);
|
|
1234
|
+
// Pro rates unchanged and DeepSeek confirmed Pro stays available past 2026-09-14.
|
|
1227
1235
|
[SupportedAiModels[LLM_CONSTANTS.DEEPSEEK_FLASH].modelApiName]: {
|
|
1228
|
-
inputPrice: 0.
|
|
1229
|
-
outputPrice: 0.
|
|
1230
|
-
cacheHitPrice:
|
|
1236
|
+
inputPrice: 0.15,
|
|
1237
|
+
outputPrice: 0.6,
|
|
1238
|
+
cacheHitPrice: 3e-3,
|
|
1231
1239
|
peakPricing: DEEPSEEK_PEAK_SCHEDULE
|
|
1232
1240
|
},
|
|
1233
1241
|
[SupportedAiModels[LLM_CONSTANTS.DEEPSEEK_PRO].modelApiName]: {
|
|
@@ -3130,7 +3138,7 @@ var GoogleAgent = class extends AbstractAgent {
|
|
|
3130
3138
|
|
|
3131
3139
|
// src/agents/mistral-agent.ts
|
|
3132
3140
|
import { Mistral } from "@mistralai/mistralai";
|
|
3133
|
-
import { HTTPClient } from "@mistralai/mistralai/lib/http";
|
|
3141
|
+
import { HTTPClient } from "@mistralai/mistralai/lib/http.js";
|
|
3134
3142
|
var MistralAgent = class extends AbstractAgent {
|
|
3135
3143
|
client;
|
|
3136
3144
|
// A getter, not a field: `maxOutputTokens` can be raised after construction, and a field
|
|
@@ -4854,7 +4862,16 @@ ${schemaDescription}`;
|
|
|
4854
4862
|
try {
|
|
4855
4863
|
const reasoningItems = JSON.parse(msg.metaEncryptedReasoning);
|
|
4856
4864
|
if (Array.isArray(reasoningItems)) {
|
|
4857
|
-
|
|
4865
|
+
for (const item of reasoningItems) {
|
|
4866
|
+
if (item?.encrypted_content) {
|
|
4867
|
+
input.push({
|
|
4868
|
+
type: "reasoning",
|
|
4869
|
+
...item.id ? { id: item.id } : {},
|
|
4870
|
+
summary: Array.isArray(item.summary) ? item.summary : [],
|
|
4871
|
+
encrypted_content: item.encrypted_content
|
|
4872
|
+
});
|
|
4873
|
+
}
|
|
4874
|
+
}
|
|
4858
4875
|
}
|
|
4859
4876
|
} catch {
|
|
4860
4877
|
this.logger(`Failed to parse stored encrypted reasoning, replaying message without it`);
|