@openclaw/ai 2026.9.5 → 2026.9.7

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 (102) hide show
  1. package/dist/{anthropic-COtDvgtt.mjs → anthropic-Cw2pgccz.mjs} +59 -88
  2. package/dist/{anthropic-payload-policy-5Erq1Nzy.d.mts → anthropic-payload-policy-NIPVYXPq.d.mts} +8 -6
  3. package/dist/{anthropic-stream-reducer-BvdYYWL8.mjs → anthropic-stream-reducer-D9MCkl8Z.mjs} +194 -247
  4. package/dist/{api-registry-Ba2Cv-ut.d.mts → api-registry-D-nbmSqr.d.mts} +2 -2
  5. package/dist/{azure-openai-responses-YrgnD583.mjs → azure-openai-responses-BwT3-X8P.mjs} +22 -33
  6. package/dist/{base64-BQOzsvUH.mjs → base64-C1PsYcRQ.mjs} +22 -16
  7. package/dist/{diagnostics-Dm4bisWG.mjs → diagnostics-CJaB6g8J.mjs} +55 -10
  8. package/dist/{diagnostics-CPeq9F7y.mjs → diagnostics-DzrF1h4J.mjs} +18 -1
  9. package/dist/diagnostics.d.mts +11 -5
  10. package/dist/diagnostics.mjs +4 -4
  11. package/dist/{env-api-keys-bktO00EJ.mjs → env-api-keys-CyX4VKGO.mjs} +7 -5
  12. package/dist/event-stream-CMQfX_yr.d.mts +1 -0
  13. package/dist/{event-stream-CCoa-qSI.d.mts → event-stream-DOPFYVqs.d.mts} +2 -2
  14. package/dist/{event-stream-D8PARQfL.mjs → event-stream-vd9UnCAU.mjs} +10 -0
  15. package/dist/event-stream.d.mts +2 -2
  16. package/dist/event-stream.mjs +1 -1
  17. package/dist/{google-BuhpRO9r.mjs → google-BfapkS_K.mjs} +8 -11
  18. package/dist/google-interactions-DW3iXzjc.mjs +574 -0
  19. package/dist/{google-messages-CyWnYlh0.mjs → google-messages-CtjVtVot.mjs} +35 -71
  20. package/dist/{google-shared-BT5ZeNer.mjs → google-shared-Y2YfotEu.mjs} +43 -47
  21. package/dist/{google-vertex-C7EplRvt.mjs → google-vertex-Dov4kBWu.mjs} +16 -30
  22. package/dist/{host-B4MeUNBc.mjs → host-CHi3X87F.mjs} +64 -189
  23. package/dist/{host-policy-DUnXSx0I.mjs → host-policy-BOAwRg_M.mjs} +2 -14
  24. package/dist/{host-FZ1RA_qD.d.mts → host-rxlNaBwm.d.mts} +9 -3
  25. package/dist/{index-DaF2QbwS.d.mts → index-D6KsSE74.d.mts} +57 -9
  26. package/dist/index.d.mts +7 -7
  27. package/dist/index.mjs +7 -7
  28. package/dist/internal/anthropic.d.mts +13 -8
  29. package/dist/internal/anthropic.mjs +5 -5
  30. package/dist/internal/openai-completions-compat.d.mts +1 -1
  31. package/dist/internal/openai-completions-compat.mjs +1 -1
  32. package/dist/internal/openai-responses-payload-policy.d.mts +1 -1
  33. package/dist/internal/openai-responses-payload-policy.mjs +2 -2
  34. package/dist/internal/openai.d.mts +46 -9
  35. package/dist/internal/openai.mjs +13 -12
  36. package/dist/internal/runtime.d.mts +31 -70
  37. package/dist/internal/runtime.mjs +11 -66
  38. package/dist/internal/shared.d.mts +16 -13
  39. package/dist/internal/shared.mjs +6 -5
  40. package/dist/internal/tool-schema.d.mts +2 -2
  41. package/dist/internal/tool-schema.mjs +2 -2
  42. package/dist/{mistral-moA-mbwl.mjs → mistral-RS6mboC-.mjs} +46 -93
  43. package/dist/{model-transport-url-DKocrEsb.d.mts → model-transport-url-C5f59L3Y.d.mts} +1 -1
  44. package/dist/{openai-chatgpt-responses-DWID3EFO.mjs → openai-chatgpt-responses-CYbidtrn.mjs} +118 -99
  45. package/dist/{openai-completions-DJ1Vm-CD.mjs → openai-completions-D14ihPYk.mjs} +14 -12
  46. package/dist/{openai-completions-compat-CkwdxTZx.mjs → openai-completions-compat-BOVWBZDn.mjs} +3 -5
  47. package/dist/{openai-completions-compat-JE7gqxb9.d.mts → openai-completions-compat-qJjmqQ71.d.mts} +3 -3
  48. package/dist/{openai-completions-stream-Bu98b0Hv.mjs → openai-completions-stream-CDCuw3DP.mjs} +124 -183
  49. package/dist/{openai-prompt-cache-CJ_xEevu.d.mts → openai-prompt-cache-CouErLh7.d.mts} +2 -2
  50. package/dist/{openai-prompt-cache-1wfaIszn.mjs → openai-prompt-cache-D2V7MqR7.mjs} +1 -1
  51. package/dist/{openai-provider-client-DPo0Hmak.mjs → openai-provider-client-CwfsGBbA.mjs} +2 -2
  52. package/dist/{openai-reasoning-effort-NlFZmfEu.mjs → openai-reasoning-effort-ConhwkeX.mjs} +14 -5
  53. package/dist/{openai-responses-BejZzQCP.mjs → openai-responses-CKCBEc2W.mjs} +12 -11
  54. package/dist/openai-responses-compaction-replay-DiYn-gFM.d.mts +12 -0
  55. package/dist/{openai-responses-compaction-window-D6P5oZP5.mjs → openai-responses-compaction-window-UNK1GDpy.mjs} +5 -5
  56. package/dist/{openai-responses-contracts-DWrfMODE.mjs → openai-responses-contracts-CLxnqS9p.mjs} +1 -1
  57. package/dist/{openai-responses-contracts-Dflvrfa8.d.mts → openai-responses-contracts-D1iZ0njF.d.mts} +4 -4
  58. package/dist/{openai-responses-prompt-observer-internal-C15_-OwV.mjs → openai-responses-prompt-observer-internal-iAqLb4tk.mjs} +16 -13
  59. package/dist/openai-responses-request-lifecycle-Fsag-IGZ.mjs +36 -0
  60. package/dist/{openai-responses-shared-CwsziD_m.mjs → openai-responses-shared-DL4ulQn7.mjs} +838 -577
  61. package/dist/{openai-responses-terminal-usage-Dl3J6zrf.d.mts → openai-responses-terminal-usage-BE7lf7nW.d.mts} +2 -2
  62. package/dist/{openai-stop-reason-Drnn_6Qj.mjs → openai-stop-reason-8s70vDXj.mjs} +2 -12
  63. package/dist/{openai-tool-schema-ynZBgqW-.d.mts → openai-tool-schema-a5ysBBga.d.mts} +0 -6
  64. package/dist/{openai-tool-schema-BO8rwyAD.mjs → openai-tool-schema-vsl-cE-n.mjs} +365 -429
  65. package/dist/{openai-transport-params-DQeuAvBl.mjs → openai-transport-params-BwlpzX-2.mjs} +61 -106
  66. package/dist/{positive-integer-DtjCkbue.mjs → positive-integer-CjN5OJbH.mjs} +1 -1
  67. package/dist/{provider-error-DDqw9Qda.mjs → provider-error-CwT_j2v0.mjs} +82 -10
  68. package/dist/{provider-error-CzNw4BWX.d.mts → provider-error-xumb1V3F.d.mts} +3 -1
  69. package/dist/{provider-options-DprLsWh9.d.mts → provider-options-Df7ov0K1.d.mts} +6 -4
  70. package/dist/{provider-replay-context-CnUSOwhr.mjs → provider-replay-context-DsyI5jOP.mjs} +1 -1
  71. package/dist/{provider-transcript-transform-BsRAhuWJ.mjs → provider-transcript-transform-JbFbHV8h.mjs} +17 -2
  72. package/dist/{provider-transport-turn-state-CkGToCD2.mjs → provider-transport-turn-state-BheUi_hl.mjs} +1 -1
  73. package/dist/{provider-types-CAKRC7N5.d.mts → provider-types-d4XnoZMd.d.mts} +3 -3
  74. package/dist/provider-types.d.mts +6 -6
  75. package/dist/providers.d.mts +2 -2
  76. package/dist/providers.mjs +15 -11
  77. package/dist/{reasoning-tag-text-partitioner-Dy9IO8Dc.mjs → reasoning-tag-text-partitioner-B6FIIBt6.mjs} +193 -98
  78. package/dist/{record-coerce-DwRYMj3t.mjs → record-coerce-CNDovvft.mjs} +1 -1
  79. package/dist/simple-options-CGAkCwtM.mjs +349 -0
  80. package/dist/{src-DeKjbE8I.mjs → src-H4aXcFuX.mjs} +53 -26
  81. package/dist/{stream-CREqxHgU.mjs → stream-DDsCBgd-.mjs} +1 -7
  82. package/dist/{stream-first-event-timeout-C9ZadkJW.mjs → stream-first-event-timeout-B9o0S4SZ.mjs} +1 -1
  83. package/dist/{tool-schema-json-projection-CD9c_fK8.mjs → tool-schema-json-projection-Ct8SeBeJ.mjs} +63 -23
  84. package/dist/{transport-stream-shared-D-6FQSHm.mjs → transport-stream-shared-Dh5qKJ8e.mjs} +63 -37
  85. package/dist/{transport-stream-shared-BbUkFaHi.d.mts → transport-stream-shared-yYhXa4kX.d.mts} +13 -7
  86. package/dist/{transport-utils-1cyq5Y7x.mjs → transport-utils-C-4bf2Ok.mjs} +3 -4
  87. package/dist/transports.d.mts +37 -33
  88. package/dist/transports.mjs +208 -239
  89. package/dist/types-CB-_vNyI.d.mts +1 -0
  90. package/dist/{types-4_uVs5WH.d.mts → types-CLLR3eB4.d.mts} +5 -1
  91. package/dist/types.d.mts +6 -6
  92. package/dist/types.mjs +5 -5
  93. package/dist/{validation-Dw7cb6BV.mjs → validation-BFZc40Ig.mjs} +80 -54
  94. package/dist/{validation-Ctzu2DhF.d.mts → validation-Cat2wQsc.d.mts} +1 -1
  95. package/dist/validation.d.mts +1 -1
  96. package/dist/validation.mjs +1 -1
  97. package/package.json +6 -6
  98. package/dist/assistant-output-BsEkB-vU.mjs +0 -16
  99. package/dist/event-stream-DmSCpi1T.d.mts +0 -1
  100. package/dist/simple-options-C6cFWj_f.mjs +0 -175
  101. package/dist/types-DkJfb4W3.d.mts +0 -1
  102. package/dist/utf16-slice-CvGodqok.mjs +0 -29
@@ -1,8 +1,17 @@
1
- import { b as supportsClaudeNativeXhighEffort, c as requiresClaudeDefaultSampling, f as resolveClaudeMythos5ModelIdentity, h as resolveClaudeSonnet5ModelIdentity, i as CLAUDE_FABLE_5_THINKING_PROFILE, l as requiresClaudeMandatoryAdaptiveThinking, m as resolveClaudeOpus5ModelIdentity, p as resolveClaudeNativeThinkingLevelMap, t as calculateUsageCost, u as resolveClaudeFable5ModelIdentity, y as supportsClaudeNativeMaxEffort } from "./src-DeKjbE8I.mjs";
1
+ import { T as supportsClaudeNativeXhighEffort, _ as resolveClaudeOpus55ModelIdentity, a as CLAUDE_OPUS_55_THINKING_PROFILE, b as resolveClaudeSonnet5ModelIdentity, d as requiresClaudeDefaultSampling, f as requiresClaudeMandatoryAdaptiveThinking, g as resolveClaudeNativeThinkingLevelMap, h as resolveClaudeMythos5ModelIdentity, i as CLAUDE_FABLE_5_THINKING_PROFILE, p as resolveClaudeFable5ModelIdentity, s as CLAUDE_SONNET_55_THINKING_PROFILE, t as calculateUsageCost, v as resolveClaudeOpus5ModelIdentity, w as supportsClaudeNativeMaxEffort, y as resolveClaudeSonnet55ModelIdentity } from "./src-H4aXcFuX.mjs";
2
+ import { i as asOptionalRecord, o as isRecord } from "./record-coerce-CNDovvft.mjs";
2
3
  import { n as normalizeLowercaseStringOrEmpty } from "./string-coerce-fsri9iCu.mjs";
3
- import { i as asOptionalRecord, o as isRecord } from "./record-coerce-DwRYMj3t.mjs";
4
- import { a as resolveOpenAIModelReasoningEfforts, d as MODEL_CATALOG_THINKING_LEVELS, f as listMappedModelThinkingLevels, p as resolveOpenAIThinkingApi } from "./openai-reasoning-effort-NlFZmfEu.mjs";
5
- import { t as truncateUtf16Safe } from "./utf16-slice-CvGodqok.mjs";
4
+ import { f as MODEL_CATALOG_THINKING_LEVELS, m as resolveOpenAIThinkingApi, o as resolveOpenAIModelReasoningEfforts, p as listMappedModelThinkingLevels } from "./openai-reasoning-effort-ConhwkeX.mjs";
5
+ //#region packages/ai/src/media-payload.ts
6
+ /** Media metadata alone is not an attachment; provider emitters need inline bytes. */
7
+ function hasMediaPayload(block) {
8
+ return isRecord(block) && typeof block.data === "string" && block.data.trim().length > 0;
9
+ }
10
+ /** Image metadata alone is not an attachment; provider emitters need inline bytes. */
11
+ function isImageWithMediaPayload(block) {
12
+ return isRecord(block) && block.type === "image" && hasMediaPayload(block);
13
+ }
14
+ //#endregion
6
15
  //#region packages/ai/src/model-utils.ts
7
16
  /** Calculates and stores model cost fields from token usage and per-million pricing. */
8
17
  function calculateCost(model, usage) {
@@ -50,9 +59,41 @@ function modelsAreEqual(a, b) {
50
59
  return a.id === b.id && a.provider === b.provider;
51
60
  }
52
61
  //#endregion
62
+ //#region packages/ai/src/utils/headers.ts
63
+ /** Converts a Headers object to a plain record for provider request handling. */
64
+ function headersToRecord(headers) {
65
+ const result = {};
66
+ for (const [key, value] of headers.entries()) result[key] = value;
67
+ return result;
68
+ }
69
+ //#endregion
53
70
  //#region packages/ai/src/providers/anthropic-model-contract.ts
54
- const ANTHROPIC_CLAUDE_CODE_VERSION = "2.1.75";
55
- const ANTHROPIC_CLAUDE_CODE_BILLING_SYSTEM_BLOCK = `x-anthropic-billing-header: cc_version=${ANTHROPIC_CLAUDE_CODE_VERSION}; cc_entrypoint=sdk-cli;`;
71
+ const ANTHROPIC_CLAUDE_CODE_VERSION = "2.1.280";
72
+ /** Build OAuth headers and the matching billing identity from one request snapshot. */
73
+ function buildAnthropicClaudeCodeIdentity(betaHeader, ...headerSources) {
74
+ const headers = new Headers({
75
+ accept: "application/json",
76
+ "anthropic-dangerous-direct-browser-access": "true",
77
+ ...betaHeader ? { "anthropic-beta": betaHeader } : {},
78
+ "x-app": "cli"
79
+ });
80
+ for (const source of headerSources) for (const [name, value] of Object.entries(source ?? {})) headers.set(name, value);
81
+ let version = ANTHROPIC_CLAUDE_CODE_VERSION;
82
+ const candidate = headers.get("user-agent")?.match(/^claude-cli\/(\d+\.\d+\.\d+)$/)?.[1];
83
+ if (candidate) {
84
+ const components = candidate.split(".").map(Number);
85
+ const minimum = version.split(".").map(Number);
86
+ const differing = components.findIndex((component, index) => component !== minimum[index]);
87
+ const component = components[differing];
88
+ const minimumComponent = minimum[differing];
89
+ if (components.every(Number.isSafeInteger) && component !== void 0 && minimumComponent !== void 0 && component > minimumComponent) version = candidate;
90
+ }
91
+ headers.set("user-agent", `claude-cli/${version}`);
92
+ return {
93
+ headers: headersToRecord(headers),
94
+ version
95
+ };
96
+ }
56
97
  function normalizeModelId(modelId) {
57
98
  const normalized = normalizeLowercaseStringOrEmpty(modelId);
58
99
  return (normalized.startsWith("anthropic/") ? normalized.slice(10) : normalized).replace(/[._\s]+/g, "-");
@@ -83,7 +124,7 @@ function defaultsClaudeAdaptiveThinking(model) {
83
124
  }
84
125
  /** Resolve provider-native effort once for direct and managed Claude requests. */
85
126
  function resolveAnthropicThinkingEffort(model, level) {
86
- const requestedLevel = level ?? (resolveClaudeFable5ModelIdentity(model) ? CLAUDE_FABLE_5_THINKING_PROFILE.defaultLevel : void 0);
127
+ const requestedLevel = level ?? (resolveClaudeOpus55ModelIdentity(model) ? CLAUDE_OPUS_55_THINKING_PROFILE.defaultLevel : resolveClaudeSonnet55ModelIdentity(model) ? CLAUDE_SONNET_55_THINKING_PROFILE.defaultLevel : resolveClaudeFable5ModelIdentity(model) ? CLAUDE_FABLE_5_THINKING_PROFILE.defaultLevel : void 0);
87
128
  const thinkingLevelMap = resolveClaudeNativeThinkingLevelMap(model);
88
129
  const clampModel = {
89
130
  ...model,
@@ -110,7 +151,8 @@ function mapAnthropicStopReason(reason) {
110
151
  case "pause_turn":
111
152
  case "compaction":
112
153
  case "stop_sequence": return "stop";
113
- case "max_tokens": return "length";
154
+ case "max_tokens":
155
+ case "model_context_window_exceeded": return "length";
114
156
  case "tool_use": return "toolUse";
115
157
  case "refusal":
116
158
  case "sensitive": return "error";
@@ -156,15 +198,20 @@ function resolveReplayModelBoundIdentity(ref) {
156
198
  const sonnetIdentity = resolveClaudeSonnet5ModelIdentity(modelRef);
157
199
  return sonnetIdentity ? `sonnet:${sonnetIdentity}` : void 0;
158
200
  }
201
+ const FABLE_51_REPLAY_IDENTITY = /^fable:claude-fable-5-1(?=$|[^a-z0-9])/;
202
+ const SONNET_55_REPLAY_IDENTITY = /^sonnet:claude-sonnet-5-5(?=$|[^a-z0-9])/;
159
203
  /**
160
- * Fable 5.1 reads thinking from every earlier Claude generation (verified live:
161
- * Opus 5, Sonnet 5, Opus 4.8 replay with no drops), while the API silently
162
- * drops anything it cannot read. Moving onto it therefore keeps prior reasoning;
163
- * every other cross-identity move, including unregistered Mythos targets, is
164
- * still dropped here until its replay contract is proven separately.
204
+ * Verified live (2026-09-28): Fable 5.1 reads every earlier Claude generation
205
+ * except Sonnet 5.5; Sonnet 5.5 reads Sonnet 5 and pre-Claude-5 thinking but
206
+ * not Opus 5, Fable, or Mythos; no other model reads Sonnet 5.5 thinking. The
207
+ * API drops what a target cannot read, and every other cross-identity move
208
+ * stays dropped here until its replay contract is proven separately.
165
209
  */
166
- function readsPriorClaudeThinking(targetIdentity) {
167
- return targetIdentity !== void 0 && /^fable:claude-fable-5-1(?=$|[^a-z0-9])/.test(targetIdentity);
210
+ function readsPriorClaudeThinking(targetIdentity, sourceIdentity) {
211
+ if (targetIdentity === void 0) return false;
212
+ if (FABLE_51_REPLAY_IDENTITY.test(targetIdentity)) return sourceIdentity === void 0 || !SONNET_55_REPLAY_IDENTITY.test(sourceIdentity);
213
+ if (SONNET_55_REPLAY_IDENTITY.test(targetIdentity)) return sourceIdentity === void 0 || sourceIdentity.startsWith("sonnet:");
214
+ return false;
168
215
  }
169
216
  function isClaudeReplaySource(ref) {
170
217
  const modelId = hasConcreteResponseModel(ref) ? ref.responseModelId : ref.modelId;
@@ -177,183 +224,11 @@ function resolveModelBoundThinkingReplayMode(params) {
177
224
  const targetIdentity = resolveReplayModelBoundIdentity(params.target);
178
225
  const sameRoute = normalizeLowercaseStringOrEmpty(params.source.provider) === normalizeLowercaseStringOrEmpty(params.target.provider) && sourceApi === targetApi && normalizeModelId(params.source.modelId) === normalizeModelId(params.target.modelId);
179
226
  if (!sourceIdentity && !targetIdentity) return "default";
180
- if (sourceApi === targetApi && readsPriorClaudeThinking(targetIdentity) && isClaudeReplaySource(params.source)) return "preserve";
227
+ if (sourceApi === targetApi && readsPriorClaudeThinking(targetIdentity, sourceIdentity) && isClaudeReplaySource(params.source)) return "preserve";
181
228
  if (!sourceIdentity && !hasConcreteResponseModel(params.source) && targetIdentity && sameRoute) return "preserve";
182
229
  return sourceApi === targetApi && sourceIdentity === targetIdentity ? "preserve" : "drop";
183
230
  }
184
231
  //#endregion
185
- //#region packages/ai/src/utils/sanitize-unicode.ts
186
- /**
187
- * Removes unpaired Unicode surrogate characters from a string.
188
- *
189
- * Unpaired surrogates (high surrogates 0xD800-0xDBFF without matching low surrogates 0xDC00-0xDFFF,
190
- * or vice versa) cause JSON serialization errors in many API providers.
191
- *
192
- * Valid emoji and other characters outside the Basic Multilingual Plane use properly paired
193
- * surrogates and will NOT be affected by this function.
194
- *
195
- * @param text - The text to sanitize
196
- * @returns The sanitized text with unpaired surrogates removed
197
- *
198
- * @example
199
- * // Valid emoji (properly paired surrogates) are preserved
200
- * sanitizeSurrogates("Hello 🙈 World") // => "Hello 🙈 World"
201
- *
202
- * // Unpaired high surrogate is removed
203
- * const unpaired = String.fromCharCode(0xD83D); // high surrogate without low
204
- * sanitizeSurrogates(`Text ${unpaired} here`) // => "Text here"
205
- */
206
- function sanitizeSurrogates(text) {
207
- return text.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g, "");
208
- }
209
- //#endregion
210
- //#region packages/ai/src/providers/tool-result-text.ts
211
- const STRUCTURED_TOOL_RESULT_MAX_CHARS = 8e3;
212
- const IMAGE_TOOL_RESULT_TYPES = /* @__PURE__ */ new Set([
213
- "image",
214
- "image_url",
215
- "input_image"
216
- ]);
217
- const AUDIO_TOOL_RESULT_TYPES = /* @__PURE__ */ new Set([
218
- "audio",
219
- "input_audio",
220
- "output_audio"
221
- ]);
222
- const MEDIA_ONLY_TOOL_RESULT_TYPES = /* @__PURE__ */ new Set([...IMAGE_TOOL_RESULT_TYPES, ...AUDIO_TOOL_RESULT_TYPES]);
223
- const INLINE_DATA_URI_PATTERN = /(^|[^A-Za-z0-9_])data:([a-z][a-z0-9.+-]*\/[a-z0-9.+-]+(?:;[a-z0-9.+-]+=[^,;"'\s]+|;base64)*,[^\s"'<>)]+)/gi;
224
- const MIME_KEY_CANDIDATES = [
225
- "mimeType",
226
- "mime_type",
227
- "mediaType",
228
- "media_type",
229
- "contentType",
230
- "content_type"
231
- ];
232
- const TEXTUAL_MIME_PATTERN = /^(?:text\/|application\/(?:json|ld\+json|x-ndjson|xml|javascript|x-www-form-urlencoded)|[^/]+\/[^+]+\+(?:json|xml)$)/i;
233
- const OPAQUE_OR_BINARY_FIELD_RE = /^(?:blob|buffer|bytes|encrypted_content|encrypted_stdout)$/i;
234
- function readMimeType(value) {
235
- if (!isRecord(value)) return;
236
- for (const key of MIME_KEY_CANDIDATES) {
237
- const mimeType = value[key];
238
- if (typeof mimeType === "string" && mimeType.trim().length > 0) return mimeType;
239
- }
240
- }
241
- function isBinaryMimeType(mimeType) {
242
- const normalized = mimeType.split(";", 1)[0]?.trim().toLowerCase();
243
- return normalized ? !TEXTUAL_MIME_PATTERN.test(normalized) : false;
244
- }
245
- function describeOmittedValue(value, label) {
246
- const length = typeof value === "string" ? value.length : JSON.stringify(value)?.length;
247
- return length ? `[${label} omitted: ${length} chars]` : `[${label} omitted]`;
248
- }
249
- function redactInlineDataUris(value) {
250
- return value.replace(INLINE_DATA_URI_PATTERN, (_match, prefix, uri) => `${prefix}[inline data URI: ${uri.length} chars]`);
251
- }
252
- function stringifyStructuredBlock(block) {
253
- const seen = /* @__PURE__ */ new WeakSet();
254
- try {
255
- const host = getAiTransportHost();
256
- const redactedBlock = host.redactModelVisibleSecrets({ structuredToolResult: block }).structuredToolResult;
257
- const serialized = JSON.stringify(redactedBlock, function structuredToolResultReplacer(key, value) {
258
- if (OPAQUE_OR_BINARY_FIELD_RE.test(key)) return `[omitted ${key}]`;
259
- if (key === "data") {
260
- const mimeType = readMimeType(this);
261
- if (mimeType && isBinaryMimeType(mimeType)) return describeOmittedValue(value, "binary data");
262
- }
263
- if (typeof value === "bigint") return value.toString();
264
- if (typeof value === "string") return redactInlineDataUris(host.redactModelVisibleSecrets(value));
265
- if (typeof value === "function" || typeof value === "symbol" || value === void 0) return;
266
- if (!value || typeof value !== "object") return value;
267
- if (seen.has(value)) return "[Circular]";
268
- seen.add(value);
269
- return value;
270
- });
271
- if (!serialized || serialized === "{}") return;
272
- return serialized;
273
- } catch {
274
- return;
275
- }
276
- }
277
- function truncateStructuredToolText(text) {
278
- if (text.length <= STRUCTURED_TOOL_RESULT_MAX_CHARS) return text;
279
- return `${truncateUtf16Safe(text, STRUCTURED_TOOL_RESULT_MAX_CHARS)}\n…(truncated)…`;
280
- }
281
- /** Media metadata alone is not an attachment; provider emitters need inline bytes. */
282
- function hasMediaPayload(block) {
283
- return isRecord(block) && typeof block.data === "string" && block.data.trim().length > 0;
284
- }
285
- /** Image metadata alone is not an attachment; provider emitters need inline bytes. */
286
- function isImageWithMediaPayload(block) {
287
- return isRecord(block) && block.type === "image" && hasMediaPayload(block);
288
- }
289
- function classifyToolResultMedia(blocks) {
290
- let hasImage = false;
291
- let hasAudio = false;
292
- for (const block of blocks) {
293
- if (!hasMediaPayload(block) || block.type === "text") continue;
294
- const type = typeof block.type === "string" ? block.type : void 0;
295
- const mimeType = readMimeType(block)?.toLowerCase();
296
- hasImage ||= Boolean(type && IMAGE_TOOL_RESULT_TYPES.has(type) || mimeType?.startsWith("image/"));
297
- hasAudio ||= Boolean(type && AUDIO_TOOL_RESULT_TYPES.has(type) || mimeType?.startsWith("audio/"));
298
- }
299
- return {
300
- hasImage,
301
- hasAudio
302
- };
303
- }
304
- function describeToolResultMediaPlaceholder(blocks) {
305
- const { hasImage, hasAudio } = classifyToolResultMedia(blocks);
306
- if (hasImage && hasAudio) return "(see attached media)";
307
- if (hasAudio) return "(see attached audio)";
308
- return hasImage ? "(see attached image)" : void 0;
309
- }
310
- function extractToolResultBlockText(block) {
311
- if (!block || typeof block !== "object") return;
312
- const record = block;
313
- if (typeof record.type === "string" && MEDIA_ONLY_TOOL_RESULT_TYPES.has(record.type)) return;
314
- if (record.type === "text") {
315
- const text = typeof record.text === "string" ? record.text : "";
316
- return text ? sanitizeSurrogates(text) : void 0;
317
- }
318
- const structured = stringifyStructuredBlock(record);
319
- return structured ? sanitizeSurrogates(truncateStructuredToolText(structured)) : void 0;
320
- }
321
- function extractToolResultText(blocks, options) {
322
- const explicitTexts = [];
323
- const structuredBlocks = [];
324
- for (const block of blocks) {
325
- if (!block || typeof block !== "object") continue;
326
- if (block.type === "text") {
327
- const text = extractToolResultBlockText(block);
328
- if (text) explicitTexts.push(text);
329
- } else structuredBlocks.push(block);
330
- }
331
- if (explicitTexts.length > 0 && !options?.includeStructured) return explicitTexts.join("\n");
332
- const structuredTexts = [];
333
- for (const block of structuredBlocks) {
334
- const text = extractToolResultBlockText(block);
335
- if (text) structuredTexts.push(text);
336
- }
337
- if (explicitTexts.length > 0) {
338
- if (structuredTexts.length > 0) explicitTexts.push(truncateStructuredToolText(structuredTexts.join("\n")));
339
- return explicitTexts.join("\n");
340
- }
341
- return truncateStructuredToolText(structuredTexts.join("\n"));
342
- }
343
- /** Describe media that cannot be represented on the target provider wire. */
344
- function describeUnsupportedToolResultMedia(blocks, support) {
345
- const { hasImage, hasAudio } = classifyToolResultMedia(blocks);
346
- const omittedImage = hasImage && !support.images;
347
- const omittedAudio = hasAudio && !support.audio;
348
- if (omittedImage && omittedAudio) return "[unsupported tool-result media omitted]";
349
- if (omittedAudio) return "[unsupported tool-result audio omitted]";
350
- return omittedImage ? "[unsupported tool-result image omitted]" : void 0;
351
- }
352
- function formatToolResultText(params) {
353
- const body = params.text.trim() ? `${params.text}${params.omittedMediaPlaceholder ? `\n${params.omittedMediaPlaceholder}` : ""}` : params.omittedMediaPlaceholder ?? params.mediaPlaceholder ?? "(no tool output)";
354
- return `${params.isError ? "[tool error] " : ""}${body}`;
355
- }
356
- //#endregion
357
232
  //#region packages/ai/src/replay-turn-classification.ts
358
233
  /** Returns true when an assistant turn contains only provider reasoning and blank text. */
359
234
  function hasOnlyAssistantReasoningContent(message) {
@@ -653,4 +528,4 @@ function resolveAiTransportHeaderSentinels(headers) {
653
528
  return resolvedHeaders ?? headers;
654
529
  }
655
530
  //#endregion
656
- export { applyProviderReportedUsageCost as A, mapAnthropicStopReason as C, resolveModelBoundThinkingReplayMode as D, resolveAnthropicThinkingEffort as E, clampThinkingLevel as M, getSupportedThinkingLevels as N, usesClaudeFable5MessagesContract as O, modelsAreEqual as P, defaultsClaudeAdaptiveThinking as S, requiresClaudeAdaptiveThinking as T, isImageWithMediaPayload as _, FAILED_ASSISTANT_REPLAY_TEXT as a, ANTHROPIC_CLAUDE_CODE_VERSION as b, isReasoningOnlyLengthAssistantTurn as c, describeToolResultMediaPlaceholder as d, describeUnsupportedToolResultMedia as f, hasMediaPayload as g, formatToolResultText as h, transformMessages as i, calculateCost as j, usesClaudeStreamingRefusalContract as k, isStreamErrorFallbackContent as l, extractToolResultText as m, getAiTransportHost as n, STREAM_ERROR_FALLBACK_TEXT as o, extractToolResultBlockText as p, resolveAiTransportHeaderSentinels as r, hasOnlyAssistantReasoningContent as s, configureAiTransportHost as t, resolveFailedAssistantReplay as u, sanitizeSurrogates as v, prepareClaudeNoPrefillRequestContext as w, applyClaudeRequestContract as x, ANTHROPIC_CLAUDE_CODE_BILLING_SYSTEM_BLOCK as y };
531
+ export { applyProviderReportedUsageCost as C, modelsAreEqual as D, getSupportedThinkingLevels as E, hasMediaPayload as O, headersToRecord as S, clampThinkingLevel as T, requiresClaudeAdaptiveThinking as _, FAILED_ASSISTANT_REPLAY_TEXT as a, usesClaudeFable5MessagesContract as b, isReasoningOnlyLengthAssistantTurn as c, ANTHROPIC_CLAUDE_CODE_VERSION as d, applyClaudeRequestContract as f, prepareClaudeNoPrefillRequestContext as g, mapAnthropicStopReason as h, transformMessages as i, isImageWithMediaPayload as k, isStreamErrorFallbackContent as l, defaultsClaudeAdaptiveThinking as m, getAiTransportHost as n, STREAM_ERROR_FALLBACK_TEXT as o, buildAnthropicClaudeCodeIdentity as p, resolveAiTransportHeaderSentinels as r, hasOnlyAssistantReasoningContent as s, configureAiTransportHost as t, resolveFailedAssistantReplay as u, resolveAnthropicThinkingEffort as v, calculateCost as w, usesClaudeStreamingRefusalContract as x, resolveModelBoundThinkingReplayMode as y };
@@ -1,4 +1,4 @@
1
- import { n as getAiTransportHost } from "./host-B4MeUNBc.mjs";
1
+ import { n as getAiTransportHost } from "./host-CHi3X87F.mjs";
2
2
  //#region packages/ai/src/transports/host-policy.ts
3
3
  function buildGuardedModelFetch(model, timeoutMs, options) {
4
4
  const host = getAiTransportHost();
@@ -18,20 +18,8 @@ function resolveProviderRequestCapabilities(input, model) {
18
18
  model
19
19
  });
20
20
  }
21
- function resolveProviderRequestPolicyConfig(model, input) {
22
- return { headers: getAiTransportHost().resolveProviderRequestHeaders({
23
- ...input,
24
- model
25
- }) };
26
- }
27
21
  function resolveModelRequestTimeoutMs(model, timeoutMs) {
28
22
  return timeoutMs ?? getAiTransportHost().resolveModelRequestTimeoutMs(model);
29
23
  }
30
- function resolveOpenAIStrictToolSetting(model, options) {
31
- return getAiTransportHost().resolveOpenAIStrictToolSetting(model, options);
32
- }
33
- function transformTransportMessages(messages, model, normalizeToolCallId, options) {
34
- return getAiTransportHost().transformTransportMessages(messages, model, normalizeToolCallId, options);
35
- }
36
24
  //#endregion
37
- export { resolveProviderRequestCapabilities as a, resolveProviderEndpoint as i, resolveModelRequestTimeoutMs as n, resolveProviderRequestPolicyConfig as o, resolveOpenAIStrictToolSetting as r, transformTransportMessages as s, buildGuardedModelFetch as t };
25
+ export { resolveProviderRequestCapabilities as i, resolveModelRequestTimeoutMs as n, resolveProviderEndpoint as r, buildGuardedModelFetch as t };
@@ -1,6 +1,6 @@
1
- import "./index-DaF2QbwS.mjs";
2
- import { O as Model, d as Context, n as Api, q as StreamFn } from "./types-4_uVs5WH.mjs";
3
- import { n as ApiRegistry } from "./api-registry-Ba2Cv-ut.mjs";
1
+ import "./index-D6KsSE74.mjs";
2
+ import { O as Model, d as Context, n as Api, q as StreamFn } from "./types-CLLR3eB4.mjs";
3
+ import { n as ApiRegistry } from "./api-registry-D-nbmSqr.mjs";
4
4
  //#region packages/ai/src/host.d.ts
5
5
  /** Provider capability facts needed by the package-owned transports. */
6
6
  interface AiProviderRequestCapabilities {
@@ -25,8 +25,14 @@ interface AiProviderRequestPolicyInput {
25
25
  /** Context shared by plugin-owned provider stream hooks. */
26
26
  interface AiProviderStreamHookContext {
27
27
  config?: unknown;
28
+ agentId?: string;
28
29
  agentDir?: string;
29
30
  workspaceDir?: string;
31
+ /** Selected credential facts supplied by the host; never credential material. */
32
+ auth?: {
33
+ mode: string;
34
+ authFlow?: string;
35
+ };
30
36
  provider: string;
31
37
  modelId: string;
32
38
  model: Model;
@@ -1,6 +1,6 @@
1
- import { $ as ThinkingContent, A as ModelCostRates, B as ProviderReplayState, C as KnownImagesApi, D as Message, E as MaybePromise, F as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, G as SimpleStreamOptions, H as ProviderStreamOptions, I as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, J as StreamFunction, K as StopReason, L as PricingTier, M as OpenAICompletionsCompat, N as OpenAIResponsesCompat, O as Model, 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, d as Context, 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";
2
- import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-CCoa-qSI.mjs";
3
- import { n as validateToolCall, t as validateToolArguments } from "./validation-Ctzu2DhF.mjs";
1
+ import { $ as ThinkingContent, A as ModelCostRates, B as ProviderReplayState, C as KnownImagesApi, D as Message, E as MaybePromise, F as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, G as SimpleStreamOptions, H as ProviderStreamOptions, I as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, J as StreamFunction, K as StopReason, L as PricingTier, M as OpenAICompletionsCompat, N as OpenAIResponsesCompat, O as Model, 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, d as Context, 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-CLLR3eB4.mjs";
2
+ import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-DOPFYVqs.mjs";
3
+ import { n as validateToolCall, t as validateToolArguments } from "./validation-Cat2wQsc.mjs";
4
4
  //#region packages/llm-core/src/model-contracts/anthropic.d.ts
5
5
  type ClaudeModelRef = {
6
6
  id?: string;
@@ -64,6 +64,37 @@ declare const CLAUDE_OPUS_5_THINKING_PROFILE: {
64
64
  }];
65
65
  readonly defaultLevel: "high";
66
66
  };
67
+ declare const CLAUDE_OPUS_55_THINKING_PROFILE: {
68
+ readonly levels: readonly [{
69
+ readonly id: "low";
70
+ }, {
71
+ readonly id: "medium";
72
+ }, {
73
+ readonly id: "high";
74
+ }, {
75
+ readonly id: "xhigh";
76
+ }, {
77
+ readonly id: "max";
78
+ }];
79
+ readonly defaultLevel: "medium";
80
+ readonly preserveWhenCatalogReasoningFalse: true;
81
+ };
82
+ declare const CLAUDE_SONNET_55_THINKING_PROFILE: {
83
+ readonly levels: readonly [{
84
+ readonly id: "off";
85
+ }, {
86
+ readonly id: "low";
87
+ }, {
88
+ readonly id: "medium";
89
+ }, {
90
+ readonly id: "high";
91
+ }, {
92
+ readonly id: "xhigh";
93
+ }, {
94
+ readonly id: "max";
95
+ }];
96
+ readonly defaultLevel: "high";
97
+ };
67
98
  /** Resolve the canonical normalized Claude model id for one runtime model ref. */
68
99
  declare function resolveClaudeModelIdentity(ref: ClaudeModelRef): string;
69
100
  /** Resolve Claude Fable 5 through direct ids, cloud ids, or deployment metadata. */
@@ -71,17 +102,22 @@ declare function resolveClaudeFable5ModelIdentity(ref: ClaudeModelRef): string |
71
102
  /** Resolve Claude Mythos 5 through direct ids, cloud ids, or deployment metadata. */
72
103
  declare function resolveClaudeMythos5ModelIdentity(ref: ClaudeModelRef): string | undefined;
73
104
  /**
74
- * Anthropic binds thinking to the conversation prefix starting with Fable 5.1 and
75
- * plans to enforce it on later models. Extend only with live replay proof for the
76
- * new model (Mythos 5.1 is unregistered here and unproven).
105
+ * Opus 5.5, Sonnet 5.5, and Fable 5.1 require append-only runtime context.
106
+ * Extend only with live replay proof (Mythos 5.1 remains unproven).
77
107
  */
78
108
  declare function bindsClaudeThinkingPrefix(ref: ClaudeModelRef): boolean;
79
109
  /** Return whether a Claude model requires adaptive thinking instead of manual budgets. */
80
110
  declare function requiresClaudeMandatoryAdaptiveThinking(ref: ClaudeModelRef): boolean;
81
- /** Resolve Claude Sonnet 5 through direct ids, cloud ids, or deployment metadata. */
111
+ /** Resolve Claude Sonnet 5 through aliases, direct ids, cloud ids, or deployment metadata. */
82
112
  declare function resolveClaudeSonnet5ModelIdentity(ref: ClaudeModelRef): string | undefined;
113
+ /** Resolve the Sonnet 5.5 contract without matching other Sonnet 5 generations. */
114
+ declare function resolveClaudeSonnet55ModelIdentity(ref: ClaudeModelRef): string | undefined;
115
+ /** Sonnet 5.5 replaces disabled thinking with between-tool progress updates. */
116
+ declare function requiresClaudeBetweenToolsThinking(ref: ClaudeModelRef): boolean;
83
117
  /** Resolve Claude Opus 5 through aliases, direct ids, cloud ids, or deployment metadata. */
84
118
  declare function resolveClaudeOpus5ModelIdentity(ref: ClaudeModelRef): string | undefined;
119
+ /** Resolve the Opus 5.5 contract without matching other Opus 5 generations. */
120
+ declare function resolveClaudeOpus55ModelIdentity(ref: ClaudeModelRef): string | undefined;
85
121
  /** Return whether a Claude model supports adaptive thinking. */
86
122
  declare function supportsClaudeAdaptiveThinking(ref: ClaudeModelRef): boolean;
87
123
  /** Return whether a Claude model has a native 1M-token context window. */
@@ -100,13 +136,25 @@ declare function requiresClaudeDefaultSampling(ref: ClaudeModelRef): boolean;
100
136
  */
101
137
  declare function resolveClaudeNativeThinkingLevelMap(ref: ClaudeEffortModelRef): Record<string, string | null | undefined> | undefined;
102
138
  //#endregion
139
+ //#region packages/llm-core/src/utils/provider-refusal.d.ts
140
+ /** Provider-authored findings; continuation is offered only after explicit user review. */
141
+ type ProviderRefusalReview = {
142
+ explanation: string;
143
+ continuation?: {
144
+ message: string;
145
+ };
146
+ errorType?: string;
147
+ };
148
+ /** Keep exact provider text. Truncation must never make an invalid continuation usable. */
149
+ declare function readProviderRefusalReview(value: unknown): ProviderRefusalReview | undefined;
150
+ //#endregion
103
151
  //#region packages/llm-core/src/usage-cost.d.ts
104
152
  declare function normalizeModelCostConfig(cost: RawModelCostConfig): ModelCostConfig;
105
153
  declare function normalizeResolvedPricing(cost: Partial<RawModelCostConfig>): ModelCostConfig;
106
154
  /** Price one model call, selecting its tier before billing the separate token buckets. */
107
155
  declare function calculateUsageCost(usage: Partial<Pick<Usage, "input" | "output" | "cacheRead" | "cacheWrite" | "cacheWrite1h">>, pricing: RawModelCostConfig): Usage["cost"];
108
156
  declare namespace index_d_exports {
109
- export { AnthropicMessagesCompat, Api, AssistantDeliveryTtsFacts, AssistantImages, AssistantMessage, AssistantMessageDiagnostic, AssistantMessageEvent, AssistantMessageEventStream, AssistantMessageEventStreamContract, AssistantMessageEventStreamLike, CLAUDE_FABLE_5_THINKING_PROFILE, CLAUDE_OPUS_5_THINKING_PROFILE, CLAUDE_SONNET_5_THINKING_PROFILE, CacheRetention, CompleteSimpleFn, Context, DiagnosticErrorInfo, EventStream, ImageContent, ImagesApi, ImagesContext, ImagesFunction, ImagesInputContent, ImagesModel, ImagesOptions, ImagesOutputContent, ImagesProvider, ImagesStopReason, KnownApi, KnownImagesApi, KnownImagesProvider, MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, MaybePromise, Message, Model, ModelCostConfig, ModelCostRates, ModelThinkingLevel, OpenAICompletionsCompat, OpenAIResponsesCompat, OpenRouterRouting, PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, PricingTier, Provider, ProviderImagesOptions, ProviderReplayState, ProviderResponse, ProviderStreamOptions, RawModelCostConfig, RawPricingTier, SimpleStreamOptions, StopReason, StreamFn, StreamFunction, StreamOptions, TextContent, TextSignatureV1, ThinkingBudgets, ThinkingContent, ThinkingLevel, ThinkingLevelMap, Tool, ToolCall, ToolResultMessage, Transport, Usage, UserMessage, ValidateToolArgumentsFn, VercelGatewayRouting, appendAssistantMessageDiagnostic, bindsClaudeThinkingPrefix, calculateUsageCost, createAssistantMessageDiagnostic, createAssistantMessageEventStream, extractDiagnosticError, formatThrownValue, isProviderRefusalAssistantError, normalizeModelCostConfig, normalizeResolvedPricing, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaude1MContext, supportsClaudeAdaptiveThinking, supportsClaudeFastMode, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
157
+ export { AnthropicMessagesCompat, Api, AssistantDeliveryTtsFacts, AssistantImages, AssistantMessage, AssistantMessageDiagnostic, AssistantMessageEvent, AssistantMessageEventStream, AssistantMessageEventStreamContract, AssistantMessageEventStreamLike, CLAUDE_FABLE_5_THINKING_PROFILE, CLAUDE_OPUS_55_THINKING_PROFILE, CLAUDE_OPUS_5_THINKING_PROFILE, CLAUDE_SONNET_55_THINKING_PROFILE, CLAUDE_SONNET_5_THINKING_PROFILE, CacheRetention, CompleteSimpleFn, Context, DiagnosticErrorInfo, EventStream, ImageContent, ImagesApi, ImagesContext, ImagesFunction, ImagesInputContent, ImagesModel, ImagesOptions, ImagesOutputContent, ImagesProvider, ImagesStopReason, KnownApi, KnownImagesApi, KnownImagesProvider, MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, MaybePromise, Message, Model, ModelCostConfig, ModelCostRates, ModelThinkingLevel, OpenAICompletionsCompat, OpenAIResponsesCompat, OpenRouterRouting, PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, PricingTier, Provider, ProviderImagesOptions, ProviderRefusalReview, ProviderReplayState, ProviderResponse, ProviderStreamOptions, RawModelCostConfig, RawPricingTier, SimpleStreamOptions, StopReason, StreamFn, StreamFunction, StreamOptions, TextContent, TextSignatureV1, ThinkingBudgets, ThinkingContent, ThinkingLevel, ThinkingLevelMap, Tool, ToolCall, ToolResultMessage, Transport, Usage, UserMessage, ValidateToolArgumentsFn, VercelGatewayRouting, appendAssistantMessageDiagnostic, bindsClaudeThinkingPrefix, calculateUsageCost, createAssistantMessageDiagnostic, createAssistantMessageEventStream, extractDiagnosticError, formatThrownValue, isProviderRefusalAssistantError, normalizeModelCostConfig, normalizeResolvedPricing, readProviderRefusalReview, requiresClaudeBetweenToolsThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus55ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet55ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaude1MContext, supportsClaudeAdaptiveThinking, supportsClaudeFastMode, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
110
158
  }
111
159
  //#endregion
112
- export { supportsClaude1MContext as _, CLAUDE_FABLE_5_THINKING_PROFILE as a, supportsClaudeNativeMaxEffort as b, bindsClaudeThinkingPrefix as c, resolveClaudeFable5ModelIdentity as d, resolveClaudeModelIdentity as f, resolveClaudeSonnet5ModelIdentity as g, resolveClaudeOpus5ModelIdentity as h, normalizeResolvedPricing as i, requiresClaudeDefaultSampling as l, resolveClaudeNativeThinkingLevelMap as m, calculateUsageCost as n, CLAUDE_OPUS_5_THINKING_PROFILE as o, resolveClaudeMythos5ModelIdentity as p, normalizeModelCostConfig as r, CLAUDE_SONNET_5_THINKING_PROFILE as s, index_d_exports as t, requiresClaudeMandatoryAdaptiveThinking as u, supportsClaudeAdaptiveThinking as v, supportsClaudeNativeXhighEffort as x, supportsClaudeFastMode as y };
160
+ export { resolveClaudeSonnet5ModelIdentity as C, supportsClaudeNativeMaxEffort as D, supportsClaudeFastMode as E, supportsClaudeNativeXhighEffort as O, resolveClaudeSonnet55ModelIdentity as S, supportsClaudeAdaptiveThinking as T, resolveClaudeModelIdentity as _, ProviderRefusalReview as a, resolveClaudeOpus55ModelIdentity as b, CLAUDE_OPUS_55_THINKING_PROFILE as c, CLAUDE_SONNET_5_THINKING_PROFILE as d, bindsClaudeThinkingPrefix as f, resolveClaudeFable5ModelIdentity as g, requiresClaudeMandatoryAdaptiveThinking as h, normalizeResolvedPricing as i, CLAUDE_OPUS_5_THINKING_PROFILE as l, requiresClaudeDefaultSampling as m, calculateUsageCost as n, readProviderRefusalReview as o, requiresClaudeBetweenToolsThinking as p, normalizeModelCostConfig as r, CLAUDE_FABLE_5_THINKING_PROFILE as s, index_d_exports as t, CLAUDE_SONNET_55_THINKING_PROFILE as u, resolveClaudeMythos5ModelIdentity as v, supportsClaude1MContext as w, resolveClaudeOpus5ModelIdentity as x, resolveClaudeNativeThinkingLevelMap as y };
package/dist/index.d.mts CHANGED
@@ -1,9 +1,9 @@
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, D as Message, E as MaybePromise, F as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, G as SimpleStreamOptions, H as ProviderStreamOptions, I as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, J as StreamFunction, K as StopReason, L as PricingTier, M as OpenAICompletionsCompat, N as OpenAIResponsesCompat, O as Model, 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, d as Context, 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 RegisteredApiProvider, i as ApiStreamSimpleFunction, n as ApiRegistry, o as createApiRegistry, r as ApiStreamFunction, t as ApiProvider } from "./api-registry-Ba2Cv-ut.mjs";
6
- import { a as AiProviderRequestPolicyInput, c as AiTransportHost, d as configureAiTransportHost, f as getAiTransportHost, i as AiProviderRequestCapabilities, l as AiTransportPluginHost, n as AiInlineImageBlock, o as AiProviderStreamHookContext, p as resolveAiTransportHeaderSentinels, r as AiInlineTextBlock, s as AiTransformTransportMessages, t as AiInlineContentBlock, u as OpenAIStrictToolSettingOptions } from "./host-FZ1RA_qD.mjs";
1
+ import { C as resolveClaudeSonnet5ModelIdentity, D as supportsClaudeNativeMaxEffort, E as supportsClaudeFastMode, O as supportsClaudeNativeXhighEffort, S as resolveClaudeSonnet55ModelIdentity, T as supportsClaudeAdaptiveThinking, _ as resolveClaudeModelIdentity, a as ProviderRefusalReview, b as resolveClaudeOpus55ModelIdentity, c as CLAUDE_OPUS_55_THINKING_PROFILE, d as CLAUDE_SONNET_5_THINKING_PROFILE, f as bindsClaudeThinkingPrefix, g as resolveClaudeFable5ModelIdentity, h as requiresClaudeMandatoryAdaptiveThinking, i as normalizeResolvedPricing, l as CLAUDE_OPUS_5_THINKING_PROFILE, m as requiresClaudeDefaultSampling, n as calculateUsageCost, o as readProviderRefusalReview, p as requiresClaudeBetweenToolsThinking, r as normalizeModelCostConfig, s as CLAUDE_FABLE_5_THINKING_PROFILE, u as CLAUDE_SONNET_55_THINKING_PROFILE, v as resolveClaudeMythos5ModelIdentity, w as supportsClaude1MContext, x as resolveClaudeOpus5ModelIdentity, y as resolveClaudeNativeThinkingLevelMap } from "./index-D6KsSE74.mjs";
2
+ import { $ as ThinkingContent, A as ModelCostRates, B as ProviderReplayState, C as KnownImagesApi, D as Message, E as MaybePromise, F as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, G as SimpleStreamOptions, H as ProviderStreamOptions, I as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, J as StreamFunction, K as StopReason, L as PricingTier, M as OpenAICompletionsCompat, N as OpenAIResponsesCompat, O as Model, 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, d as Context, 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-CLLR3eB4.mjs";
3
+ import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-DOPFYVqs.mjs";
4
+ import { n as validateToolCall, t as validateToolArguments } from "./validation-Cat2wQsc.mjs";
5
+ import { a as RegisteredApiProvider, i as ApiStreamSimpleFunction, n as ApiRegistry, o as createApiRegistry, r as ApiStreamFunction, t as ApiProvider } from "./api-registry-D-nbmSqr.mjs";
6
+ import { a as AiProviderRequestPolicyInput, c as AiTransportHost, d as configureAiTransportHost, f as getAiTransportHost, i as AiProviderRequestCapabilities, l as AiTransportPluginHost, n as AiInlineImageBlock, o as AiProviderStreamHookContext, p as resolveAiTransportHeaderSentinels, r as AiInlineTextBlock, s as AiTransformTransportMessages, t as AiInlineContentBlock, u as OpenAIStrictToolSettingOptions } from "./host-rxlNaBwm.mjs";
7
7
  //#region packages/ai/src/stream.d.ts
8
8
  /** Creates an isolated LLM runtime backed by the supplied provider registry. */
9
9
  export declare function createLlmRuntime(registry?: ApiRegistry): {
@@ -21,4 +21,4 @@ export declare function createLlmRuntime(registry?: ApiRegistry): {
21
21
  };
22
22
  export type LlmRuntime = ReturnType<typeof createLlmRuntime>;
23
23
  //#endregion
24
- export { AiInlineContentBlock, AiInlineImageBlock, AiInlineTextBlock, AiProviderRequestCapabilities, AiProviderRequestPolicyInput, AiProviderStreamHookContext, AiTransformTransportMessages, AiTransportHost, AiTransportPluginHost, AnthropicMessagesCompat, Api, ApiProvider, ApiRegistry, ApiStreamFunction, ApiStreamSimpleFunction, AssistantDeliveryTtsFacts, AssistantImages, AssistantMessage, AssistantMessageDiagnostic, AssistantMessageEvent, AssistantMessageEventStream, AssistantMessageEventStreamContract, AssistantMessageEventStreamLike, CLAUDE_FABLE_5_THINKING_PROFILE, CLAUDE_OPUS_5_THINKING_PROFILE, CLAUDE_SONNET_5_THINKING_PROFILE, CacheRetention, CompleteSimpleFn, Context, DiagnosticErrorInfo, EventStream, ImageContent, ImagesApi, ImagesContext, ImagesFunction, ImagesInputContent, ImagesModel, ImagesOptions, ImagesOutputContent, ImagesProvider, ImagesStopReason, KnownApi, KnownImagesApi, KnownImagesProvider, MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, MaybePromise, Message, Model, ModelCostConfig, ModelCostRates, ModelThinkingLevel, OpenAICompletionsCompat, OpenAIResponsesCompat, OpenAIStrictToolSettingOptions, OpenRouterRouting, PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, PricingTier, Provider, ProviderImagesOptions, ProviderReplayState, ProviderResponse, ProviderStreamOptions, RawModelCostConfig, RawPricingTier, RegisteredApiProvider, SimpleStreamOptions, StopReason, StreamFn, StreamFunction, StreamOptions, TextContent, TextSignatureV1, ThinkingBudgets, ThinkingContent, ThinkingLevel, ThinkingLevelMap, Tool, ToolCall, ToolResultMessage, Transport, Usage, UserMessage, ValidateToolArgumentsFn, VercelGatewayRouting, appendAssistantMessageDiagnostic, bindsClaudeThinkingPrefix, calculateUsageCost, configureAiTransportHost, createApiRegistry, createAssistantMessageDiagnostic, createAssistantMessageEventStream, extractDiagnosticError, formatThrownValue, getAiTransportHost, isProviderRefusalAssistantError, normalizeModelCostConfig, normalizeResolvedPricing, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAiTransportHeaderSentinels, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaude1MContext, supportsClaudeAdaptiveThinking, supportsClaudeFastMode, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
24
+ export { AiInlineContentBlock, AiInlineImageBlock, AiInlineTextBlock, AiProviderRequestCapabilities, AiProviderRequestPolicyInput, AiProviderStreamHookContext, AiTransformTransportMessages, AiTransportHost, AiTransportPluginHost, AnthropicMessagesCompat, Api, ApiProvider, ApiRegistry, ApiStreamFunction, ApiStreamSimpleFunction, AssistantDeliveryTtsFacts, AssistantImages, AssistantMessage, AssistantMessageDiagnostic, AssistantMessageEvent, AssistantMessageEventStream, AssistantMessageEventStreamContract, AssistantMessageEventStreamLike, CLAUDE_FABLE_5_THINKING_PROFILE, CLAUDE_OPUS_55_THINKING_PROFILE, CLAUDE_OPUS_5_THINKING_PROFILE, CLAUDE_SONNET_55_THINKING_PROFILE, CLAUDE_SONNET_5_THINKING_PROFILE, CacheRetention, CompleteSimpleFn, Context, DiagnosticErrorInfo, EventStream, ImageContent, ImagesApi, ImagesContext, ImagesFunction, ImagesInputContent, ImagesModel, ImagesOptions, ImagesOutputContent, ImagesProvider, ImagesStopReason, KnownApi, KnownImagesApi, KnownImagesProvider, MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, MaybePromise, Message, Model, ModelCostConfig, ModelCostRates, ModelThinkingLevel, OpenAICompletionsCompat, OpenAIResponsesCompat, OpenAIStrictToolSettingOptions, OpenRouterRouting, PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, PricingTier, Provider, ProviderImagesOptions, type ProviderRefusalReview, ProviderReplayState, ProviderResponse, ProviderStreamOptions, RawModelCostConfig, RawPricingTier, RegisteredApiProvider, SimpleStreamOptions, StopReason, StreamFn, StreamFunction, StreamOptions, TextContent, TextSignatureV1, ThinkingBudgets, ThinkingContent, ThinkingLevel, ThinkingLevelMap, Tool, ToolCall, ToolResultMessage, Transport, Usage, UserMessage, ValidateToolArgumentsFn, VercelGatewayRouting, appendAssistantMessageDiagnostic, bindsClaudeThinkingPrefix, calculateUsageCost, configureAiTransportHost, createApiRegistry, createAssistantMessageDiagnostic, createAssistantMessageEventStream, extractDiagnosticError, formatThrownValue, getAiTransportHost, isProviderRefusalAssistantError, normalizeModelCostConfig, normalizeResolvedPricing, readProviderRefusalReview, requiresClaudeBetweenToolsThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAiTransportHeaderSentinels, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus55ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet55ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaude1MContext, supportsClaudeAdaptiveThinking, supportsClaudeFastMode, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { _ as supportsClaudeAdaptiveThinking, a as CLAUDE_OPUS_5_THINKING_PROFILE, b as supportsClaudeNativeXhighEffort, c as requiresClaudeDefaultSampling, d as resolveClaudeModelIdentity, f as resolveClaudeMythos5ModelIdentity, g as supportsClaude1MContext, h as resolveClaudeSonnet5ModelIdentity, i as CLAUDE_FABLE_5_THINKING_PROFILE, l as requiresClaudeMandatoryAdaptiveThinking, m as resolveClaudeOpus5ModelIdentity, n as normalizeModelCostConfig, o as CLAUDE_SONNET_5_THINKING_PROFILE, p as resolveClaudeNativeThinkingLevelMap, r as normalizeResolvedPricing, s as bindsClaudeThinkingPrefix, t as calculateUsageCost, u as resolveClaudeFable5ModelIdentity, v as supportsClaudeFastMode, y as supportsClaudeNativeMaxEffort } from "./src-DeKjbE8I.mjs";
1
+ import { C as supportsClaudeFastMode, S as supportsClaudeAdaptiveThinking, T as supportsClaudeNativeXhighEffort, _ as resolveClaudeOpus55ModelIdentity, a as CLAUDE_OPUS_55_THINKING_PROFILE, b as resolveClaudeSonnet5ModelIdentity, c as CLAUDE_SONNET_5_THINKING_PROFILE, d as requiresClaudeDefaultSampling, f as requiresClaudeMandatoryAdaptiveThinking, g as resolveClaudeNativeThinkingLevelMap, h as resolveClaudeMythos5ModelIdentity, i as CLAUDE_FABLE_5_THINKING_PROFILE, l as bindsClaudeThinkingPrefix, m as resolveClaudeModelIdentity, n as normalizeModelCostConfig, o as CLAUDE_OPUS_5_THINKING_PROFILE, p as resolveClaudeFable5ModelIdentity, r as normalizeResolvedPricing, s as CLAUDE_SONNET_55_THINKING_PROFILE, t as calculateUsageCost, u as requiresClaudeBetweenToolsThinking, v as resolveClaudeOpus5ModelIdentity, w as supportsClaudeNativeMaxEffort, x as supportsClaude1MContext, y as resolveClaudeSonnet55ModelIdentity } from "./src-H4aXcFuX.mjs";
2
2
  import { n as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, r as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, t as MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE } from "./types-LFWwv0cF.mjs";
3
- import { a as isProviderRefusalAssistantError, i as formatThrownValue, n as createAssistantMessageDiagnostic, r as extractDiagnosticError, t as appendAssistantMessageDiagnostic } from "./diagnostics-CPeq9F7y.mjs";
4
- import { i as createAssistantMessageEventStream, n as EventStream, t as AssistantMessageEventStream } from "./event-stream-D8PARQfL.mjs";
5
- import { n as validateToolCall, t as validateToolArguments } from "./validation-Dw7cb6BV.mjs";
6
- import { n as createApiRegistry, t as createLlmRuntime } from "./stream-CREqxHgU.mjs";
7
- import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels, t as configureAiTransportHost } from "./host-B4MeUNBc.mjs";
8
- export { AssistantMessageEventStream, CLAUDE_FABLE_5_THINKING_PROFILE, CLAUDE_OPUS_5_THINKING_PROFILE, CLAUDE_SONNET_5_THINKING_PROFILE, EventStream, MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, appendAssistantMessageDiagnostic, bindsClaudeThinkingPrefix, calculateUsageCost, configureAiTransportHost, createApiRegistry, createAssistantMessageDiagnostic, createAssistantMessageEventStream, createLlmRuntime, extractDiagnosticError, formatThrownValue, getAiTransportHost, isProviderRefusalAssistantError, normalizeModelCostConfig, normalizeResolvedPricing, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAiTransportHeaderSentinels, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaude1MContext, supportsClaudeAdaptiveThinking, supportsClaudeFastMode, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
3
+ import { a as isProviderRefusalAssistantError, i as formatThrownValue, n as createAssistantMessageDiagnostic, o as readProviderRefusalReview, r as extractDiagnosticError, t as appendAssistantMessageDiagnostic } from "./diagnostics-DzrF1h4J.mjs";
4
+ import { i as createAssistantMessageEventStream, n as EventStream, t as AssistantMessageEventStream } from "./event-stream-vd9UnCAU.mjs";
5
+ import { n as validateToolCall, t as validateToolArguments } from "./validation-BFZc40Ig.mjs";
6
+ import { n as createApiRegistry, t as createLlmRuntime } from "./stream-DDsCBgd-.mjs";
7
+ import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels, t as configureAiTransportHost } from "./host-CHi3X87F.mjs";
8
+ export { AssistantMessageEventStream, CLAUDE_FABLE_5_THINKING_PROFILE, CLAUDE_OPUS_55_THINKING_PROFILE, CLAUDE_OPUS_5_THINKING_PROFILE, CLAUDE_SONNET_55_THINKING_PROFILE, CLAUDE_SONNET_5_THINKING_PROFILE, EventStream, MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, appendAssistantMessageDiagnostic, bindsClaudeThinkingPrefix, calculateUsageCost, configureAiTransportHost, createApiRegistry, createAssistantMessageDiagnostic, createAssistantMessageEventStream, createLlmRuntime, extractDiagnosticError, formatThrownValue, getAiTransportHost, isProviderRefusalAssistantError, normalizeModelCostConfig, normalizeResolvedPricing, readProviderRefusalReview, requiresClaudeBetweenToolsThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAiTransportHeaderSentinels, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus55ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet55ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaude1MContext, supportsClaudeAdaptiveThinking, supportsClaudeFastMode, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
@@ -1,8 +1,8 @@
1
- import { b as supportsClaudeNativeMaxEffort, c as bindsClaudeThinkingPrefix, d as resolveClaudeFable5ModelIdentity, f as resolveClaudeModelIdentity, g as resolveClaudeSonnet5ModelIdentity, h as resolveClaudeOpus5ModelIdentity, l as requiresClaudeDefaultSampling, m as resolveClaudeNativeThinkingLevelMap, p as resolveClaudeMythos5ModelIdentity, u as requiresClaudeMandatoryAdaptiveThinking, v as supportsClaudeAdaptiveThinking, x as supportsClaudeNativeXhighEffort } from "../index-DaF2QbwS.mjs";
2
- import { G as SimpleStreamOptions, J as StreamFunction, K as StopReason, O as Model, d as Context, ot as Usage, ut as AssistantMessageDiagnostic } from "../types-4_uVs5WH.mjs";
3
- import { i as AnthropicThinkingDisplay, n as AnthropicEffort, r as AnthropicOptions, t as AnthropicContextManagementOptions } from "../provider-options-DprLsWh9.mjs";
4
- import "../types-DkJfb4W3.mjs";
5
- import { p as resolveAnthropicServerCompactionPlan } from "../anthropic-payload-policy-5Erq1Nzy.mjs";
1
+ import { C as resolveClaudeSonnet5ModelIdentity, D as supportsClaudeNativeMaxEffort, O as supportsClaudeNativeXhighEffort, S as resolveClaudeSonnet55ModelIdentity, T as supportsClaudeAdaptiveThinking, _ as resolveClaudeModelIdentity, b as resolveClaudeOpus55ModelIdentity, f as bindsClaudeThinkingPrefix, g as resolveClaudeFable5ModelIdentity, h as requiresClaudeMandatoryAdaptiveThinking, m as requiresClaudeDefaultSampling, p as requiresClaudeBetweenToolsThinking, v as resolveClaudeMythos5ModelIdentity, x as resolveClaudeOpus5ModelIdentity, y as resolveClaudeNativeThinkingLevelMap } from "../index-D6KsSE74.mjs";
2
+ import { G as SimpleStreamOptions, J as StreamFunction, K as StopReason, O as Model, d as Context, ot as Usage, ut as AssistantMessageDiagnostic } from "../types-CLLR3eB4.mjs";
3
+ import { i as AnthropicThinkingDisplay, n as AnthropicEffort, r as AnthropicOptions, t as AnthropicContextManagementOptions } from "../provider-options-Df7ov0K1.mjs";
4
+ import "../types-CB-_vNyI.mjs";
5
+ import { p as resolveAnthropicServerCompactionPlan } from "../anthropic-payload-policy-NIPVYXPq.mjs";
6
6
  import { Tool } from "@anthropic-ai/sdk/resources/messages.js";
7
7
  //#region packages/ai/src/providers/anthropic.d.ts
8
8
  type AnthropicCompactionOptions = AnthropicOptions & {
@@ -12,6 +12,7 @@ export declare const streamAnthropic: StreamFunction<"anthropic-messages", Anthr
12
12
  type AnthropicSimpleStreamOptions = SimpleStreamOptions & AnthropicContextManagementOptions & {
13
13
  authProfileId?: string;
14
14
  toolChoice?: AnthropicCompactionOptions["toolChoice"];
15
+ thinkingDisplay?: AnthropicOptions["thinkingDisplay"];
15
16
  };
16
17
  export declare const streamSimpleAnthropic: StreamFunction<"anthropic-messages", AnthropicSimpleStreamOptions>;
17
18
  //#endregion
@@ -27,8 +28,12 @@ export declare function usesFoundryBearerAuth(model: AnthropicAuthModel): boolea
27
28
  export declare function omitFoundryBearerCredentialHeaders(headers?: Record<string, string>): Record<string, string> | undefined;
28
29
  //#endregion
29
30
  //#region packages/ai/src/providers/anthropic-model-contract.d.ts
30
- export declare const ANTHROPIC_CLAUDE_CODE_VERSION = "2.1.75";
31
- export declare const ANTHROPIC_CLAUDE_CODE_BILLING_SYSTEM_BLOCK = "x-anthropic-billing-header: cc_version=2.1.75; cc_entrypoint=sdk-cli;";
31
+ export declare const ANTHROPIC_CLAUDE_CODE_VERSION = "2.1.280";
32
+ /** Build OAuth headers and the matching billing identity from one request snapshot. */
33
+ export declare function buildAnthropicClaudeCodeIdentity(betaHeader: string | undefined, ...headerSources: (Record<string, string> | undefined)[]): {
34
+ headers: Record<string, string>;
35
+ version: string;
36
+ };
32
37
  type ReplayModelRef = {
33
38
  provider?: string;
34
39
  api?: string;
@@ -225,4 +230,4 @@ export declare function applyAnthropicMessageStartUsage(target: Usage, payload:
225
230
  /** Keep billing and context distinct; omitted usage preserves the last snapshot. */
226
231
  export declare function applyAnthropicMessageDeltaUsage(target: Usage, usage: AnthropicUsagePayload | undefined, messageStartPromptUsage: AnthropicPromptUsageSnapshot | undefined): void;
227
232
  //#endregion
228
- export { type AnthropicEffort, type AnthropicOptions, type AnthropicThinkingDisplay, bindsClaudeThinkingPrefix, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAnthropicServerCompactionPlan, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort };
233
+ export { type AnthropicEffort, type AnthropicOptions, type AnthropicThinkingDisplay, bindsClaudeThinkingPrefix, requiresClaudeBetweenToolsThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAnthropicServerCompactionPlan, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus55ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet55ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort };