@openclaw/ai 2026.9.5 → 2026.9.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.
Files changed (87) hide show
  1. package/dist/{anthropic-COtDvgtt.mjs → anthropic-DZQ_7gD1.mjs} +35 -35
  2. package/dist/{anthropic-payload-policy-5Erq1Nzy.d.mts → anthropic-payload-policy-DyfwikYJ.d.mts} +4 -4
  3. package/dist/{anthropic-stream-reducer-BvdYYWL8.mjs → anthropic-stream-reducer-D6ZI1wwj.mjs} +32 -16
  4. package/dist/{api-registry-Ba2Cv-ut.d.mts → api-registry-C2T3lTV7.d.mts} +2 -2
  5. package/dist/{assistant-output-BsEkB-vU.mjs → assistant-output-DM1JBNs1.mjs} +1 -1
  6. package/dist/{azure-openai-responses-YrgnD583.mjs → azure-openai-responses-DS86GYzq.mjs} +5 -5
  7. package/dist/{base64-BQOzsvUH.mjs → base64-CPmadnUf.mjs} +8 -8
  8. package/dist/{diagnostics-Dm4bisWG.mjs → diagnostics-CH8j2wIG.mjs} +55 -10
  9. package/dist/{diagnostics-CPeq9F7y.mjs → diagnostics-DzrF1h4J.mjs} +18 -1
  10. package/dist/diagnostics.d.mts +11 -5
  11. package/dist/diagnostics.mjs +4 -4
  12. package/dist/event-stream-C0nsgbj2.d.mts +1 -0
  13. package/dist/{event-stream-CCoa-qSI.d.mts → event-stream-CjnIZZst.d.mts} +1 -1
  14. package/dist/event-stream.d.mts +2 -2
  15. package/dist/{google-BuhpRO9r.mjs → google-BZJFjhuC.mjs} +5 -5
  16. package/dist/{google-messages-CyWnYlh0.mjs → google-messages-DB7GKkDk.mjs} +3 -3
  17. package/dist/{google-shared-BT5ZeNer.mjs → google-shared-Bok4I6zB.mjs} +5 -5
  18. package/dist/{google-vertex-C7EplRvt.mjs → google-vertex-3eVNR2qW.mjs} +4 -4
  19. package/dist/{host-FZ1RA_qD.d.mts → host-DH-Z-LDb.d.mts} +3 -3
  20. package/dist/{host-policy-DUnXSx0I.mjs → host-policy-DZO3oPPk.mjs} +1 -1
  21. package/dist/{host-B4MeUNBc.mjs → host-yTvBrYM2.mjs} +41 -7
  22. package/dist/{index-DaF2QbwS.d.mts → index-C25RT6bP.d.mts} +36 -8
  23. package/dist/index.d.mts +7 -7
  24. package/dist/index.mjs +4 -4
  25. package/dist/internal/anthropic.d.mts +12 -8
  26. package/dist/internal/anthropic.mjs +5 -5
  27. package/dist/internal/openai-completions-compat.d.mts +1 -1
  28. package/dist/internal/openai-completions-compat.mjs +1 -1
  29. package/dist/internal/openai-responses-payload-policy.d.mts +1 -1
  30. package/dist/internal/openai-responses-payload-policy.mjs +1 -1
  31. package/dist/internal/openai.d.mts +22 -8
  32. package/dist/internal/openai.mjs +11 -10
  33. package/dist/internal/runtime.d.mts +6 -6
  34. package/dist/internal/runtime.mjs +5 -5
  35. package/dist/internal/shared.d.mts +5 -4
  36. package/dist/internal/shared.mjs +4 -4
  37. package/dist/internal/tool-schema.d.mts +1 -1
  38. package/dist/internal/tool-schema.mjs +1 -1
  39. package/dist/{mistral-moA-mbwl.mjs → mistral-C_13dVBn.mjs} +5 -5
  40. package/dist/{model-transport-url-DKocrEsb.d.mts → model-transport-url-C5f59L3Y.d.mts} +1 -1
  41. package/dist/{openai-chatgpt-responses-DWID3EFO.mjs → openai-chatgpt-responses-sTxPl4zM.mjs} +107 -84
  42. package/dist/{openai-completions-DJ1Vm-CD.mjs → openai-completions-BO6D_hrB.mjs} +10 -10
  43. package/dist/{openai-completions-compat-CkwdxTZx.mjs → openai-completions-compat-CUollwl6.mjs} +1 -1
  44. package/dist/{openai-completions-compat-JE7gqxb9.d.mts → openai-completions-compat-DfJG1wSO.d.mts} +3 -3
  45. package/dist/{openai-completions-stream-Bu98b0Hv.mjs → openai-completions-stream-BpuJ0ZOA.mjs} +38 -25
  46. package/dist/{openai-prompt-cache-CJ_xEevu.d.mts → openai-prompt-cache-C4RHdN4n.d.mts} +2 -2
  47. package/dist/{openai-prompt-cache-1wfaIszn.mjs → openai-prompt-cache-CjV_2IRI.mjs} +1 -1
  48. package/dist/{openai-provider-client-DPo0Hmak.mjs → openai-provider-client-BP8J1aeg.mjs} +2 -2
  49. package/dist/{openai-reasoning-effort-NlFZmfEu.mjs → openai-reasoning-effort-ash8dPrd.mjs} +12 -4
  50. package/dist/{openai-responses-BejZzQCP.mjs → openai-responses-BJ_IEoMU.mjs} +7 -7
  51. package/dist/{openai-responses-compaction-window-D6P5oZP5.mjs → openai-responses-compaction-window-BiNCT0bS.mjs} +3 -3
  52. package/dist/{openai-responses-contracts-Dflvrfa8.d.mts → openai-responses-contracts-B1ENJFpI.d.mts} +4 -4
  53. package/dist/{openai-responses-prompt-observer-internal-C15_-OwV.mjs → openai-responses-prompt-observer-internal-DPHWgbBH.mjs} +14 -11
  54. package/dist/openai-responses-request-lifecycle-DFuyO1pQ.mjs +36 -0
  55. package/dist/{openai-responses-shared-CwsziD_m.mjs → openai-responses-shared-DvSqtJ6_.mjs} +481 -410
  56. package/dist/{openai-responses-terminal-usage-Dl3J6zrf.d.mts → openai-responses-terminal-usage-BNFbvY9f.d.mts} +2 -2
  57. package/dist/{openai-tool-schema-BO8rwyAD.mjs → openai-tool-schema-D4BMcj2D.mjs} +171 -95
  58. package/dist/{openai-transport-params-DQeuAvBl.mjs → openai-transport-params-DZKOTSfH.mjs} +9 -9
  59. package/dist/{positive-integer-DtjCkbue.mjs → positive-integer-BiUxrd71.mjs} +1 -1
  60. package/dist/{provider-error-DDqw9Qda.mjs → provider-error-CRhW7lkJ.mjs} +40 -7
  61. package/dist/{provider-error-CzNw4BWX.d.mts → provider-error-xumb1V3F.d.mts} +3 -1
  62. package/dist/{provider-options-DprLsWh9.d.mts → provider-options-DZYq53lj.d.mts} +6 -4
  63. package/dist/{provider-replay-context-CnUSOwhr.mjs → provider-replay-context-DPr3w20a.mjs} +1 -1
  64. package/dist/{provider-transcript-transform-BsRAhuWJ.mjs → provider-transcript-transform-BTocjCRs.mjs} +1 -1
  65. package/dist/{provider-transport-turn-state-CkGToCD2.mjs → provider-transport-turn-state-lrXEFkYr.mjs} +1 -1
  66. package/dist/{provider-types-CAKRC7N5.d.mts → provider-types-w1rEqrGP.d.mts} +3 -3
  67. package/dist/provider-types.d.mts +6 -6
  68. package/dist/providers.d.mts +2 -2
  69. package/dist/providers.mjs +10 -10
  70. package/dist/{reasoning-tag-text-partitioner-Dy9IO8Dc.mjs → reasoning-tag-text-partitioner-Di38crhI.mjs} +154 -35
  71. package/dist/{simple-options-C6cFWj_f.mjs → simple-options-np1XPuhm.mjs} +2 -2
  72. package/dist/{src-DeKjbE8I.mjs → src-DwGYYyZp.mjs} +15 -6
  73. package/dist/{stream-first-event-timeout-C9ZadkJW.mjs → stream-first-event-timeout-BeptfRL6.mjs} +1 -1
  74. package/dist/{transport-stream-shared-D-6FQSHm.mjs → transport-stream-shared-B5RioB_Q.mjs} +5 -13
  75. package/dist/{transport-stream-shared-BbUkFaHi.d.mts → transport-stream-shared-B7Z9oCYg.d.mts} +5 -5
  76. package/dist/{transport-utils-1cyq5Y7x.mjs → transport-utils-03Qi0CN2.mjs} +3 -3
  77. package/dist/transports.d.mts +11 -11
  78. package/dist/transports.mjs +70 -45
  79. package/dist/types-DTvddOfm.d.mts +1 -0
  80. package/dist/{types-4_uVs5WH.d.mts → types-qZFbaDbK.d.mts} +2 -0
  81. package/dist/types.d.mts +6 -6
  82. package/dist/types.mjs +3 -3
  83. package/dist/{validation-Ctzu2DhF.d.mts → validation-DhQhmt6t.d.mts} +1 -1
  84. package/dist/validation.d.mts +1 -1
  85. package/package.json +5 -5
  86. package/dist/event-stream-DmSCpi1T.d.mts +0 -1
  87. package/dist/types-DkJfb4W3.d.mts +0 -1
@@ -1,5 +1,5 @@
1
- import { K as StopReason, a as AssistantMessage, ot as Usage } from "./types-4_uVs5WH.mjs";
2
- import "./types-DkJfb4W3.mjs";
1
+ import { K as StopReason, a as AssistantMessage, ot as Usage } from "./types-qZFbaDbK.mjs";
2
+ import "./types-DTvddOfm.mjs";
3
3
  import OpenAI from "openai";
4
4
  //#region packages/ai/src/providers/openai-responses-terminal-usage.d.ts
5
5
  /** A known output ceiling can resume sampling after admitted tools have settled. */
@@ -1,8 +1,35 @@
1
1
  import { n as normalizeLowercaseStringOrEmpty } from "./string-coerce-fsri9iCu.mjs";
2
2
  import { o as isRecord } from "./record-coerce-DwRYMj3t.mjs";
3
3
  import { i as uniqueValues, t as normalizeStringEntries } from "./string-normalization-J9ZiLfGO.mjs";
4
+ //#region packages/ai/src/providers/schema-walk.ts
5
+ /** Resume child schema walks on a heap stack, never through recursive yield delegation. */
6
+ function evaluateSchemaWalk(walk) {
7
+ const parents = [];
8
+ let current = walk;
9
+ let value;
10
+ try {
11
+ while (true) {
12
+ const step = current.next(value);
13
+ if (!step.done) {
14
+ parents.push(current);
15
+ current = step.value;
16
+ value = void 0;
17
+ continue;
18
+ }
19
+ value = step.value;
20
+ const parent = parents.pop();
21
+ if (!parent) return value;
22
+ current = parent;
23
+ }
24
+ } finally {
25
+ let parent;
26
+ while (parent = parents.pop()) parent.return(void 0);
27
+ }
28
+ }
29
+ //#endregion
4
30
  //#region packages/ai/src/providers/clean-for-gemini.ts
5
31
  const GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS = /* @__PURE__ */ new Set([
32
+ "~optional",
6
33
  "patternProperties",
7
34
  "additionalProperties",
8
35
  "$schema",
@@ -158,89 +185,123 @@ function sanitizeRequiredFields(schema) {
158
185
  else delete schema.required;
159
186
  return schema;
160
187
  }
161
- function cleanSchemaForGeminiWithDefs(schema, defs, refStack) {
188
+ function* cleanSchemaArray(schemas, defs, refStack, ancestors, result) {
189
+ result.length = schemas.length;
190
+ for (let index = 0; index < result.length; index += 1) if (index in schemas) result[index] = yield cleanSchemaForGeminiWithDefs(schemas[index], defs, refStack, ancestors);
191
+ return result;
192
+ }
193
+ function* cleanSchemaForGeminiWithDefs(schema, defs, refStack, ancestors) {
162
194
  if (!schema || typeof schema !== "object") return schema;
163
- if (Array.isArray(schema)) return schema.map((item) => cleanSchemaForGeminiWithDefs(item, defs, refStack));
164
- const obj = schema;
165
- const nextDefs = extendSchemaDefs$1(defs, obj);
166
- const refValue = typeof obj.$ref === "string" ? obj.$ref : void 0;
167
- if (refValue) {
168
- if (refStack?.has(refValue)) return {};
169
- const resolved = tryResolveLocalRef$1(refValue, nextDefs);
170
- if (resolved) {
171
- const nextRefStack = refStack ? new Set(refStack) : /* @__PURE__ */ new Set();
172
- nextRefStack.add(refValue);
173
- const cleaned = cleanSchemaForGeminiWithDefs(resolved, nextDefs, nextRefStack);
174
- if (!cleaned || typeof cleaned !== "object" || Array.isArray(cleaned)) return cleaned;
175
- const result = { ...cleaned };
195
+ if (ancestors.has(schema)) throw new TypeError("Tool schema contains a circular reference.");
196
+ ancestors.add(schema);
197
+ try {
198
+ if (Array.isArray(schema)) {
199
+ const result = [];
200
+ yield cleanSchemaArray(schema, defs, refStack, ancestors, result);
201
+ return result;
202
+ }
203
+ const obj = schema;
204
+ const nextDefs = extendSchemaDefs$1(defs, obj);
205
+ const refValue = typeof obj.$ref === "string" ? obj.$ref : void 0;
206
+ if (refValue) {
207
+ if (refStack?.has(refValue)) return {};
208
+ const resolved = tryResolveLocalRef$1(refValue, nextDefs);
209
+ if (resolved) {
210
+ const nextRefStack = refStack ? new Set(refStack) : /* @__PURE__ */ new Set();
211
+ nextRefStack.add(refValue);
212
+ const cleaned = yield cleanSchemaForGeminiWithDefs(resolved, nextDefs, nextRefStack, /* @__PURE__ */ new Set());
213
+ if (!cleaned || typeof cleaned !== "object" || Array.isArray(cleaned)) return cleaned;
214
+ const result = { ...cleaned };
215
+ copySchemaMeta$1(obj, result);
216
+ return result;
217
+ }
218
+ const result = {};
176
219
  copySchemaMeta$1(obj, result);
177
220
  return result;
178
221
  }
179
- const result = {};
180
- copySchemaMeta$1(obj, result);
181
- return result;
182
- }
183
- const hasAnyOf = "anyOf" in obj && Array.isArray(obj.anyOf);
184
- const hasOneOf = "oneOf" in obj && Array.isArray(obj.oneOf);
185
- let cleanedAnyOf = hasAnyOf ? obj.anyOf.map((variant) => cleanSchemaForGeminiWithDefs(variant, nextDefs, refStack)) : void 0;
186
- let cleanedOneOf = hasOneOf ? obj.oneOf.map((variant) => cleanSchemaForGeminiWithDefs(variant, nextDefs, refStack)) : void 0;
187
- if (hasAnyOf) {
188
- const simplified = simplifyUnionVariants({
189
- obj,
190
- variants: cleanedAnyOf ?? []
191
- });
192
- if (simplified.kind === "simplified") return simplified.value;
193
- cleanedAnyOf = simplified.value;
194
- }
195
- if (hasOneOf) {
196
- const simplified = simplifyUnionVariants({
197
- obj,
198
- variants: cleanedOneOf ?? []
199
- });
200
- if (simplified.kind === "simplified") return simplified.value;
201
- cleanedOneOf = simplified.value;
202
- }
203
- const cleaned = {};
204
- for (const [key, value] of Object.entries(obj)) {
205
- if (GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS.has(key)) continue;
206
- if (key === "const") {
207
- const enumValues = cleanGeminiEnumValues([value]);
208
- if (enumValues) cleaned.enum = enumValues;
209
- continue;
222
+ const hasAnyOf = "anyOf" in obj && Array.isArray(obj.anyOf);
223
+ const hasOneOf = "oneOf" in obj && Array.isArray(obj.oneOf);
224
+ let cleanedAnyOf;
225
+ if (hasAnyOf) {
226
+ const variants = obj.anyOf;
227
+ cleanedAnyOf = [];
228
+ yield cleanSchemaArray(variants, nextDefs, refStack, ancestors, cleanedAnyOf);
210
229
  }
211
- if (key === "enum") {
212
- const enumValues = cleanGeminiEnumValues(value);
213
- if (enumValues) cleaned.enum = enumValues;
214
- continue;
230
+ let cleanedOneOf;
231
+ if (hasOneOf) {
232
+ const variants = obj.oneOf;
233
+ cleanedOneOf = [];
234
+ yield cleanSchemaArray(variants, nextDefs, refStack, ancestors, cleanedOneOf);
215
235
  }
216
- if (key === "required" && Array.isArray(value) && value.length === 0) continue;
217
- if (key === "type" && (hasAnyOf || hasOneOf)) continue;
218
- if (key === "type" && Array.isArray(value) && value.every((entry) => typeof entry === "string")) {
219
- const types = value.filter((entry) => entry !== "null");
220
- cleaned.type = types.length === 1 ? types[0] : types;
221
- continue;
236
+ if (hasAnyOf) {
237
+ const simplified = simplifyUnionVariants({
238
+ obj,
239
+ variants: cleanedAnyOf ?? []
240
+ });
241
+ if (simplified.kind === "simplified") return simplified.value;
242
+ cleanedAnyOf = simplified.value;
222
243
  }
223
- if (key === "properties") {
224
- if (value && typeof value === "object" && !Array.isArray(value)) cleaned[key] = Object.fromEntries(Object.entries(value).map(([k, v]) => [k, cleanSchemaForGeminiWithDefs(v, nextDefs, refStack)]));
225
- else cleaned[key] = {};
226
- } else if (key === "items" && value) {
227
- if (Array.isArray(value)) cleaned[key] = value.map((entry) => cleanSchemaForGeminiWithDefs(entry, nextDefs, refStack));
228
- else if (typeof value === "object") cleaned[key] = cleanSchemaForGeminiWithDefs(value, nextDefs, refStack);
229
- else cleaned[key] = value;
230
- } else if (key === "anyOf" && Array.isArray(value)) cleaned[key] = cleanedAnyOf ?? value.map((variant) => cleanSchemaForGeminiWithDefs(variant, nextDefs, refStack));
231
- else if (key === "oneOf" && Array.isArray(value)) cleaned[key] = cleanedOneOf ?? value.map((variant) => cleanSchemaForGeminiWithDefs(variant, nextDefs, refStack));
232
- else if (key === "allOf" && Array.isArray(value)) cleaned[key] = value.map((variant) => cleanSchemaForGeminiWithDefs(variant, nextDefs, refStack));
233
- else cleaned[key] = value;
234
- }
235
- if (cleaned.anyOf && Array.isArray(cleaned.anyOf)) {
236
- const flattened = flattenUnionFallback(cleaned, cleaned.anyOf);
237
- if (flattened) return sanitizeRequiredFields(flattened);
238
- }
239
- if (cleaned.oneOf && Array.isArray(cleaned.oneOf)) {
240
- const flattened = flattenUnionFallback(cleaned, cleaned.oneOf);
241
- if (flattened) return sanitizeRequiredFields(flattened);
244
+ if (hasOneOf) {
245
+ const simplified = simplifyUnionVariants({
246
+ obj,
247
+ variants: cleanedOneOf ?? []
248
+ });
249
+ if (simplified.kind === "simplified") return simplified.value;
250
+ cleanedOneOf = simplified.value;
251
+ }
252
+ const cleaned = {};
253
+ for (const [key, value] of Object.entries(obj)) {
254
+ if (GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS.has(key)) continue;
255
+ if (key === "const") {
256
+ const enumValues = cleanGeminiEnumValues([value]);
257
+ if (enumValues) cleaned.enum = enumValues;
258
+ continue;
259
+ }
260
+ if (key === "enum") {
261
+ const enumValues = cleanGeminiEnumValues(value);
262
+ if (enumValues) cleaned.enum = enumValues;
263
+ continue;
264
+ }
265
+ if (key === "required" && Array.isArray(value) && value.length === 0) continue;
266
+ if (key === "type" && (hasAnyOf || hasOneOf)) continue;
267
+ if (key === "type" && Array.isArray(value) && value.every((entry) => typeof entry === "string")) {
268
+ const types = value.filter((entry) => entry !== "null");
269
+ cleaned.type = types.length === 1 ? types[0] : types;
270
+ continue;
271
+ }
272
+ if (key === "properties") {
273
+ if (value && typeof value === "object" && !Array.isArray(value)) {
274
+ const entries = Object.entries(value);
275
+ for (const entry of entries) entry[1] = yield cleanSchemaForGeminiWithDefs(entry[1], nextDefs, refStack, ancestors);
276
+ cleaned[key] = Object.fromEntries(entries);
277
+ } else cleaned[key] = {};
278
+ } else if (key === "items" && value) {
279
+ if (Array.isArray(value)) {
280
+ const result = [];
281
+ yield cleanSchemaArray(value, nextDefs, refStack, ancestors, result);
282
+ cleaned[key] = result;
283
+ } else if (typeof value === "object") cleaned[key] = yield cleanSchemaForGeminiWithDefs(value, nextDefs, refStack, ancestors);
284
+ else cleaned[key] = value;
285
+ } else if (key === "anyOf" && Array.isArray(value)) cleaned[key] = cleanedAnyOf;
286
+ else if (key === "oneOf" && Array.isArray(value)) cleaned[key] = cleanedOneOf;
287
+ else if (key === "allOf" && Array.isArray(value)) {
288
+ const result = [];
289
+ yield cleanSchemaArray(value, nextDefs, refStack, ancestors, result);
290
+ cleaned[key] = result;
291
+ } else cleaned[key] = value;
292
+ }
293
+ if (cleaned.anyOf && Array.isArray(cleaned.anyOf)) {
294
+ const flattened = flattenUnionFallback(cleaned, cleaned.anyOf);
295
+ if (flattened) return sanitizeRequiredFields(flattened);
296
+ }
297
+ if (cleaned.oneOf && Array.isArray(cleaned.oneOf)) {
298
+ const flattened = flattenUnionFallback(cleaned, cleaned.oneOf);
299
+ if (flattened) return sanitizeRequiredFields(flattened);
300
+ }
301
+ return sanitizeRequiredFields(cleaned);
302
+ } finally {
303
+ ancestors.delete(schema);
242
304
  }
243
- return sanitizeRequiredFields(cleaned);
244
305
  }
245
306
  /**
246
307
  * Last-resort flattening for anyOf/oneOf arrays that could not be simplified
@@ -272,7 +333,7 @@ function flattenUnionFallback(obj, variants) {
272
333
  return merged;
273
334
  }
274
335
  function cleanSchemaForGemini(schema) {
275
- return cleanSchemaForGeminiWithDefs(schema, void 0, void 0);
336
+ return evaluateSchemaWalk(cleanSchemaForGeminiWithDefs(schema, void 0, void 0, /* @__PURE__ */ new Set()));
276
337
  }
277
338
  //#endregion
278
339
  //#region packages/ai/src/providers/clean-for-llamacpp-gbnf.ts
@@ -393,29 +454,44 @@ const SCHEMA_ARRAY_KEYS$1 = /* @__PURE__ */ new Set([
393
454
  "oneOf",
394
455
  "prefixItems"
395
456
  ]);
396
- /** Recursively remove schema keywords unsupported by a target provider/tool surface. */
397
- function stripUnsupportedSchemaKeywords(schema, unsupportedKeywords) {
457
+ function* stripSchemaArray(schemas, unsupportedKeywords, ancestors, result) {
458
+ result.length = schemas.length;
459
+ for (let index = 0; index < result.length; index += 1) if (index in schemas) result[index] = yield stripSchemaKeywords(schemas[index], unsupportedKeywords, ancestors);
460
+ return result;
461
+ }
462
+ function* stripSchemaKeywords(schema, unsupportedKeywords, ancestors) {
398
463
  if (!schema || typeof schema !== "object") return schema;
399
- if (Array.isArray(schema)) return schema.map((entry) => stripUnsupportedSchemaKeywords(entry, unsupportedKeywords));
400
- const obj = schema;
401
- const cleaned = {};
402
- for (const [key, value] of Object.entries(obj)) {
403
- if (unsupportedKeywords.has(key)) continue;
404
- if (SCHEMA_MAP_KEYS$1.has(key) && value && typeof value === "object" && !Array.isArray(value)) {
405
- cleaned[key] = Object.fromEntries(Object.entries(value).map(([childKey, childValue]) => [childKey, stripUnsupportedSchemaKeywords(childValue, unsupportedKeywords)]));
406
- continue;
407
- }
408
- if (SCHEMA_ARRAY_KEYS$1.has(key) && Array.isArray(value)) {
409
- cleaned[key] = value.map((entry) => stripUnsupportedSchemaKeywords(entry, unsupportedKeywords));
410
- continue;
464
+ if (ancestors.has(schema)) throw new TypeError("Tool schema contains a circular reference.");
465
+ ancestors.add(schema);
466
+ try {
467
+ if (Array.isArray(schema)) {
468
+ const result = [];
469
+ yield stripSchemaArray(schema, unsupportedKeywords, ancestors, result);
470
+ return result;
411
471
  }
412
- if (SCHEMA_OBJECT_KEYS$1.has(key) && value && typeof value === "object") {
413
- cleaned[key] = stripUnsupportedSchemaKeywords(value, unsupportedKeywords);
414
- continue;
472
+ const obj = schema;
473
+ const cleaned = {};
474
+ for (const [key, value] of Object.entries(obj)) {
475
+ if (unsupportedKeywords.has(key)) continue;
476
+ if (SCHEMA_MAP_KEYS$1.has(key) && value && typeof value === "object" && !Array.isArray(value)) {
477
+ const entries = Object.entries(value);
478
+ for (const entry of entries) entry[1] = yield stripSchemaKeywords(entry[1], unsupportedKeywords, ancestors);
479
+ cleaned[key] = Object.fromEntries(entries);
480
+ } else if (SCHEMA_ARRAY_KEYS$1.has(key) && Array.isArray(value)) {
481
+ const result = [];
482
+ yield stripSchemaArray(value, unsupportedKeywords, ancestors, result);
483
+ cleaned[key] = result;
484
+ } else if (SCHEMA_OBJECT_KEYS$1.has(key) && value && typeof value === "object") cleaned[key] = yield stripSchemaKeywords(value, unsupportedKeywords, ancestors);
485
+ else cleaned[key] = value;
415
486
  }
416
- cleaned[key] = value;
487
+ return cleaned;
488
+ } finally {
489
+ ancestors.delete(schema);
417
490
  }
418
- return cleaned;
491
+ }
492
+ /** Remove schema keywords unsupported by a target provider/tool surface. */
493
+ function stripUnsupportedSchemaKeywords(schema, unsupportedKeywords) {
494
+ return evaluateSchemaWalk(stripSchemaKeywords(schema, unsupportedKeywords, /* @__PURE__ */ new Set()));
419
495
  }
420
496
  //#endregion
421
497
  //#region packages/ai/src/providers/tool-schema-normalization-cache.ts
@@ -1,15 +1,15 @@
1
1
  import { a as normalizeOptionalString, n as normalizeLowercaseStringOrEmpty } from "./string-coerce-fsri9iCu.mjs";
2
2
  import { o as isRecord, r as asOptionalObjectRecord } from "./record-coerce-DwRYMj3t.mjs";
3
- import { a as resolveOpenAIModelReasoningEfforts, d as MODEL_CATALOG_THINKING_LEVELS, i as normalizeOpenAIReasoningEffort, l as supportsOpenAIReasoningEffort, o as resolveOpenAIReasoningEffortForModel, p as resolveOpenAIThinkingApi, s as resolveOpenAIReasoningEffortMapping } from "./openai-reasoning-effort-NlFZmfEu.mjs";
4
- import { A as applyProviderReportedUsageCost, M as clampThinkingLevel, j as calculateCost, n as getAiTransportHost } from "./host-B4MeUNBc.mjs";
5
- import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-1wfaIszn.mjs";
6
- import { i as isCodeModeModelVisibleToolName } from "./transport-utils-1cyq5Y7x.mjs";
7
- import { i as resolveOpenAICompletionsCompat, o as usesNativeOpenAICodexResponsesBackend } from "./openai-completions-compat-CkwdxTZx.mjs";
8
- import { n as resolveModelRequestTimeoutMs, o as resolveProviderRequestPolicyConfig } from "./host-policy-DUnXSx0I.mjs";
3
+ import { a as normalizeOpenAIReasoningEffort, c as resolveOpenAIReasoningEffortMapping, f as MODEL_CATALOG_THINKING_LEVELS, m as resolveOpenAIThinkingApi, o as resolveOpenAIModelReasoningEfforts, s as resolveOpenAIReasoningEffortForModel, u as supportsOpenAIReasoningEffort } from "./openai-reasoning-effort-ash8dPrd.mjs";
4
+ import { A as headersToRecord, M as calculateCost, N as clampThinkingLevel, j as applyProviderReportedUsageCost, n as getAiTransportHost } from "./host-yTvBrYM2.mjs";
5
+ import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-CjV_2IRI.mjs";
6
+ import { i as isCodeModeModelVisibleToolName } from "./transport-utils-03Qi0CN2.mjs";
7
+ import { i as resolveOpenAICompletionsCompat, o as usesNativeOpenAICodexResponsesBackend } from "./openai-completions-compat-CUollwl6.mjs";
8
+ import { n as resolveModelRequestTimeoutMs, o as resolveProviderRequestPolicyConfig } from "./host-policy-DZO3oPPk.mjs";
9
9
  import { n as projectRuntimeToolInputSchema, t as prepareRuntimeToolInputSchema } from "./tool-schema-json-projection-CD9c_fK8.mjs";
10
- import { O as headersToRecord, p as notifyProviderHttpResponse, v as transportAbortError } from "./transport-stream-shared-D-6FQSHm.mjs";
10
+ import { p as notifyProviderHttpResponse, v as transportAbortError } from "./transport-stream-shared-B5RioB_Q.mjs";
11
11
  import { n as resolveOpencodeSessionHeaders } from "./session-affinity-Bcunsn4I.mjs";
12
- import { a as resolveOpenAIProjectedToolsStrictToolFlag, t as findOpenAIStrictToolProjectionDiagnostics } from "./openai-tool-schema-BO8rwyAD.mjs";
12
+ import { a as resolveOpenAIProjectedToolsStrictToolFlag, t as findOpenAIStrictToolProjectionDiagnostics } from "./openai-tool-schema-D4BMcj2D.mjs";
13
13
  import { i as OPENAI_RESPONSES_APIS } from "./openai-responses-contracts-DWrfMODE.mjs";
14
14
  import { hash } from "node:crypto";
15
15
  //#region packages/normalization-core/src/node-crypto.ts
@@ -370,7 +370,7 @@ function resolveOpenAIRequestReasoning(model, reasoning) {
370
370
  fallbackMap: { [requested]: intent }
371
371
  });
372
372
  return {
373
- effort: effort === "none" && resolveOpenAIThinkingApi(model.api) === "openai-chatgpt-responses" && !supportsOpenAIReasoningEffort({ compat: model.compat }, "none") ? void 0 : effort,
373
+ effort: effort === "none" && resolveOpenAIThinkingApi(model.api) === "openai-chatgpt-responses" && !supportsOpenAIReasoningEffort(model.id === "gpt-6-sol" || model.id === "gpt-6-luna" ? model : { compat: model.compat }, "none") ? void 0 : effort,
374
374
  thinkingEnabled: intent === void 0 ? void 0 : model.reasoning && normalizedIntent !== "off" && normalizedIntent !== "none"
375
375
  };
376
376
  }
@@ -1,4 +1,4 @@
1
- import { o as parseStrictPositiveInteger } from "./base64-BQOzsvUH.mjs";
1
+ import { o as parseStrictPositiveInteger } from "./base64-CPmadnUf.mjs";
2
2
  //#region packages/ai/src/transports/positive-integer.ts
3
3
  function parsePositiveInteger(value) {
4
4
  if (typeof value === "number" && Number.isFinite(value) && value > 0) return Math.floor(value);
@@ -2,7 +2,7 @@ import { o as normalizeStringifiedOptionalString } from "./string-coerce-fsri9iC
2
2
  import { i as asOptionalRecord } from "./record-coerce-DwRYMj3t.mjs";
3
3
  import { t as truncateUtf16Safe } from "./utf16-slice-CvGodqok.mjs";
4
4
  import { t as expectDefined } from "./expect-lbe3Hgrh.mjs";
5
- import { n as estimateBase64DecodedBytes } from "./base64-BQOzsvUH.mjs";
5
+ import { n as estimateBase64DecodedBytes } from "./base64-CPmadnUf.mjs";
6
6
  import { parseRetryAfterErrorSeconds, parseRetryAfterHeadersSeconds } from "./internal/retry-after.mjs";
7
7
  //#region packages/normalization-core/src/balanced-json.ts
8
8
  function isJsonOpeningDelimiter(char, openers) {
@@ -103,7 +103,7 @@ const preserveString = (value) => value;
103
103
  function stableStringify(value, normalizeString = preserveString) {
104
104
  return stringifyStableValue(value, /* @__PURE__ */ new WeakSet(), normalizeString);
105
105
  }
106
- function stringifyStableValue(value, stack, normalizeString) {
106
+ function stringifyStableValue(value, stack, normalizeString, write) {
107
107
  if (value === null || value === void 0) return String(value);
108
108
  if (typeof value === "number" && !Number.isFinite(value)) return JSON.stringify(String(value));
109
109
  if (typeof value === "bigint") return JSON.stringify(value.toString());
@@ -112,22 +112,33 @@ function stringifyStableValue(value, stack, normalizeString) {
112
112
  if (stack.has(value)) return JSON.stringify("[Circular]");
113
113
  stack.add(value);
114
114
  try {
115
- return stringifyObjectValue(value, stack, normalizeString);
115
+ return stringifyObjectValue(value, stack, normalizeString, write);
116
116
  } finally {
117
117
  stack.delete(value);
118
118
  }
119
119
  }
120
- function stringifyObjectValue(value, stack, normalizeString) {
120
+ function stringifyObjectValue(value, stack, normalizeString, write) {
121
121
  if (value instanceof Error) return stringifyStableValue({
122
122
  name: value.name,
123
123
  message: value.message,
124
124
  stack: value.stack
125
- }, stack, normalizeString);
125
+ }, stack, normalizeString, write);
126
126
  if (value instanceof Uint8Array) return stringifyStableValue({
127
127
  type: "Uint8Array",
128
128
  data: encodeBase64(value)
129
- }, stack, normalizeString);
129
+ }, stack, normalizeString, write);
130
130
  if (Array.isArray(value)) {
131
+ if (write) {
132
+ write("[");
133
+ let separator = "";
134
+ for (const entry of value) {
135
+ write(separator);
136
+ write(stringifyStableValue(entry, stack, normalizeString, write));
137
+ separator = ",";
138
+ }
139
+ write("]");
140
+ return "";
141
+ }
131
142
  const serializedEntries = [];
132
143
  for (const entry of value) serializedEntries.push(stringifyStableValue(entry, stack, normalizeString));
133
144
  return `[${serializedEntries.join(",")}]`;
@@ -135,6 +146,17 @@ function stringifyObjectValue(value, stack, normalizeString) {
135
146
  const record = value;
136
147
  if (normalizeString === preserveString) {
137
148
  const fields = Object.keys(record).sort();
149
+ if (write) {
150
+ write("{");
151
+ let separator = "";
152
+ for (const key of fields) {
153
+ write(`${separator}${JSON.stringify(key)}:`);
154
+ write(stringifyStableValue(record[key], stack, normalizeString, write));
155
+ separator = ",";
156
+ }
157
+ write("}");
158
+ return "";
159
+ }
138
160
  let fieldIndex = 0;
139
161
  for (const key of fields) fields[fieldIndex++] = `${JSON.stringify(key)}:${stringifyStableValue(record[key], stack, normalizeString)}`;
140
162
  return `{${fields.join(",")}}`;
@@ -146,6 +168,17 @@ function stringifyObjectValue(value, stack, normalizeString) {
146
168
  return compareStableStrings(left.normalizedKey, right.normalizedKey) || compareStableStrings(left.key, right.key);
147
169
  });
148
170
  const serializedFields = [];
171
+ if (write) {
172
+ write("{");
173
+ let separator = "";
174
+ for (const { key, normalizedKey } of entries) {
175
+ write(`${separator}${JSON.stringify(normalizedKey)}:`);
176
+ write(stringifyStableValue(record[key], stack, normalizeString, write));
177
+ separator = ",";
178
+ }
179
+ write("}");
180
+ return "";
181
+ }
149
182
  for (const { key, normalizedKey } of entries) serializedFields.push(`${JSON.stringify(normalizedKey)}:${stringifyStableValue(record[key], stack, normalizeString)}`);
150
183
  return `{${serializedFields.join(",")}}`;
151
184
  }
@@ -432,7 +465,7 @@ function buildProjection(snapshot, signal) {
432
465
  const originalMessage = (typeof snapshot === "string" ? snapshot : void 0) ?? readProviderErrorField(error, "message") ?? readProviderErrorField(nestedError, "message");
433
466
  const genericMessage = originalMessage === `${status} status code (no body)`;
434
467
  let errorMessage = status !== void 0 && body && (!originalMessage || genericMessage) ? `${status}: ${body}` : originalMessage ?? body ?? stringifyField(snapshot, MAX_ERROR_BODY_LENGTH) ?? "Unknown provider error";
435
- if (status !== void 0 && !body && originalMessage && !originalMessage.startsWith(String(status))) errorMessage = `${status}: ${errorMessage}`;
468
+ if (status !== void 0 && originalMessage && !originalMessage.startsWith(String(status))) errorMessage = `${status}: ${errorMessage}`;
436
469
  const rawMetadata = stringifyField(asOptionalRecord(nestedError?.metadata)?.raw, MAX_ERROR_BODY_LENGTH);
437
470
  if (rawMetadata && !errorMessage.includes(rawMetadata)) errorMessage += `\n${rawMetadata}`;
438
471
  const errorCode = readProviderErrorField(error, "errorCode") ?? readProviderErrorField(error, "code") ?? readProviderErrorField(nestedError, "code") ?? (error ? readCauseCode(error) : void 0) ?? (status === void 0 ? void 0 : String(status));
@@ -8,5 +8,7 @@ type ProviderErrorProjection = {
8
8
  };
9
9
  type ProviderErrorRedactor = (value: unknown) => unknown;
10
10
  declare function configureProviderErrorRedactor(redactor: ProviderErrorRedactor | undefined): ProviderErrorRedactor | undefined;
11
+ /** Projects one hostile provider throw into final, bounded assistant terminal fields. */
12
+ declare function projectProviderError(error: unknown, signal?: AbortSignal): ProviderErrorProjection;
11
13
  //#endregion
12
- export { ProviderErrorRedactor as n, configureProviderErrorRedactor as r, ProviderErrorProjection as t };
14
+ export { projectProviderError as i, ProviderErrorRedactor as n, configureProviderErrorRedactor as r, ProviderErrorProjection as t };
@@ -1,6 +1,6 @@
1
- import { Y as StreamOptions } from "./types-4_uVs5WH.mjs";
1
+ import { Y as StreamOptions } from "./types-qZFbaDbK.mjs";
2
2
  import { t as OpenAICompletionsToolChoice } from "./openai-tool-projection-793cE3QX.mjs";
3
- import "./types-DkJfb4W3.mjs";
3
+ import "./types-DTvddOfm.mjs";
4
4
  import Anthropic from "@anthropic-ai/sdk";
5
5
  //#region packages/ai/src/providers/openai-reasoning-effort.d.ts
6
6
  declare const ENABLED_REASONING_EFFORTS: readonly ["minimal", "low", "medium", "high", "xhigh", "max"];
@@ -20,6 +20,8 @@ declare function isOpenAIGpt54MiniModel(model: OpenAIReasoningModel): boolean;
20
20
  declare function isOpenAIGpt55Model(model: OpenAIReasoningModel): boolean;
21
21
  /** Return whether a model is the GPT-5.6 family. */
22
22
  declare function isOpenAIGpt56Model(model: OpenAIReasoningModel): boolean;
23
+ /** Return whether a model has a known GPT-6 reasoning and sampling contract. */
24
+ declare function isOpenAIGpt6Model(model: OpenAIReasoningModel): boolean;
23
25
  /** Normalize user-facing reasoning effort names to API effort names. */
24
26
  declare function normalizeOpenAIReasoningEffort(effort: string): string;
25
27
  /** Resolve the reasoning efforts accepted by a specific OpenAI-compatible model. */
@@ -27,7 +29,7 @@ declare function resolveOpenAISupportedReasoningEfforts(model: OpenAIReasoningMo
27
29
  /** Read a declared or known model contract, leaving unknown compatible models unspecified. */
28
30
  declare function resolveOpenAIModelReasoningEfforts(model: OpenAIReasoningModel): readonly OpenAIApiReasoningEffort[] | undefined;
29
31
  /**
30
- * Return whether a model accepts temperature. GPT-5.6 and GPT-6 Astra
32
+ * Return whether a model accepts temperature. GPT-5.6 and known GPT-6 models
31
33
  * reject it with a 400; catalog compat can override per model.
32
34
  */
33
35
  declare function supportsOpenAITemperature(model: OpenAIReasoningModel): boolean;
@@ -146,4 +148,4 @@ type OpenAICompletionsOptions = BaseOpenAIStreamOptions & {
146
148
  reasoningEffort?: OpenAIReasoningEffort | "off";
147
149
  };
148
150
  //#endregion
149
- export { supportsOpenAITemperature as S, resolveOpenAIModelReasoningEfforts as _, BaseOpenAIStreamOptions as a, resolveOpenAISupportedReasoningEfforts as b, OpenAIResponsesCompactionRejection as c, OpenAIApiReasoningEffort as d, OpenAIReasoningEffort as f, normalizeOpenAIReasoningEffort as g, isOpenAIGpt56Model as h, AnthropicThinkingDisplay as i, codeModeToolSurfaceObserver as l, isOpenAIGpt55Model as m, AnthropicEffort as n, CodeModeToolSurfaceObservation as o, isOpenAIGpt54MiniModel as p, AnthropicOptions as r, OpenAICompletionsOptions as s, AnthropicContextManagementOptions as t, reasoningTagTextPolicy as u, resolveOpenAIReasoningEffortForModel as v, supportsOpenAIReasoningEffort as x, resolveOpenAIReasoningEffortMapping as y };
151
+ export { supportsOpenAITemperature as C, supportsOpenAIReasoningEffort as S, normalizeOpenAIReasoningEffort as _, BaseOpenAIStreamOptions as a, resolveOpenAIReasoningEffortMapping as b, OpenAIResponsesCompactionRejection as c, OpenAIApiReasoningEffort as d, OpenAIReasoningEffort as f, isOpenAIGpt6Model as g, isOpenAIGpt56Model as h, AnthropicThinkingDisplay as i, codeModeToolSurfaceObserver as l, isOpenAIGpt55Model as m, AnthropicEffort as n, CodeModeToolSurfaceObservation as o, isOpenAIGpt54MiniModel as p, AnthropicOptions as r, OpenAICompletionsOptions as s, AnthropicContextManagementOptions as t, reasoningTagTextPolicy as u, resolveOpenAIModelReasoningEfforts as v, resolveOpenAISupportedReasoningEfforts as x, resolveOpenAIReasoningEffortForModel as y };
@@ -1,4 +1,4 @@
1
- import { k as shortHash } from "./transport-stream-shared-D-6FQSHm.mjs";
1
+ import { O as shortHash } from "./transport-stream-shared-B5RioB_Q.mjs";
2
2
  //#region packages/ai/src/transports/provider-replay-context.ts
3
3
  function hashReplayContextValue(value) {
4
4
  const normalized = value?.trim();
@@ -1,4 +1,4 @@
1
- import { i as transformMessages } from "./host-B4MeUNBc.mjs";
1
+ import { i as transformMessages } from "./host-yTvBrYM2.mjs";
2
2
  //#region packages/ai/src/provider-transcript-transform.ts
3
3
  const IMAGE_OMISSION = "(image omitted: model does not support images)";
4
4
  const VIDEO_OMISSION = "(video omitted: provider does not support video input)";
@@ -1,4 +1,4 @@
1
- import { n as getAiTransportHost } from "./host-B4MeUNBc.mjs";
1
+ import { n as getAiTransportHost } from "./host-yTvBrYM2.mjs";
2
2
  import { n as resolveOpencodeSessionHeaders, t as hasOpencodeSessionHeader } from "./session-affinity-Bcunsn4I.mjs";
3
3
  import { randomUUID } from "node:crypto";
4
4
  //#region packages/ai/src/transports/provider-transport-turn-state.ts
@@ -1,6 +1,6 @@
1
- import { t as index_d_exports } from "./index-DaF2QbwS.mjs";
2
- import { O as Model, X as TextContent, Y as StreamOptions, a as AssistantMessage, d as Context, f as ImageContent, it as ToolResultMessage, n as Api, s as AssistantMessageEventStreamContract, st as UserMessage } from "./types-4_uVs5WH.mjs";
3
- import "./types-DkJfb4W3.mjs";
1
+ import { t as index_d_exports } from "./index-C25RT6bP.mjs";
2
+ import { O as Model, X as TextContent, Y as StreamOptions, a as AssistantMessage, d as Context, f as ImageContent, it as ToolResultMessage, n as Api, s as AssistantMessageEventStreamContract, st as UserMessage } from "./types-qZFbaDbK.mjs";
3
+ import "./types-DTvddOfm.mjs";
4
4
  //#region packages/ai/src/provider-types.d.ts
5
5
  declare const PROVIDER_CONTEXT_HANDOFF: unique symbol;
6
6
  type VideoContent = Omit<ImageContent, "type"> & {
@@ -1,6 +1,6 @@
1
- import { _ as supportsClaude1MContext, a as CLAUDE_FABLE_5_THINKING_PROFILE, b as supportsClaudeNativeMaxEffort, c as bindsClaudeThinkingPrefix, d as resolveClaudeFable5ModelIdentity, f as resolveClaudeModelIdentity, g as resolveClaudeSonnet5ModelIdentity, h as resolveClaudeOpus5ModelIdentity, i as normalizeResolvedPricing, l as requiresClaudeDefaultSampling, m as resolveClaudeNativeThinkingLevelMap, n as calculateUsageCost, o as CLAUDE_OPUS_5_THINKING_PROFILE, p as resolveClaudeMythos5ModelIdentity, r as normalizeModelCostConfig, s as CLAUDE_SONNET_5_THINKING_PROFILE, u as requiresClaudeMandatoryAdaptiveThinking, v as supportsClaudeAdaptiveThinking, x as supportsClaudeNativeXhighEffort, y as supportsClaudeFastMode } from "./index-DaF2QbwS.mjs";
2
- import { $ as ThinkingContent, A as ModelCostRates, B as ProviderReplayState, C as KnownImagesApi, E as MaybePromise, F as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, G as SimpleStreamOptions, I as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, K as StopReason, L as PricingTier, M as OpenAICompletionsCompat, N as OpenAIResponsesCompat, P as OpenRouterRouting, Q as ThinkingBudgets, R as Provider, S as KnownApi, T as MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, U as RawModelCostConfig, V as ProviderResponse, W as RawPricingTier, X as TextContent, Y as StreamOptions, Z as TextSignatureV1, _ as ImagesModel, a as AssistantMessage, at as Transport, b as ImagesProvider, c as AssistantMessageEventStreamLike, ct as ValidateToolArgumentsFn, dt as DiagnosticErrorInfo, et as ThinkingLevel, f as ImageContent, ft as appendAssistantMessageDiagnostic, g as ImagesInputContent, gt as isProviderRefusalAssistantError, h as ImagesFunction, ht as formatThrownValue, i as AssistantImages, it as ToolResultMessage, j as ModelThinkingLevel, k as ModelCostConfig, l as CacheRetention, lt as VercelGatewayRouting, m as ImagesContext, mt as extractDiagnosticError, n as Api, nt as Tool, o as AssistantMessageEvent, ot as Usage, p as ImagesApi, pt as createAssistantMessageDiagnostic, q as StreamFn, r as AssistantDeliveryTtsFacts, rt as ToolCall, s as AssistantMessageEventStreamContract, st as UserMessage, t as AnthropicMessagesCompat, tt as ThinkingLevelMap, u as CompleteSimpleFn, ut as AssistantMessageDiagnostic, v as ImagesOptions, w as KnownImagesProvider, x as ImagesStopReason, y as ImagesOutputContent, z as ProviderImagesOptions } from "./types-4_uVs5WH.mjs";
3
- import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-CCoa-qSI.mjs";
4
- import { n as validateToolCall, t as validateToolArguments } from "./validation-Ctzu2DhF.mjs";
5
- import { a as ProviderContextHandoff, c as ProviderStreamFunction, d as VideoContent, f as resolveProviderContext, i as ProviderContext, l as ProviderStreamOptions, n as ModelInputContent, o as ProviderMessage, r as PROVIDER_CONTEXT_HANDOFF, s as ProviderModel, t as MediaContent, u as ProviderUserMessage } from "./provider-types-CAKRC7N5.mjs";
6
- export { type AnthropicMessagesCompat, type Api, type AssistantDeliveryTtsFacts, type AssistantImages, type AssistantMessage, type AssistantMessageDiagnostic, type AssistantMessageEvent, type AssistantMessageEventStream, type AssistantMessageEventStreamContract, type AssistantMessageEventStreamLike, type CLAUDE_FABLE_5_THINKING_PROFILE, type CLAUDE_OPUS_5_THINKING_PROFILE, type CLAUDE_SONNET_5_THINKING_PROFILE, type CacheRetention, type CompleteSimpleFn, type ProviderContext as Context, ProviderContext, type DiagnosticErrorInfo, type EventStream, type ImageContent, type ImagesApi, type ImagesContext, type ImagesFunction, type ImagesInputContent, type ImagesModel, type ImagesOptions, type ImagesOutputContent, type ImagesProvider, type ImagesStopReason, type KnownApi, type KnownImagesApi, type KnownImagesProvider, type MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, type MaybePromise, MediaContent, type ProviderMessage as Message, ProviderMessage, type ProviderModel as Model, ProviderModel, type ModelCostConfig, type ModelCostRates, ModelInputContent, type ModelThinkingLevel, type OpenAICompletionsCompat, type OpenAIResponsesCompat, type OpenRouterRouting, PROVIDER_CONTEXT_HANDOFF, type PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, type PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, type PricingTier, type Provider, ProviderContextHandoff, type ProviderImagesOptions, type ProviderReplayState, type ProviderResponse, ProviderStreamFunction, type ProviderStreamFunction as StreamFunction, ProviderStreamOptions, ProviderUserMessage, type RawModelCostConfig, type RawPricingTier, type SimpleStreamOptions, type StopReason, type StreamFn, type StreamOptions, type TextContent, type TextSignatureV1, type ThinkingBudgets, type ThinkingContent, type ThinkingLevel, type ThinkingLevelMap, type Tool, type ToolCall, type ToolResultMessage, type Transport, type Usage, type UserMessage, type ValidateToolArgumentsFn, type VercelGatewayRouting, VideoContent, type appendAssistantMessageDiagnostic, type bindsClaudeThinkingPrefix, type calculateUsageCost, type createAssistantMessageDiagnostic, type createAssistantMessageEventStream, type extractDiagnosticError, type formatThrownValue, type isProviderRefusalAssistantError, type normalizeModelCostConfig, type normalizeResolvedPricing, type requiresClaudeDefaultSampling, type requiresClaudeMandatoryAdaptiveThinking, type resolveClaudeFable5ModelIdentity, type resolveClaudeModelIdentity, type resolveClaudeMythos5ModelIdentity, type resolveClaudeNativeThinkingLevelMap, type resolveClaudeOpus5ModelIdentity, type resolveClaudeSonnet5ModelIdentity, resolveProviderContext, type supportsClaude1MContext, type supportsClaudeAdaptiveThinking, type supportsClaudeFastMode, type supportsClaudeNativeMaxEffort, type supportsClaudeNativeXhighEffort, type validateToolArguments, type validateToolCall };
1
+ import { C as supportsClaudeFastMode, S as supportsClaudeAdaptiveThinking, T as supportsClaudeNativeXhighEffort, _ as resolveClaudeNativeThinkingLevelMap, a as ProviderRefusalReview, b as resolveClaudeSonnet5ModelIdentity, c as CLAUDE_OPUS_55_THINKING_PROFILE, d as bindsClaudeThinkingPrefix, f as requiresClaudeDefaultSampling, g as resolveClaudeMythos5ModelIdentity, h as resolveClaudeModelIdentity, i as normalizeResolvedPricing, l as CLAUDE_OPUS_5_THINKING_PROFILE, m as resolveClaudeFable5ModelIdentity, n as calculateUsageCost, o as readProviderRefusalReview, p as requiresClaudeMandatoryAdaptiveThinking, r as normalizeModelCostConfig, s as CLAUDE_FABLE_5_THINKING_PROFILE, u as CLAUDE_SONNET_5_THINKING_PROFILE, v as resolveClaudeOpus55ModelIdentity, w as supportsClaudeNativeMaxEffort, x as supportsClaude1MContext, y as resolveClaudeOpus5ModelIdentity } from "./index-C25RT6bP.mjs";
2
+ import { $ as ThinkingContent, A as ModelCostRates, B as ProviderReplayState, C as KnownImagesApi, E as MaybePromise, F as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, G as SimpleStreamOptions, I as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, K as StopReason, L as PricingTier, M as OpenAICompletionsCompat, N as OpenAIResponsesCompat, P as OpenRouterRouting, Q as ThinkingBudgets, R as Provider, S as KnownApi, T as MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, U as RawModelCostConfig, V as ProviderResponse, W as RawPricingTier, X as TextContent, Y as StreamOptions, Z as TextSignatureV1, _ as ImagesModel, a as AssistantMessage, at as Transport, b as ImagesProvider, c as AssistantMessageEventStreamLike, ct as ValidateToolArgumentsFn, dt as DiagnosticErrorInfo, et as ThinkingLevel, f as ImageContent, ft as appendAssistantMessageDiagnostic, g as ImagesInputContent, gt as isProviderRefusalAssistantError, h as ImagesFunction, ht as formatThrownValue, i as AssistantImages, it as ToolResultMessage, j as ModelThinkingLevel, k as ModelCostConfig, l as CacheRetention, lt as VercelGatewayRouting, m as ImagesContext, mt as extractDiagnosticError, n as Api, nt as Tool, o as AssistantMessageEvent, ot as Usage, p as ImagesApi, pt as createAssistantMessageDiagnostic, q as StreamFn, r as AssistantDeliveryTtsFacts, rt as ToolCall, s as AssistantMessageEventStreamContract, st as UserMessage, t as AnthropicMessagesCompat, tt as ThinkingLevelMap, u as CompleteSimpleFn, ut as AssistantMessageDiagnostic, v as ImagesOptions, w as KnownImagesProvider, x as ImagesStopReason, y as ImagesOutputContent, z as ProviderImagesOptions } from "./types-qZFbaDbK.mjs";
3
+ import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-CjnIZZst.mjs";
4
+ import { n as validateToolCall, t as validateToolArguments } from "./validation-DhQhmt6t.mjs";
5
+ import { a as ProviderContextHandoff, c as ProviderStreamFunction, d as VideoContent, f as resolveProviderContext, i as ProviderContext, l as ProviderStreamOptions, n as ModelInputContent, o as ProviderMessage, r as PROVIDER_CONTEXT_HANDOFF, s as ProviderModel, t as MediaContent, u as ProviderUserMessage } from "./provider-types-w1rEqrGP.mjs";
6
+ export { type AnthropicMessagesCompat, type Api, type AssistantDeliveryTtsFacts, type AssistantImages, type AssistantMessage, type AssistantMessageDiagnostic, type AssistantMessageEvent, type AssistantMessageEventStream, type AssistantMessageEventStreamContract, type AssistantMessageEventStreamLike, type CLAUDE_FABLE_5_THINKING_PROFILE, type CLAUDE_OPUS_55_THINKING_PROFILE, type CLAUDE_OPUS_5_THINKING_PROFILE, type CLAUDE_SONNET_5_THINKING_PROFILE, type CacheRetention, type CompleteSimpleFn, type ProviderContext as Context, ProviderContext, type DiagnosticErrorInfo, type EventStream, type ImageContent, type ImagesApi, type ImagesContext, type ImagesFunction, type ImagesInputContent, type ImagesModel, type ImagesOptions, type ImagesOutputContent, type ImagesProvider, type ImagesStopReason, type KnownApi, type KnownImagesApi, type KnownImagesProvider, type MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, type MaybePromise, MediaContent, type ProviderMessage as Message, ProviderMessage, type ProviderModel as Model, ProviderModel, type ModelCostConfig, type ModelCostRates, ModelInputContent, type ModelThinkingLevel, type OpenAICompletionsCompat, type OpenAIResponsesCompat, type OpenRouterRouting, PROVIDER_CONTEXT_HANDOFF, type PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, type PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, type PricingTier, type Provider, ProviderContextHandoff, type ProviderImagesOptions, type ProviderRefusalReview, type ProviderReplayState, type ProviderResponse, ProviderStreamFunction, type ProviderStreamFunction as StreamFunction, ProviderStreamOptions, ProviderUserMessage, type RawModelCostConfig, type RawPricingTier, type SimpleStreamOptions, type StopReason, type StreamFn, type StreamOptions, type TextContent, type TextSignatureV1, type ThinkingBudgets, type ThinkingContent, type ThinkingLevel, type ThinkingLevelMap, type Tool, type ToolCall, type ToolResultMessage, type Transport, type Usage, type UserMessage, type ValidateToolArgumentsFn, type VercelGatewayRouting, VideoContent, type appendAssistantMessageDiagnostic, type bindsClaudeThinkingPrefix, type calculateUsageCost, type createAssistantMessageDiagnostic, type createAssistantMessageEventStream, type extractDiagnosticError, type formatThrownValue, type isProviderRefusalAssistantError, type normalizeModelCostConfig, type normalizeResolvedPricing, type readProviderRefusalReview, type requiresClaudeDefaultSampling, type requiresClaudeMandatoryAdaptiveThinking, type resolveClaudeFable5ModelIdentity, type resolveClaudeModelIdentity, type resolveClaudeMythos5ModelIdentity, type resolveClaudeNativeThinkingLevelMap, type resolveClaudeOpus55ModelIdentity, type resolveClaudeOpus5ModelIdentity, type resolveClaudeSonnet5ModelIdentity, resolveProviderContext, type supportsClaude1MContext, type supportsClaudeAdaptiveThinking, type supportsClaudeFastMode, type supportsClaudeNativeMaxEffort, type supportsClaudeNativeXhighEffort, type validateToolArguments, type validateToolCall };
@@ -1,5 +1,5 @@
1
- import { n as ApiRegistry } from "./api-registry-Ba2Cv-ut.mjs";
2
- import { n as clampOpenAIPromptCacheKey, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "./openai-prompt-cache-CJ_xEevu.mjs";
1
+ import { n as ApiRegistry } from "./api-registry-C2T3lTV7.mjs";
2
+ import { n as clampOpenAIPromptCacheKey, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "./openai-prompt-cache-C4RHdN4n.mjs";
3
3
  //#region packages/ai/src/providers/register-builtins.d.ts
4
4
  /** Source id used for built-in API provider registrations. */
5
5
  export declare const BUILT_IN_API_PROVIDER_SOURCE_ID = "core:built-in";