aieo 0.2.0 → 0.2.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 +19 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43746,7 +43746,7 @@ var PROVIDERS = [
|
|
|
43746
43746
|
var MODELS = {
|
|
43747
43747
|
anthropic: {
|
|
43748
43748
|
sonnet: "claude-sonnet-5",
|
|
43749
|
-
opus: "claude-opus-5",
|
|
43749
|
+
opus: "claude-opus-5-5",
|
|
43750
43750
|
haiku: "claude-haiku-4-5"
|
|
43751
43751
|
},
|
|
43752
43752
|
google: {
|
|
@@ -43762,7 +43762,7 @@ var MODELS = {
|
|
|
43762
43762
|
glm: "~z-ai/glm-flash-latest"
|
|
43763
43763
|
},
|
|
43764
43764
|
xai: {
|
|
43765
|
-
grok: "grok-4.
|
|
43765
|
+
grok: "grok-4.7"
|
|
43766
43766
|
}
|
|
43767
43767
|
};
|
|
43768
43768
|
var DEFAULT_MODELS = {
|
|
@@ -43817,6 +43817,7 @@ function getProviderForModel(modelName) {
|
|
|
43817
43817
|
return "xai";
|
|
43818
43818
|
// Full model IDs
|
|
43819
43819
|
case "claude-sonnet-5":
|
|
43820
|
+
case "claude-opus-5-5":
|
|
43820
43821
|
case "claude-opus-5":
|
|
43821
43822
|
case "claude-opus-4-6":
|
|
43822
43823
|
case "claude-haiku-4-5":
|
|
@@ -44140,6 +44141,7 @@ function getModel(provider, opts) {
|
|
|
44140
44141
|
var MODEL_CONTEXT_LIMITS = {
|
|
44141
44142
|
// Anthropic — 1M is the default and the max on the 5-series; Haiku 4.5 is 200k.
|
|
44142
44143
|
"claude-sonnet-5": 1e6,
|
|
44144
|
+
"claude-opus-5-5": 1e6,
|
|
44143
44145
|
"claude-opus-5": 1e6,
|
|
44144
44146
|
"claude-opus-4-6": 1e6,
|
|
44145
44147
|
"claude-haiku-4-5": 2e5,
|
|
@@ -44178,6 +44180,7 @@ var MODEL_CONTEXT_LIMITS = {
|
|
|
44178
44180
|
// right matters beyond display: contextLimit drives truncateOldToolResults,
|
|
44179
44181
|
// and premature truncation rewrites old messages — which invalidates Grok's
|
|
44180
44182
|
// automatic prefix cache on every subsequent step.
|
|
44183
|
+
"grok-4.7": 5e5,
|
|
44181
44184
|
"grok-4.6": 5e5,
|
|
44182
44185
|
"grok-4.5": 5e5,
|
|
44183
44186
|
"grok-4.3": 1e6,
|
|
@@ -44186,6 +44189,7 @@ var MODEL_CONTEXT_LIMITS = {
|
|
|
44186
44189
|
"grok-4-fast-reasoning": 2e6,
|
|
44187
44190
|
"grok-4-fast-non-reasoning": 2e6,
|
|
44188
44191
|
"grok-code-fast-1": 256e3,
|
|
44192
|
+
"x-ai/grok-4.7": 5e5,
|
|
44189
44193
|
"x-ai/grok-4.6": 5e5,
|
|
44190
44194
|
"x-ai/grok-4.5": 5e5,
|
|
44191
44195
|
"x-ai/grok-4.3": 1e6,
|
|
@@ -44272,6 +44276,11 @@ function anthropicSupportsAdaptiveThinking(modelName) {
|
|
|
44272
44276
|
if (m.includes("haiku")) return false;
|
|
44273
44277
|
return m.includes("sonnet") || m.includes("opus");
|
|
44274
44278
|
}
|
|
44279
|
+
function anthropicRejectsDisabledThinking(modelName) {
|
|
44280
|
+
if (!modelName) return false;
|
|
44281
|
+
const m = modelName.toLowerCase();
|
|
44282
|
+
return m.includes("opus-5-5") || m.includes("fable");
|
|
44283
|
+
}
|
|
44275
44284
|
function getProviderOptions(provider, thinkingSpeed, modelName) {
|
|
44276
44285
|
const fast = thinkingSpeed === "fast";
|
|
44277
44286
|
const explicitThinking = thinkingSpeed === "thinking";
|
|
@@ -44279,6 +44288,14 @@ function getProviderOptions(provider, thinkingSpeed, modelName) {
|
|
|
44279
44288
|
switch (provider) {
|
|
44280
44289
|
case "anthropic":
|
|
44281
44290
|
let thinking;
|
|
44291
|
+
if (fast && anthropicRejectsDisabledThinking(modelName)) {
|
|
44292
|
+
return {
|
|
44293
|
+
anthropic: {
|
|
44294
|
+
effort: "low",
|
|
44295
|
+
cacheControl: { type: "ephemeral" }
|
|
44296
|
+
}
|
|
44297
|
+
};
|
|
44298
|
+
}
|
|
44282
44299
|
if (fast) {
|
|
44283
44300
|
thinking = { type: "disabled" };
|
|
44284
44301
|
return {
|