indusagi 0.13.9 → 0.13.11
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/CHANGELOG.md +6 -0
- package/dist/agent.js +125 -29
- package/dist/ai.js +173 -51
- package/dist/cli.js +36 -4
- package/dist/index.js +36 -4
- package/dist/llmgateway.js +36 -4
- package/dist/runtime.js +36 -4
- package/dist/shell-app.js +36 -4
- package/dist/smithy.js +36 -4
- package/dist/swarm.js +36 -4
- package/dist/types/facade/agent.d.ts +1 -1
- package/dist/types/facade/agent.test.d.ts +1 -0
- package/dist/types/facade/ai.d.ts +1 -1
- package/dist/types/facade/bot/types.d.ts +3 -3
- package/dist/types/facade/mcp.d.ts +1 -1
- package/dist/types/facade/ml/adapters/openai-codex-responses.d.ts +1 -1
- package/dist/types/facade/ml/adapters/openai-codex-responses.test.d.ts +1 -0
- package/dist/types/facade/ml/adapters/openai-responses.d.ts +1 -1
- package/dist/types/facade/ml/adapters/openai-responses.test.d.ts +1 -0
- package/dist/types/facade/ml/adapters/simple-options.d.ts +2 -2
- package/dist/types/facade/ml/models.generated.d.ts +54 -0
- package/dist/types/facade/ml/types.d.ts +14 -1
- package/dist/types/llmgateway/connectors/openai-responses.test.d.ts +1 -0
- package/dist/types/llmgateway/contract/index.d.ts +2 -2
- package/dist/types/llmgateway/contract/model-card.d.ts +14 -0
- package/dist/types/llmgateway/contract/options.d.ts +3 -1
- package/package.json +2 -1
package/dist/cli.js
CHANGED
|
@@ -410,6 +410,28 @@ var MODEL_CARDS = [
|
|
|
410
410
|
cacheReadPerMTok: 0.275
|
|
411
411
|
}
|
|
412
412
|
},
|
|
413
|
+
{
|
|
414
|
+
id: "gpt-6-astra",
|
|
415
|
+
provider: "openai",
|
|
416
|
+
api: "openai-responses",
|
|
417
|
+
displayName: "GPT-6 Astra",
|
|
418
|
+
baseUrl: "https://api.openai.com/v1",
|
|
419
|
+
contextWindow: 105e4,
|
|
420
|
+
maxOutputTokens: 128e3,
|
|
421
|
+
modalities: ["text", "image"],
|
|
422
|
+
reasoning: true,
|
|
423
|
+
reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
|
|
424
|
+
longContextPricing: {
|
|
425
|
+
threshold: 272e3,
|
|
426
|
+
multipliers: { input: 2, output: 1.5, cacheRead: 2, cacheWrite: 2 }
|
|
427
|
+
},
|
|
428
|
+
cost: {
|
|
429
|
+
inputPerMTok: 10,
|
|
430
|
+
outputPerMTok: 50,
|
|
431
|
+
cacheReadPerMTok: 1,
|
|
432
|
+
cacheWritePerMTok: 12.5
|
|
433
|
+
}
|
|
434
|
+
},
|
|
413
435
|
// ── Google (Gemini) ─────────────────────────────────────────────────────
|
|
414
436
|
{
|
|
415
437
|
id: "gemini-2.5-pro",
|
|
@@ -1113,6 +1135,7 @@ function anthropicThinkingBudget(level, maxOutput) {
|
|
|
1113
1135
|
low: 0.2,
|
|
1114
1136
|
medium: 0.4,
|
|
1115
1137
|
high: 0.6,
|
|
1138
|
+
xhigh: 0.8,
|
|
1116
1139
|
max: 0.8
|
|
1117
1140
|
};
|
|
1118
1141
|
if (level === "off") {
|
|
@@ -1917,13 +1940,17 @@ function readNumber2(o, key) {
|
|
|
1917
1940
|
const v = o[key];
|
|
1918
1941
|
return typeof v === "number" && Number.isFinite(v) ? v : void 0;
|
|
1919
1942
|
}
|
|
1920
|
-
function reasoningEffort(level) {
|
|
1943
|
+
function reasoningEffort(model, level) {
|
|
1944
|
+
if (model.reasoningEfforts?.includes(level)) {
|
|
1945
|
+
return level;
|
|
1946
|
+
}
|
|
1921
1947
|
switch (level) {
|
|
1922
1948
|
case "low":
|
|
1923
1949
|
return "low";
|
|
1924
1950
|
case "medium":
|
|
1925
1951
|
return "medium";
|
|
1926
1952
|
case "high":
|
|
1953
|
+
case "xhigh":
|
|
1927
1954
|
case "max":
|
|
1928
1955
|
return "high";
|
|
1929
1956
|
}
|
|
@@ -1964,14 +1991,17 @@ function buildBody2(model, c, opts) {
|
|
|
1964
1991
|
if (ceiling > 0) {
|
|
1965
1992
|
body.max_output_tokens = ceiling;
|
|
1966
1993
|
}
|
|
1967
|
-
if (opts.temperature !== void 0) {
|
|
1994
|
+
if (model.id !== "gpt-6-astra" && opts.temperature !== void 0) {
|
|
1968
1995
|
body.temperature = opts.temperature;
|
|
1969
1996
|
}
|
|
1970
|
-
if (opts.topP !== void 0) {
|
|
1997
|
+
if (model.id !== "gpt-6-astra" && opts.topP !== void 0) {
|
|
1971
1998
|
body.top_p = opts.topP;
|
|
1972
1999
|
}
|
|
1973
2000
|
if (model.reasoning && opts.thinking !== void 0 && opts.thinking !== "off") {
|
|
1974
|
-
|
|
2001
|
+
const effort = reasoningEffort(model, opts.thinking);
|
|
2002
|
+
if (effort !== void 0) {
|
|
2003
|
+
body.reasoning = { effort };
|
|
2004
|
+
}
|
|
1975
2005
|
}
|
|
1976
2006
|
return body;
|
|
1977
2007
|
}
|
|
@@ -2246,6 +2276,7 @@ function geminiThinkingBudget(level, maxOutput) {
|
|
|
2246
2276
|
low: 0.2,
|
|
2247
2277
|
medium: 0.4,
|
|
2248
2278
|
high: 0.6,
|
|
2279
|
+
xhigh: 0.8,
|
|
2249
2280
|
max: 0.8
|
|
2250
2281
|
};
|
|
2251
2282
|
const budget = Math.floor(maxOutput * fraction[level]);
|
|
@@ -2539,6 +2570,7 @@ function thinkingBudget(level, maxOutput) {
|
|
|
2539
2570
|
low: 0.2,
|
|
2540
2571
|
medium: 0.4,
|
|
2541
2572
|
high: 0.6,
|
|
2573
|
+
xhigh: 0.8,
|
|
2542
2574
|
max: 0.8
|
|
2543
2575
|
};
|
|
2544
2576
|
return Math.max(0, Math.floor(maxOutput * fraction[level]));
|
package/dist/index.js
CHANGED
|
@@ -199,6 +199,28 @@ var MODEL_CARDS = [
|
|
|
199
199
|
cacheReadPerMTok: 0.275
|
|
200
200
|
}
|
|
201
201
|
},
|
|
202
|
+
{
|
|
203
|
+
id: "gpt-6-astra",
|
|
204
|
+
provider: "openai",
|
|
205
|
+
api: "openai-responses",
|
|
206
|
+
displayName: "GPT-6 Astra",
|
|
207
|
+
baseUrl: "https://api.openai.com/v1",
|
|
208
|
+
contextWindow: 105e4,
|
|
209
|
+
maxOutputTokens: 128e3,
|
|
210
|
+
modalities: ["text", "image"],
|
|
211
|
+
reasoning: true,
|
|
212
|
+
reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
|
|
213
|
+
longContextPricing: {
|
|
214
|
+
threshold: 272e3,
|
|
215
|
+
multipliers: { input: 2, output: 1.5, cacheRead: 2, cacheWrite: 2 }
|
|
216
|
+
},
|
|
217
|
+
cost: {
|
|
218
|
+
inputPerMTok: 10,
|
|
219
|
+
outputPerMTok: 50,
|
|
220
|
+
cacheReadPerMTok: 1,
|
|
221
|
+
cacheWritePerMTok: 12.5
|
|
222
|
+
}
|
|
223
|
+
},
|
|
202
224
|
// ── Google (Gemini) ─────────────────────────────────────────────────────
|
|
203
225
|
{
|
|
204
226
|
id: "gemini-2.5-pro",
|
|
@@ -943,6 +965,7 @@ function anthropicThinkingBudget(level, maxOutput) {
|
|
|
943
965
|
low: 0.2,
|
|
944
966
|
medium: 0.4,
|
|
945
967
|
high: 0.6,
|
|
968
|
+
xhigh: 0.8,
|
|
946
969
|
max: 0.8
|
|
947
970
|
};
|
|
948
971
|
if (level === "off") {
|
|
@@ -1747,13 +1770,17 @@ function readNumber2(o, key) {
|
|
|
1747
1770
|
const v = o[key];
|
|
1748
1771
|
return typeof v === "number" && Number.isFinite(v) ? v : void 0;
|
|
1749
1772
|
}
|
|
1750
|
-
function reasoningEffort(level) {
|
|
1773
|
+
function reasoningEffort(model, level) {
|
|
1774
|
+
if (model.reasoningEfforts?.includes(level)) {
|
|
1775
|
+
return level;
|
|
1776
|
+
}
|
|
1751
1777
|
switch (level) {
|
|
1752
1778
|
case "low":
|
|
1753
1779
|
return "low";
|
|
1754
1780
|
case "medium":
|
|
1755
1781
|
return "medium";
|
|
1756
1782
|
case "high":
|
|
1783
|
+
case "xhigh":
|
|
1757
1784
|
case "max":
|
|
1758
1785
|
return "high";
|
|
1759
1786
|
}
|
|
@@ -1794,14 +1821,17 @@ function buildBody2(model, c, opts) {
|
|
|
1794
1821
|
if (ceiling > 0) {
|
|
1795
1822
|
body.max_output_tokens = ceiling;
|
|
1796
1823
|
}
|
|
1797
|
-
if (opts.temperature !== void 0) {
|
|
1824
|
+
if (model.id !== "gpt-6-astra" && opts.temperature !== void 0) {
|
|
1798
1825
|
body.temperature = opts.temperature;
|
|
1799
1826
|
}
|
|
1800
|
-
if (opts.topP !== void 0) {
|
|
1827
|
+
if (model.id !== "gpt-6-astra" && opts.topP !== void 0) {
|
|
1801
1828
|
body.top_p = opts.topP;
|
|
1802
1829
|
}
|
|
1803
1830
|
if (model.reasoning && opts.thinking !== void 0 && opts.thinking !== "off") {
|
|
1804
|
-
|
|
1831
|
+
const effort = reasoningEffort(model, opts.thinking);
|
|
1832
|
+
if (effort !== void 0) {
|
|
1833
|
+
body.reasoning = { effort };
|
|
1834
|
+
}
|
|
1805
1835
|
}
|
|
1806
1836
|
return body;
|
|
1807
1837
|
}
|
|
@@ -2076,6 +2106,7 @@ function geminiThinkingBudget(level, maxOutput) {
|
|
|
2076
2106
|
low: 0.2,
|
|
2077
2107
|
medium: 0.4,
|
|
2078
2108
|
high: 0.6,
|
|
2109
|
+
xhigh: 0.8,
|
|
2079
2110
|
max: 0.8
|
|
2080
2111
|
};
|
|
2081
2112
|
const budget = Math.floor(maxOutput * fraction[level]);
|
|
@@ -2369,6 +2400,7 @@ function thinkingBudget(level, maxOutput) {
|
|
|
2369
2400
|
low: 0.2,
|
|
2370
2401
|
medium: 0.4,
|
|
2371
2402
|
high: 0.6,
|
|
2403
|
+
xhigh: 0.8,
|
|
2372
2404
|
max: 0.8
|
|
2373
2405
|
};
|
|
2374
2406
|
return Math.max(0, Math.floor(maxOutput * fraction[level]));
|
package/dist/llmgateway.js
CHANGED
|
@@ -169,6 +169,28 @@ var MODEL_CARDS = [
|
|
|
169
169
|
cacheReadPerMTok: 0.275
|
|
170
170
|
}
|
|
171
171
|
},
|
|
172
|
+
{
|
|
173
|
+
id: "gpt-6-astra",
|
|
174
|
+
provider: "openai",
|
|
175
|
+
api: "openai-responses",
|
|
176
|
+
displayName: "GPT-6 Astra",
|
|
177
|
+
baseUrl: "https://api.openai.com/v1",
|
|
178
|
+
contextWindow: 105e4,
|
|
179
|
+
maxOutputTokens: 128e3,
|
|
180
|
+
modalities: ["text", "image"],
|
|
181
|
+
reasoning: true,
|
|
182
|
+
reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
|
|
183
|
+
longContextPricing: {
|
|
184
|
+
threshold: 272e3,
|
|
185
|
+
multipliers: { input: 2, output: 1.5, cacheRead: 2, cacheWrite: 2 }
|
|
186
|
+
},
|
|
187
|
+
cost: {
|
|
188
|
+
inputPerMTok: 10,
|
|
189
|
+
outputPerMTok: 50,
|
|
190
|
+
cacheReadPerMTok: 1,
|
|
191
|
+
cacheWritePerMTok: 12.5
|
|
192
|
+
}
|
|
193
|
+
},
|
|
172
194
|
// ── Google (Gemini) ─────────────────────────────────────────────────────
|
|
173
195
|
{
|
|
174
196
|
id: "gemini-2.5-pro",
|
|
@@ -913,6 +935,7 @@ function anthropicThinkingBudget(level, maxOutput) {
|
|
|
913
935
|
low: 0.2,
|
|
914
936
|
medium: 0.4,
|
|
915
937
|
high: 0.6,
|
|
938
|
+
xhigh: 0.8,
|
|
916
939
|
max: 0.8
|
|
917
940
|
};
|
|
918
941
|
if (level === "off") {
|
|
@@ -1717,13 +1740,17 @@ function readNumber2(o, key) {
|
|
|
1717
1740
|
const v = o[key];
|
|
1718
1741
|
return typeof v === "number" && Number.isFinite(v) ? v : void 0;
|
|
1719
1742
|
}
|
|
1720
|
-
function reasoningEffort(level) {
|
|
1743
|
+
function reasoningEffort(model, level) {
|
|
1744
|
+
if (model.reasoningEfforts?.includes(level)) {
|
|
1745
|
+
return level;
|
|
1746
|
+
}
|
|
1721
1747
|
switch (level) {
|
|
1722
1748
|
case "low":
|
|
1723
1749
|
return "low";
|
|
1724
1750
|
case "medium":
|
|
1725
1751
|
return "medium";
|
|
1726
1752
|
case "high":
|
|
1753
|
+
case "xhigh":
|
|
1727
1754
|
case "max":
|
|
1728
1755
|
return "high";
|
|
1729
1756
|
}
|
|
@@ -1764,14 +1791,17 @@ function buildBody2(model, c, opts) {
|
|
|
1764
1791
|
if (ceiling > 0) {
|
|
1765
1792
|
body.max_output_tokens = ceiling;
|
|
1766
1793
|
}
|
|
1767
|
-
if (opts.temperature !== void 0) {
|
|
1794
|
+
if (model.id !== "gpt-6-astra" && opts.temperature !== void 0) {
|
|
1768
1795
|
body.temperature = opts.temperature;
|
|
1769
1796
|
}
|
|
1770
|
-
if (opts.topP !== void 0) {
|
|
1797
|
+
if (model.id !== "gpt-6-astra" && opts.topP !== void 0) {
|
|
1771
1798
|
body.top_p = opts.topP;
|
|
1772
1799
|
}
|
|
1773
1800
|
if (model.reasoning && opts.thinking !== void 0 && opts.thinking !== "off") {
|
|
1774
|
-
|
|
1801
|
+
const effort = reasoningEffort(model, opts.thinking);
|
|
1802
|
+
if (effort !== void 0) {
|
|
1803
|
+
body.reasoning = { effort };
|
|
1804
|
+
}
|
|
1775
1805
|
}
|
|
1776
1806
|
return body;
|
|
1777
1807
|
}
|
|
@@ -2046,6 +2076,7 @@ function geminiThinkingBudget(level, maxOutput) {
|
|
|
2046
2076
|
low: 0.2,
|
|
2047
2077
|
medium: 0.4,
|
|
2048
2078
|
high: 0.6,
|
|
2079
|
+
xhigh: 0.8,
|
|
2049
2080
|
max: 0.8
|
|
2050
2081
|
};
|
|
2051
2082
|
const budget = Math.floor(maxOutput * fraction[level]);
|
|
@@ -2339,6 +2370,7 @@ function thinkingBudget(level, maxOutput) {
|
|
|
2339
2370
|
low: 0.2,
|
|
2340
2371
|
medium: 0.4,
|
|
2341
2372
|
high: 0.6,
|
|
2373
|
+
xhigh: 0.8,
|
|
2342
2374
|
max: 0.8
|
|
2343
2375
|
};
|
|
2344
2376
|
return Math.max(0, Math.floor(maxOutput * fraction[level]));
|
package/dist/runtime.js
CHANGED
|
@@ -169,6 +169,28 @@ var MODEL_CARDS = [
|
|
|
169
169
|
cacheReadPerMTok: 0.275
|
|
170
170
|
}
|
|
171
171
|
},
|
|
172
|
+
{
|
|
173
|
+
id: "gpt-6-astra",
|
|
174
|
+
provider: "openai",
|
|
175
|
+
api: "openai-responses",
|
|
176
|
+
displayName: "GPT-6 Astra",
|
|
177
|
+
baseUrl: "https://api.openai.com/v1",
|
|
178
|
+
contextWindow: 105e4,
|
|
179
|
+
maxOutputTokens: 128e3,
|
|
180
|
+
modalities: ["text", "image"],
|
|
181
|
+
reasoning: true,
|
|
182
|
+
reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
|
|
183
|
+
longContextPricing: {
|
|
184
|
+
threshold: 272e3,
|
|
185
|
+
multipliers: { input: 2, output: 1.5, cacheRead: 2, cacheWrite: 2 }
|
|
186
|
+
},
|
|
187
|
+
cost: {
|
|
188
|
+
inputPerMTok: 10,
|
|
189
|
+
outputPerMTok: 50,
|
|
190
|
+
cacheReadPerMTok: 1,
|
|
191
|
+
cacheWritePerMTok: 12.5
|
|
192
|
+
}
|
|
193
|
+
},
|
|
172
194
|
// ── Google (Gemini) ─────────────────────────────────────────────────────
|
|
173
195
|
{
|
|
174
196
|
id: "gemini-2.5-pro",
|
|
@@ -856,6 +878,7 @@ function anthropicThinkingBudget(level, maxOutput) {
|
|
|
856
878
|
low: 0.2,
|
|
857
879
|
medium: 0.4,
|
|
858
880
|
high: 0.6,
|
|
881
|
+
xhigh: 0.8,
|
|
859
882
|
max: 0.8
|
|
860
883
|
};
|
|
861
884
|
if (level === "off") {
|
|
@@ -1660,13 +1683,17 @@ function readNumber2(o, key) {
|
|
|
1660
1683
|
const v = o[key];
|
|
1661
1684
|
return typeof v === "number" && Number.isFinite(v) ? v : void 0;
|
|
1662
1685
|
}
|
|
1663
|
-
function reasoningEffort(level) {
|
|
1686
|
+
function reasoningEffort(model, level) {
|
|
1687
|
+
if (model.reasoningEfforts?.includes(level)) {
|
|
1688
|
+
return level;
|
|
1689
|
+
}
|
|
1664
1690
|
switch (level) {
|
|
1665
1691
|
case "low":
|
|
1666
1692
|
return "low";
|
|
1667
1693
|
case "medium":
|
|
1668
1694
|
return "medium";
|
|
1669
1695
|
case "high":
|
|
1696
|
+
case "xhigh":
|
|
1670
1697
|
case "max":
|
|
1671
1698
|
return "high";
|
|
1672
1699
|
}
|
|
@@ -1707,14 +1734,17 @@ function buildBody2(model, c, opts) {
|
|
|
1707
1734
|
if (ceiling > 0) {
|
|
1708
1735
|
body.max_output_tokens = ceiling;
|
|
1709
1736
|
}
|
|
1710
|
-
if (opts.temperature !== void 0) {
|
|
1737
|
+
if (model.id !== "gpt-6-astra" && opts.temperature !== void 0) {
|
|
1711
1738
|
body.temperature = opts.temperature;
|
|
1712
1739
|
}
|
|
1713
|
-
if (opts.topP !== void 0) {
|
|
1740
|
+
if (model.id !== "gpt-6-astra" && opts.topP !== void 0) {
|
|
1714
1741
|
body.top_p = opts.topP;
|
|
1715
1742
|
}
|
|
1716
1743
|
if (model.reasoning && opts.thinking !== void 0 && opts.thinking !== "off") {
|
|
1717
|
-
|
|
1744
|
+
const effort = reasoningEffort(model, opts.thinking);
|
|
1745
|
+
if (effort !== void 0) {
|
|
1746
|
+
body.reasoning = { effort };
|
|
1747
|
+
}
|
|
1718
1748
|
}
|
|
1719
1749
|
return body;
|
|
1720
1750
|
}
|
|
@@ -1989,6 +2019,7 @@ function geminiThinkingBudget(level, maxOutput) {
|
|
|
1989
2019
|
low: 0.2,
|
|
1990
2020
|
medium: 0.4,
|
|
1991
2021
|
high: 0.6,
|
|
2022
|
+
xhigh: 0.8,
|
|
1992
2023
|
max: 0.8
|
|
1993
2024
|
};
|
|
1994
2025
|
const budget = Math.floor(maxOutput * fraction[level]);
|
|
@@ -2282,6 +2313,7 @@ function thinkingBudget(level, maxOutput) {
|
|
|
2282
2313
|
low: 0.2,
|
|
2283
2314
|
medium: 0.4,
|
|
2284
2315
|
high: 0.6,
|
|
2316
|
+
xhigh: 0.8,
|
|
2285
2317
|
max: 0.8
|
|
2286
2318
|
};
|
|
2287
2319
|
return Math.max(0, Math.floor(maxOutput * fraction[level]));
|
package/dist/shell-app.js
CHANGED
|
@@ -408,6 +408,28 @@ var MODEL_CARDS = [
|
|
|
408
408
|
cacheReadPerMTok: 0.275
|
|
409
409
|
}
|
|
410
410
|
},
|
|
411
|
+
{
|
|
412
|
+
id: "gpt-6-astra",
|
|
413
|
+
provider: "openai",
|
|
414
|
+
api: "openai-responses",
|
|
415
|
+
displayName: "GPT-6 Astra",
|
|
416
|
+
baseUrl: "https://api.openai.com/v1",
|
|
417
|
+
contextWindow: 105e4,
|
|
418
|
+
maxOutputTokens: 128e3,
|
|
419
|
+
modalities: ["text", "image"],
|
|
420
|
+
reasoning: true,
|
|
421
|
+
reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
|
|
422
|
+
longContextPricing: {
|
|
423
|
+
threshold: 272e3,
|
|
424
|
+
multipliers: { input: 2, output: 1.5, cacheRead: 2, cacheWrite: 2 }
|
|
425
|
+
},
|
|
426
|
+
cost: {
|
|
427
|
+
inputPerMTok: 10,
|
|
428
|
+
outputPerMTok: 50,
|
|
429
|
+
cacheReadPerMTok: 1,
|
|
430
|
+
cacheWritePerMTok: 12.5
|
|
431
|
+
}
|
|
432
|
+
},
|
|
411
433
|
// ── Google (Gemini) ─────────────────────────────────────────────────────
|
|
412
434
|
{
|
|
413
435
|
id: "gemini-2.5-pro",
|
|
@@ -1111,6 +1133,7 @@ function anthropicThinkingBudget(level, maxOutput) {
|
|
|
1111
1133
|
low: 0.2,
|
|
1112
1134
|
medium: 0.4,
|
|
1113
1135
|
high: 0.6,
|
|
1136
|
+
xhigh: 0.8,
|
|
1114
1137
|
max: 0.8
|
|
1115
1138
|
};
|
|
1116
1139
|
if (level === "off") {
|
|
@@ -1915,13 +1938,17 @@ function readNumber2(o, key) {
|
|
|
1915
1938
|
const v = o[key];
|
|
1916
1939
|
return typeof v === "number" && Number.isFinite(v) ? v : void 0;
|
|
1917
1940
|
}
|
|
1918
|
-
function reasoningEffort(level) {
|
|
1941
|
+
function reasoningEffort(model, level) {
|
|
1942
|
+
if (model.reasoningEfforts?.includes(level)) {
|
|
1943
|
+
return level;
|
|
1944
|
+
}
|
|
1919
1945
|
switch (level) {
|
|
1920
1946
|
case "low":
|
|
1921
1947
|
return "low";
|
|
1922
1948
|
case "medium":
|
|
1923
1949
|
return "medium";
|
|
1924
1950
|
case "high":
|
|
1951
|
+
case "xhigh":
|
|
1925
1952
|
case "max":
|
|
1926
1953
|
return "high";
|
|
1927
1954
|
}
|
|
@@ -1962,14 +1989,17 @@ function buildBody2(model, c, opts) {
|
|
|
1962
1989
|
if (ceiling > 0) {
|
|
1963
1990
|
body.max_output_tokens = ceiling;
|
|
1964
1991
|
}
|
|
1965
|
-
if (opts.temperature !== void 0) {
|
|
1992
|
+
if (model.id !== "gpt-6-astra" && opts.temperature !== void 0) {
|
|
1966
1993
|
body.temperature = opts.temperature;
|
|
1967
1994
|
}
|
|
1968
|
-
if (opts.topP !== void 0) {
|
|
1995
|
+
if (model.id !== "gpt-6-astra" && opts.topP !== void 0) {
|
|
1969
1996
|
body.top_p = opts.topP;
|
|
1970
1997
|
}
|
|
1971
1998
|
if (model.reasoning && opts.thinking !== void 0 && opts.thinking !== "off") {
|
|
1972
|
-
|
|
1999
|
+
const effort = reasoningEffort(model, opts.thinking);
|
|
2000
|
+
if (effort !== void 0) {
|
|
2001
|
+
body.reasoning = { effort };
|
|
2002
|
+
}
|
|
1973
2003
|
}
|
|
1974
2004
|
return body;
|
|
1975
2005
|
}
|
|
@@ -2244,6 +2274,7 @@ function geminiThinkingBudget(level, maxOutput) {
|
|
|
2244
2274
|
low: 0.2,
|
|
2245
2275
|
medium: 0.4,
|
|
2246
2276
|
high: 0.6,
|
|
2277
|
+
xhigh: 0.8,
|
|
2247
2278
|
max: 0.8
|
|
2248
2279
|
};
|
|
2249
2280
|
const budget = Math.floor(maxOutput * fraction[level]);
|
|
@@ -2537,6 +2568,7 @@ function thinkingBudget(level, maxOutput) {
|
|
|
2537
2568
|
low: 0.2,
|
|
2538
2569
|
medium: 0.4,
|
|
2539
2570
|
high: 0.6,
|
|
2571
|
+
xhigh: 0.8,
|
|
2540
2572
|
max: 0.8
|
|
2541
2573
|
};
|
|
2542
2574
|
return Math.max(0, Math.floor(maxOutput * fraction[level]));
|
package/dist/smithy.js
CHANGED
|
@@ -3649,6 +3649,28 @@ var MODEL_CARDS = [
|
|
|
3649
3649
|
cacheReadPerMTok: 0.275
|
|
3650
3650
|
}
|
|
3651
3651
|
},
|
|
3652
|
+
{
|
|
3653
|
+
id: "gpt-6-astra",
|
|
3654
|
+
provider: "openai",
|
|
3655
|
+
api: "openai-responses",
|
|
3656
|
+
displayName: "GPT-6 Astra",
|
|
3657
|
+
baseUrl: "https://api.openai.com/v1",
|
|
3658
|
+
contextWindow: 105e4,
|
|
3659
|
+
maxOutputTokens: 128e3,
|
|
3660
|
+
modalities: ["text", "image"],
|
|
3661
|
+
reasoning: true,
|
|
3662
|
+
reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
|
|
3663
|
+
longContextPricing: {
|
|
3664
|
+
threshold: 272e3,
|
|
3665
|
+
multipliers: { input: 2, output: 1.5, cacheRead: 2, cacheWrite: 2 }
|
|
3666
|
+
},
|
|
3667
|
+
cost: {
|
|
3668
|
+
inputPerMTok: 10,
|
|
3669
|
+
outputPerMTok: 50,
|
|
3670
|
+
cacheReadPerMTok: 1,
|
|
3671
|
+
cacheWritePerMTok: 12.5
|
|
3672
|
+
}
|
|
3673
|
+
},
|
|
3652
3674
|
// ── Google (Gemini) ─────────────────────────────────────────────────────
|
|
3653
3675
|
{
|
|
3654
3676
|
id: "gemini-2.5-pro",
|
|
@@ -4336,6 +4358,7 @@ function anthropicThinkingBudget(level, maxOutput) {
|
|
|
4336
4358
|
low: 0.2,
|
|
4337
4359
|
medium: 0.4,
|
|
4338
4360
|
high: 0.6,
|
|
4361
|
+
xhigh: 0.8,
|
|
4339
4362
|
max: 0.8
|
|
4340
4363
|
};
|
|
4341
4364
|
if (level === "off") {
|
|
@@ -5140,13 +5163,17 @@ function readNumber2(o, key) {
|
|
|
5140
5163
|
const v = o[key];
|
|
5141
5164
|
return typeof v === "number" && Number.isFinite(v) ? v : void 0;
|
|
5142
5165
|
}
|
|
5143
|
-
function reasoningEffort(level) {
|
|
5166
|
+
function reasoningEffort(model, level) {
|
|
5167
|
+
if (model.reasoningEfforts?.includes(level)) {
|
|
5168
|
+
return level;
|
|
5169
|
+
}
|
|
5144
5170
|
switch (level) {
|
|
5145
5171
|
case "low":
|
|
5146
5172
|
return "low";
|
|
5147
5173
|
case "medium":
|
|
5148
5174
|
return "medium";
|
|
5149
5175
|
case "high":
|
|
5176
|
+
case "xhigh":
|
|
5150
5177
|
case "max":
|
|
5151
5178
|
return "high";
|
|
5152
5179
|
}
|
|
@@ -5187,14 +5214,17 @@ function buildBody2(model, c, opts) {
|
|
|
5187
5214
|
if (ceiling > 0) {
|
|
5188
5215
|
body.max_output_tokens = ceiling;
|
|
5189
5216
|
}
|
|
5190
|
-
if (opts.temperature !== void 0) {
|
|
5217
|
+
if (model.id !== "gpt-6-astra" && opts.temperature !== void 0) {
|
|
5191
5218
|
body.temperature = opts.temperature;
|
|
5192
5219
|
}
|
|
5193
|
-
if (opts.topP !== void 0) {
|
|
5220
|
+
if (model.id !== "gpt-6-astra" && opts.topP !== void 0) {
|
|
5194
5221
|
body.top_p = opts.topP;
|
|
5195
5222
|
}
|
|
5196
5223
|
if (model.reasoning && opts.thinking !== void 0 && opts.thinking !== "off") {
|
|
5197
|
-
|
|
5224
|
+
const effort = reasoningEffort(model, opts.thinking);
|
|
5225
|
+
if (effort !== void 0) {
|
|
5226
|
+
body.reasoning = { effort };
|
|
5227
|
+
}
|
|
5198
5228
|
}
|
|
5199
5229
|
return body;
|
|
5200
5230
|
}
|
|
@@ -5469,6 +5499,7 @@ function geminiThinkingBudget(level, maxOutput) {
|
|
|
5469
5499
|
low: 0.2,
|
|
5470
5500
|
medium: 0.4,
|
|
5471
5501
|
high: 0.6,
|
|
5502
|
+
xhigh: 0.8,
|
|
5472
5503
|
max: 0.8
|
|
5473
5504
|
};
|
|
5474
5505
|
const budget = Math.floor(maxOutput * fraction[level]);
|
|
@@ -5762,6 +5793,7 @@ function thinkingBudget(level, maxOutput) {
|
|
|
5762
5793
|
low: 0.2,
|
|
5763
5794
|
medium: 0.4,
|
|
5764
5795
|
high: 0.6,
|
|
5796
|
+
xhigh: 0.8,
|
|
5765
5797
|
max: 0.8
|
|
5766
5798
|
};
|
|
5767
5799
|
return Math.max(0, Math.floor(maxOutput * fraction[level]));
|
package/dist/swarm.js
CHANGED
|
@@ -172,6 +172,28 @@ var MODEL_CARDS = [
|
|
|
172
172
|
cacheReadPerMTok: 0.275
|
|
173
173
|
}
|
|
174
174
|
},
|
|
175
|
+
{
|
|
176
|
+
id: "gpt-6-astra",
|
|
177
|
+
provider: "openai",
|
|
178
|
+
api: "openai-responses",
|
|
179
|
+
displayName: "GPT-6 Astra",
|
|
180
|
+
baseUrl: "https://api.openai.com/v1",
|
|
181
|
+
contextWindow: 105e4,
|
|
182
|
+
maxOutputTokens: 128e3,
|
|
183
|
+
modalities: ["text", "image"],
|
|
184
|
+
reasoning: true,
|
|
185
|
+
reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
|
|
186
|
+
longContextPricing: {
|
|
187
|
+
threshold: 272e3,
|
|
188
|
+
multipliers: { input: 2, output: 1.5, cacheRead: 2, cacheWrite: 2 }
|
|
189
|
+
},
|
|
190
|
+
cost: {
|
|
191
|
+
inputPerMTok: 10,
|
|
192
|
+
outputPerMTok: 50,
|
|
193
|
+
cacheReadPerMTok: 1,
|
|
194
|
+
cacheWritePerMTok: 12.5
|
|
195
|
+
}
|
|
196
|
+
},
|
|
175
197
|
// ── Google (Gemini) ─────────────────────────────────────────────────────
|
|
176
198
|
{
|
|
177
199
|
id: "gemini-2.5-pro",
|
|
@@ -859,6 +881,7 @@ function anthropicThinkingBudget(level, maxOutput) {
|
|
|
859
881
|
low: 0.2,
|
|
860
882
|
medium: 0.4,
|
|
861
883
|
high: 0.6,
|
|
884
|
+
xhigh: 0.8,
|
|
862
885
|
max: 0.8
|
|
863
886
|
};
|
|
864
887
|
if (level === "off") {
|
|
@@ -1663,13 +1686,17 @@ function readNumber2(o, key) {
|
|
|
1663
1686
|
const v = o[key];
|
|
1664
1687
|
return typeof v === "number" && Number.isFinite(v) ? v : void 0;
|
|
1665
1688
|
}
|
|
1666
|
-
function reasoningEffort(level) {
|
|
1689
|
+
function reasoningEffort(model, level) {
|
|
1690
|
+
if (model.reasoningEfforts?.includes(level)) {
|
|
1691
|
+
return level;
|
|
1692
|
+
}
|
|
1667
1693
|
switch (level) {
|
|
1668
1694
|
case "low":
|
|
1669
1695
|
return "low";
|
|
1670
1696
|
case "medium":
|
|
1671
1697
|
return "medium";
|
|
1672
1698
|
case "high":
|
|
1699
|
+
case "xhigh":
|
|
1673
1700
|
case "max":
|
|
1674
1701
|
return "high";
|
|
1675
1702
|
}
|
|
@@ -1710,14 +1737,17 @@ function buildBody2(model, c, opts) {
|
|
|
1710
1737
|
if (ceiling > 0) {
|
|
1711
1738
|
body.max_output_tokens = ceiling;
|
|
1712
1739
|
}
|
|
1713
|
-
if (opts.temperature !== void 0) {
|
|
1740
|
+
if (model.id !== "gpt-6-astra" && opts.temperature !== void 0) {
|
|
1714
1741
|
body.temperature = opts.temperature;
|
|
1715
1742
|
}
|
|
1716
|
-
if (opts.topP !== void 0) {
|
|
1743
|
+
if (model.id !== "gpt-6-astra" && opts.topP !== void 0) {
|
|
1717
1744
|
body.top_p = opts.topP;
|
|
1718
1745
|
}
|
|
1719
1746
|
if (model.reasoning && opts.thinking !== void 0 && opts.thinking !== "off") {
|
|
1720
|
-
|
|
1747
|
+
const effort = reasoningEffort(model, opts.thinking);
|
|
1748
|
+
if (effort !== void 0) {
|
|
1749
|
+
body.reasoning = { effort };
|
|
1750
|
+
}
|
|
1721
1751
|
}
|
|
1722
1752
|
return body;
|
|
1723
1753
|
}
|
|
@@ -1992,6 +2022,7 @@ function geminiThinkingBudget(level, maxOutput) {
|
|
|
1992
2022
|
low: 0.2,
|
|
1993
2023
|
medium: 0.4,
|
|
1994
2024
|
high: 0.6,
|
|
2025
|
+
xhigh: 0.8,
|
|
1995
2026
|
max: 0.8
|
|
1996
2027
|
};
|
|
1997
2028
|
const budget = Math.floor(maxOutput * fraction[level]);
|
|
@@ -2285,6 +2316,7 @@ function thinkingBudget(level, maxOutput) {
|
|
|
2285
2316
|
low: 0.2,
|
|
2286
2317
|
medium: 0.4,
|
|
2287
2318
|
high: 0.6,
|
|
2319
|
+
xhigh: 0.8,
|
|
2288
2320
|
max: 0.8
|
|
2289
2321
|
};
|
|
2290
2322
|
return Math.max(0, Math.floor(maxOutput * fraction[level]));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./bot/index";
|
|
1
|
+
export * from "./bot/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./ml/index";
|
|
1
|
+
export * from "./ml/index.js";
|
|
@@ -4,10 +4,10 @@ import type { Static, TSchema } from "@sinclair/typebox";
|
|
|
4
4
|
export type StreamFn = (...args: Parameters<typeof streamSimple>) => ReturnType<typeof streamSimple> | Promise<ReturnType<typeof streamSimple>>;
|
|
5
5
|
/**
|
|
6
6
|
* Reasoning effort tier requested from models that expose one.
|
|
7
|
-
* Heads up: the top "xhigh"
|
|
8
|
-
*
|
|
7
|
+
* Heads up: the top "xhigh" and "max" tiers are model-specific; most
|
|
8
|
+
* providers cap out at "high".
|
|
9
9
|
*/
|
|
10
|
-
export type ThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
10
|
+
export type ThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
11
11
|
/**
|
|
12
12
|
* Open extension point for application-defined message kinds.
|
|
13
13
|
* Downstream code adds its own kinds by merging this module's interface:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./mcp-core/index";
|
|
1
|
+
export * from "./mcp-core/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SimpleStreamOptions, StreamFunction, StreamOptions } from "../types.js";
|
|
2
2
|
export interface OpenAICodexResponsesOptions extends StreamOptions {
|
|
3
|
-
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
3
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
4
4
|
reasoningSummary?: "auto" | "concise" | "detailed" | "off" | "on" | null;
|
|
5
5
|
textVerbosity?: "low" | "medium" | "high";
|
|
6
6
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|