@openclaw/ai 2026.11.6 → 2026.11.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 (88) hide show
  1. package/README.md +7 -1
  2. package/dist/.source-module-urls/fe058cc430242ce2ab0dfbcbe153e240a52cf9c3072c3dc0a73e5f956b6ba49b.json +1 -1
  3. package/dist/{anthropic-BNkSFJGp.mjs → anthropic-OsxZVxT3.mjs} +5 -5
  4. package/dist/{anthropic-payload-policy-DxijyMFH.d.mts → anthropic-payload-policy-CcIAtAos.d.mts} +3 -3
  5. package/dist/{anthropic-stream-lifecycle-Dp5TblwC.mjs → anthropic-stream-lifecycle-BA3FkIQn.mjs} +10 -10
  6. package/dist/{anthropic-tool-projection-DX_igbpX.d.mts → anthropic-tool-projection-DFvJiCQy.d.mts} +1 -1
  7. package/dist/{anthropic-tool-projection-DpN77rtb.mjs → anthropic-tool-projection-DP6R_sBq.mjs} +1 -1
  8. package/dist/{api-registry-CCdcCPSA.d.mts → api-registry-CvAtt60P.d.mts} +2 -2
  9. package/dist/{assistant-output-BEE6TWdj.mjs → assistant-output-ByrQmF0P.mjs} +1 -1
  10. package/dist/{azure-openai-responses-BjX0owXR.mjs → azure-openai-responses-NfpppzMN.mjs} +4 -4
  11. package/dist/diagnostics.d.mts +3 -3
  12. package/dist/event-stream-C1QKiamS.d.mts +1 -0
  13. package/dist/{event-stream-CDyUvxkI.d.mts → event-stream-DSHjzUpL.d.mts} +1 -1
  14. package/dist/event-stream.d.mts +2 -2
  15. package/dist/{google-BJwjWpAX.mjs → google-DkwM8MvM.mjs} +2 -2
  16. package/dist/{google-interactions-BEOEOp0d.mjs → google-interactions-BUXAmg4x.mjs} +10 -10
  17. package/dist/{google-messages-Bja86PP8.mjs → google-messages-ClSK5R7R.mjs} +3 -3
  18. package/dist/{google-provider-stream-GYgtu60C.mjs → google-provider-stream-BiDLtKTp.mjs} +6 -6
  19. package/dist/{google-shared-7sAuYDNq.mjs → google-shared-Bny3gZ6L.mjs} +5 -5
  20. package/dist/{google-vertex-2zavNJkj.mjs → google-vertex-DQ3ErTAp.mjs} +2 -2
  21. package/dist/{host-DZ29cEYd.mjs → host-BVynqwGC.mjs} +40 -28
  22. package/dist/{host-C2_6_j-L.d.mts → host-bx8W0SER.d.mts} +3 -3
  23. package/dist/{host-policy-DqFgGiV6.mjs → host-policy-C1VDPJqb.mjs} +1 -1
  24. package/dist/{index-DkF8J4yH.d.mts → index-DqIreoGH.d.mts} +3 -3
  25. package/dist/index.d.mts +7 -7
  26. package/dist/index.mjs +2 -2
  27. package/dist/internal/anthropic.d.mts +6 -6
  28. package/dist/internal/anthropic.mjs +4 -4
  29. package/dist/internal/google.d.mts +3 -3
  30. package/dist/internal/google.mjs +1 -1
  31. package/dist/internal/openai-completions-compat.d.mts +1 -1
  32. package/dist/internal/openai-completions-compat.mjs +1 -1
  33. package/dist/internal/openai-responses-payload-policy.d.mts +1 -1
  34. package/dist/internal/openai-responses-payload-policy.mjs +2 -2
  35. package/dist/internal/openai.d.mts +10 -10
  36. package/dist/internal/openai.mjs +9 -9
  37. package/dist/internal/runtime.d.mts +8 -8
  38. package/dist/internal/runtime.mjs +3 -3
  39. package/dist/internal/shared.d.mts +10 -10
  40. package/dist/internal/shared.mjs +3 -3
  41. package/dist/internal/tool-schema.d.mts +2 -2
  42. package/dist/internal/tool-schema.mjs +3 -3
  43. package/dist/{mistral-CjTsnfIz.mjs → mistral-C_S0gC58.mjs} +9 -9
  44. package/dist/{openai-chatgpt-responses-BinD_u6y.mjs → openai-chatgpt-responses-Dzj5zqW6.mjs} +11 -11
  45. package/dist/{openai-completions-B380Vg0n.mjs → openai-completions-7jTg6B6X.mjs} +3 -3
  46. package/dist/{openai-completions-compat-CEj778te.d.mts → openai-completions-compat-C26ajk4r.d.mts} +3 -3
  47. package/dist/{openai-completions-compat-CmyT3piu.mjs → openai-completions-compat-CDNGOoQn.mjs} +2 -2
  48. package/dist/{openai-completions-transport-BGoKrb3z.mjs → openai-completions-transport-DKSeBBXY.mjs} +28 -28
  49. package/dist/{openai-function-tool-DUT14vv6.mjs → openai-function-tool-8ION6Su5.mjs} +1 -1
  50. package/dist/{openai-prompt-cache-DV1t-7dP.mjs → openai-prompt-cache-CZSWH8rC.mjs} +1 -1
  51. package/dist/{openai-prompt-cache-C_XCgsDn.d.mts → openai-prompt-cache-rhVEVVcq.d.mts} +2 -2
  52. package/dist/{openai-responses-ClgomgWG.mjs → openai-responses-Dn3ad3e-.mjs} +6 -6
  53. package/dist/{openai-responses-compaction-replay-6MNmDBBu.d.mts → openai-responses-compaction-replay-DpVAOvpR.d.mts} +4 -4
  54. package/dist/{openai-responses-contracts-D-saZnr_.d.mts → openai-responses-contracts-D6OypGUv.d.mts} +4 -4
  55. package/dist/{openai-responses-contracts-BpyK1Ygq.mjs → openai-responses-contracts-YlVzpuW_.mjs} +1 -1
  56. package/dist/{openai-responses-endpoint-BGwjxesS.mjs → openai-responses-endpoint-D8fhfY4d.mjs} +1 -1
  57. package/dist/{openai-responses-request-lifecycle-pjoJ2KB8.mjs → openai-responses-request-lifecycle-BRnD7G5s.mjs} +6 -6
  58. package/dist/{openai-responses-shared-BE2zSjin.mjs → openai-responses-shared-CNBWb5iO.mjs} +14 -14
  59. package/dist/{openai-responses-terminal-usage-CuXS9TCK.d.mts → openai-responses-terminal-usage-B9dUhNQJ.d.mts} +2 -2
  60. package/dist/{openai-responses-websocket-Bzo4ykRX.mjs → openai-responses-websocket-BbTCvD64.mjs} +8 -8
  61. package/dist/{openai-stop-reason-8s70vDXj.mjs → openai-stop-reason-CpYv2sZh.mjs} +3 -1
  62. package/dist/{otel-VKlSbm9p.mjs → otel-Cmspirtq.mjs} +1 -1
  63. package/dist/{provider-options-Bo0XJEeK.d.mts → provider-options-2vKAAn7G.d.mts} +3 -3
  64. package/dist/{provider-replay-context-BAwe7OIR.mjs → provider-replay-context-CeMMMu55.mjs} +1 -1
  65. package/dist/{provider-transcript-transform-BA4B0NIr.mjs → provider-transcript-transform-C99cDpZV.mjs} +1 -1
  66. package/dist/{provider-transport-turn-state-BU7KCpkK.mjs → provider-transport-turn-state-DIis-pzH.mjs} +3 -3
  67. package/dist/{provider-types-wHqA9oSz.d.mts → provider-types-C8GKdM8d.d.mts} +4 -4
  68. package/dist/provider-types.d.mts +6 -6
  69. package/dist/providers.d.mts +2 -2
  70. package/dist/providers.mjs +10 -10
  71. package/dist/{sanitize-unicode-D0B2CDXP.d.mts → sanitize-unicode-DzL-LjLt.d.mts} +3 -3
  72. package/dist/{simple-options-BPzChce1.mjs → simple-options-M4Ngy-Ej.mjs} +3 -3
  73. package/dist/{stream-WbisbzUF.mjs → stream-Dm0EMT-0.mjs} +1 -1
  74. package/dist/{telemetry-BS2h0FVa.mjs → telemetry-X9oIHyf3.mjs} +2 -2
  75. package/dist/{tool-schema-json-projection-C9KSjPuG.mjs → tool-schema-json-projection-BIs0pwdB.mjs} +1 -1
  76. package/dist/{transport-stream-shared-DtOk207K.mjs → transport-stream-shared-CBr4U0TY.mjs} +4 -3
  77. package/dist/{transport-stream-shared-Cwd9ZIqy.d.mts → transport-stream-shared-CMWWoyy5.d.mts} +6 -5
  78. package/dist/{transport-utils-Czu6bnbQ.mjs → transport-utils-DSJQf0i_.mjs} +2 -2
  79. package/dist/transports.d.mts +19 -15
  80. package/dist/transports.mjs +21 -13
  81. package/dist/{types-DrqxFIh9.d.mts → types-B6vvn8is.d.mts} +10 -2
  82. package/dist/types-a4Eg5L2z.d.mts +1 -0
  83. package/dist/types.d.mts +6 -6
  84. package/dist/{validation-ByHJvdN2.d.mts → validation-B3VZTKei.d.mts} +1 -1
  85. package/dist/validation.d.mts +1 -1
  86. package/package.json +1 -1
  87. package/dist/event-stream-X0f18GAs.d.mts +0 -1
  88. package/dist/types-g3molYjD.d.mts +0 -1
@@ -1,3 +1,3 @@
1
- import { a as resolveOpenAICompletionsCompat } from "../openai-completions-compat-CmyT3piu.mjs";
1
+ import { a as resolveOpenAICompletionsCompat } from "../openai-completions-compat-CDNGOoQn.mjs";
2
2
  import { t as requiresReasoningContentReplay } from "../openai-completions-reasoning-replay-BwT1xwRI.mjs";
3
3
  export { requiresReasoningContentReplay, resolveOpenAICompletionsCompat };
@@ -1,4 +1,4 @@
1
- import { d as readOpenAIResponsesCompactionWindow, t as OPENAI_RESPONSES_APIS, u as OpenAIResponsesCompactionOutput } from "../openai-responses-contracts-D-saZnr_.mjs";
1
+ import { d as readOpenAIResponsesCompactionWindow, t as OPENAI_RESPONSES_APIS, u as OpenAIResponsesCompactionOutput } from "../openai-responses-contracts-D6OypGUv.mjs";
2
2
  import { c as resolveOpenAIResponsesServerCompactionPlan, i as normalizeOpenAIServiceTier, o as resolveOpenAIResponsesPayloadPolicy, s as resolveOpenAIResponsesRequestContextTokens, t as OpenAIServiceTier } from "../openai-responses-payload-policy-BsQaD-gD.mjs";
3
3
  //#region packages/ai/src/transports/openai-responses-endpoint.d.ts
4
4
  export declare function supportsNativeOpenAIResponsesEndpoint(params: {
@@ -1,3 +1,3 @@
1
- import { i as OPENAI_RESPONSES_APIS } from "../openai-responses-contracts-BpyK1Ygq.mjs";
2
- import { d as normalizeOpenAIServiceTier, h as resolveOpenAIResponsesServerCompactionPlan, m as resolveOpenAIResponsesRequestContextTokens, n as supportsNativeOpenAIResponsesEndpoint, o as readOpenAIResponsesCompactionWindow, p as resolveOpenAIResponsesPayloadPolicy } from "../openai-responses-endpoint-BGwjxesS.mjs";
1
+ import { i as OPENAI_RESPONSES_APIS } from "../openai-responses-contracts-YlVzpuW_.mjs";
2
+ import { d as normalizeOpenAIServiceTier, h as resolveOpenAIResponsesServerCompactionPlan, m as resolveOpenAIResponsesRequestContextTokens, n as supportsNativeOpenAIResponsesEndpoint, o as readOpenAIResponsesCompactionWindow, p as resolveOpenAIResponsesPayloadPolicy } from "../openai-responses-endpoint-D8fhfY4d.mjs";
3
3
  export { OPENAI_RESPONSES_APIS, normalizeOpenAIServiceTier, readOpenAIResponsesCompactionWindow, resolveOpenAIResponsesPayloadPolicy, resolveOpenAIResponsesRequestContextTokens, resolveOpenAIResponsesServerCompactionPlan, supportsNativeOpenAIResponsesEndpoint };
@@ -1,13 +1,13 @@
1
- import { d as Context, it as StreamFunction, nt as StopReason, tt as SimpleStreamOptions } from "../types-DrqxFIh9.mjs";
2
- import "../index-DkF8J4yH.mjs";
3
- import "../types-g3molYjD.mjs";
4
- import { a as ProviderContext, c as ProviderModel } from "../provider-types-wHqA9oSz.mjs";
5
- import { A as resolveOpenAISupportedReasoningEfforts, C as isOpenAIGpt55Model, D as resolveOpenAIModelReasoningEfforts, E as normalizeOpenAIReasoningEffort, M as supportsOpenAITemperature, O as resolveOpenAIReasoningEffortForModel, S as isOpenAIGpt54MiniModel, T as isOpenAIGpt6Model, _ as reconcileOpenAICompletionsToolChoice, a as BaseOpenAIStreamOptions, b as OpenAIReasoningEffort, c as OpenAICompletionsOptions, d as measuredRequestPressure, g as projectOpenAITools, h as OpenAIToolProjection, j as supportsOpenAIReasoningEffort, k as resolveOpenAIReasoningEffortMapping, m as OpenAICompletionsToolChoice, o as CodeModeToolSurfaceObservation, p as reasoningTagTextPolicy, u as codeModeToolSurfaceObserver, v as reconcileOpenAIResponsesToolChoice, w as isOpenAIGpt56Model, x as applyOpenAICompletionsToolReasoning, y as OpenAIApiReasoningEffort } from "../provider-options-Bo0XJEeK.mjs";
6
- import { t as ResolvedOpenAICompletionsCompat } from "../openai-completions-compat-CEj778te.mjs";
7
- import { c as responsesPromptObserver, f as OpenAIRequestReasoningEffort, l as responsesServiceTierObserver, o as ResponsesPromptObservation, s as ResponsesServiceTierObservation } from "../openai-responses-contracts-D-saZnr_.mjs";
8
- import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "../openai-prompt-cache-C_XCgsDn.mjs";
9
- import { a as readResponsesReasoningTokens, i as mapResponsesTerminalUsage, n as applyResponsesCacheWritePricing, o as resolveResponsesTerminalStopReason, r as isResponsesOutputLimitToolCallError, t as ResponsesTerminalUsagePayload } from "../openai-responses-terminal-usage-CuXS9TCK.mjs";
10
- import "../openai-responses-compaction-replay-6MNmDBBu.mjs";
1
+ import { f as Context, it as StopReason, ot as StreamFunction, rt as SimpleStreamOptions } from "../types-B6vvn8is.mjs";
2
+ import "../index-DqIreoGH.mjs";
3
+ import "../types-a4Eg5L2z.mjs";
4
+ import { a as ProviderContext, c as ProviderModel } from "../provider-types-C8GKdM8d.mjs";
5
+ import { A as resolveOpenAISupportedReasoningEfforts, C as isOpenAIGpt55Model, D as resolveOpenAIModelReasoningEfforts, E as normalizeOpenAIReasoningEffort, M as supportsOpenAITemperature, O as resolveOpenAIReasoningEffortForModel, S as isOpenAIGpt54MiniModel, T as isOpenAIGpt6Model, _ as reconcileOpenAICompletionsToolChoice, a as BaseOpenAIStreamOptions, b as OpenAIReasoningEffort, c as OpenAICompletionsOptions, d as measuredRequestPressure, g as projectOpenAITools, h as OpenAIToolProjection, j as supportsOpenAIReasoningEffort, k as resolveOpenAIReasoningEffortMapping, m as OpenAICompletionsToolChoice, o as CodeModeToolSurfaceObservation, p as reasoningTagTextPolicy, u as codeModeToolSurfaceObserver, v as reconcileOpenAIResponsesToolChoice, w as isOpenAIGpt56Model, x as applyOpenAICompletionsToolReasoning, y as OpenAIApiReasoningEffort } from "../provider-options-2vKAAn7G.mjs";
6
+ import { t as ResolvedOpenAICompletionsCompat } from "../openai-completions-compat-C26ajk4r.mjs";
7
+ import { c as responsesPromptObserver, f as OpenAIRequestReasoningEffort, l as responsesServiceTierObserver, o as ResponsesPromptObservation, s as ResponsesServiceTierObservation } from "../openai-responses-contracts-D6OypGUv.mjs";
8
+ import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "../openai-prompt-cache-rhVEVVcq.mjs";
9
+ import { a as readResponsesReasoningTokens, i as mapResponsesTerminalUsage, n as applyResponsesCacheWritePricing, o as resolveResponsesTerminalStopReason, r as isResponsesOutputLimitToolCallError, t as ResponsesTerminalUsagePayload } from "../openai-responses-terminal-usage-B9dUhNQJ.mjs";
10
+ import "../openai-responses-compaction-replay-DpVAOvpR.mjs";
11
11
  import { encodedModelRequestBodyStream, modelRequestBodyState } from "./model-request-body.mjs";
12
12
  import { ResponseCreateParamsStreaming, ResponseInputItem } from "openai/resources/responses/responses.js";
13
13
  import { ChatCompletionMessageParam } from "openai/resources/chat/completions.js";
@@ -1,14 +1,14 @@
1
- import { A as resolveOpenAIReasoningEffortMapping, C as isOpenAIGpt54MiniModel, D as normalizeOpenAIReasoningEffort, E as isOpenAIGpt6Model, M as supportsOpenAIReasoningEffort, N as supportsOpenAITemperature, O as resolveOpenAIModelReasoningEfforts, S as applyOpenAICompletionsToolReasoning, T as isOpenAIGpt56Model, j as resolveOpenAISupportedReasoningEfforts, k as resolveOpenAIReasoningEffortForModel, v as responsesPromptObserver, w as isOpenAIGpt55Model, y as responsesServiceTierObserver } from "../openai-responses-contracts-BpyK1Ygq.mjs";
2
- import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "../openai-prompt-cache-DV1t-7dP.mjs";
1
+ import { A as resolveOpenAIReasoningEffortMapping, C as isOpenAIGpt54MiniModel, D as normalizeOpenAIReasoningEffort, E as isOpenAIGpt6Model, M as supportsOpenAIReasoningEffort, N as supportsOpenAITemperature, O as resolveOpenAIModelReasoningEfforts, S as applyOpenAICompletionsToolReasoning, T as isOpenAIGpt56Model, j as resolveOpenAISupportedReasoningEfforts, k as resolveOpenAIReasoningEffortForModel, v as responsesPromptObserver, w as isOpenAIGpt55Model, y as responsesServiceTierObserver } from "../openai-responses-contracts-YlVzpuW_.mjs";
2
+ import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "../openai-prompt-cache-CZSWH8rC.mjs";
3
3
  import { _ as isResponsesOutputLimitToolCallError, b as resolveResponsesTerminalStopReason, g as applyResponsesCacheWritePricing, v as mapResponsesTerminalUsage, y as readResponsesReasoningTokens } from "../diagnostics-CloVGQiK.mjs";
4
- import { d as measuredRequestPressure, p as reasoningTagTextPolicy, u as codeModeToolSurfaceObserver } from "../simple-options-BPzChce1.mjs";
4
+ import { d as measuredRequestPressure, p as reasoningTagTextPolicy, u as codeModeToolSurfaceObserver } from "../simple-options-M4Ngy-Ej.mjs";
5
5
  import { encodedModelRequestBodyStream, modelRequestBodyState } from "./model-request-body.mjs";
6
- import { l as convertMessages, s as hasResponsesWebSearchTool } from "../openai-completions-transport-BGoKrb3z.mjs";
7
- import { G as reconcileOpenAICompletionsToolChoice, K as reconcileOpenAIResponsesToolChoice, W as projectOpenAITools, _ as isAzureResponsesTextDeltaEventType, b as resolveResponsesMessageSnapshotCollapse, f as AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, ft as bindResponsesInputMessage, g as isAzureResponsesTextDeltaEvent, h as OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, l as createResponsesToolCallTracker, m as OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, p as AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, u as readResponsesToolCallItemIdentity, v as isResponsesTextContentPartType, y as isResponsesTextDeltaEventType } from "../openai-responses-shared-BE2zSjin.mjs";
6
+ import { l as convertMessages, s as hasResponsesWebSearchTool } from "../openai-completions-transport-DKSeBBXY.mjs";
7
+ import { G as reconcileOpenAICompletionsToolChoice, K as reconcileOpenAIResponsesToolChoice, W as projectOpenAITools, _ as isAzureResponsesTextDeltaEventType, b as resolveResponsesMessageSnapshotCollapse, f as AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, ft as bindResponsesInputMessage, g as isAzureResponsesTextDeltaEvent, h as OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, l as createResponsesToolCallTracker, m as OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, p as AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, u as readResponsesToolCallItemIdentity, v as isResponsesTextContentPartType, y as isResponsesTextDeltaEventType } from "../openai-responses-shared-CNBWb5iO.mjs";
8
8
  import { n as isTraditionalAzureOpenAIHost, t as isOpenAICompatibleAzureResponsesBaseUrl } from "../azure-openai-responses-client-compat-a5PrPIdL.mjs";
9
- import { t as mapOpenAIStopReason } from "../openai-stop-reason-8s70vDXj.mjs";
9
+ import { t as mapOpenAIStopReason } from "../openai-stop-reason-CpYv2sZh.mjs";
10
10
  import { n as resolveAzureDeploymentNameFromMap, t as parseAzureDeploymentNameMap } from "../azure-deployment-map-DKJ8Xc4c.mjs";
11
- import { n as responsesRequestLifecycle, t as independentResponsesRequest } from "../openai-responses-request-lifecycle-pjoJ2KB8.mjs";
12
- import { n as streamOpenAICompletions, r as streamSimpleOpenAICompletions } from "../openai-completions-B380Vg0n.mjs";
13
- import { n as streamOpenAIResponses, r as streamSimpleOpenAIResponses } from "../openai-responses-ClgomgWG.mjs";
11
+ import { n as responsesRequestLifecycle, t as independentResponsesRequest } from "../openai-responses-request-lifecycle-BRnD7G5s.mjs";
12
+ import { n as streamOpenAICompletions, r as streamSimpleOpenAICompletions } from "../openai-completions-7jTg6B6X.mjs";
13
+ import { n as streamOpenAIResponses, r as streamSimpleOpenAIResponses } from "../openai-responses-Dn3ad3e-.mjs";
14
14
  export { AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH, OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, applyOpenAICompletionsToolReasoning, applyResponsesCacheWritePricing, bindResponsesInputMessage, clampOpenAIPromptCacheKey, codeModeToolSurfaceObserver, convertMessages, createResponsesToolCallTracker, encodedModelRequestBodyStream, hasResponsesWebSearchTool, independentResponsesRequest, isAzureResponsesTextDeltaEvent, isAzureResponsesTextDeltaEventType, isOpenAICompatibleAzureResponsesBaseUrl, isOpenAIGpt54MiniModel, isOpenAIGpt55Model, isOpenAIGpt56Model, isOpenAIGpt6Model, isResponsesOutputLimitToolCallError, isResponsesTextContentPartType, isResponsesTextDeltaEventType, isTraditionalAzureOpenAIHost, mapOpenAIStopReason, mapResponsesTerminalUsage, measuredRequestPressure, modelRequestBodyState, normalizeOpenAIReasoningEffort, parseAzureDeploymentNameMap, projectOpenAITools, readResponsesReasoningTokens, readResponsesToolCallItemIdentity, reasoningTagTextPolicy, reconcileOpenAICompletionsToolChoice, reconcileOpenAIResponsesToolChoice, resolveAzureDeploymentNameFromMap, resolveOpenAIModelReasoningEfforts, resolveOpenAIPromptCacheParams, resolveOpenAIReasoningEffortForModel, resolveOpenAIReasoningEffortMapping, resolveOpenAISupportedReasoningEfforts, resolveResponsesMessageSnapshotCollapse, resolveResponsesTerminalStopReason, responsesPromptObserver, responsesRequestLifecycle, responsesServiceTierObserver, streamOpenAICompletions, streamOpenAIResponses, streamSimpleOpenAICompletions, streamSimpleOpenAIResponses, supportsOpenAIReasoningEffort, supportsOpenAITemperature };
@@ -1,11 +1,11 @@
1
- import { G as ProviderStreamOptions, N as ModelThinkingLevel, a as AssistantMessage, at as StreamOptions, d as Context, gt as Usage, k as Model, n as Api, s as AssistantMessageEventStreamContract, tt as SimpleStreamOptions } from "../types-DrqxFIh9.mjs";
2
- import "../index-DkF8J4yH.mjs";
3
- import { i as getEventStreamCompletion } from "../event-stream-CDyUvxkI.mjs";
4
- import { a as RegisteredApiProvider, t as ApiProvider } from "../api-registry-CCdcCPSA.mjs";
5
- import { m as getDefaultAiTransportHost } from "../host-C2_6_j-L.mjs";
6
- import "../types-g3molYjD.mjs";
7
- import { n as isContextOverflow, t as sanitizeSurrogates } from "../sanitize-unicode-D0B2CDXP.mjs";
8
- import { y as parseTerminalToolCallArguments } from "../transport-stream-shared-Cwd9ZIqy.mjs";
1
+ import { F as ModelThinkingLevel, c as AssistantMessageEventStreamContract, f as Context, j as Model, n as Api, o as AssistantMessage, q as ProviderStreamOptions, rt as SimpleStreamOptions, st as StreamOptions, vt as Usage } from "../types-B6vvn8is.mjs";
2
+ import "../index-DqIreoGH.mjs";
3
+ import { i as getEventStreamCompletion } from "../event-stream-DSHjzUpL.mjs";
4
+ import { a as RegisteredApiProvider, t as ApiProvider } from "../api-registry-CvAtt60P.mjs";
5
+ import { m as getDefaultAiTransportHost } from "../host-bx8W0SER.mjs";
6
+ import "../types-a4Eg5L2z.mjs";
7
+ import { n as isContextOverflow, t as sanitizeSurrogates } from "../sanitize-unicode-DzL-LjLt.mjs";
8
+ import { b as parseTerminalToolCallArguments } from "../transport-stream-shared-CMWWoyy5.mjs";
9
9
  //#region packages/ai/src/internal/default-runtime.d.ts
10
10
  export declare const defaultApiRegistry: {
11
11
  registerApiProvider: <TApi extends Api, TOptions extends StreamOptions>(provider: ApiProvider<TApi, TOptions>, sourceId?: string) => void;
@@ -1,9 +1,9 @@
1
1
  import { o as getEventStreamCompletion } from "../event-stream-X2gmsUWv.mjs";
2
- import { r as createApiRegistry, t as createLlmRuntime } from "../stream-WbisbzUF.mjs";
3
- import { A as applyProviderReportedUsageCost, M as clampThinkingLevel, N as getSupportedThinkingLevels, P as modelsAreEqual, j as calculateCost, k as headersToRecord } from "../host-DZ29cEYd.mjs";
2
+ import { r as createApiRegistry, t as createLlmRuntime } from "../stream-Dm0EMT-0.mjs";
3
+ import { A as applyProviderReportedUsageCost, M as clampThinkingLevel, N as getSupportedThinkingLevels, P as modelsAreEqual, j as calculateCost, k as headersToRecord } from "../host-BVynqwGC.mjs";
4
4
  import { n as getSessionResourceOwnerId, r as registerSessionResourceCleanup, t as cleanupSessionResources } from "../session-resources-vKvGIE3J.mjs";
5
5
  import { t as sanitizeSurrogates } from "../sanitize-unicode-CRGuMONI.mjs";
6
- import { A as parseStreamingJson, D as shortHash, O as createToolArgumentPreviewSchedule, _ as parseTerminalToolCallArguments, j as repairJson, k as parseJsonWithRepair } from "../transport-stream-shared-DtOk207K.mjs";
6
+ import { A as parseJsonWithRepair, M as repairJson, O as shortHash, j as parseStreamingJson, k as createToolArgumentPreviewSchedule, v as parseTerminalToolCallArguments } from "../transport-stream-shared-CBr4U0TY.mjs";
7
7
  import { n as getEnvApiKey, t as findEnvKeys } from "../env-api-keys-BuHc86ya.mjs";
8
8
  import { t as createDeferredEventBuffer } from "../deferred-event-buffer-tIGkTkTm.mjs";
9
9
  import { n as onLlmRequestActivity, t as notifyLlmRequestActivity } from "../llm-request-activity-DzaHoRAU.mjs";
@@ -1,13 +1,13 @@
1
- import { O as Message, a as AssistantMessage, ct as ThinkingBudgets, d as Context, k as Model, n as Api, tt as SimpleStreamOptions, ut as ThinkingLevel, z as PreparedSystemPrompt } from "../types-DrqxFIh9.mjs";
2
- import "../index-DkF8J4yH.mjs";
3
- import { a as readAssistantThinkingAppend } from "../event-stream-CDyUvxkI.mjs";
4
- import "../types-g3molYjD.mjs";
5
- import { u as ProviderStreamOptions } from "../provider-types-wHqA9oSz.mjs";
6
- import { f as preparedRequestSuffix } from "../provider-options-Bo0XJEeK.mjs";
1
+ import { A as Message, V as PreparedSystemPrompt, f as Context, ft as ThinkingLevel, i as AssistantHistoryMessage, j as Model, n as Api, rt as SimpleStreamOptions, ut as ThinkingBudgets } from "../types-B6vvn8is.mjs";
2
+ import "../index-DqIreoGH.mjs";
3
+ import { a as readAssistantThinkingAppend } from "../event-stream-DSHjzUpL.mjs";
4
+ import "../types-a4Eg5L2z.mjs";
5
+ import { u as ProviderStreamOptions } from "../provider-types-C8GKdM8d.mjs";
6
+ import { f as preparedRequestSuffix } from "../provider-options-2vKAAn7G.mjs";
7
7
  import { serializeModelRequestBody } from "./model-request-body.mjs";
8
- import { r as matchesContextOverflowMessage, t as sanitizeSurrogates } from "../sanitize-unicode-D0B2CDXP.mjs";
8
+ import { r as matchesContextOverflowMessage, t as sanitizeSurrogates } from "../sanitize-unicode-DzL-LjLt.mjs";
9
9
  import { i as projectProviderError } from "../provider-error-CnaWYTRY.mjs";
10
- import { m as iterateSseFrames } from "../transport-stream-shared-Cwd9ZIqy.mjs";
10
+ import { h as iterateSseFrames } from "../transport-stream-shared-CMWWoyy5.mjs";
11
11
  import { i as projectPreparedDiagnosticValue, n as isCredentialFieldName } from "../credential-redaction-DrgndwTJ.mjs";
12
12
  import { n as normalizeStructuredPromptSection, r as sortPromptCacheToolsByName, t as normalizePromptCapabilityIds } from "../prompt-cache-stability-Cwcjv_fx.mjs";
13
13
  //#region packages/ai/src/providers/simple-options.d.ts
@@ -55,7 +55,7 @@ export declare function isImageWithMediaPayload<T>(block: T): block is T & {
55
55
  };
56
56
  //#endregion
57
57
  //#region packages/ai/src/transcript-transform.d.ts
58
- export declare function transformMessages<TApi extends Api>(messages: Message[], model: Model<TApi>, normalizeToolCallId?: (id: string, model: Model<TApi>, source: AssistantMessage) => string): Message[];
58
+ export declare function transformMessages<TApi extends Api>(messages: Message[], model: Model<TApi>, normalizeToolCallId?: (id: string, model: Model<TApi>, source: AssistantHistoryMessage) => string): Message[];
59
59
  //#endregion
60
60
  //#region packages/ai/src/replay-turn-classification.d.ts
61
61
  type AssistantTurnLike = {
@@ -107,7 +107,7 @@ export declare function prependSystemPromptAdditionAfterCacheBoundary(params: {
107
107
  /** Request facts shared by Copilot transports; identity headers remain plugin-owned. */
108
108
  export declare function projectCopilotRequestFacts(messages: readonly {
109
109
  role: string;
110
- content: unknown;
110
+ content?: unknown;
111
111
  runtimeContext?: unknown;
112
112
  runtimeContextCarrier?: unknown;
113
113
  }[], contentMode: "direct" | "nested", hasImages?: boolean): {
@@ -1,10 +1,10 @@
1
1
  import { s as readAssistantThinkingAppend } from "../event-stream-X2gmsUWv.mjs";
2
- import { F as hasMediaPayload, I as isImageWithMediaPayload, c as transformMessages, d as hasOnlyAssistantReasoningContent, f as isReasoningOnlyLengthAssistantTurn, l as FAILED_ASSISTANT_REPLAY_TEXT, m as resolveFailedAssistantReplay, p as isStreamErrorFallbackContent, u as STREAM_ERROR_FALLBACK_TEXT } from "../host-DZ29cEYd.mjs";
2
+ import { F as hasMediaPayload, I as isImageWithMediaPayload, c as transformMessages, d as hasOnlyAssistantReasoningContent, f as isReasoningOnlyLengthAssistantTurn, l as FAILED_ASSISTANT_REPLAY_TEXT, m as resolveFailedAssistantReplay, p as isStreamErrorFallbackContent, u as STREAM_ERROR_FALLBACK_TEXT } from "../host-BVynqwGC.mjs";
3
3
  import { i as isCredentialFieldName, n as projectProviderError, o as projectPreparedDiagnosticValue } from "../provider-error-DD-fo4Rz.mjs";
4
4
  import { t as sanitizeSurrogates } from "../sanitize-unicode-CRGuMONI.mjs";
5
5
  import { n as normalizeStructuredPromptSection, r as sortPromptCacheToolsByName, t as normalizePromptCapabilityIds } from "../prompt-cache-stability-w-ICeyOI.mjs";
6
- import { C as stripSystemPromptCacheBoundary, S as splitSystemPromptRelocatableBoundary, _ as createSystemPromptCacheBoundaryStripper, a as describeToolResultMediaPlaceholder, b as prependSystemPromptAdditionAfterCacheBoundary, c as extractToolResultText, f as preparedRequestSuffix, g as SYSTEM_PROMPT_RELOCATABLE_BOUNDARY_END, h as SYSTEM_PROMPT_RELOCATABLE_BOUNDARY, i as clampReasoning, l as formatToolResultText, m as SYSTEM_PROMPT_CACHE_BOUNDARY, n as buildBaseOptions, o as describeUnsupportedToolResultMedia, r as clampMaxTokensToModel, s as extractToolResultBlockText, t as adjustMaxTokensForThinking, v as ensureSystemPromptCacheBoundary, w as stripSystemPromptRelocatableBoundary, x as splitSystemPromptCacheBoundary, y as prepareSystemPrompt } from "../simple-options-BPzChce1.mjs";
7
- import { f as iterateSseFrames } from "../transport-stream-shared-DtOk207K.mjs";
6
+ import { C as stripSystemPromptCacheBoundary, S as splitSystemPromptRelocatableBoundary, _ as createSystemPromptCacheBoundaryStripper, a as describeToolResultMediaPlaceholder, b as prependSystemPromptAdditionAfterCacheBoundary, c as extractToolResultText, f as preparedRequestSuffix, g as SYSTEM_PROMPT_RELOCATABLE_BOUNDARY_END, h as SYSTEM_PROMPT_RELOCATABLE_BOUNDARY, i as clampReasoning, l as formatToolResultText, m as SYSTEM_PROMPT_CACHE_BOUNDARY, n as buildBaseOptions, o as describeUnsupportedToolResultMedia, r as clampMaxTokensToModel, s as extractToolResultBlockText, t as adjustMaxTokensForThinking, v as ensureSystemPromptCacheBoundary, w as stripSystemPromptRelocatableBoundary, x as splitSystemPromptCacheBoundary, y as prepareSystemPrompt } from "../simple-options-M4Ngy-Ej.mjs";
7
+ import { p as iterateSseFrames } from "../transport-stream-shared-CBr4U0TY.mjs";
8
8
  import { serializeModelRequestBody } from "./model-request-body.mjs";
9
9
  import { t as projectCopilotRequestFacts } from "../github-copilot-request-facts-BZ_EMo7X.mjs";
10
10
  import { n as matchesContextOverflowMessage } from "../overflow-CpApyjG2.mjs";
@@ -1,5 +1,5 @@
1
- import { h as OpenAIToolProjection } from "../provider-options-Bo0XJEeK.mjs";
2
- import { a as prepareAnthropicInputSchema } from "../anthropic-tool-projection-DX_igbpX.mjs";
1
+ import { h as OpenAIToolProjection } from "../provider-options-2vKAAn7G.mjs";
2
+ import { a as prepareAnthropicInputSchema } from "../anthropic-tool-projection-DFvJiCQy.mjs";
3
3
  import { TSchema } from "typebox";
4
4
  //#region packages/ai/src/providers/agent-tools-parameter-schema.d.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { d as MAX_TOOL_SCHEMA_DEPTH, f as inheritToolSchemaTruncation, g as wasToolSchemaTruncated, h as truncateToolSchemaDepth, i as publishRuntimeToolInputSchema, m as toolSchemaChildPosition, p as reportToolSchemaTruncation, r as projectRuntimeToolInputSchema, t as getPublishedRuntimeToolInputSchema, v as SCHEMA_MAP_KEYS, y as SCHEMA_NESTED_KEYS } from "../tool-schema-json-projection-C9KSjPuG.mjs";
2
- import { r as prepareAnthropicInputSchema } from "../anthropic-tool-projection-DpN77rtb.mjs";
3
- import { _ as LLAMACPP_GBNF_MAX_REPETITION_THRESHOLD, a as normalizeStrictOpenAIJsonSchema, b as GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, c as findOpenAIStrictSchemaViolations, d as normalizeToolParameterSchema, f as resolveUnsupportedToolSchemaKeywords, g as stripUnsupportedSchemaKeywords, i as normalizeOpenAIStrictToolParameters, l as normalizeOpenAIStrictCompatSchema, n as findOpenAIStrictToolProjectionDiagnostics, o as resolveOpenAIProjectedToolsStrictToolFlag, p as shouldOmitEmptyArrayItems, r as isStrictOpenAIJsonSchemaCompatible, s as findCompatClosedObjectPaths, t as prepareOpenAIFunctionTool, u as extractToolSchemaModelCompat, v as cleanSchemaForLlamacppGbnf, x as cleanSchemaForGemini, y as findLlamacppGbnfSchemaViolations } from "../openai-function-tool-DUT14vv6.mjs";
1
+ import { d as MAX_TOOL_SCHEMA_DEPTH, f as inheritToolSchemaTruncation, g as wasToolSchemaTruncated, h as truncateToolSchemaDepth, i as publishRuntimeToolInputSchema, m as toolSchemaChildPosition, p as reportToolSchemaTruncation, r as projectRuntimeToolInputSchema, t as getPublishedRuntimeToolInputSchema, v as SCHEMA_MAP_KEYS, y as SCHEMA_NESTED_KEYS } from "../tool-schema-json-projection-BIs0pwdB.mjs";
2
+ import { r as prepareAnthropicInputSchema } from "../anthropic-tool-projection-DP6R_sBq.mjs";
3
+ import { _ as LLAMACPP_GBNF_MAX_REPETITION_THRESHOLD, a as normalizeStrictOpenAIJsonSchema, b as GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, c as findOpenAIStrictSchemaViolations, d as normalizeToolParameterSchema, f as resolveUnsupportedToolSchemaKeywords, g as stripUnsupportedSchemaKeywords, i as normalizeOpenAIStrictToolParameters, l as normalizeOpenAIStrictCompatSchema, n as findOpenAIStrictToolProjectionDiagnostics, o as resolveOpenAIProjectedToolsStrictToolFlag, p as shouldOmitEmptyArrayItems, r as isStrictOpenAIJsonSchemaCompatible, s as findCompatClosedObjectPaths, t as prepareOpenAIFunctionTool, u as extractToolSchemaModelCompat, v as cleanSchemaForLlamacppGbnf, x as cleanSchemaForGemini, y as findLlamacppGbnfSchemaViolations } from "../openai-function-tool-8ION6Su5.mjs";
4
4
  export { GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, LLAMACPP_GBNF_MAX_REPETITION_THRESHOLD, MAX_TOOL_SCHEMA_DEPTH, SCHEMA_MAP_KEYS, SCHEMA_NESTED_KEYS, cleanSchemaForGemini, cleanSchemaForLlamacppGbnf, extractToolSchemaModelCompat, findCompatClosedObjectPaths, findLlamacppGbnfSchemaViolations, findOpenAIStrictSchemaViolations, findOpenAIStrictToolProjectionDiagnostics, getPublishedRuntimeToolInputSchema, inheritToolSchemaTruncation, isStrictOpenAIJsonSchemaCompatible, normalizeOpenAIStrictCompatSchema, normalizeOpenAIStrictToolParameters, normalizeStrictOpenAIJsonSchema, normalizeToolParameterSchema, prepareAnthropicInputSchema, prepareOpenAIFunctionTool, projectRuntimeToolInputSchema, publishRuntimeToolInputSchema, reportToolSchemaTruncation, resolveOpenAIProjectedToolsStrictToolFlag, resolveUnsupportedToolSchemaKeywords, shouldOmitEmptyArrayItems, stripUnsupportedSchemaKeywords, toolSchemaChildPosition, truncateToolSchemaDepth, wasToolSchemaTruncated };
@@ -2,17 +2,17 @@ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
2
  import "./src-CQ7nH2mL.mjs";
3
3
  import { t as omitNullRequestHeaders } from "./request-headers-DO4Mqhw1.mjs";
4
4
  import { r as appendAssistantThinking, t as AssistantMessageEventStream } from "./event-stream-X2gmsUWv.mjs";
5
- import { I as isImageWithMediaPayload, M as clampThinkingLevel, j as calculateCost, r as getAiTransportHost } from "./host-DZ29cEYd.mjs";
5
+ import { I as isImageWithMediaPayload, M as clampThinkingLevel, j as calculateCost, r as getAiTransportHost } from "./host-BVynqwGC.mjs";
6
6
  import { t as sanitizeSurrogates } from "./sanitize-unicode-CRGuMONI.mjs";
7
7
  import { r as sortPromptCacheToolsByName } from "./prompt-cache-stability-w-ICeyOI.mjs";
8
- import { C as stripSystemPromptCacheBoundary, a as describeToolResultMediaPlaceholder, c as extractToolResultText, l as formatToolResultText, n as buildBaseOptions, r as clampMaxTokensToModel } from "./simple-options-BPzChce1.mjs";
9
- import { A as parseStreamingJson, D as shortHash, O as createToolArgumentPreviewSchedule, h as notifyProviderHttpResponse, l as finalizeTerminalToolCallArguments, n as assignTransportErrorDetails, p as mergeTransportHeaders, u as finalizeTransportStream } from "./transport-stream-shared-DtOk207K.mjs";
10
- import { t as getPublishedRuntimeToolInputSchema } from "./tool-schema-json-projection-C9KSjPuG.mjs";
8
+ import { C as stripSystemPromptCacheBoundary, a as describeToolResultMediaPlaceholder, c as extractToolResultText, l as formatToolResultText, n as buildBaseOptions, r as clampMaxTokensToModel } from "./simple-options-M4Ngy-Ej.mjs";
9
+ import { O as shortHash, d as finalizeTransportStream, g as notifyProviderHttpResponse, j as parseStreamingJson, k as createToolArgumentPreviewSchedule, m as mergeTransportHeaders, n as assignTransportErrorDetails, u as finalizeTerminalToolCallArguments } from "./transport-stream-shared-CBr4U0TY.mjs";
10
+ import { t as getPublishedRuntimeToolInputSchema } from "./tool-schema-json-projection-BIs0pwdB.mjs";
11
11
  import { t as notifyLlmRequestActivity } from "./llm-request-activity-DzaHoRAU.mjs";
12
- import { t as transformProviderMessages } from "./provider-transcript-transform-BA4B0NIr.mjs";
13
- import { t as createAssistantOutput } from "./assistant-output-BEE6TWdj.mjs";
12
+ import { t as transformProviderMessages } from "./provider-transcript-transform-C99cDpZV.mjs";
13
+ import { t as createAssistantOutput } from "./assistant-output-ByrQmF0P.mjs";
14
14
  import { t as boundResponseBody } from "./streaming-byte-guard-DBXr1XYn.mjs";
15
- import { t as mapOpenAIStopReason } from "./openai-stop-reason-8s70vDXj.mjs";
15
+ import { t as mapOpenAIStopReason } from "./openai-stop-reason-CpYv2sZh.mjs";
16
16
  import { t as requireApiKey } from "./required-api-key-2zZTkmsi.mjs";
17
17
  import { randomUUID } from "node:crypto";
18
18
  import * as z$1 from "zod/v4";
@@ -2433,7 +2433,7 @@ let telemetryModule;
2433
2433
  async function getObservabilityModule() {
2434
2434
  if (observabilityModule !== void 0) return observabilityModule;
2435
2435
  try {
2436
- observabilityModule = await import("./otel-VKlSbm9p.mjs");
2436
+ observabilityModule = await import("./otel-Cmspirtq.mjs");
2437
2437
  } catch {
2438
2438
  observabilityModule = null;
2439
2439
  }
@@ -2442,7 +2442,7 @@ async function getObservabilityModule() {
2442
2442
  async function getTelemetryModule() {
2443
2443
  if (telemetryModule !== void 0) return telemetryModule;
2444
2444
  try {
2445
- telemetryModule = await import("./telemetry-BS2h0FVa.mjs");
2445
+ telemetryModule = await import("./telemetry-X9oIHyf3.mjs");
2446
2446
  } catch {
2447
2447
  telemetryModule = null;
2448
2448
  }
@@ -4,22 +4,22 @@ import { t as omitNullRequestHeaders } from "./request-headers-DO4Mqhw1.mjs";
4
4
  import { t as AssistantMessageEventStream } from "./event-stream-X2gmsUWv.mjs";
5
5
  import { o as isRecord } from "./record-coerce-BQaoiN3r.mjs";
6
6
  import { i as clampPositiveTimerTimeoutMs } from "./number-coercion-C7HsBgUL.mjs";
7
- import { a as resolveAiTransportHeaderSentinels, k as headersToRecord, r as getAiTransportHost } from "./host-DZ29cEYd.mjs";
8
- import { N as supportsOpenAITemperature, v as responsesPromptObserver } from "./openai-responses-contracts-BpyK1Ygq.mjs";
7
+ import { a as resolveAiTransportHeaderSentinels, k as headersToRecord, r as getAiTransportHost } from "./host-BVynqwGC.mjs";
8
+ import { N as supportsOpenAITemperature, v as responsesPromptObserver } from "./openai-responses-contracts-YlVzpuW_.mjs";
9
9
  import { r as registerSessionResourceCleanup } from "./session-resources-vKvGIE3J.mjs";
10
10
  import "./src-BUsVkrNt.mjs";
11
- import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-DV1t-7dP.mjs";
11
+ import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-CZSWH8rC.mjs";
12
12
  import { S as toErrorObject, s as WEBSOCKET_NON_RETRYABLE_CLOSE_ERROR_CODE, x as extractErrorCodeOrErrno } from "./diagnostics-CloVGQiK.mjs";
13
- import { a as streamFragmentError, s as consumeResponseBytes, t as MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "./transport-utils-Czu6bnbQ.mjs";
13
+ import { a as streamFragmentError, s as consumeResponseBytes, t as MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "./transport-utils-DSJQf0i_.mjs";
14
14
  import { parseRetryAfterHeadersSeconds } from "./internal/retry-after.mjs";
15
- import { u as resolveOpenAIResponsesTextFormat } from "./openai-completions-compat-CmyT3piu.mjs";
16
- import { n as buildManagedModelFetch } from "./host-policy-DqFgGiV6.mjs";
17
- import { n as buildBaseOptions, y as prepareSystemPrompt } from "./simple-options-BPzChce1.mjs";
18
- import { C as withProviderResponseHook, g as notifyProviderStreamOpened, n as assignTransportErrorDetails, p as mergeTransportHeaders, x as transportAbortError } from "./transport-stream-shared-DtOk207K.mjs";
19
- import { t as createAssistantOutput } from "./assistant-output-BEE6TWdj.mjs";
20
- import { At as createOpenAIResponseHook, Ct as buildOpenAIResponsesReasoningReplayMetadata, Dt as suppressOpenAIResponsesCompaction, H as resolveOpenAISimpleReasoningEffort, T as recordResponsesContextUsage, V as resolveOpenAIRequestReasoning, dt as resolveNextResponsesEncryptedContentAttempt, i as convertResponsesToolPayload, it as commitResponsesEncryptedContentAttempt, jt as createResponseModelTracker, kt as createOpenAIProviderAcceptanceHook, mt as convertProviderResponsesMessages, n as applyResponsesServiceTierPricing, o as readOpenAIMisalignmentReview, s as processResponsesStream, st as isInvalidEncryptedContentError, x as ResponsesStreamFailure } from "./openai-responses-shared-BE2zSjin.mjs";
15
+ import { u as resolveOpenAIResponsesTextFormat } from "./openai-completions-compat-CDNGOoQn.mjs";
16
+ import { n as buildManagedModelFetch } from "./host-policy-C1VDPJqb.mjs";
17
+ import { n as buildBaseOptions, y as prepareSystemPrompt } from "./simple-options-M4Ngy-Ej.mjs";
18
+ import { S as transportAbortError, _ as notifyProviderStreamOpened, m as mergeTransportHeaders, n as assignTransportErrorDetails, w as withProviderResponseHook } from "./transport-stream-shared-CBr4U0TY.mjs";
19
+ import { t as createAssistantOutput } from "./assistant-output-ByrQmF0P.mjs";
20
+ import { At as createOpenAIResponseHook, Ct as buildOpenAIResponsesReasoningReplayMetadata, Dt as suppressOpenAIResponsesCompaction, H as resolveOpenAISimpleReasoningEffort, T as recordResponsesContextUsage, V as resolveOpenAIRequestReasoning, dt as resolveNextResponsesEncryptedContentAttempt, i as convertResponsesToolPayload, it as commitResponsesEncryptedContentAttempt, jt as createResponseModelTracker, kt as createOpenAIProviderAcceptanceHook, mt as convertProviderResponsesMessages, n as applyResponsesServiceTierPricing, o as readOpenAIMisalignmentReview, s as processResponsesStream, st as isInvalidEncryptedContentError, x as ResponsesStreamFailure } from "./openai-responses-shared-CNBWb5iO.mjs";
21
21
  import { a as withFirstStreamEventTimeout, i as getFirstStreamEventTimeoutMs, r as getFirstStreamEventTimeoutHandler, t as createFirstStreamEventAbortController } from "./stream-first-event-timeout-B7RcufAV.mjs";
22
- import { a as createResponsesV2CompactionCollector, i as createResponsesPromptEgressObserver, n as responsesRequestLifecycle, o as claimResponsesCompactRequest, r as withResponsesRequestAcceptance, s as copyResponsesCompactRequest, t as independentResponsesRequest } from "./openai-responses-request-lifecycle-pjoJ2KB8.mjs";
22
+ import { a as createResponsesV2CompactionCollector, i as createResponsesPromptEgressObserver, n as responsesRequestLifecycle, o as claimResponsesCompactRequest, r as withResponsesRequestAcceptance, s as copyResponsesCompactRequest, t as independentResponsesRequest } from "./openai-responses-request-lifecycle-BRnD7G5s.mjs";
23
23
  import { t as requireApiKey } from "./required-api-key-2zZTkmsi.mjs";
24
24
  import { n as resolveOpenAICodexAccountId } from "./openai-chatgpt-jwt-KWcgd0d_.mjs";
25
25
  //#region packages/ai/src/providers/openai-chatgpt-request-headers.ts
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
- import { M as clampThinkingLevel } from "./host-DZ29cEYd.mjs";
3
- import { n as buildBaseOptions } from "./simple-options-BPzChce1.mjs";
4
- import { l as convertMessages, n as streamOpenAICompletionsRequest } from "./openai-completions-transport-BGoKrb3z.mjs";
2
+ import { M as clampThinkingLevel } from "./host-BVynqwGC.mjs";
3
+ import { n as buildBaseOptions } from "./simple-options-M4Ngy-Ej.mjs";
4
+ import { l as convertMessages, n as streamOpenAICompletionsRequest } from "./openai-completions-transport-DKSeBBXY.mjs";
5
5
  import { t as requireApiKey } from "./required-api-key-2zZTkmsi.mjs";
6
6
  //#region packages/ai/src/providers/openai-completions.ts
7
7
  var openai_completions_exports = /* @__PURE__ */ __exportAll({
@@ -1,6 +1,6 @@
1
- import { P as OpenAICompletionsCompat, k as Model } from "./types-DrqxFIh9.mjs";
2
- import "./index-DkF8J4yH.mjs";
3
- import { a as AiProviderRequestPolicyInput, i as AiProviderRequestCapabilities } from "./host-C2_6_j-L.mjs";
1
+ import { I as OpenAICompletionsCompat, j as Model } from "./types-B6vvn8is.mjs";
2
+ import "./index-DqIreoGH.mjs";
3
+ import { a as AiProviderRequestPolicyInput, i as AiProviderRequestCapabilities } from "./host-bx8W0SER.mjs";
4
4
  //#region packages/ai/src/transports/openai-completions-compat.d.ts
5
5
  type OpenAICompletionsSessionAffinity = "none" | "openai" | "openrouter";
6
6
  type OpenAICompletionsCompatDefaults = {
@@ -1,7 +1,7 @@
1
1
  import { o as isRecord } from "./record-coerce-BQaoiN3r.mjs";
2
2
  import { r as normalizeLowercaseStringOrEmpty } from "./string-coerce-BCuWMIrk.mjs";
3
- import { A as resolveOpenAIReasoningEffortMapping, M as supportsOpenAIReasoningEffort } from "./openai-responses-contracts-BpyK1Ygq.mjs";
4
- import { a as resolveProviderRequestCapabilities, i as resolveProviderEndpoint } from "./host-policy-DqFgGiV6.mjs";
3
+ import { A as resolveOpenAIReasoningEffortMapping, M as supportsOpenAIReasoningEffort } from "./openai-responses-contracts-YlVzpuW_.mjs";
4
+ import { a as resolveProviderRequestCapabilities, i as resolveProviderEndpoint } from "./host-policy-C1VDPJqb.mjs";
5
5
  //#region packages/model-catalog-core/src/provider-model-id-normalize.ts
6
6
  function normalizeOpenRouterModelFamilyId(modelId) {
7
7
  if (typeof modelId !== "string") return;
@@ -4,43 +4,43 @@ import { r as appendAssistantThinking } from "./event-stream-X2gmsUWv.mjs";
4
4
  import { i as asOptionalRecord, o as isRecord, r as asOptionalObjectRecord } from "./record-coerce-BQaoiN3r.mjs";
5
5
  import { c as readNonEmptyStringPreservingWhitespace, t as hasNonEmptyString } from "./string-coerce-BCuWMIrk.mjs";
6
6
  import { n as asNonNegativeFiniteNumber, r as asPositiveFiniteNumber } from "./number-coercion-C7HsBgUL.mjs";
7
- import { I as isImageWithMediaPayload, j as calculateCost, r as getAiTransportHost } from "./host-DZ29cEYd.mjs";
8
- import { E as isOpenAIGpt6Model, N as supportsOpenAITemperature, R as resolveOpenAIThinkingApi, S as applyOpenAICompletionsToolReasoning, b as isResponsesServiceTierRejection, d as OpenAIResponsesWebSocketPreDispatchError, f as OpenAIResponsesWebSocketSafeRetryError, l as OPENAI_RESPONSES_TOOL_CALL_PROVIDERS, r as OPENAI_CODEX_RESPONSES_DEFAULT_INSTRUCTIONS, t as AZURE_RESPONSES_FIRST_EVENT_TIMEOUT_MS, u as OpenAIResponsesWebSocketPostDispatchError, x as nextResponsesServiceTier, y as responsesServiceTierObserver } from "./openai-responses-contracts-BpyK1Ygq.mjs";
7
+ import { I as isImageWithMediaPayload, j as calculateCost, r as getAiTransportHost } from "./host-BVynqwGC.mjs";
8
+ import { E as isOpenAIGpt6Model, N as supportsOpenAITemperature, R as resolveOpenAIThinkingApi, S as applyOpenAICompletionsToolReasoning, b as isResponsesServiceTierRejection, d as OpenAIResponsesWebSocketPreDispatchError, f as OpenAIResponsesWebSocketSafeRetryError, l as OPENAI_RESPONSES_TOOL_CALL_PROVIDERS, r as OPENAI_CODEX_RESPONSES_DEFAULT_INSTRUCTIONS, t as AZURE_RESPONSES_FIRST_EVENT_TIMEOUT_MS, u as OpenAIResponsesWebSocketPostDispatchError, x as nextResponsesServiceTier, y as responsesServiceTierObserver } from "./openai-responses-contracts-YlVzpuW_.mjs";
9
9
  import { c as truncateUtf16Safe } from "./provider-error-DD-fo4Rz.mjs";
10
10
  import { t as estimateStringChars } from "./src-BUsVkrNt.mjs";
11
- import { r as resolveOpenAIPromptCacheParams } from "./openai-prompt-cache-DV1t-7dP.mjs";
11
+ import { r as resolveOpenAIPromptCacheParams } from "./openai-prompt-cache-CZSWH8rC.mjs";
12
12
  import { g as applyResponsesCacheWritePricing, p as hasOnlyResponsesFunctionTools, r as emitModelTransportDebug, t as formatModelTransportDebugBaseUrl, u as DegenerateToolCallArgumentsError, v as mapResponsesTerminalUsage, y as readResponsesReasoningTokens } from "./diagnostics-CloVGQiK.mjs";
13
- import { o as supportsModelTools } from "./transport-utils-Czu6bnbQ.mjs";
13
+ import { o as supportsModelTools } from "./transport-utils-DSJQf0i_.mjs";
14
14
  import { t as stableStringify } from "./stable-stringify-CchQEmeA.mjs";
15
15
  import { t as createZeroUsage } from "./usage-CJH5D6Ea.mjs";
16
- import { a as resolveOpenAICompletionsCompat, c as isAzureOpenAICompatibleHost, d as shouldOmitOllamaCompatResponseFormat, i as isOpenAICodexResponsesModel, l as resolveOpenAICompletionsResponseFormat, n as isKnownOpenAIEndpoint, r as isNativeOpenAIEndpoint, s as usesNativeOpenAICodexResponsesBackend, t as detectOpenAICompletionsCompat, u as resolveOpenAIResponsesTextFormat } from "./openai-completions-compat-CmyT3piu.mjs";
17
- import { t as buildGuardedModelFetch } from "./host-policy-DqFgGiV6.mjs";
16
+ import { a as resolveOpenAICompletionsCompat, c as isAzureOpenAICompatibleHost, d as shouldOmitOllamaCompatResponseFormat, i as isOpenAICodexResponsesModel, l as resolveOpenAICompletionsResponseFormat, n as isKnownOpenAIEndpoint, r as isNativeOpenAIEndpoint, s as usesNativeOpenAICodexResponsesBackend, t as detectOpenAICompletionsCompat, u as resolveOpenAIResponsesTextFormat } from "./openai-completions-compat-CDNGOoQn.mjs";
17
+ import { t as buildGuardedModelFetch } from "./host-policy-C1VDPJqb.mjs";
18
18
  import { i as resolveCacheRetention, r as buildCopilotDynamicHeaders } from "./cloudflare-BJ2_Xabx.mjs";
19
19
  import { t as sanitizeSurrogates } from "./sanitize-unicode-CRGuMONI.mjs";
20
20
  import { r as sortPromptCacheToolsByName } from "./prompt-cache-stability-w-ICeyOI.mjs";
21
- import { C as stripSystemPromptCacheBoundary, S as splitSystemPromptRelocatableBoundary, a as describeToolResultMediaPlaceholder, c as extractToolResultText, d as measuredRequestPressure, f as preparedRequestSuffix, p as reasoningTagTextPolicy, r as clampMaxTokensToModel, u as codeModeToolSurfaceObserver, w as stripSystemPromptRelocatableBoundary, x as splitSystemPromptCacheBoundary, y as prepareSystemPrompt } from "./simple-options-BPzChce1.mjs";
22
- import { A as parseStreamingJson, C as withProviderResponseHook, D as shortHash, O as createToolArgumentPreviewSchedule, b as throwIfModelStreamAborted, c as failTransportStream, d as iterateModelStream, g as notifyProviderStreamOpened, l as finalizeTerminalToolCallArguments, o as createWritableTransportEventStream, u as finalizeTransportStream, x as transportAbortError } from "./transport-stream-shared-DtOk207K.mjs";
23
- import { S as redactIdentifier } from "./tool-schema-json-projection-C9KSjPuG.mjs";
21
+ import { C as stripSystemPromptCacheBoundary, S as splitSystemPromptRelocatableBoundary, a as describeToolResultMediaPlaceholder, c as extractToolResultText, d as measuredRequestPressure, f as preparedRequestSuffix, p as reasoningTagTextPolicy, r as clampMaxTokensToModel, u as codeModeToolSurfaceObserver, w as stripSystemPromptRelocatableBoundary, x as splitSystemPromptCacheBoundary, y as prepareSystemPrompt } from "./simple-options-M4Ngy-Ej.mjs";
22
+ import { O as shortHash, S as transportAbortError, _ as notifyProviderStreamOpened, d as finalizeTransportStream, f as iterateModelStream, j as parseStreamingJson, k as createToolArgumentPreviewSchedule, l as failTransportStream, r as awaitProviderLifecycleCallback, s as createWritableTransportEventStream, u as finalizeTerminalToolCallArguments, w as withProviderResponseHook, x as throwIfModelStreamAborted } from "./transport-stream-shared-CBr4U0TY.mjs";
23
+ import { S as redactIdentifier } from "./tool-schema-json-projection-BIs0pwdB.mjs";
24
24
  import { n as getEnvApiKey } from "./env-api-keys-BuHc86ya.mjs";
25
25
  import { t as notifyLlmRequestActivity } from "./llm-request-activity-DzaHoRAU.mjs";
26
- import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-BAwe7OIR.mjs";
27
- import { t as transformProviderMessages } from "./provider-transcript-transform-BA4B0NIr.mjs";
26
+ import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-CeMMMu55.mjs";
27
+ import { t as transformProviderMessages } from "./provider-transcript-transform-C99cDpZV.mjs";
28
28
  import { prepareModelRequestBody } from "./internal/model-request-body.mjs";
29
29
  import { PROVIDER_MODEL_INPUT, resolveProviderContext } from "./provider-types.mjs";
30
- import { t as createAssistantOutput } from "./assistant-output-BEE6TWdj.mjs";
30
+ import { t as createAssistantOutput } from "./assistant-output-ByrQmF0P.mjs";
31
31
  import { n as resolveOpencodeSessionHeaders } from "./session-affinity-DA4WHv1h.mjs";
32
32
  import { isGoogleGemini3ThinkingLevelModel } from "./internal/google-model-family.mjs";
33
33
  import "./types.mjs";
34
- import { A as responsesContinuationPrefixFingerprint, B as supportsResponsesReasoningUpdate, Bt as resolvePromptCacheKey, C as safeDebugValue, Ct as buildOpenAIResponsesReasoningReplayMetadata, D as claimOpenAIResponsesHttpContinuation, Dt as suppressOpenAIResponsesCompaction, Ft as measureUtf8AppendBytes, G as reconcileOpenAICompletionsToolChoice, H as resolveOpenAISimpleReasoningEffort, It as parseOpenAICompletionsUsage, J as assertCodeModeResponsesToolSurface, K as reconcileOpenAIResponsesToolChoice, Lt as readOpenAICompletionsContentDeltas, Mt as detachPartialSnapshot, Nt as isOpenAICompletionsThinkingEnabled, Ot as GEMINI_THOUGHT_SIGNATURE_VALIDATOR_SKIP, Pt as log, Q as enforceCodeModeResponsesToolSurface, R as isConfigurationUpdate, Rt as readOpenAICompletionsReasoningBatch, S as observeResponsesTransportFailure, T as recordResponsesContextUsage, U as prepareOpenAITools, V as resolveOpenAIRequestReasoning, Vt as withOpenAIErrorResponseHook, W as projectOpenAITools, X as buildOpenAISdkClientOptions, Y as buildOpenAIClientHeaders, Z as buildOpenAISdkRequestOptions, a as prepareResponsesTools, at as createResponsesItemConflictRecovery, bt as recordResponsesInputReplay, c as observeResponsesStream, ct as isResponsesItemConflict, dt as resolveNextResponsesEncryptedContentAttempt, et as getCompat, ht as convertResponsesMessages, j as responsesContinuationRequestFingerprint, jt as createResponseModelTracker, kt as createOpenAIProviderAcceptanceHook, lt as readResponsesRecoveryEvent, n as applyResponsesServiceTierPricing, nt as resolveCodeModeResponsesVisibleToolNames, ot as createResponsesStreamWithRecovery, pt as buildResponsesInputMessage, q as toOpenAIResponsesToolChoice, rt as resolveOpenAIStrictToolFlagWithDiagnostics, s as processResponsesStream, st as isInvalidEncryptedContentError, w as summarizeResponsesPayload, yt as readResponsesInputReplayState, z as replayResponsesReasoningUpdates, zt as resolveOpenAIClientBaseUrl } from "./openai-responses-shared-BE2zSjin.mjs";
34
+ import { A as responsesContinuationPrefixFingerprint, B as supportsResponsesReasoningUpdate, Bt as resolvePromptCacheKey, C as safeDebugValue, Ct as buildOpenAIResponsesReasoningReplayMetadata, D as claimOpenAIResponsesHttpContinuation, Dt as suppressOpenAIResponsesCompaction, Ft as measureUtf8AppendBytes, G as reconcileOpenAICompletionsToolChoice, H as resolveOpenAISimpleReasoningEffort, It as parseOpenAICompletionsUsage, J as assertCodeModeResponsesToolSurface, K as reconcileOpenAIResponsesToolChoice, Lt as readOpenAICompletionsContentDeltas, Mt as detachPartialSnapshot, Nt as isOpenAICompletionsThinkingEnabled, Ot as GEMINI_THOUGHT_SIGNATURE_VALIDATOR_SKIP, Pt as log, Q as enforceCodeModeResponsesToolSurface, R as isConfigurationUpdate, Rt as readOpenAICompletionsReasoningBatch, S as observeResponsesTransportFailure, T as recordResponsesContextUsage, U as prepareOpenAITools, V as resolveOpenAIRequestReasoning, Vt as withOpenAIErrorResponseHook, W as projectOpenAITools, X as buildOpenAISdkClientOptions, Y as buildOpenAIClientHeaders, Z as buildOpenAISdkRequestOptions, a as prepareResponsesTools, at as createResponsesItemConflictRecovery, bt as recordResponsesInputReplay, c as observeResponsesStream, ct as isResponsesItemConflict, dt as resolveNextResponsesEncryptedContentAttempt, et as getCompat, ht as convertResponsesMessages, j as responsesContinuationRequestFingerprint, jt as createResponseModelTracker, kt as createOpenAIProviderAcceptanceHook, lt as readResponsesRecoveryEvent, n as applyResponsesServiceTierPricing, nt as resolveCodeModeResponsesVisibleToolNames, ot as createResponsesStreamWithRecovery, pt as buildResponsesInputMessage, q as toOpenAIResponsesToolChoice, rt as resolveOpenAIStrictToolFlagWithDiagnostics, s as processResponsesStream, st as isInvalidEncryptedContentError, w as summarizeResponsesPayload, yt as readResponsesInputReplayState, z as replayResponsesReasoningUpdates, zt as resolveOpenAIClientBaseUrl } from "./openai-responses-shared-CNBWb5iO.mjs";
35
35
  import { t as boundResponseBody } from "./streaming-byte-guard-DBXr1XYn.mjs";
36
- import { a as isOpenAIResponsesCompactionOutput, c as sanitizeResponsesImagePayload, i as getOpenAIResponsesCompactionOutputError, l as applyOpenAIResponsesPayloadPolicy, n as supportsNativeOpenAIResponsesEndpoint, p as resolveOpenAIResponsesPayloadPolicy, r as createBoundedOpenAIResponsesCompactionFetch, u as enforceOpenAIResponsesCompactionReplayStorage } from "./openai-responses-endpoint-BGwjxesS.mjs";
37
- import { h as withPreparedToolSchemaNormalization, i as normalizeOpenAIStrictToolParameters, m as normalizeToolSchema, t as prepareOpenAIFunctionTool } from "./openai-function-tool-DUT14vv6.mjs";
38
- import { a as createOpenAIProviderClient, i as createAzureOpenAIClient, n as resolveProviderSimpleCompletionHeaders, r as resolveProviderTransportTurnState, t as filterProviderTurnHeadersForExplicitOpencodeSession } from "./provider-transport-turn-state-BU7KCpkK.mjs";
36
+ import { a as isOpenAIResponsesCompactionOutput, c as sanitizeResponsesImagePayload, i as getOpenAIResponsesCompactionOutputError, l as applyOpenAIResponsesPayloadPolicy, n as supportsNativeOpenAIResponsesEndpoint, p as resolveOpenAIResponsesPayloadPolicy, r as createBoundedOpenAIResponsesCompactionFetch, u as enforceOpenAIResponsesCompactionReplayStorage } from "./openai-responses-endpoint-D8fhfY4d.mjs";
37
+ import { h as withPreparedToolSchemaNormalization, i as normalizeOpenAIStrictToolParameters, m as normalizeToolSchema, t as prepareOpenAIFunctionTool } from "./openai-function-tool-8ION6Su5.mjs";
38
+ import { a as createOpenAIProviderClient, i as createAzureOpenAIClient, n as resolveProviderSimpleCompletionHeaders, r as resolveProviderTransportTurnState, t as filterProviderTurnHeadersForExplicitOpencodeSession } from "./provider-transport-turn-state-DIis-pzH.mjs";
39
+ import { t as mapOpenAIStopReason } from "./openai-stop-reason-CpYv2sZh.mjs";
39
40
  import { a as withFirstStreamEventTimeout, i as getFirstStreamEventTimeoutMs, r as getFirstStreamEventTimeoutHandler, t as createFirstStreamEventAbortController } from "./stream-first-event-timeout-B7RcufAV.mjs";
40
41
  import { t as requiresReasoningContentReplay } from "./openai-completions-reasoning-replay-BwT1xwRI.mjs";
41
- import { t as mapOpenAIStopReason } from "./openai-stop-reason-8s70vDXj.mjs";
42
42
  import { n as resolveAzureDeploymentNameFromMap } from "./azure-deployment-map-DKJ8Xc4c.mjs";
43
- import { a as createResponsesV2CompactionCollector, i as createResponsesPromptEgressObserver, n as responsesRequestLifecycle, o as claimResponsesCompactRequest, r as withResponsesRequestAcceptance, t as independentResponsesRequest } from "./openai-responses-request-lifecycle-pjoJ2KB8.mjs";
43
+ import { a as createResponsesV2CompactionCollector, i as createResponsesPromptEgressObserver, n as responsesRequestLifecycle, o as claimResponsesCompactRequest, r as withResponsesRequestAcceptance, t as independentResponsesRequest } from "./openai-responses-request-lifecycle-BRnD7G5s.mjs";
44
44
  import { randomUUID } from "node:crypto";
45
45
  import { isDeepStrictEqual } from "node:util";
46
46
  import OpenAI from "openai";
@@ -721,9 +721,9 @@ function hasGoogleCompatThoughtSignatureTruncationFootprint(value) {
721
721
  return GOOGLE_COMPAT_THOUGHT_SIGNATURE_ELLIPSIS_RE.test(value) || GOOGLE_COMPAT_THOUGHT_SIGNATURE_BASE64_RE.test(value) && value.length % 4 !== 0;
722
722
  }
723
723
  function injectToolCallThoughtSignatures(outgoingMessages, context, model) {
724
- if (!isGoogleOpenAICompatModel(model)) return;
724
+ const google = isGoogleOpenAICompatModel(model);
725
725
  const sigById = /* @__PURE__ */ new Map();
726
- const fallbackSig = isGoogleGemini3ThinkingLevelModel(model.id) ? GEMINI_THOUGHT_SIGNATURE_VALIDATOR_SKIP : void 0;
726
+ const fallbackSig = google && isGoogleGemini3ThinkingLevelModel(model.id) ? GEMINI_THOUGHT_SIGNATURE_VALIDATOR_SKIP : void 0;
727
727
  for (const msg of context.messages ?? []) {
728
728
  if (msg.role !== "assistant") continue;
729
729
  if (!Array.isArray(msg.content)) continue;
@@ -733,7 +733,7 @@ function injectToolCallThoughtSignatures(outgoingMessages, context, model) {
733
733
  const sig = block.thoughtSignature;
734
734
  if (typeof id === "string" && typeof sig === "string" && sig.length > 0) {
735
735
  const isSameRoute = msg.api === model.api && msg.provider === model.provider && msg.model === model.id;
736
- if (!isSameRoute && !fallbackSig) continue;
736
+ if (!isSameRoute && !fallbackSig || !google && sig.trimStart().startsWith("{")) continue;
737
737
  sigById.set(id, isSameRoute ? sig : fallbackSig ?? sig);
738
738
  }
739
739
  }
@@ -748,7 +748,7 @@ function injectToolCallThoughtSignatures(outgoingMessages, context, model) {
748
748
  if (hasGoogleCompatThoughtSignatureTruncationFootprint(sig.trim())) sig = fallbackSig;
749
749
  }
750
750
  if (!sig) continue;
751
- Object.assign(toolCall, { extra_content: { google: { thought_signature: sig } } });
751
+ Object.assign(toolCall, google ? { extra_content: { google: { thought_signature: sig } } } : { provider_specific_fields: { thought_signature: sig } });
752
752
  }
753
753
  }
754
754
  }
@@ -940,8 +940,8 @@ function buildOpenAICompletionsRequest(model, context, options, policy) {
940
940
  if (params.stream && compat.supportsUsageInStreaming) params.stream_options = { include_usage: true };
941
941
  if (compat.supportsStore) params.store = false;
942
942
  if (policy.mode === "direct" || compat.supportsPromptCacheKey && promptCacheKey) params.prompt_cache_key = compat.supportsPromptCacheKey ? promptCacheKey : void 0;
943
- if (options?.temperature !== void 0) params.temperature = options.temperature;
944
- if (policy.mode === "managed" && options?.topP !== void 0) params.top_p = options.topP;
943
+ if (options?.temperature !== void 0 && supportsOpenAITemperature(model)) params.temperature = options.temperature;
944
+ if (policy.mode === "managed" && options?.topP !== void 0 && !isOpenAIGpt6Model(model)) params.top_p = options.topP;
945
945
  const requestedResponseFormat = options?.responseFormat;
946
946
  const responseFormat = policy.mode === "direct" && requestedResponseFormat === void 0 ? void 0 : resolveOpenAICompletionsResponseFormat(shouldOmitOllamaCompatResponseFormat({
947
947
  provider: model.provider,
@@ -1418,7 +1418,7 @@ function extractToolCallThoughtSignature(toolCall) {
1418
1418
  const tc = toolCall;
1419
1419
  if (!tc) return;
1420
1420
  const extra = tc.extra_content?.google;
1421
- return readNonEmptyStringPreservingWhitespace(extra?.thought_signature) ?? readNonEmptyStringPreservingWhitespace(tc.function?.thought_signature) ?? readNonEmptyStringPreservingWhitespace(tc.thought_signature);
1421
+ return readNonEmptyStringPreservingWhitespace(extra?.thought_signature) ?? readNonEmptyStringPreservingWhitespace(tc.function?.thought_signature) ?? readNonEmptyStringPreservingWhitespace(tc.thought_signature) ?? readNonEmptyStringPreservingWhitespace(asOptionalRecord(tc.provider_specific_fields)?.thought_signature);
1422
1422
  }
1423
1423
  async function* observeOpenAICompletionsProgress(responseStream, signal) {
1424
1424
  const maxUsageTokens = {
@@ -2474,7 +2474,7 @@ function createResponsesTransportExecutor(config) {
2474
2474
  if (websocketMode) {
2475
2475
  requestSignal = websocketSignal;
2476
2476
  try {
2477
- const { createOpenAIResponsesWebSocketStream } = await import("./openai-responses-websocket-Bzo4ykRX.mjs");
2477
+ const { createOpenAIResponsesWebSocketStream } = await import("./openai-responses-websocket-BbTCvD64.mjs");
2478
2478
  if (websocketSignal.aborted) throw transportAbortError(websocketSignal);
2479
2479
  const websocket = createOpenAIResponsesWebSocketStream({
2480
2480
  client,
@@ -2857,7 +2857,7 @@ function streamOpenAICompletionsRequest(model, context, options, mode) {
2857
2857
  const builtParams = buildOpenAICompletionsRequest(model, requestContext, options, policy);
2858
2858
  let params = builtParams;
2859
2859
  const encodeBody = prepareModelRequestBody(options);
2860
- const nextParams = await options?.onPayload?.(params, model);
2860
+ const nextParams = await awaitProviderLifecycleCallback(options?.onPayload ? () => options.onPayload?.(params, model) : void 0, options?.signal);
2861
2861
  if (nextParams !== void 0) params = nextParams;
2862
2862
  if (mode === "managed") {
2863
2863
  if (options?.openclawCodeModeToolSurface === true) {
@@ -2939,7 +2939,7 @@ function streamOpenAICompletionsRequest(model, context, options, mode) {
2939
2939
  chunks.push(chunk);
2940
2940
  bufferedBytes += chunkBytes;
2941
2941
  const chunkFinishReason = chunk?.choices?.[0]?.finish_reason;
2942
- if (chunkFinishReason) finishReason = chunkFinishReason;
2942
+ if (chunkFinishReason) finishReason = mapOpenAIStopReason(chunkFinishReason).stopReason;
2943
2943
  options?.signal?.throwIfAborted();
2944
2944
  }
2945
2945
  } catch (error) {
@@ -2,7 +2,7 @@ import { o as isRecord, s as isStringArray } from "./record-coerce-BQaoiN3r.mjs"
2
2
  import { r as parseLocalSchemaRefPointer } from "./validation-DGXqfvkj.mjs";
3
3
  import { r as normalizeLowercaseStringOrEmpty } from "./string-coerce-BCuWMIrk.mjs";
4
4
  import { i as uniqueValues, n as normalizeStringEntries, t as filterStringEntries } from "./string-normalization-B8TDDBX_.mjs";
5
- import { _ as SCHEMA_ARRAY_KEYS, a as SCHEMA_LITERAL_KEYS, b as SCHEMA_OBJECT_KEYS, c as extendSchemaDefs, f as inheritToolSchemaTruncation, g as wasToolSchemaTruncated, h as truncateToolSchemaDepth, i as publishRuntimeToolInputSchema, l as inlineLocalToolSchemaRefs, o as canPreserveRootSchemaRefs, p as reportToolSchemaTruncation, s as copySchemaMeta$1, t as getPublishedRuntimeToolInputSchema, u as setOwnSchemaProperty, v as SCHEMA_MAP_KEYS, x as walkSchemaValue, y as SCHEMA_NESTED_KEYS } from "./tool-schema-json-projection-C9KSjPuG.mjs";
5
+ import { _ as SCHEMA_ARRAY_KEYS, a as SCHEMA_LITERAL_KEYS, b as SCHEMA_OBJECT_KEYS, c as extendSchemaDefs, f as inheritToolSchemaTruncation, g as wasToolSchemaTruncated, h as truncateToolSchemaDepth, i as publishRuntimeToolInputSchema, l as inlineLocalToolSchemaRefs, o as canPreserveRootSchemaRefs, p as reportToolSchemaTruncation, s as copySchemaMeta$1, t as getPublishedRuntimeToolInputSchema, u as setOwnSchemaProperty, v as SCHEMA_MAP_KEYS, x as walkSchemaValue, y as SCHEMA_NESTED_KEYS } from "./tool-schema-json-projection-BIs0pwdB.mjs";
6
6
  //#region packages/ai/src/providers/clean-for-gemini.ts
7
7
  const GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS = /* @__PURE__ */ new Set([
8
8
  "~optional",
@@ -1,4 +1,4 @@
1
- import { r as isNativeOpenAIEndpoint } from "./openai-completions-compat-CmyT3piu.mjs";
1
+ import { r as isNativeOpenAIEndpoint } from "./openai-completions-compat-CDNGOoQn.mjs";
2
2
  //#region packages/normalization-core/src/code-points.ts
3
3
  /** Truncates to a nonnegative code-point budget; grapheme clusters may be split. */
4
4
  function truncateCodePoints(text, maxCodePoints) {
@@ -1,5 +1,5 @@
1
- import { P as OpenAICompletionsCompat, at as StreamOptions, k as Model, l as CacheRetention } from "./types-DrqxFIh9.mjs";
2
- import "./types-g3molYjD.mjs";
1
+ import { I as OpenAICompletionsCompat, j as Model, st as StreamOptions, u as CacheRetention } from "./types-B6vvn8is.mjs";
2
+ import "./types-a4Eg5L2z.mjs";
3
3
  //#region packages/ai/src/providers/openai-prompt-cache.d.ts
4
4
  /** Selects documented lifetime fields shared by Responses and Chat Completions. */
5
5
  declare function resolveOpenAIPromptCacheParams(model: Pick<Model, "id" | "provider" | "baseUrl">, cacheRetention: CacheRetention, compat: Required<Pick<OpenAICompletionsCompat, "supportsPromptCacheKey" | "supportsLongCacheRetention">>, promptCacheTtl?: StreamOptions["promptCacheTtl"]): {
@@ -1,13 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
2
  import { t as AssistantMessageEventStream } from "./event-stream-X2gmsUWv.mjs";
3
- import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams } from "./openai-prompt-cache-DV1t-7dP.mjs";
4
- import { a as resolveOpenAICompletionsCompat } from "./openai-completions-compat-CmyT3piu.mjs";
3
+ import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams } from "./openai-prompt-cache-CZSWH8rC.mjs";
4
+ import { a as resolveOpenAICompletionsCompat } from "./openai-completions-compat-CDNGOoQn.mjs";
5
5
  import { i as resolveCacheRetention, r as buildCopilotDynamicHeaders } from "./cloudflare-BJ2_Xabx.mjs";
6
- import { n as buildBaseOptions } from "./simple-options-BPzChce1.mjs";
6
+ import { n as buildBaseOptions } from "./simple-options-M4Ngy-Ej.mjs";
7
7
  import { n as getEnvApiKey } from "./env-api-keys-BuHc86ya.mjs";
8
- import { t as createAssistantOutput } from "./assistant-output-BEE6TWdj.mjs";
9
- import { H as resolveOpenAISimpleReasoningEffort, mt as convertProviderResponsesMessages, n as applyResponsesServiceTierPricing, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams } from "./openai-responses-shared-BE2zSjin.mjs";
10
- import { a as createOpenAIProviderClient, n as resolveProviderSimpleCompletionHeaders } from "./provider-transport-turn-state-BU7KCpkK.mjs";
8
+ import { t as createAssistantOutput } from "./assistant-output-ByrQmF0P.mjs";
9
+ import { H as resolveOpenAISimpleReasoningEffort, mt as convertProviderResponsesMessages, n as applyResponsesServiceTierPricing, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams } from "./openai-responses-shared-CNBWb5iO.mjs";
10
+ import { a as createOpenAIProviderClient, n as resolveProviderSimpleCompletionHeaders } from "./provider-transport-turn-state-DIis-pzH.mjs";
11
11
  import { t as requireApiKey } from "./required-api-key-2zZTkmsi.mjs";
12
12
  //#region packages/ai/src/providers/openai-responses.ts
13
13
  var openai_responses_exports = /* @__PURE__ */ __exportAll({
@@ -1,7 +1,7 @@
1
- import { U as ProviderReplayState, a as AssistantMessage, k as Model } from "./types-DrqxFIh9.mjs";
2
- import "./index-DkF8J4yH.mjs";
3
- import "./provider-options-Bo0XJEeK.mjs";
4
- import { i as ReplayableResponseCompactionItem, r as OpenAIResponsesReasoningReplayMetadata, u as OpenAIResponsesCompactionOutput } from "./openai-responses-contracts-D-saZnr_.mjs";
1
+ import { G as ProviderReplayState, j as Model, o as AssistantMessage } from "./types-B6vvn8is.mjs";
2
+ import "./index-DqIreoGH.mjs";
3
+ import "./provider-options-2vKAAn7G.mjs";
4
+ import { i as ReplayableResponseCompactionItem, r as OpenAIResponsesReasoningReplayMetadata, u as OpenAIResponsesCompactionOutput } from "./openai-responses-contracts-D6OypGUv.mjs";
5
5
  import "openai/resources/responses/responses.js";
6
6
  //#region packages/ai/src/transports/openai-responses-compaction-replay.d.ts
7
7
  declare function readOpenAIResponsesItemRecoveryAnchor(replay: ProviderReplayState | undefined): string | undefined;
@@ -1,7 +1,7 @@
1
- import { N as ModelThinkingLevel, k as Model, n as Api } from "./types-DrqxFIh9.mjs";
2
- import "./index-DkF8J4yH.mjs";
3
- import "./types-g3molYjD.mjs";
4
- import { a as BaseOpenAIStreamOptions, b as OpenAIReasoningEffort } from "./provider-options-Bo0XJEeK.mjs";
1
+ import { F as ModelThinkingLevel, j as Model, n as Api } from "./types-B6vvn8is.mjs";
2
+ import "./index-DqIreoGH.mjs";
3
+ import "./types-a4Eg5L2z.mjs";
4
+ import { a as BaseOpenAIStreamOptions, b as OpenAIReasoningEffort } from "./provider-options-2vKAAn7G.mjs";
5
5
  import { Response, ResponseCompactionItem, ResponseCreateParamsStreaming, ResponseInputItem, ResponseOutputMessage, ResponseReasoningItem } from "openai/resources/responses/responses.js";
6
6
  //#region packages/ai/src/providers/openai-request-reasoning.d.ts
7
7
  type OpenAIRequestReasoningEffort = ModelThinkingLevel | "none";
@@ -162,7 +162,7 @@ const CANONICAL_REASONING_EFFORTS = /* @__PURE__ */ new Set([
162
162
  "off"
163
163
  ]);
164
164
  function normalizeModelId(id) {
165
- return normalizeLowercaseStringOrEmpty(id ?? "").replace(/-\d{4}-\d{2}-\d{2}$/u, "");
165
+ return normalizeLowercaseStringOrEmpty(id ?? "").replace(/^openai\//u, "").replace(/-\d{4}-\d{2}-\d{2}$/u, "");
166
166
  }
167
167
  /** Return whether a model is the GPT-5.4 mini family. */
168
168
  function isOpenAIGpt54MiniModel(model) {