@axlsdk/axl 0.17.5 → 0.17.6
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/README.md +3 -3
- package/dist/index.cjs +18 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -5
- package/dist/index.d.ts +10 -5
- package/dist/index.js +18 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -236,9 +236,9 @@ The `effort` parameter provides a unified way to control reasoning depth across
|
|
|
236
236
|
```typescript
|
|
237
237
|
// Simple levels — works on any provider
|
|
238
238
|
const reasoner = agent({
|
|
239
|
-
model: 'anthropic:claude-opus-4-
|
|
239
|
+
model: 'anthropic:claude-opus-4-7',
|
|
240
240
|
system: 'You are a careful analyst.',
|
|
241
|
-
effort: 'high', // 'none' | 'low' | 'medium' | 'high' | 'max'
|
|
241
|
+
effort: 'high', // 'none' | 'low' | 'medium' | 'high' | 'xhigh' | 'max'
|
|
242
242
|
});
|
|
243
243
|
|
|
244
244
|
// Explicit thinking budget (in tokens — supported on Gemini 2.x and Anthropic)
|
|
@@ -679,7 +679,7 @@ Four built-in providers using the `provider:model` URI scheme:
|
|
|
679
679
|
```
|
|
680
680
|
openai-responses:gpt-5.4 # OpenAI Responses API (preferred over Chat Completions)
|
|
681
681
|
openai:gpt-5.4 # OpenAI Chat Completions
|
|
682
|
-
anthropic:claude-
|
|
682
|
+
anthropic:claude-opus-4-7 # Anthropic (supports effort: 'xhigh')
|
|
683
683
|
google:gemini-3.1-pro-preview # Google Gemini
|
|
684
684
|
```
|
|
685
685
|
|
package/dist/index.cjs
CHANGED
|
@@ -1007,6 +1007,7 @@ var OpenAIResponsesProvider = class {
|
|
|
1007
1007
|
// src/providers/anthropic.ts
|
|
1008
1008
|
var ANTHROPIC_API_VERSION = "2023-06-01";
|
|
1009
1009
|
var ANTHROPIC_PRICING = {
|
|
1010
|
+
"claude-opus-4-7": [5e-6, 25e-6],
|
|
1010
1011
|
"claude-opus-4-6": [5e-6, 25e-6],
|
|
1011
1012
|
"claude-sonnet-4-6": [3e-6, 15e-6],
|
|
1012
1013
|
"claude-opus-4-5": [5e-6, 25e-6],
|
|
@@ -1051,13 +1052,21 @@ var THINKING_BUDGETS = {
|
|
|
1051
1052
|
max: 3e4
|
|
1052
1053
|
};
|
|
1053
1054
|
function supportsAdaptiveThinking(model) {
|
|
1054
|
-
return model.startsWith("claude-opus-4-6") || model.startsWith("claude-sonnet-4-6");
|
|
1055
|
+
return model.startsWith("claude-opus-4-7") || model.startsWith("claude-opus-4-6") || model.startsWith("claude-sonnet-4-6");
|
|
1055
1056
|
}
|
|
1056
1057
|
function supportsMaxEffort(model) {
|
|
1057
|
-
return model.startsWith("claude-opus-4-6");
|
|
1058
|
+
return model.startsWith("claude-opus-4-7") || model.startsWith("claude-opus-4-6");
|
|
1059
|
+
}
|
|
1060
|
+
function supportsXhigh2(model) {
|
|
1061
|
+
return model.startsWith("claude-opus-4-7");
|
|
1058
1062
|
}
|
|
1059
1063
|
function supportsEffort(model) {
|
|
1060
|
-
return model.startsWith("claude-opus-4-6") || model.startsWith("claude-sonnet-4-6") || model.startsWith("claude-opus-4-5");
|
|
1064
|
+
return model.startsWith("claude-opus-4-7") || model.startsWith("claude-opus-4-6") || model.startsWith("claude-sonnet-4-6") || model.startsWith("claude-opus-4-5");
|
|
1065
|
+
}
|
|
1066
|
+
function clampAnthropicEffort(model, effort) {
|
|
1067
|
+
if (effort === "max" && !supportsMaxEffort(model)) return "high";
|
|
1068
|
+
if (effort === "xhigh" && !supportsXhigh2(model)) return "high";
|
|
1069
|
+
return effort;
|
|
1061
1070
|
}
|
|
1062
1071
|
var AnthropicProvider = class {
|
|
1063
1072
|
name = "anthropic";
|
|
@@ -1158,10 +1167,7 @@ var AnthropicProvider = class {
|
|
|
1158
1167
|
body.tool_choice = this.mapToolChoice(options.toolChoice);
|
|
1159
1168
|
}
|
|
1160
1169
|
const { thinkingBudget, thinkingDisabled, activeEffort, hasBudgetOverride } = resolveThinkingOptions(options);
|
|
1161
|
-
|
|
1162
|
-
if (resolvedEffort === "max" && !supportsMaxEffort(options.model)) {
|
|
1163
|
-
resolvedEffort = "high";
|
|
1164
|
-
}
|
|
1170
|
+
const resolvedEffort = activeEffort ? clampAnthropicEffort(options.model, activeEffort) : void 0;
|
|
1165
1171
|
if (hasBudgetOverride) {
|
|
1166
1172
|
body.thinking = { type: "enabled", budget_tokens: thinkingBudget };
|
|
1167
1173
|
const currentMax = body.max_tokens;
|
|
@@ -1528,6 +1534,7 @@ var GEMINI_PRICING = {
|
|
|
1528
1534
|
"gemini-3-pro-preview": [2e-6, 12e-6],
|
|
1529
1535
|
"gemini-3-flash-preview": [5e-7, 3e-6],
|
|
1530
1536
|
"gemini-3.1-pro-preview": [2e-6, 12e-6],
|
|
1537
|
+
"gemini-3.1-flash-lite": [25e-8, 15e-7],
|
|
1531
1538
|
"gemini-3.1-flash-lite-preview": [25e-8, 15e-7]
|
|
1532
1539
|
};
|
|
1533
1540
|
var GEMINI_PRICING_KEYS_BY_LENGTH = Object.keys(GEMINI_PRICING).sort(
|
|
@@ -1553,12 +1560,16 @@ var THINKING_BUDGETS2 = {
|
|
|
1553
1560
|
low: 1024,
|
|
1554
1561
|
medium: 5e3,
|
|
1555
1562
|
high: 1e4,
|
|
1563
|
+
xhigh: 16384,
|
|
1564
|
+
// between high (10000) and max (24576)
|
|
1556
1565
|
max: 24576
|
|
1557
1566
|
};
|
|
1558
1567
|
var THINKING_LEVELS = {
|
|
1559
1568
|
low: "low",
|
|
1560
1569
|
medium: "medium",
|
|
1561
1570
|
high: "high",
|
|
1571
|
+
xhigh: "high",
|
|
1572
|
+
// 3.x has no xhigh tier; clamp to 'high'
|
|
1562
1573
|
max: "high"
|
|
1563
1574
|
// 3.x caps at 'high'
|
|
1564
1575
|
};
|