@openclaw/ai 2026.8.1 → 2026.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/{anthropic-Djj7L1rx.mjs → anthropic-DTGZ4VMY.mjs} +13 -11
  2. package/dist/{anthropic-compaction-replay-CY4tkD4V.mjs → anthropic-compaction-replay-CKCDrZJv.mjs} +6 -6
  3. package/dist/{anthropic-payload-policy-i_5_inWe.d.mts → anthropic-payload-policy-BTzmNC14.d.mts} +2 -2
  4. package/dist/{api-registry-C9-wZd_W.d.mts → api-registry-BbUHEKER.d.mts} +2 -2
  5. package/dist/{azure-openai-responses-Bj3czHNa.mjs → azure-openai-responses-BmqaDXM1.mjs} +5 -4
  6. package/dist/diagnostics.mjs +1 -1
  7. package/dist/{event-stream-UhnxHuqt.d.mts → event-stream-DcvAPSBe.d.mts} +1 -1
  8. package/dist/event-stream-pXT3FI6X.d.mts +1 -0
  9. package/dist/event-stream.d.mts +2 -2
  10. package/dist/{google-0Ca6TYbw.mjs → google-CqjVZMwo.mjs} +7 -5
  11. package/dist/{google-shared-DVfL9COU.mjs → google-shared-Bnqni5j3.mjs} +25 -23
  12. package/dist/{google-vertex-5dAMxprN.mjs → google-vertex-D_WREEJi.mjs} +7 -5
  13. package/dist/{host-D51fmkH6.mjs → host-BIaiBURL.mjs} +2 -2
  14. package/dist/{host-DoPJJ1KD.d.mts → host-DKFUAmCn.d.mts} +3 -3
  15. package/dist/{index-N3zr6__t.d.mts → index-CefaUGSS.d.mts} +11 -5
  16. package/dist/index.d.mts +7 -7
  17. package/dist/index.mjs +4 -4
  18. package/dist/internal/anthropic.d.mts +5 -5
  19. package/dist/internal/anthropic.mjs +4 -4
  20. package/dist/internal/openai-responses-payload-policy.d.mts +1 -1
  21. package/dist/internal/openai-responses-payload-policy.mjs +1 -1
  22. package/dist/internal/openai.d.mts +5 -5
  23. package/dist/internal/openai.mjs +8 -8
  24. package/dist/internal/runtime.d.mts +5 -5
  25. package/dist/internal/runtime.mjs +3 -3
  26. package/dist/internal/shared.d.mts +2 -2
  27. package/dist/internal/shared.mjs +3 -3
  28. package/dist/{mistral-BCnrI-kV.mjs → mistral-C24jVd6f.mjs} +18 -13
  29. package/dist/{openai-chatgpt-responses-CGBGWSqr.mjs → openai-chatgpt-responses-Czum0oXz.mjs} +16 -15
  30. package/dist/{openai-completions-BaTuwID7.mjs → openai-completions-BfFwac6f.mjs} +16 -13
  31. package/dist/{openai-completions-compat-DB7FFq7k.d.mts → openai-completions-compat-SZhi0Lf4.d.mts} +3 -3
  32. package/dist/{openai-completions-stream-Bpns6uNc.mjs → openai-completions-stream-DGOvau4J.mjs} +29 -26
  33. package/dist/{openai-responses-1GBcQujk.mjs → openai-responses-BAryVEJM.mjs} +9 -7
  34. package/dist/{openai-responses-compaction-window-DwydGZI8.mjs → openai-responses-compaction-window-DO7yV7az.mjs} +3 -3
  35. package/dist/{openai-responses-contracts-DgaR3t5T.d.mts → openai-responses-contracts-BthRXano.d.mts} +3 -3
  36. package/dist/{openai-responses-prompt-observer-internal-_nhGTn2b.mjs → openai-responses-prompt-observer-internal--R0kZLOZ.mjs} +3 -3
  37. package/dist/{openai-responses-shared-zPmKnhF5.mjs → openai-responses-shared-CxgdGBvm.mjs} +27 -26
  38. package/dist/{openai-tool-schema-Dgl4H2MU.mjs → openai-tool-schema-CSMh5e9O.mjs} +13 -11
  39. package/dist/{provider-error-jZP5NMTZ.mjs → provider-error-BI8kIViN.mjs} +11 -11
  40. package/dist/{provider-options-HvA_slFa.d.mts → provider-options-DJd_9euj.d.mts} +2 -2
  41. package/dist/{provider-transcript-transform-C01bQ5a3.mjs → provider-transcript-transform-WvJmFUAf.mjs} +1 -1
  42. package/dist/provider-types.d.mts +6 -6
  43. package/dist/providers.d.mts +1 -1
  44. package/dist/providers.mjs +9 -9
  45. package/dist/{reasoning-tag-text-partitioner-CwzKb0bA.mjs → reasoning-tag-text-partitioner-BsUX44Tq.mjs} +29 -19
  46. package/dist/{sanitize-unicode-DCkltN94.mjs → sanitize-unicode-S6binQG-.mjs} +2 -8
  47. package/dist/{simple-options-DKx86yX9.mjs → simple-options-rdOPzr7Z.mjs} +2 -2
  48. package/dist/{src-Bu3FiFAG.mjs → src-C8U7lkoa.mjs} +75 -2
  49. package/dist/{tool-schema-json-projection-qvTEs5Am.mjs → tool-schema-json-projection-BtZiml7r.mjs} +21 -31
  50. package/dist/{transport-stream-shared-NjwWNaRY.d.mts → transport-stream-shared-BbG7PThh.d.mts} +4 -4
  51. package/dist/{transport-stream-shared-CT5ycdzn.mjs → transport-stream-shared-D8nQWCUo.mjs} +2 -2
  52. package/dist/{transport-utils-BHx9z8Cl.mjs → transport-utils-CtuS1Upe.mjs} +2 -2
  53. package/dist/transports.d.mts +12 -9
  54. package/dist/transports.mjs +61 -50
  55. package/dist/{types-h38Azne1.d.mts → types-Beemor2E.d.mts} +20 -7
  56. package/dist/types-COdhCX0U.d.mts +1 -0
  57. package/dist/types.d.mts +6 -6
  58. package/dist/types.mjs +3 -3
  59. package/dist/{validation-C68lP2uy.d.mts → validation-CC6s7Smp.d.mts} +1 -1
  60. package/dist/{validation-B61OhAio.mjs → validation-CJZtym2g.mjs} +7 -5
  61. package/dist/validation.d.mts +1 -1
  62. package/dist/validation.mjs +1 -1
  63. package/package.json +2 -2
  64. package/dist/event-stream-C988TSLe.d.mts +0 -1
  65. package/dist/types-DtGu2d3C.d.mts +0 -1
@@ -1,4 +1,4 @@
1
- import { i as transformMessages } from "./host-D51fmkH6.mjs";
1
+ import { i as transformMessages } from "./host-BIaiBURL.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,9 +1,9 @@
1
- import { _ as supportsClaudeNativeXhighEffort, a as requiresClaudeDefaultSampling, c as resolveClaudeModelIdentity, d as resolveClaudeOpus5ModelIdentity, f as resolveClaudeSonnet5ModelIdentity, g as supportsClaudeNativeMaxEffort, h as supportsClaudeFastMode, i as CLAUDE_SONNET_5_THINKING_PROFILE, l as resolveClaudeMythos5ModelIdentity, m as supportsClaudeAdaptiveThinking, n as CLAUDE_FABLE_5_THINKING_PROFILE, o as requiresClaudeMandatoryAdaptiveThinking, p as supportsClaude1MContext, r as CLAUDE_OPUS_5_THINKING_PROFILE, s as resolveClaudeFable5ModelIdentity, t as index_d_exports, u as resolveClaudeNativeThinkingLevelMap } from "./index-N3zr6__t.mjs";
1
+ import { _ as supportsClaudeAdaptiveThinking, a as CLAUDE_FABLE_5_THINKING_PROFILE, b as supportsClaudeNativeXhighEffort, c as requiresClaudeDefaultSampling, d as resolveClaudeModelIdentity, f as resolveClaudeMythos5ModelIdentity, g as supportsClaude1MContext, h as resolveClaudeSonnet5ModelIdentity, i as normalizeResolvedPricing, l as requiresClaudeMandatoryAdaptiveThinking, m as resolveClaudeOpus5ModelIdentity, n as calculateUsageCost, o as CLAUDE_OPUS_5_THINKING_PROFILE, p as resolveClaudeNativeThinkingLevelMap, r as normalizeModelCostConfig, s as CLAUDE_SONNET_5_THINKING_PROFILE, t as index_d_exports, u as resolveClaudeFable5ModelIdentity, v as supportsClaudeFastMode, y as supportsClaudeNativeMaxEffort } from "./index-CefaUGSS.mjs";
2
2
  import { a as extractDiagnosticError, i as createAssistantMessageDiagnostic, n as DiagnosticErrorInfo, o as formatThrownValue, r as appendAssistantMessageDiagnostic, t as AssistantMessageDiagnostic } from "./diagnostics-BaTA9eVl.mjs";
3
- import { $ as Transport, A as OpenAIResponsesCompat, B as StopReason, C as KnownImagesApi, D as Model, F as ProviderImagesOptions, G as TextSignatureV1, I as ProviderReplayState, J as ThinkingLevel, K as ThinkingBudgets, L as ProviderResponse, M as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, N as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, O as ModelThinkingLevel, P as Provider, Q as ToolResultMessage, S as KnownApi, T as MaybePromise, U as StreamOptions, V as StreamFn, W as TextContent, X as Tool, Y as ThinkingLevelMap, Z as ToolCall, _ as ImagesModel, a as AssistantMessage, b as ImagesProvider, c as AssistantMessageEventStreamLike, d as Context, et as Usage, f as ImageContent, g as ImagesInputContent, h as ImagesFunction, i as AssistantImages, j as OpenRouterRouting, k as OpenAICompletionsCompat, l as CacheRetention, m as ImagesContext, n as Api, nt as ValidateToolArgumentsFn, o as AssistantMessageEvent, p as ImagesApi, q as ThinkingContent, r as AssistantDeliveryTtsFacts, rt as VercelGatewayRouting, s as AssistantMessageEventStreamContract, t as AnthropicMessagesCompat, tt as UserMessage, u as CompleteSimpleFn, v as ImagesOptions, w as KnownImagesProvider, x as ImagesStopReason, y as ImagesOutputContent, z as SimpleStreamOptions } from "./types-h38Azne1.mjs";
4
- import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-UhnxHuqt.mjs";
5
- import { n as validateToolCall, t as validateToolArguments } from "./validation-C68lP2uy.mjs";
6
- import "./types-DtGu2d3C.mjs";
3
+ import { $ as ThinkingLevel, A as ModelThinkingLevel, B as ProviderResponse, C as KnownImagesApi, D as Model, F as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, G as StopReason, H as RawModelCostConfig, I as PricingTier, J as StreamOptions, K as StreamFn, L as Provider, M as OpenAIResponsesCompat, N as OpenRouterRouting, O as ModelCostConfig, P as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, Q as ThinkingContent, R as ProviderImagesOptions, S as KnownApi, T as MaybePromise, U as RawPricingTier, W as SimpleStreamOptions, X as TextSignatureV1, Y as TextContent, Z as ThinkingBudgets, _ as ImagesModel, a as AssistantMessage, at as Usage, b as ImagesProvider, c as AssistantMessageEventStreamLike, ct as VercelGatewayRouting, d as Context, et as ThinkingLevelMap, f as ImageContent, g as ImagesInputContent, h as ImagesFunction, i as AssistantImages, it as Transport, j as OpenAICompletionsCompat, k as ModelCostRates, l as CacheRetention, m as ImagesContext, n as Api, nt as ToolCall, o as AssistantMessageEvent, ot as UserMessage, p as ImagesApi, r as AssistantDeliveryTtsFacts, rt as ToolResultMessage, s as AssistantMessageEventStreamContract, st as ValidateToolArgumentsFn, t as AnthropicMessagesCompat, tt as Tool, u as CompleteSimpleFn, v as ImagesOptions, w as KnownImagesProvider, x as ImagesStopReason, y as ImagesOutputContent, z as ProviderReplayState } from "./types-Beemor2E.mjs";
4
+ import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-DcvAPSBe.mjs";
5
+ import { n as validateToolCall, t as validateToolArguments } from "./validation-CC6s7Smp.mjs";
6
+ import "./types-COdhCX0U.mjs";
7
7
  //#region packages/ai/src/provider-types.d.ts
8
8
  export declare const PROVIDER_CONTEXT_HANDOFF: unique symbol;
9
9
  export type VideoContent = Omit<ImageContent, "type"> & {
@@ -29,4 +29,4 @@ export type ProviderStreamFunction<TApi extends Api = Api, TOptions extends Stre
29
29
  /** Resolves provider-only context without widening the canonical call contract. */
30
30
  export declare function resolveProviderContext(context: Context | ProviderContext, options?: ProviderStreamOptions): Promise<ProviderContext>;
31
31
  //#endregion
32
- export type { 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, ProviderContext as Context, DiagnosticErrorInfo, EventStream, ImageContent, ImagesApi, ImagesContext, ImagesFunction, ImagesInputContent, ImagesModel, ImagesOptions, ImagesOutputContent, ImagesProvider, ImagesStopReason, KnownApi, KnownImagesApi, KnownImagesProvider, MaybePromise, ProviderMessage as Message, ProviderModel as Model, ModelThinkingLevel, OpenAICompletionsCompat, OpenAIResponsesCompat, OpenRouterRouting, PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, Provider, ProviderImagesOptions, ProviderReplayState, ProviderResponse, ProviderStreamFunction as StreamFunction, SimpleStreamOptions, StopReason, StreamFn, StreamOptions, TextContent, TextSignatureV1, ThinkingBudgets, ThinkingContent, ThinkingLevel, ThinkingLevelMap, Tool, ToolCall, ToolResultMessage, Transport, Usage, UserMessage, ValidateToolArgumentsFn, VercelGatewayRouting, appendAssistantMessageDiagnostic, createAssistantMessageDiagnostic, createAssistantMessageEventStream, extractDiagnosticError, formatThrownValue, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaude1MContext, supportsClaudeAdaptiveThinking, supportsClaudeFastMode, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
32
+ export type { 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, ProviderContext as Context, DiagnosticErrorInfo, EventStream, ImageContent, ImagesApi, ImagesContext, ImagesFunction, ImagesInputContent, ImagesModel, ImagesOptions, ImagesOutputContent, ImagesProvider, ImagesStopReason, KnownApi, KnownImagesApi, KnownImagesProvider, MaybePromise, ProviderMessage as Message, ProviderModel as Model, ModelCostConfig, ModelCostRates, ModelThinkingLevel, OpenAICompletionsCompat, OpenAIResponsesCompat, OpenRouterRouting, PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, PricingTier, Provider, ProviderImagesOptions, ProviderReplayState, ProviderResponse, ProviderStreamFunction as StreamFunction, RawModelCostConfig, RawPricingTier, SimpleStreamOptions, StopReason, StreamFn, StreamOptions, TextContent, TextSignatureV1, ThinkingBudgets, ThinkingContent, ThinkingLevel, ThinkingLevelMap, Tool, ToolCall, ToolResultMessage, Transport, Usage, UserMessage, ValidateToolArgumentsFn, VercelGatewayRouting, appendAssistantMessageDiagnostic, calculateUsageCost, createAssistantMessageDiagnostic, createAssistantMessageEventStream, extractDiagnosticError, formatThrownValue, normalizeModelCostConfig, normalizeResolvedPricing, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaude1MContext, supportsClaudeAdaptiveThinking, supportsClaudeFastMode, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
@@ -1,4 +1,4 @@
1
- import { n as ApiRegistry } from "./api-registry-C9-wZd_W.mjs";
1
+ import { n as ApiRegistry } from "./api-registry-BbUHEKER.mjs";
2
2
  import { n as clampOpenAIPromptCacheKey, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "./openai-prompt-cache-2uo_1OR1.mjs";
3
3
  //#region packages/ai/src/providers/register-builtins.d.ts
4
4
  /** Source id used for built-in API provider registrations. */
@@ -1,5 +1,5 @@
1
1
  import { t as AssistantMessageEventStream } from "./event-stream-uSMZJ3FA.mjs";
2
- import { n as projectProviderError } from "./provider-error-jZP5NMTZ.mjs";
2
+ import { n as projectProviderError } from "./provider-error-BI8kIViN.mjs";
3
3
  import { n as clampOpenAIPromptCacheKey, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "./openai-prompt-cache-mZTCdRPo.mjs";
4
4
  //#region packages/ai/src/providers/register-builtins.ts
5
5
  /** Source id used for built-in API provider registrations. */
@@ -62,35 +62,35 @@ function createLazyRegistration(api, importModule, select) {
62
62
  };
63
63
  }
64
64
  const registerBuiltIns = [
65
- createLazyRegistration("anthropic-messages", () => import("./anthropic-Djj7L1rx.mjs").then((n) => n.t), (module) => ({
65
+ createLazyRegistration("anthropic-messages", () => import("./anthropic-DTGZ4VMY.mjs").then((n) => n.t), (module) => ({
66
66
  stream: module.streamAnthropic,
67
67
  streamSimple: module.streamSimpleAnthropic
68
68
  })),
69
- createLazyRegistration("openai-completions", () => import("./openai-completions-BaTuwID7.mjs").then((n) => n.t), (module) => ({
69
+ createLazyRegistration("openai-completions", () => import("./openai-completions-BfFwac6f.mjs").then((n) => n.t), (module) => ({
70
70
  stream: module.streamOpenAICompletions,
71
71
  streamSimple: module.streamSimpleOpenAICompletions
72
72
  })),
73
- createLazyRegistration("mistral-conversations", () => import("./mistral-BCnrI-kV.mjs"), (module) => ({
73
+ createLazyRegistration("mistral-conversations", () => import("./mistral-C24jVd6f.mjs"), (module) => ({
74
74
  stream: module.streamMistral,
75
75
  streamSimple: module.streamSimpleMistral
76
76
  })),
77
- createLazyRegistration("openai-responses", () => import("./openai-responses-1GBcQujk.mjs").then((n) => n.t), (module) => ({
77
+ createLazyRegistration("openai-responses", () => import("./openai-responses-BAryVEJM.mjs").then((n) => n.t), (module) => ({
78
78
  stream: module.streamOpenAIResponses,
79
79
  streamSimple: module.streamSimpleOpenAIResponses
80
80
  })),
81
- createLazyRegistration("azure-openai-responses", () => import("./azure-openai-responses-Bj3czHNa.mjs"), (module) => ({
81
+ createLazyRegistration("azure-openai-responses", () => import("./azure-openai-responses-BmqaDXM1.mjs"), (module) => ({
82
82
  stream: module.streamAzureOpenAIResponses,
83
83
  streamSimple: module.streamSimpleAzureOpenAIResponses
84
84
  })),
85
- createLazyRegistration("openai-chatgpt-responses", () => import("./openai-chatgpt-responses-CGBGWSqr.mjs"), (module) => ({
85
+ createLazyRegistration("openai-chatgpt-responses", () => import("./openai-chatgpt-responses-Czum0oXz.mjs"), (module) => ({
86
86
  stream: module.streamOpenAICodexResponses,
87
87
  streamSimple: module.streamSimpleOpenAICodexResponses
88
88
  })),
89
- createLazyRegistration("google-generative-ai", () => import("./google-0Ca6TYbw.mjs"), (module) => ({
89
+ createLazyRegistration("google-generative-ai", () => import("./google-CqjVZMwo.mjs"), (module) => ({
90
90
  stream: module.streamGoogle,
91
91
  streamSimple: module.streamSimpleGoogle
92
92
  })),
93
- createLazyRegistration("google-vertex", () => import("./google-vertex-5dAMxprN.mjs"), (module) => ({
93
+ createLazyRegistration("google-vertex", () => import("./google-vertex-D_WREEJi.mjs"), (module) => ({
94
94
  stream: module.streamGoogleVertex,
95
95
  streamSimple: module.streamSimpleGoogleVertex
96
96
  }))
@@ -5375,7 +5375,9 @@ function factoryLabel(effects, ok, nok, type, markerType, stringType) {
5375
5375
  * @type {State}
5376
5376
  */
5377
5377
  function atBreak(code) {
5378
- if (size > 999 || code === null || code === 91 || code === 93 && !seen || code === 94 && !size && "_hiddenFootnoteSupport" in self.parser.constructs) return nok(code);
5378
+ if (size > 999 || code === null || code === 91 || code === 93 && !seen ||
5379
+ /* c8 ignore next 3 */
5380
+ code === 94 && !size && "_hiddenFootnoteSupport" in self.parser.constructs) return nok(code);
5379
5381
  if (code === 93) {
5380
5382
  effects.exit(stringType);
5381
5383
  effects.enter(markerType);
@@ -9867,8 +9869,10 @@ function compiler(options) {
9867
9869
  /** @type {Array<number>} */
9868
9870
  const listStack = [];
9869
9871
  let index = -1;
9870
- while (++index < events.length) if (events[index][1].type === "listOrdered" || events[index][1].type === "listUnordered") if (events[index][0] === "enter") listStack.push(index);
9871
- else index = prepareList(events, listStack.pop(), index);
9872
+ while (++index < events.length) if (events[index][1].type === "listOrdered" || events[index][1].type === "listUnordered") {
9873
+ if (events[index][0] === "enter") listStack.push(index);
9874
+ else index = prepareList(events, listStack.pop(), index);
9875
+ }
9872
9876
  index = -1;
9873
9877
  while (++index < events.length) {
9874
9878
  const handler = config[events[index][0]];
@@ -10058,8 +10062,10 @@ function compiler(options) {
10058
10062
  start: token.start,
10059
10063
  end: token.end
10060
10064
  }) + "): it’s not open");
10061
- else if (open[0].type !== token.type) if (onExitError) onExitError.call(this, token, open[0]);
10062
- else (open[1] || defaultOnError).call(this, token, open[0]);
10065
+ else if (open[0].type !== token.type) {
10066
+ if (onExitError) onExitError.call(this, token, open[0]);
10067
+ else (open[1] || defaultOnError).call(this, token, open[0]);
10068
+ }
10063
10069
  node.position.end = point(token.end);
10064
10070
  }
10065
10071
  /**
@@ -11416,19 +11422,21 @@ function resolveTable(events, context) {
11416
11422
  }
11417
11423
  cell[2] = index;
11418
11424
  }
11419
- } else if (token.type === "tableCellDivider") if (inFirstCellAwaitingPipe) inFirstCellAwaitingPipe = false;
11420
- else {
11421
- if (lastCell[1] !== 0) {
11422
- cell[0] = cell[1];
11423
- currentCell = flushCell(map, context, lastCell, rowKind, void 0, currentCell);
11425
+ } else if (token.type === "tableCellDivider") {
11426
+ if (inFirstCellAwaitingPipe) inFirstCellAwaitingPipe = false;
11427
+ else {
11428
+ if (lastCell[1] !== 0) {
11429
+ cell[0] = cell[1];
11430
+ currentCell = flushCell(map, context, lastCell, rowKind, void 0, currentCell);
11431
+ }
11432
+ lastCell = cell;
11433
+ cell = [
11434
+ lastCell[1],
11435
+ index,
11436
+ 0,
11437
+ 0
11438
+ ];
11424
11439
  }
11425
- lastCell = cell;
11426
- cell = [
11427
- lastCell[1],
11428
- index,
11429
- 0,
11430
- 0
11431
- ];
11432
11440
  }
11433
11441
  } else if (token.type === "tableHead") {
11434
11442
  afterHeadAwaitingFirstBodyRow = true;
@@ -11821,8 +11829,10 @@ function reduceReasoningText(text, codeSpans, state, options) {
11821
11829
  append(text.slice(cursor));
11822
11830
  if (options.final && state.depth > 0 && state.pending) {
11823
11831
  const pending = state.pending;
11824
- if (!pending.containsPrivate) if (options.mode === "static-preserve" || options.mode === "static-strict" && !pending.visibleBefore && !pending.protectedClose || options.mode === "visible" && !pending.protectedClose) emit("text", options.mode === "visible" && pending.visibleBefore ? pending.openTag + pending.content : pending.content);
11825
- else emit("thinking", pending.content);
11832
+ if (!pending.containsPrivate) {
11833
+ if (options.mode === "static-preserve" || options.mode === "static-strict" && !pending.visibleBefore && !pending.protectedClose || options.mode === "visible" && !pending.protectedClose) emit("text", options.mode === "visible" && pending.visibleBefore ? pending.openTag + pending.content : pending.content);
11834
+ else emit("thinking", pending.content);
11835
+ }
11826
11836
  state.depth = 0;
11827
11837
  state.pending = void 0;
11828
11838
  }
@@ -1,14 +1,8 @@
1
- import { a as requiresClaudeMandatoryAdaptiveThinking, l as resolveClaudeNativeThinkingLevelMap } from "./src-Bu3FiFAG.mjs";
1
+ import { c as requiresClaudeMandatoryAdaptiveThinking, f as resolveClaudeNativeThinkingLevelMap, t as calculateUsageCost } from "./src-C8U7lkoa.mjs";
2
2
  //#region packages/ai/src/model-utils.ts
3
3
  /** Calculates and stores model cost fields from token usage and per-million pricing. */
4
4
  function calculateCost(model, usage) {
5
- const cacheWrite1h = Math.min(usage.cacheWrite, Math.max(0, usage.cacheWrite1h ?? 0));
6
- const cacheWrite5m = usage.cacheWrite - cacheWrite1h;
7
- usage.cost.input = model.cost.input / 1e6 * usage.input;
8
- usage.cost.output = model.cost.output / 1e6 * usage.output;
9
- usage.cost.cacheRead = model.cost.cacheRead / 1e6 * usage.cacheRead;
10
- usage.cost.cacheWrite = (model.cost.cacheWrite * cacheWrite5m + model.cost.input * 2 * cacheWrite1h) / 1e6;
11
- usage.cost.total = usage.cost.input + usage.cost.output + usage.cost.cacheRead + usage.cost.cacheWrite;
5
+ Object.assign(usage.cost, calculateUsageCost(usage, model.cost));
12
6
  return usage.cost;
13
7
  }
14
8
  /** Replaces the catalog estimate when the provider reports an authoritative billed total. */
@@ -1,6 +1,6 @@
1
1
  import { c as normalizeLowercaseStringOrEmpty } from "./utf16-slice-qz3nsy87.mjs";
2
- import { t as sanitizeSurrogates } from "./sanitize-unicode-DCkltN94.mjs";
3
- import { r as copyProviderAcceptanceObserver } from "./transport-stream-shared-CT5ycdzn.mjs";
2
+ import { t as sanitizeSurrogates } from "./sanitize-unicode-S6binQG-.mjs";
3
+ import { r as copyProviderAcceptanceObserver } from "./transport-stream-shared-D8nQWCUo.mjs";
4
4
  //#region packages/ai/src/utils/prompt-cache-stability.ts
5
5
  /**
6
6
  * Prompt-cache normalization helpers. They keep generated prompt sections
@@ -1,4 +1,4 @@
1
- import "./validation-B61OhAio.mjs";
1
+ import "./validation-CJZtym2g.mjs";
2
2
  //#region packages/llm-core/src/model-contracts/anthropic.ts
3
3
  function normalizeClaudeModelId(modelId) {
4
4
  const normalized = modelId?.trim().toLowerCase() ?? "";
@@ -114,4 +114,77 @@ function resolveClaudeNativeThinkingLevelMap(ref) {
114
114
  };
115
115
  }
116
116
  //#endregion
117
- export { requiresClaudeMandatoryAdaptiveThinking as a, resolveClaudeMythos5ModelIdentity as c, resolveClaudeSonnet5ModelIdentity as d, supportsClaude1MContext as f, supportsClaudeNativeXhighEffort as g, supportsClaudeNativeMaxEffort as h, requiresClaudeDefaultSampling as i, resolveClaudeNativeThinkingLevelMap as l, supportsClaudeFastMode as m, CLAUDE_OPUS_5_THINKING_PROFILE as n, resolveClaudeFable5ModelIdentity as o, supportsClaudeAdaptiveThinking as p, CLAUDE_SONNET_5_THINKING_PROFILE as r, resolveClaudeModelIdentity as s, CLAUDE_FABLE_5_THINKING_PROFILE as t, resolveClaudeOpus5ModelIdentity as u };
117
+ //#region packages/llm-core/src/usage-cost.ts
118
+ const sortedPricingTiers = /* @__PURE__ */ new WeakMap();
119
+ const finiteOrZero = (value) => typeof value === "number" && Number.isFinite(value) ? value : 0;
120
+ function normalizeTieredPricing(raw) {
121
+ if (!raw || raw.length === 0) return;
122
+ const result = [];
123
+ for (const tier of raw) {
124
+ const range = tier.range;
125
+ const start = Array.isArray(range) && typeof range[0] === "number" ? range[0] : NaN;
126
+ if (!Number.isFinite(start)) continue;
127
+ const rawEnd = range.length >= 2 ? range[1] : null;
128
+ const end = typeof rawEnd === "number" && Number.isFinite(rawEnd) && rawEnd > start ? rawEnd : Infinity;
129
+ if (!Number.isFinite(tier.input) || !Number.isFinite(tier.output) || !Number.isFinite(tier.cacheRead) || !Number.isFinite(tier.cacheWrite)) continue;
130
+ result.push({
131
+ input: tier.input,
132
+ output: tier.output,
133
+ cacheRead: tier.cacheRead,
134
+ cacheWrite: tier.cacheWrite,
135
+ range: [start, end]
136
+ });
137
+ }
138
+ return result.length > 0 ? result.toSorted((a, b) => a.range[0] - b.range[0]) : void 0;
139
+ }
140
+ function normalizeModelCostConfig(cost) {
141
+ const normalizedTiers = normalizeTieredPricing(cost.tieredPricing);
142
+ return {
143
+ input: cost.input,
144
+ output: cost.output,
145
+ cacheRead: cost.cacheRead,
146
+ cacheWrite: cost.cacheWrite,
147
+ ...normalizedTiers ? { tieredPricing: normalizedTiers } : {}
148
+ };
149
+ }
150
+ function normalizeResolvedPricing(cost) {
151
+ return normalizeModelCostConfig({
152
+ input: finiteOrZero(cost.input),
153
+ output: finiteOrZero(cost.output),
154
+ cacheRead: finiteOrZero(cost.cacheRead),
155
+ cacheWrite: finiteOrZero(cost.cacheWrite),
156
+ ...cost.tieredPricing ? { tieredPricing: cost.tieredPricing } : {}
157
+ });
158
+ }
159
+ function selectPricingRates(cost, promptTokens) {
160
+ const tiers = cost.tieredPricing;
161
+ if (!tiers?.length) return cost;
162
+ let sorted = sortedPricingTiers.get(tiers);
163
+ if (!sorted) {
164
+ sorted = normalizeTieredPricing(tiers) ?? [];
165
+ sortedPricingTiers.set(tiers, sorted);
166
+ }
167
+ if (promptTokens <= 0) return sorted[0] ?? cost;
168
+ return sorted.find((tier) => promptTokens >= tier.range[0] && promptTokens < tier.range[1]) ?? sorted.findLast((tier) => promptTokens >= tier.range[0]) ?? sorted[0] ?? cost;
169
+ }
170
+ /** Price one model call, selecting its tier before billing the separate token buckets. */
171
+ function calculateUsageCost(usage, pricing) {
172
+ const input = finiteOrZero(usage.input);
173
+ const output = finiteOrZero(usage.output);
174
+ const cacheRead = finiteOrZero(usage.cacheRead);
175
+ const cacheWrite = finiteOrZero(usage.cacheWrite);
176
+ const rates = selectPricingRates(pricing, input + cacheRead + cacheWrite);
177
+ const cacheWrite1h = Math.min(cacheWrite, Math.max(0, finiteOrZero(usage.cacheWrite1h)));
178
+ const cacheWrite5m = cacheWrite - cacheWrite1h;
179
+ const cost = {
180
+ input: input * rates.input / 1e6,
181
+ output: output * rates.output / 1e6,
182
+ cacheRead: cacheRead * rates.cacheRead / 1e6,
183
+ cacheWrite: (cacheWrite5m * rates.cacheWrite + cacheWrite1h * rates.input * 2) / 1e6,
184
+ total: 0
185
+ };
186
+ cost.total = cost.input + cost.output + cost.cacheRead + cost.cacheWrite;
187
+ return cost;
188
+ }
189
+ //#endregion
190
+ export { supportsClaudeFastMode as _, CLAUDE_OPUS_5_THINKING_PROFILE as a, requiresClaudeMandatoryAdaptiveThinking as c, resolveClaudeMythos5ModelIdentity as d, resolveClaudeNativeThinkingLevelMap as f, supportsClaudeAdaptiveThinking as g, supportsClaude1MContext as h, CLAUDE_FABLE_5_THINKING_PROFILE as i, resolveClaudeFable5ModelIdentity as l, resolveClaudeSonnet5ModelIdentity as m, normalizeModelCostConfig as n, CLAUDE_SONNET_5_THINKING_PROFILE as o, resolveClaudeOpus5ModelIdentity as p, normalizeResolvedPricing as r, requiresClaudeDefaultSampling as s, calculateUsageCost as t, resolveClaudeModelIdentity as u, supportsClaudeNativeMaxEffort as v, supportsClaudeNativeXhighEffort as y };
@@ -1,5 +1,5 @@
1
1
  import { o as isRecord } from "./utf16-slice-qz3nsy87.mjs";
2
- import { n as getAiTransportHost } from "./host-D51fmkH6.mjs";
2
+ import { n as getAiTransportHost } from "./host-BIaiBURL.mjs";
3
3
  import { types } from "node:util";
4
4
  //#region packages/ai/src/transports/host-policy.ts
5
5
  function buildGuardedModelFetch(model, timeoutMs, options) {
@@ -37,18 +37,6 @@ function transformTransportMessages(messages, model, normalizeToolCallId, option
37
37
  }
38
38
  //#endregion
39
39
  //#region packages/ai/src/providers/tool-schema-json-projection.ts
40
- function isJsonValue(value) {
41
- if (value === null) return true;
42
- switch (typeof value) {
43
- case "boolean":
44
- case "string": return true;
45
- case "number": return Number.isFinite(value);
46
- case "object":
47
- if (Array.isArray(value)) return value.every(isJsonValue);
48
- return Object.values(value).every(isJsonValue);
49
- default: return false;
50
- }
51
- }
52
40
  function isNonFiniteNumberValue(value) {
53
41
  if (typeof value === "number") return !Number.isFinite(value);
54
42
  if (value === null || typeof value !== "object" || !types.isNumberObject(value)) return false;
@@ -61,11 +49,14 @@ function serializeToolInputSchema(value, path) {
61
49
  let text;
62
50
  try {
63
51
  text = JSON.stringify(value, function(key, entry) {
64
- const holderPath = paths.get(this);
65
- const entryPath = isRoot ? path : holderPath === void 0 ? `${path}.${key}` : Array.isArray(this) ? `${holderPath}[${key}]` : `${holderPath}.${key}`;
52
+ const invalidNumber = nonFiniteNumber.path === null && isNonFiniteNumberValue(entry);
53
+ if (invalidNumber || entry && typeof entry === "object") {
54
+ const holderPath = paths.get(this);
55
+ const entryPath = isRoot ? path : holderPath === void 0 ? `${path}.${key}` : Array.isArray(this) ? `${holderPath}[${key}]` : `${holderPath}.${key}`;
56
+ if (invalidNumber) nonFiniteNumber.path = entryPath;
57
+ else paths.set(entry, entryPath);
58
+ }
66
59
  isRoot = false;
67
- if (nonFiniteNumber.path === null && isNonFiniteNumberValue(entry)) nonFiniteNumber.path = entryPath;
68
- else if (entry && typeof entry === "object") paths.set(entry, entryPath);
69
60
  return entry;
70
61
  });
71
62
  } catch {
@@ -82,13 +73,8 @@ function serializeToolInputSchema(value, path) {
82
73
  schema: {},
83
74
  violations: [`${nonFiniteNumber.path} is not JSON-serializable`]
84
75
  };
85
- const parsed = JSON.parse(text);
86
- if (!isJsonValue(parsed)) return {
87
- schema: {},
88
- violations: [`${path} is not a JSON value`]
89
- };
90
76
  return {
91
- schema: parsed,
77
+ schema: JSON.parse(text),
92
78
  violations: []
93
79
  };
94
80
  }
@@ -100,17 +86,18 @@ const schemaMapKeywords = /* @__PURE__ */ new Set([
100
86
  "patternProperties",
101
87
  "properties"
102
88
  ]);
103
- function findDynamicSchemaKeywordViolations(schema, path) {
104
- if (Array.isArray(schema)) return schema.flatMap((entry, index) => findDynamicSchemaKeywordViolations(entry, `${path}[${index}]`));
105
- if (!isRecord(schema)) return [];
106
- const violations = [];
89
+ function inspectJsonSchema(schema, path, violations) {
90
+ if (Array.isArray(schema)) return schema.every((entry, index) => inspectJsonSchema(entry, `${path}[${index}]`, violations));
91
+ if (!isRecord(schema)) return typeof schema !== "number" || Number.isFinite(schema);
107
92
  for (const key of ["$dynamicRef", "$dynamicAnchor"]) if (key in schema) violations.push(`${path}.${key}`);
108
93
  for (const [key, value] of Object.entries(schema)) {
94
+ if (typeof value === "number" && !Number.isFinite(value)) return false;
109
95
  if (!value || typeof value !== "object") continue;
110
- if (schemaMapKeywords.has(key) && isRecord(value)) for (const [schemaName, childSchema] of Object.entries(value)) violations.push(...findDynamicSchemaKeywordViolations(childSchema, `${path}.${key}.${schemaName}`));
111
- else violations.push(...findDynamicSchemaKeywordViolations(value, `${path}.${key}`));
96
+ if (schemaMapKeywords.has(key) && isRecord(value)) {
97
+ for (const [schemaName, childSchema] of Object.entries(value)) if (!inspectJsonSchema(childSchema, `${path}.${key}.${schemaName}`, violations)) return false;
98
+ } else if (!inspectJsonSchema(value, `${path}.${key}`, violations)) return false;
112
99
  }
113
- return violations;
100
+ return true;
114
101
  }
115
102
  /** Projects one runtime tool input schema to JSON and reports runtime incompatibilities. */
116
103
  function projectRuntimeToolInputSchema(schema, path = "parameters") {
@@ -118,7 +105,10 @@ function projectRuntimeToolInputSchema(schema, path = "parameters") {
118
105
  const violations = [...projection.violations];
119
106
  if (!isRecord(projection.schema)) violations.push(`${path} must be a JSON object schema`);
120
107
  else if (projection.schema.type !== void 0 && projection.schema.type !== "object") violations.push(`${path}.type must be "object"`);
121
- violations.push(...findDynamicSchemaKeywordViolations(projection.schema, path));
108
+ if (!inspectJsonSchema(projection.schema, path, violations)) return {
109
+ schema: {},
110
+ violations: [`${path} is not a JSON value`]
111
+ };
122
112
  return {
123
113
  schema: projection.schema,
124
114
  violations
@@ -1,7 +1,7 @@
1
- import "./index-N3zr6__t.mjs";
2
- import { D as Model, L as ProviderResponse, U as StreamOptions, a as AssistantMessage, et as Usage } from "./types-h38Azne1.mjs";
3
- import { r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-UhnxHuqt.mjs";
4
- import "./event-stream-C988TSLe.mjs";
1
+ import "./index-CefaUGSS.mjs";
2
+ import { B as ProviderResponse, D as Model, J as StreamOptions, a as AssistantMessage, at as Usage } from "./types-Beemor2E.mjs";
3
+ import { r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-DcvAPSBe.mjs";
4
+ import "./event-stream-pXT3FI6X.mjs";
5
5
  import { t as ProviderErrorProjection } from "./provider-error-CzNw4BWX.mjs";
6
6
  //#region packages/ai/src/utils/stream-first-event-timeout.d.ts
7
7
  type StreamStage = "responses" | "completions";
@@ -1,7 +1,7 @@
1
1
  import { r as createAssistantMessageEventStream } from "./event-stream-uSMZJ3FA.mjs";
2
2
  import { a as asOptionalRecord, n as asNonArrayRecord, r as asNullableRecord } from "./utf16-slice-qz3nsy87.mjs";
3
- import { t as sanitizeSurrogates } from "./sanitize-unicode-DCkltN94.mjs";
4
- import { n as projectProviderError } from "./provider-error-jZP5NMTZ.mjs";
3
+ import { t as sanitizeSurrogates } from "./sanitize-unicode-S6binQG-.mjs";
4
+ import { n as projectProviderError } from "./provider-error-BI8kIViN.mjs";
5
5
  //#region packages/ai/src/utils/headers.ts
6
6
  /** Converts a Headers object to a plain record for provider request handling. */
7
7
  function headersToRecord(headers) {
@@ -1,5 +1,5 @@
1
1
  import { d as normalizeOptionalString, t as truncateUtf16Safe } from "./utf16-slice-qz3nsy87.mjs";
2
- import { n as getAiTransportHost } from "./host-D51fmkH6.mjs";
2
+ import { n as getAiTransportHost } from "./host-BIaiBURL.mjs";
3
3
  import { c as parseStrictNonNegativeInteger, i as asFiniteNumberInRange, l as parseStrictPositiveInteger, s as parseStrictFiniteNumber } from "./base64-CEFBpSkN.mjs";
4
4
  import { parseRetryAfterHttpDateMs } from "./internal/retry-after.mjs";
5
5
  import { createHash } from "node:crypto";
@@ -96,7 +96,7 @@ async function readChunkWithIdleTimeout(reader, timeoutMs, onIdleTimeout) {
96
96
  }
97
97
  }
98
98
  async function readResponseTextSnippet(response, options) {
99
- const maxBytes = options?.maxBytes ?? 8 * 1024;
99
+ const maxBytes = options?.maxBytes ?? 8192;
100
100
  const maxChars = options?.maxChars ?? 200;
101
101
  const reader = response.body?.getReader();
102
102
  if (!reader) return;
@@ -1,13 +1,13 @@
1
- import "./index-N3zr6__t.mjs";
2
- import { D as Model, I as ProviderReplayState, V as StreamFn, W as TextContent, Z as ToolCall, a as AssistantMessage, d as Context, et as Usage, k as OpenAICompletionsCompat, n as Api, o as AssistantMessageEvent, q as ThinkingContent } from "./types-h38Azne1.mjs";
3
- import { n as ApiRegistry } from "./api-registry-C9-wZd_W.mjs";
4
- import { a as CodeModeToolSurfaceObservation, d as OpenAIToolProjection, i as BaseOpenAIStreamOptions, o as OpenAICompletionsOptions, s as OpenAIResponsesCompactionRejection } from "./provider-options-HvA_slFa.mjs";
5
- import "./types-DtGu2d3C.mjs";
6
- import { a as resolveAnthropicPayloadPolicy, i as resolveAnthropicEphemeralCacheControl, n as applyAnthropicEphemeralCacheControlMarkers, o as resolveAnthropicServerCompactionPlan, r as applyAnthropicPayloadPolicyToParams, t as applyAnthropicCacheControlToMessages } from "./anthropic-payload-policy-i_5_inWe.mjs";
7
- import { a as ReplayableResponseCompactionItem, c as OpenAIResponsesCompactionOutput, i as OpenAIResponsesRequestParams, n as OpenAIResponsesOptions, o as ResponsesPromptObservation, r as OpenAIResponsesReasoningReplayMetadata } from "./openai-responses-contracts-DgaR3t5T.mjs";
1
+ import "./index-CefaUGSS.mjs";
2
+ import { D as Model, K as StreamFn, Q as ThinkingContent, Y as TextContent, a as AssistantMessage, at as Usage, d as Context, j as OpenAICompletionsCompat, n as Api, nt as ToolCall, o as AssistantMessageEvent, z as ProviderReplayState } from "./types-Beemor2E.mjs";
3
+ import { n as ApiRegistry } from "./api-registry-BbUHEKER.mjs";
4
+ import { a as CodeModeToolSurfaceObservation, d as OpenAIToolProjection, i as BaseOpenAIStreamOptions, o as OpenAICompletionsOptions, s as OpenAIResponsesCompactionRejection } from "./provider-options-DJd_9euj.mjs";
5
+ import "./types-COdhCX0U.mjs";
6
+ import { a as resolveAnthropicPayloadPolicy, i as resolveAnthropicEphemeralCacheControl, n as applyAnthropicEphemeralCacheControlMarkers, o as resolveAnthropicServerCompactionPlan, r as applyAnthropicPayloadPolicyToParams, t as applyAnthropicCacheControlToMessages } from "./anthropic-payload-policy-BTzmNC14.mjs";
7
+ import { a as ReplayableResponseCompactionItem, c as OpenAIResponsesCompactionOutput, i as OpenAIResponsesRequestParams, n as OpenAIResponsesOptions, o as ResponsesPromptObservation, r as OpenAIResponsesReasoningReplayMetadata } from "./openai-responses-contracts-BthRXano.mjs";
8
8
  import { i as resolveOpenAIResponsesServerCompactionPlan, n as resolveOpenAIResponsesCompactEndpointPlan, r as resolveOpenAIResponsesPayloadPolicy, t as applyOpenAIResponsesPayloadPolicy } from "./openai-responses-payload-policy-rLRPsSmB.mjs";
9
- import { n as detectOpenAICompletionsCompat, r as resolveOpenAICompletionsCompat, t as ResolvedOpenAICompletionsCompat } from "./openai-completions-compat-DB7FFq7k.mjs";
10
- import { C as FirstStreamEventInternalOptions, _ as sanitizeNonEmptyTransportPayloadText, a as copyProviderAcceptanceObserver, b as withProviderAcceptanceObserver, c as failTransportStream, d as mergeTransportHeaders, f as mergeTransportMetadata, g as parseTerminalToolCallArguments, h as notifyProviderStreamOpened, i as coerceTransportToolCallArguments, l as finalizeTerminalToolCallArguments, m as notifyProviderHttpResponse, n as WritableTransportStream, o as createEmptyTransportUsage, p as notifyProviderHttpMetadata, r as assignTransportErrorDetails, s as createWritableTransportEventStream, t as ProviderAcceptance, u as finalizeTransportStream, v as sanitizeTransportPayloadText, x as withProviderResponseHook, y as transportAbortError } from "./transport-stream-shared-NjwWNaRY.mjs";
9
+ import { n as detectOpenAICompletionsCompat, r as resolveOpenAICompletionsCompat, t as ResolvedOpenAICompletionsCompat } from "./openai-completions-compat-SZhi0Lf4.mjs";
10
+ import { C as FirstStreamEventInternalOptions, _ as sanitizeNonEmptyTransportPayloadText, a as copyProviderAcceptanceObserver, b as withProviderAcceptanceObserver, c as failTransportStream, d as mergeTransportHeaders, f as mergeTransportMetadata, g as parseTerminalToolCallArguments, h as notifyProviderStreamOpened, i as coerceTransportToolCallArguments, l as finalizeTerminalToolCallArguments, m as notifyProviderHttpResponse, n as WritableTransportStream, o as createEmptyTransportUsage, p as notifyProviderHttpMetadata, r as assignTransportErrorDetails, s as createWritableTransportEventStream, t as ProviderAcceptance, u as finalizeTransportStream, v as sanitizeTransportPayloadText, x as withProviderResponseHook, y as transportAbortError } from "./transport-stream-shared-BbG7PThh.mjs";
11
11
  import { r as sortPromptCacheToolsByName } from "./prompt-cache-stability-Cwcjv_fx.mjs";
12
12
  import OpenAI from "openai";
13
13
  import { ResponseCreateParamsStreaming, ResponseInput, ResponseInputItem as ResponseInputItem$1 } from "openai/resources/responses/responses.js";
@@ -137,6 +137,9 @@ export type MutableAssistantOutput = Omit<AssistantMessage, "content" | "usage">
137
137
  export declare function parseOpenAICompletionsUsage(rawUsage: NonNullable<ChatCompletionChunk["usage"]> & {
138
138
  cost?: unknown;
139
139
  prompt_cache_hit_tokens?: number;
140
+ prompt_tokens_details?: {
141
+ cache_creation_input_tokens?: number;
142
+ };
140
143
  }, model: Model, options?: {
141
144
  includeReasoningTokens?: boolean;
142
145
  }): MutableAssistantOutput["usage"];