indusagi 0.13.10 → 0.13.12

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.
Files changed (35) hide show
  1. package/dist/agent.js +204 -29
  2. package/dist/ai.js +204 -29
  3. package/dist/cli.js +92 -9
  4. package/dist/index.js +186 -21
  5. package/dist/llmgateway.js +81 -4
  6. package/dist/mcp.js +94 -12
  7. package/dist/react-host/jsx-dev-runtime.js +93 -0
  8. package/dist/react-ink.js +11 -5
  9. package/dist/runtime.js +81 -4
  10. package/dist/shell-app.js +92 -9
  11. package/dist/smithy.js +81 -4
  12. package/dist/swarm.js +81 -4
  13. package/dist/types/facade/agent.d.ts +1 -1
  14. package/dist/types/facade/agent.test.d.ts +1 -0
  15. package/dist/types/facade/ai.d.ts +1 -1
  16. package/dist/types/facade/bot/types.d.ts +3 -3
  17. package/dist/types/facade/mcp.d.ts +1 -1
  18. package/dist/types/facade/ml/adapters/openai-codex-responses.d.ts +1 -1
  19. package/dist/types/facade/ml/adapters/openai-codex-responses.test.d.ts +1 -0
  20. package/dist/types/facade/ml/adapters/openai-responses.d.ts +1 -1
  21. package/dist/types/facade/ml/adapters/openai-responses.test.d.ts +1 -0
  22. package/dist/types/facade/ml/adapters/simple-options.d.ts +2 -2
  23. package/dist/types/facade/ml/auth-store.d.ts +7 -0
  24. package/dist/types/facade/ml/auth-store.test.d.ts +1 -0
  25. package/dist/types/facade/ml/models.generated.d.ts +162 -0
  26. package/dist/types/facade/ml/types.d.ts +14 -1
  27. package/dist/types/llmgateway/connectors/openai-responses.test.d.ts +1 -0
  28. package/dist/types/llmgateway/contract/index.d.ts +2 -2
  29. package/dist/types/llmgateway/contract/model-card.d.ts +14 -0
  30. package/dist/types/llmgateway/contract/options.d.ts +3 -1
  31. package/dist/types/react-host/jsx-dev-runtime.d.ts +3 -0
  32. package/dist/types/react-host/loader.d.ts +1 -0
  33. package/dist/types/security/private-state.d.ts +3 -0
  34. package/dist/zoho.js +94 -12
  35. package/package.json +7 -2
package/dist/runtime.js CHANGED
@@ -169,6 +169,72 @@ 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
+ },
194
+ {
195
+ id: "gpt-6-luna",
196
+ provider: "openai",
197
+ api: "openai-responses",
198
+ displayName: "GPT-6 Luna",
199
+ baseUrl: "https://api.openai.com/v1",
200
+ contextWindow: 105e4,
201
+ maxOutputTokens: 128e3,
202
+ modalities: ["text", "image"],
203
+ reasoning: true,
204
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
205
+ longContextPricing: {
206
+ threshold: 272e3,
207
+ multipliers: { input: 2, output: 1.5, cacheRead: 2, cacheWrite: 2 }
208
+ },
209
+ cost: {
210
+ inputPerMTok: 0.1,
211
+ outputPerMTok: 0.5,
212
+ cacheReadPerMTok: 0.01,
213
+ cacheWritePerMTok: 0.125
214
+ }
215
+ },
216
+ {
217
+ id: "gpt-6-sol",
218
+ provider: "openai",
219
+ api: "openai-responses",
220
+ displayName: "GPT-6 Sol",
221
+ baseUrl: "https://api.openai.com/v1",
222
+ contextWindow: 105e4,
223
+ maxOutputTokens: 128e3,
224
+ modalities: ["text", "image"],
225
+ reasoning: true,
226
+ reasoningEfforts: ["high"],
227
+ longContextPricing: {
228
+ threshold: 272e3,
229
+ multipliers: { input: 2, output: 1.5, cacheRead: 2, cacheWrite: 2 }
230
+ },
231
+ cost: {
232
+ inputPerMTok: 10,
233
+ outputPerMTok: 50,
234
+ cacheReadPerMTok: 1,
235
+ cacheWritePerMTok: 12.5
236
+ }
237
+ },
172
238
  // ── Google (Gemini) ─────────────────────────────────────────────────────
173
239
  {
174
240
  id: "gemini-2.5-pro",
@@ -856,6 +922,7 @@ function anthropicThinkingBudget(level, maxOutput) {
856
922
  low: 0.2,
857
923
  medium: 0.4,
858
924
  high: 0.6,
925
+ xhigh: 0.8,
859
926
  max: 0.8
860
927
  };
861
928
  if (level === "off") {
@@ -1660,13 +1727,17 @@ function readNumber2(o, key) {
1660
1727
  const v = o[key];
1661
1728
  return typeof v === "number" && Number.isFinite(v) ? v : void 0;
1662
1729
  }
1663
- function reasoningEffort(level) {
1730
+ function reasoningEffort(model, level) {
1731
+ if (model.reasoningEfforts?.includes(level)) {
1732
+ return level;
1733
+ }
1664
1734
  switch (level) {
1665
1735
  case "low":
1666
1736
  return "low";
1667
1737
  case "medium":
1668
1738
  return "medium";
1669
1739
  case "high":
1740
+ case "xhigh":
1670
1741
  case "max":
1671
1742
  return "high";
1672
1743
  }
@@ -1707,14 +1778,18 @@ function buildBody2(model, c, opts) {
1707
1778
  if (ceiling > 0) {
1708
1779
  body.max_output_tokens = ceiling;
1709
1780
  }
1710
- if (opts.temperature !== void 0) {
1781
+ const usesFixedGpt6Sampling = ["gpt-6-astra", "gpt-6-sol", "gpt-6-luna"].includes(model.id);
1782
+ if (!usesFixedGpt6Sampling && opts.temperature !== void 0) {
1711
1783
  body.temperature = opts.temperature;
1712
1784
  }
1713
- if (opts.topP !== void 0) {
1785
+ if (!usesFixedGpt6Sampling && opts.topP !== void 0) {
1714
1786
  body.top_p = opts.topP;
1715
1787
  }
1716
1788
  if (model.reasoning && opts.thinking !== void 0 && opts.thinking !== "off") {
1717
- body.reasoning = { effort: reasoningEffort(opts.thinking) };
1789
+ const effort = reasoningEffort(model, opts.thinking);
1790
+ if (effort !== void 0) {
1791
+ body.reasoning = { effort };
1792
+ }
1718
1793
  }
1719
1794
  return body;
1720
1795
  }
@@ -1989,6 +2064,7 @@ function geminiThinkingBudget(level, maxOutput) {
1989
2064
  low: 0.2,
1990
2065
  medium: 0.4,
1991
2066
  high: 0.6,
2067
+ xhigh: 0.8,
1992
2068
  max: 0.8
1993
2069
  };
1994
2070
  const budget = Math.floor(maxOutput * fraction[level]);
@@ -2282,6 +2358,7 @@ function thinkingBudget(level, maxOutput) {
2282
2358
  low: 0.2,
2283
2359
  medium: 0.4,
2284
2360
  high: 0.6,
2361
+ xhigh: 0.8,
2285
2362
  max: 0.8
2286
2363
  };
2287
2364
  return Math.max(0, Math.floor(maxOutput * fraction[level]));
package/dist/shell-app.js CHANGED
@@ -408,6 +408,72 @@ 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
+ },
433
+ {
434
+ id: "gpt-6-luna",
435
+ provider: "openai",
436
+ api: "openai-responses",
437
+ displayName: "GPT-6 Luna",
438
+ baseUrl: "https://api.openai.com/v1",
439
+ contextWindow: 105e4,
440
+ maxOutputTokens: 128e3,
441
+ modalities: ["text", "image"],
442
+ reasoning: true,
443
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
444
+ longContextPricing: {
445
+ threshold: 272e3,
446
+ multipliers: { input: 2, output: 1.5, cacheRead: 2, cacheWrite: 2 }
447
+ },
448
+ cost: {
449
+ inputPerMTok: 0.1,
450
+ outputPerMTok: 0.5,
451
+ cacheReadPerMTok: 0.01,
452
+ cacheWritePerMTok: 0.125
453
+ }
454
+ },
455
+ {
456
+ id: "gpt-6-sol",
457
+ provider: "openai",
458
+ api: "openai-responses",
459
+ displayName: "GPT-6 Sol",
460
+ baseUrl: "https://api.openai.com/v1",
461
+ contextWindow: 105e4,
462
+ maxOutputTokens: 128e3,
463
+ modalities: ["text", "image"],
464
+ reasoning: true,
465
+ reasoningEfforts: ["high"],
466
+ longContextPricing: {
467
+ threshold: 272e3,
468
+ multipliers: { input: 2, output: 1.5, cacheRead: 2, cacheWrite: 2 }
469
+ },
470
+ cost: {
471
+ inputPerMTok: 10,
472
+ outputPerMTok: 50,
473
+ cacheReadPerMTok: 1,
474
+ cacheWritePerMTok: 12.5
475
+ }
476
+ },
411
477
  // ── Google (Gemini) ─────────────────────────────────────────────────────
412
478
  {
413
479
  id: "gemini-2.5-pro",
@@ -1111,6 +1177,7 @@ function anthropicThinkingBudget(level, maxOutput) {
1111
1177
  low: 0.2,
1112
1178
  medium: 0.4,
1113
1179
  high: 0.6,
1180
+ xhigh: 0.8,
1114
1181
  max: 0.8
1115
1182
  };
1116
1183
  if (level === "off") {
@@ -1915,13 +1982,17 @@ function readNumber2(o, key) {
1915
1982
  const v = o[key];
1916
1983
  return typeof v === "number" && Number.isFinite(v) ? v : void 0;
1917
1984
  }
1918
- function reasoningEffort(level) {
1985
+ function reasoningEffort(model, level) {
1986
+ if (model.reasoningEfforts?.includes(level)) {
1987
+ return level;
1988
+ }
1919
1989
  switch (level) {
1920
1990
  case "low":
1921
1991
  return "low";
1922
1992
  case "medium":
1923
1993
  return "medium";
1924
1994
  case "high":
1995
+ case "xhigh":
1925
1996
  case "max":
1926
1997
  return "high";
1927
1998
  }
@@ -1962,14 +2033,18 @@ function buildBody2(model, c, opts) {
1962
2033
  if (ceiling > 0) {
1963
2034
  body.max_output_tokens = ceiling;
1964
2035
  }
1965
- if (opts.temperature !== void 0) {
2036
+ const usesFixedGpt6Sampling = ["gpt-6-astra", "gpt-6-sol", "gpt-6-luna"].includes(model.id);
2037
+ if (!usesFixedGpt6Sampling && opts.temperature !== void 0) {
1966
2038
  body.temperature = opts.temperature;
1967
2039
  }
1968
- if (opts.topP !== void 0) {
2040
+ if (!usesFixedGpt6Sampling && opts.topP !== void 0) {
1969
2041
  body.top_p = opts.topP;
1970
2042
  }
1971
2043
  if (model.reasoning && opts.thinking !== void 0 && opts.thinking !== "off") {
1972
- body.reasoning = { effort: reasoningEffort(opts.thinking) };
2044
+ const effort = reasoningEffort(model, opts.thinking);
2045
+ if (effort !== void 0) {
2046
+ body.reasoning = { effort };
2047
+ }
1973
2048
  }
1974
2049
  return body;
1975
2050
  }
@@ -2244,6 +2319,7 @@ function geminiThinkingBudget(level, maxOutput) {
2244
2319
  low: 0.2,
2245
2320
  medium: 0.4,
2246
2321
  high: 0.6,
2322
+ xhigh: 0.8,
2247
2323
  max: 0.8
2248
2324
  };
2249
2325
  const budget = Math.floor(maxOutput * fraction[level]);
@@ -2537,6 +2613,7 @@ function thinkingBudget(level, maxOutput) {
2537
2613
  low: 0.2,
2538
2614
  medium: 0.4,
2539
2615
  high: 0.6,
2616
+ xhigh: 0.8,
2540
2617
  max: 0.8
2541
2618
  };
2542
2619
  return Math.max(0, Math.floor(maxOutput * fraction[level]));
@@ -9771,9 +9848,9 @@ function formatToken(token, theme, highlight = null, listDepth = 0, orderedListN
9771
9848
  const inner = (headingToken.tokens ?? []).map((child) => formatToken(child, theme, highlight)).join("");
9772
9849
  const colored = theme.role("heading", inner);
9773
9850
  if (headingToken.depth === 1) {
9774
- return chalk2.bold.italic.underline(colored) + EOL + EOL;
9851
+ return chalk2.bold.underline(`${theme.role("heading", "\u25B0")} ${colored}`) + EOL;
9775
9852
  }
9776
- return chalk2.bold(colored) + EOL + EOL;
9853
+ return chalk2.bold(`${theme.role("heading", "\u25C6")} ${colored}`) + EOL;
9777
9854
  }
9778
9855
  case "hr":
9779
9856
  return "---";
@@ -9807,8 +9884,14 @@ function formatToken(token, theme, highlight = null, listDepth = 0, orderedListN
9807
9884
  return (token.tokens ?? []).map(
9808
9885
  (child) => `${" ".repeat(listDepth)}${formatToken(child, theme, highlight, listDepth + 1, orderedListNumber, token)}`
9809
9886
  ).join("");
9810
- case "paragraph":
9811
- return (token.tokens ?? []).map((child) => formatToken(child, theme, highlight)).join("") + EOL;
9887
+ case "paragraph": {
9888
+ const children = token.tokens ?? [];
9889
+ const body = children.map((child) => formatToken(child, theme, highlight)).join("");
9890
+ if (children.length === 1 && children[0]?.type === "strong") {
9891
+ return `${theme.role("heading", "\u25C6")} ${body}${EOL}`;
9892
+ }
9893
+ return body + EOL;
9894
+ }
9812
9895
  case "space":
9813
9896
  case "br":
9814
9897
  return EOL;
@@ -9818,7 +9901,7 @@ function formatToken(token, theme, highlight = null, listDepth = 0, orderedListN
9818
9901
  return textToken.text;
9819
9902
  }
9820
9903
  if (parent?.type === "list_item") {
9821
- const marker = orderedListNumber === null ? "-" : `${getListNumber(listDepth, orderedListNumber)}.`;
9904
+ const marker = orderedListNumber === null ? "\u2022" : `${getListNumber(listDepth, orderedListNumber)}.`;
9822
9905
  const body = textToken.tokens ? textToken.tokens.map((child) => formatToken(child, theme, highlight, listDepth, orderedListNumber, token)).join("") : textToken.text;
9823
9906
  return `${marker} ${body}${EOL}`;
9824
9907
  }
package/dist/smithy.js CHANGED
@@ -3649,6 +3649,72 @@ 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
+ },
3674
+ {
3675
+ id: "gpt-6-luna",
3676
+ provider: "openai",
3677
+ api: "openai-responses",
3678
+ displayName: "GPT-6 Luna",
3679
+ baseUrl: "https://api.openai.com/v1",
3680
+ contextWindow: 105e4,
3681
+ maxOutputTokens: 128e3,
3682
+ modalities: ["text", "image"],
3683
+ reasoning: true,
3684
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
3685
+ longContextPricing: {
3686
+ threshold: 272e3,
3687
+ multipliers: { input: 2, output: 1.5, cacheRead: 2, cacheWrite: 2 }
3688
+ },
3689
+ cost: {
3690
+ inputPerMTok: 0.1,
3691
+ outputPerMTok: 0.5,
3692
+ cacheReadPerMTok: 0.01,
3693
+ cacheWritePerMTok: 0.125
3694
+ }
3695
+ },
3696
+ {
3697
+ id: "gpt-6-sol",
3698
+ provider: "openai",
3699
+ api: "openai-responses",
3700
+ displayName: "GPT-6 Sol",
3701
+ baseUrl: "https://api.openai.com/v1",
3702
+ contextWindow: 105e4,
3703
+ maxOutputTokens: 128e3,
3704
+ modalities: ["text", "image"],
3705
+ reasoning: true,
3706
+ reasoningEfforts: ["high"],
3707
+ longContextPricing: {
3708
+ threshold: 272e3,
3709
+ multipliers: { input: 2, output: 1.5, cacheRead: 2, cacheWrite: 2 }
3710
+ },
3711
+ cost: {
3712
+ inputPerMTok: 10,
3713
+ outputPerMTok: 50,
3714
+ cacheReadPerMTok: 1,
3715
+ cacheWritePerMTok: 12.5
3716
+ }
3717
+ },
3652
3718
  // ── Google (Gemini) ─────────────────────────────────────────────────────
3653
3719
  {
3654
3720
  id: "gemini-2.5-pro",
@@ -4336,6 +4402,7 @@ function anthropicThinkingBudget(level, maxOutput) {
4336
4402
  low: 0.2,
4337
4403
  medium: 0.4,
4338
4404
  high: 0.6,
4405
+ xhigh: 0.8,
4339
4406
  max: 0.8
4340
4407
  };
4341
4408
  if (level === "off") {
@@ -5140,13 +5207,17 @@ function readNumber2(o, key) {
5140
5207
  const v = o[key];
5141
5208
  return typeof v === "number" && Number.isFinite(v) ? v : void 0;
5142
5209
  }
5143
- function reasoningEffort(level) {
5210
+ function reasoningEffort(model, level) {
5211
+ if (model.reasoningEfforts?.includes(level)) {
5212
+ return level;
5213
+ }
5144
5214
  switch (level) {
5145
5215
  case "low":
5146
5216
  return "low";
5147
5217
  case "medium":
5148
5218
  return "medium";
5149
5219
  case "high":
5220
+ case "xhigh":
5150
5221
  case "max":
5151
5222
  return "high";
5152
5223
  }
@@ -5187,14 +5258,18 @@ function buildBody2(model, c, opts) {
5187
5258
  if (ceiling > 0) {
5188
5259
  body.max_output_tokens = ceiling;
5189
5260
  }
5190
- if (opts.temperature !== void 0) {
5261
+ const usesFixedGpt6Sampling = ["gpt-6-astra", "gpt-6-sol", "gpt-6-luna"].includes(model.id);
5262
+ if (!usesFixedGpt6Sampling && opts.temperature !== void 0) {
5191
5263
  body.temperature = opts.temperature;
5192
5264
  }
5193
- if (opts.topP !== void 0) {
5265
+ if (!usesFixedGpt6Sampling && opts.topP !== void 0) {
5194
5266
  body.top_p = opts.topP;
5195
5267
  }
5196
5268
  if (model.reasoning && opts.thinking !== void 0 && opts.thinking !== "off") {
5197
- body.reasoning = { effort: reasoningEffort(opts.thinking) };
5269
+ const effort = reasoningEffort(model, opts.thinking);
5270
+ if (effort !== void 0) {
5271
+ body.reasoning = { effort };
5272
+ }
5198
5273
  }
5199
5274
  return body;
5200
5275
  }
@@ -5469,6 +5544,7 @@ function geminiThinkingBudget(level, maxOutput) {
5469
5544
  low: 0.2,
5470
5545
  medium: 0.4,
5471
5546
  high: 0.6,
5547
+ xhigh: 0.8,
5472
5548
  max: 0.8
5473
5549
  };
5474
5550
  const budget = Math.floor(maxOutput * fraction[level]);
@@ -5762,6 +5838,7 @@ function thinkingBudget(level, maxOutput) {
5762
5838
  low: 0.2,
5763
5839
  medium: 0.4,
5764
5840
  high: 0.6,
5841
+ xhigh: 0.8,
5765
5842
  max: 0.8
5766
5843
  };
5767
5844
  return Math.max(0, Math.floor(maxOutput * fraction[level]));
package/dist/swarm.js CHANGED
@@ -172,6 +172,72 @@ 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
+ },
197
+ {
198
+ id: "gpt-6-luna",
199
+ provider: "openai",
200
+ api: "openai-responses",
201
+ displayName: "GPT-6 Luna",
202
+ baseUrl: "https://api.openai.com/v1",
203
+ contextWindow: 105e4,
204
+ maxOutputTokens: 128e3,
205
+ modalities: ["text", "image"],
206
+ reasoning: true,
207
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
208
+ longContextPricing: {
209
+ threshold: 272e3,
210
+ multipliers: { input: 2, output: 1.5, cacheRead: 2, cacheWrite: 2 }
211
+ },
212
+ cost: {
213
+ inputPerMTok: 0.1,
214
+ outputPerMTok: 0.5,
215
+ cacheReadPerMTok: 0.01,
216
+ cacheWritePerMTok: 0.125
217
+ }
218
+ },
219
+ {
220
+ id: "gpt-6-sol",
221
+ provider: "openai",
222
+ api: "openai-responses",
223
+ displayName: "GPT-6 Sol",
224
+ baseUrl: "https://api.openai.com/v1",
225
+ contextWindow: 105e4,
226
+ maxOutputTokens: 128e3,
227
+ modalities: ["text", "image"],
228
+ reasoning: true,
229
+ reasoningEfforts: ["high"],
230
+ longContextPricing: {
231
+ threshold: 272e3,
232
+ multipliers: { input: 2, output: 1.5, cacheRead: 2, cacheWrite: 2 }
233
+ },
234
+ cost: {
235
+ inputPerMTok: 10,
236
+ outputPerMTok: 50,
237
+ cacheReadPerMTok: 1,
238
+ cacheWritePerMTok: 12.5
239
+ }
240
+ },
175
241
  // ── Google (Gemini) ─────────────────────────────────────────────────────
176
242
  {
177
243
  id: "gemini-2.5-pro",
@@ -859,6 +925,7 @@ function anthropicThinkingBudget(level, maxOutput) {
859
925
  low: 0.2,
860
926
  medium: 0.4,
861
927
  high: 0.6,
928
+ xhigh: 0.8,
862
929
  max: 0.8
863
930
  };
864
931
  if (level === "off") {
@@ -1663,13 +1730,17 @@ function readNumber2(o, key) {
1663
1730
  const v = o[key];
1664
1731
  return typeof v === "number" && Number.isFinite(v) ? v : void 0;
1665
1732
  }
1666
- function reasoningEffort(level) {
1733
+ function reasoningEffort(model, level) {
1734
+ if (model.reasoningEfforts?.includes(level)) {
1735
+ return level;
1736
+ }
1667
1737
  switch (level) {
1668
1738
  case "low":
1669
1739
  return "low";
1670
1740
  case "medium":
1671
1741
  return "medium";
1672
1742
  case "high":
1743
+ case "xhigh":
1673
1744
  case "max":
1674
1745
  return "high";
1675
1746
  }
@@ -1710,14 +1781,18 @@ function buildBody2(model, c, opts) {
1710
1781
  if (ceiling > 0) {
1711
1782
  body.max_output_tokens = ceiling;
1712
1783
  }
1713
- if (opts.temperature !== void 0) {
1784
+ const usesFixedGpt6Sampling = ["gpt-6-astra", "gpt-6-sol", "gpt-6-luna"].includes(model.id);
1785
+ if (!usesFixedGpt6Sampling && opts.temperature !== void 0) {
1714
1786
  body.temperature = opts.temperature;
1715
1787
  }
1716
- if (opts.topP !== void 0) {
1788
+ if (!usesFixedGpt6Sampling && opts.topP !== void 0) {
1717
1789
  body.top_p = opts.topP;
1718
1790
  }
1719
1791
  if (model.reasoning && opts.thinking !== void 0 && opts.thinking !== "off") {
1720
- body.reasoning = { effort: reasoningEffort(opts.thinking) };
1792
+ const effort = reasoningEffort(model, opts.thinking);
1793
+ if (effort !== void 0) {
1794
+ body.reasoning = { effort };
1795
+ }
1721
1796
  }
1722
1797
  return body;
1723
1798
  }
@@ -1992,6 +2067,7 @@ function geminiThinkingBudget(level, maxOutput) {
1992
2067
  low: 0.2,
1993
2068
  medium: 0.4,
1994
2069
  high: 0.6,
2070
+ xhigh: 0.8,
1995
2071
  max: 0.8
1996
2072
  };
1997
2073
  const budget = Math.floor(maxOutput * fraction[level]);
@@ -2285,6 +2361,7 @@ function thinkingBudget(level, maxOutput) {
2285
2361
  low: 0.2,
2286
2362
  medium: 0.4,
2287
2363
  high: 0.6,
2364
+ xhigh: 0.8,
2288
2365
  max: 0.8
2289
2366
  };
2290
2367
  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" tier is currently only honored by a few OpenAI
8
- * frontier models; most providers cap out at "high".
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
  }
@@ -1,7 +1,7 @@
1
1
  import type { ResponseCreateParamsStreaming } from "openai/resources/responses/responses.js";
2
2
  import type { SimpleStreamOptions, StreamFunction, StreamOptions } from "../types.js";
3
3
  export interface OpenAIResponsesOptions extends StreamOptions {
4
- reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh";
4
+ reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
5
5
  reasoningSummary?: "auto" | "detailed" | "concise" | null;
6
6
  serviceTier?: ResponseCreateParamsStreaming["service_tier"];
7
7
  }
@@ -31,8 +31,8 @@ export declare class SimpleOptionsProviderError extends Error {
31
31
  export declare function normalizeProviderError(error: unknown): SimpleOptionsProviderError;
32
32
  export declare function executeWithRetry<T>(operation: () => Promise<T>, policy: RetryPolicy): Promise<T>;
33
33
  export declare function buildBaseOptions(model: Model<Api>, options?: SimpleStreamOptions, apiKey?: string): StreamOptions;
34
- export declare function clampReasoning(effort: ThinkingLevel | undefined): Exclude<ThinkingLevel, "xhigh"> | undefined;
35
- export declare function mapThinkingLevel(level: ThinkingLevel | undefined, provider?: "supports-xhigh" | "clamp-xhigh"): ThinkingLevel | Exclude<ThinkingLevel, "xhigh"> | undefined;
34
+ export declare function clampReasoning(effort: ThinkingLevel | undefined): Exclude<ThinkingLevel, "xhigh" | "max"> | undefined;
35
+ export declare function mapThinkingLevel(level: ThinkingLevel | undefined, provider?: "supports-xhigh" | "clamp-xhigh"): Exclude<ThinkingLevel, "max"> | undefined;
36
36
  export declare function adjustMaxTokensForThinking(baseMaxTokens: number, modelMaxTokens: number, reasoningLevel: ThinkingLevel, customBudgets?: ThinkingBudgets): {
37
37
  maxTokens: number;
38
38
  thinkingBudget: number;
@@ -0,0 +1,7 @@
1
+ import type { OAuthCredentials } from "./kit/auth/types.js";
2
+ export type AuthStore = Record<string, {
3
+ type: "oauth";
4
+ } & OAuthCredentials>;
5
+ export declare function resolveAuthFile(home?: string): string;
6
+ export declare function loadAuthStore(path?: string): AuthStore;
7
+ export declare function saveAuthStore(auth: AuthStore, path?: string): void;
@@ -0,0 +1 @@
1
+ export {};