@openclaw/ai 2026.11.3 → 2026.11.4

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 (76) hide show
  1. package/README.md +2 -1
  2. package/dist/{anthropic-lueA8LUg.mjs → anthropic-C8cQsW5d.mjs} +45 -25
  3. package/dist/{anthropic-payload-policy-C0ki72BT.d.mts → anthropic-payload-policy-BCp4dUJR.d.mts} +2 -2
  4. package/dist/{anthropic-stream-reducer-yWDb5Cct.mjs → anthropic-stream-reducer-BgAICq34.mjs} +11 -10
  5. package/dist/{anthropic-tool-projection-DZOKfAmL.mjs → anthropic-tool-projection-CrsCkF4k.mjs} +1 -1
  6. package/dist/{anthropic-tool-projection-C2-d1eZ3.d.mts → anthropic-tool-projection-CzSSQzZL.d.mts} +1 -1
  7. package/dist/{api-registry-gDt0faai.d.mts → api-registry-CkmxPPac.d.mts} +1 -1
  8. package/dist/{assistant-output-BnQm3fov.mjs → assistant-output-Hl3b-ViJ.mjs} +2 -2
  9. package/dist/{azure-openai-responses-BvvXzZbi.mjs → azure-openai-responses-CZKrN3aq.mjs} +5 -5
  10. package/dist/diagnostics.d.mts +3 -3
  11. package/dist/{google-Cpi_cLKZ.mjs → google-DuI8TLy0.mjs} +2 -2
  12. package/dist/{google-interactions-CGINbsjO.mjs → google-interactions-jbqgn8zL.mjs} +8 -8
  13. package/dist/{google-messages-DQMgG5yG.mjs → google-messages-BWhsZ167.mjs} +3 -3
  14. package/dist/{google-provider-stream-BHd0cST9.mjs → google-provider-stream-DL0bXgX5.mjs} +6 -6
  15. package/dist/{google-shared-vtag8bj5.mjs → google-shared-DXizMtnG.mjs} +5 -5
  16. package/dist/{google-vertex-eKoUnW7N.mjs → google-vertex-DnjRWo-M.mjs} +2 -2
  17. package/dist/{host-jJOffdlW.d.mts → host-B03VqZdH.d.mts} +2 -2
  18. package/dist/{host-CWt55nnF.mjs → host-CyGba3M8.mjs} +99 -80
  19. package/dist/{host-policy-Dm7PM6AD.mjs → host-policy-CNQztzZm.mjs} +1 -1
  20. package/dist/{index-DSprYWaz.d.mts → index-B8ODIVmA.d.mts} +15 -4
  21. package/dist/index.d.mts +4 -4
  22. package/dist/index.mjs +4 -4
  23. package/dist/internal/anthropic.d.mts +15 -5
  24. package/dist/internal/anthropic.mjs +6 -6
  25. package/dist/internal/openai-completions-compat.d.mts +1 -1
  26. package/dist/internal/openai-completions-compat.mjs +1 -1
  27. package/dist/internal/openai-responses-payload-policy.d.mts +2 -2
  28. package/dist/internal/openai-responses-payload-policy.mjs +1 -1
  29. package/dist/internal/openai.d.mts +8 -8
  30. package/dist/internal/openai.mjs +7 -7
  31. package/dist/internal/runtime.d.mts +6 -6
  32. package/dist/internal/runtime.mjs +3 -3
  33. package/dist/internal/shared.d.mts +3 -3
  34. package/dist/internal/shared.mjs +2 -2
  35. package/dist/internal/tool-schema.d.mts +2 -2
  36. package/dist/internal/tool-schema.mjs +3 -3
  37. package/dist/{mistral-CQ7aoWg2.mjs → mistral-BgamhpFG.mjs} +4 -4
  38. package/dist/{openai-CiRi-nVE.mjs → openai-DAGvHDxa.mjs} +1 -1
  39. package/dist/{openai-chatgpt-responses-BZa3SySh.mjs → openai-chatgpt-responses-CWIwGLDZ.mjs} +10 -10
  40. package/dist/{openai-completions-compat-bNQXF1y9.mjs → openai-completions-compat-D9KEUevM.mjs} +1 -1
  41. package/dist/{openai-completions-compat-CBvb2eld.d.mts → openai-completions-compat-DTe2EXPi.d.mts} +2 -2
  42. package/dist/{openai-completions-CCZ_UHCk.mjs → openai-completions-kAWkz3bl.mjs} +3 -3
  43. package/dist/{openai-completions-transport-DFvSBbUT.mjs → openai-completions-transport-bgZfY_xa.mjs} +16 -16
  44. package/dist/{openai-prompt-cache-B9AvdoEo.mjs → openai-prompt-cache-CAo-Mah6.mjs} +1 -1
  45. package/dist/{openai-prompt-cache-DgjD-UL5.d.mts → openai-prompt-cache-k7EPMLa0.d.mts} +1 -1
  46. package/dist/{openai-responses-compaction-replay-_sUXtcwU.d.mts → openai-responses-compaction-replay-DOJaDCUl.d.mts} +3 -3
  47. package/dist/{openai-responses-contracts-B1nkeLL6.d.mts → openai-responses-contracts-DHtim7d_.d.mts} +3 -3
  48. package/dist/{openai-responses-endpoint-CfKR6N5f.mjs → openai-responses-endpoint-DJwbSy3n.mjs} +3 -1
  49. package/dist/{openai-responses-payload-policy-BzM52TTH.d.mts → openai-responses-payload-policy-cIaYG5ZQ.d.mts} +1 -0
  50. package/dist/{openai-responses-request-lifecycle-CTqHc02t.mjs → openai-responses-request-lifecycle-CQBkk3bx.mjs} +6 -6
  51. package/dist/{openai-responses-shared-wx9v1MCn.mjs → openai-responses-shared-C8C1myRt.mjs} +13 -13
  52. package/dist/{openai-responses-terminal-usage-CpVjkqn-.d.mts → openai-responses-terminal-usage-BDGDBGuA.d.mts} +1 -1
  53. package/dist/{openai-responses-DQsZKUoI.mjs → openai-responses-wWDdPeKC.mjs} +6 -6
  54. package/dist/{openai-tool-schema-BTEU2xmN.mjs → openai-tool-schema-D913am3I.mjs} +3 -2
  55. package/dist/{provider-options-DAzsyi49.d.mts → provider-options-DFjnfImJ.d.mts} +7 -1
  56. package/dist/{provider-replay-context-4vxI7p4V.mjs → provider-replay-context-BWgW0iTm.mjs} +1 -1
  57. package/dist/{provider-transport-turn-state-D_GjPJHe.mjs → provider-transport-turn-state-CxXS1_Cv.mjs} +3 -3
  58. package/dist/{provider-types-CWl4VXvE.d.mts → provider-types-C-67EZr8.d.mts} +2 -2
  59. package/dist/provider-types.d.mts +3 -3
  60. package/dist/providers.d.mts +2 -2
  61. package/dist/providers.mjs +10 -10
  62. package/dist/{sanitize-unicode-ZqVLLEKC.d.mts → sanitize-unicode-CkejzD2f.d.mts} +1 -1
  63. package/dist/{simple-options-xJkqrG_E.mjs → simple-options-Bd0STwu7.mjs} +2 -2
  64. package/dist/{src-CyA0zJnt.mjs → src--qsViR3j.mjs} +60 -12
  65. package/dist/{stream-C4YDqhFj.mjs → stream-BRecd0FZ.mjs} +1 -1
  66. package/dist/{tool-schema-json-projection-B1sTYwfH.mjs → tool-schema-json-projection-DU-FFSa7.mjs} +1 -1
  67. package/dist/{transport-stream-shared-lhgkTOz3.mjs → transport-stream-shared-C1AtJhZA.mjs} +1 -1
  68. package/dist/{transport-stream-shared-8ru8eX4s.d.mts → transport-stream-shared-Dhx_37f1.d.mts} +1 -1
  69. package/dist/{transport-utils-DwOpuTjL.mjs → transport-utils-4xPfuKp2.mjs} +2 -2
  70. package/dist/transports.d.mts +12 -12
  71. package/dist/transports.mjs +61 -41
  72. package/dist/types-BFfXm_Jr.d.mts +1 -0
  73. package/dist/types.d.mts +3 -3
  74. package/dist/types.mjs +2 -2
  75. package/package.json +1 -1
  76. package/dist/types-CBJthzJX.d.mts +0 -1
@@ -1,12 +1,12 @@
1
1
  import { A as supportsOpenAIReasoningEffort, C as isOpenAIGpt56Model, D as resolveOpenAIReasoningEffortForModel, E as resolveOpenAIModelReasoningEfforts, O as resolveOpenAIReasoningEffortMapping, S as isOpenAIGpt55Model, T as normalizeOpenAIReasoningEffort, _ as responsesServiceTierObserver, b as applyOpenAICompletionsToolReasoning, g as responsesPromptObserver, j as supportsOpenAITemperature, k as resolveOpenAISupportedReasoningEfforts, w as isOpenAIGpt6Model, x as isOpenAIGpt54MiniModel } from "../openai-responses-contracts-B5mGAbR6.mjs";
2
- import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "../openai-prompt-cache-B9AvdoEo.mjs";
2
+ import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "../openai-prompt-cache-CAo-Mah6.mjs";
3
3
  import { _ as mapResponsesTerminalUsage, g as isResponsesOutputLimitToolCallError, v as readResponsesReasoningTokens, y as resolveResponsesTerminalStopReason } from "../diagnostics-v7oVEW59.mjs";
4
- import { a as encodedModelRequestBodyStream, g as reasoningTagTextPolicy, m as codeModeToolSurfaceObserver, o as modelRequestBodyState } from "../simple-options-xJkqrG_E.mjs";
5
- import { a as hasResponsesWebSearchTool, s as convertMessages } from "../openai-completions-transport-DFvSBbUT.mjs";
6
- import { Ct as reconcileOpenAIResponsesToolChoice, N as bindResponsesInputMessage, St as reconcileOpenAICompletionsToolChoice, _ as isResponsesTextContentPartType, d as AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, f as AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, g as isAzureResponsesTextDeltaEventType, h as isAzureResponsesTextDeltaEvent, l as createResponsesToolCallTracker, m as OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, p as OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, u as readResponsesToolCallItemIdentity, v as isResponsesTextDeltaEventType, xt as projectOpenAITools, y as resolveResponsesMessageSnapshotCollapse } from "../openai-responses-shared-wx9v1MCn.mjs";
4
+ import { a as encodedModelRequestBodyStream, g as reasoningTagTextPolicy, m as codeModeToolSurfaceObserver, o as modelRequestBodyState } from "../simple-options-Bd0STwu7.mjs";
5
+ import { a as hasResponsesWebSearchTool, s as convertMessages } from "../openai-completions-transport-bgZfY_xa.mjs";
6
+ import { Ct as reconcileOpenAIResponsesToolChoice, N as bindResponsesInputMessage, St as reconcileOpenAICompletionsToolChoice, _ as isResponsesTextContentPartType, d as AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, f as AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, g as isAzureResponsesTextDeltaEventType, h as isAzureResponsesTextDeltaEvent, l as createResponsesToolCallTracker, m as OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, p as OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, u as readResponsesToolCallItemIdentity, v as isResponsesTextDeltaEventType, xt as projectOpenAITools, y as resolveResponsesMessageSnapshotCollapse } from "../openai-responses-shared-C8C1myRt.mjs";
7
7
  import { t as mapOpenAIStopReason } from "../openai-stop-reason-8s70vDXj.mjs";
8
8
  import { i as resolveAzureDeploymentNameFromMap, n as isTraditionalAzureOpenAIHost, r as parseAzureDeploymentNameMap, t as isOpenAICompatibleAzureResponsesBaseUrl } from "../azure-openai-responses-client-compat-D0dvJMbZ.mjs";
9
- import { n as responsesRequestLifecycle, t as independentResponsesRequest } from "../openai-responses-request-lifecycle-CTqHc02t.mjs";
10
- import { n as streamOpenAICompletions, r as streamSimpleOpenAICompletions } from "../openai-completions-CCZ_UHCk.mjs";
11
- import { n as streamOpenAIResponses, r as streamSimpleOpenAIResponses } from "../openai-responses-DQsZKUoI.mjs";
9
+ import { n as responsesRequestLifecycle, t as independentResponsesRequest } from "../openai-responses-request-lifecycle-CQBkk3bx.mjs";
10
+ import { n as streamOpenAICompletions, r as streamSimpleOpenAICompletions } from "../openai-completions-kAWkz3bl.mjs";
11
+ import { n as streamOpenAIResponses, r as streamSimpleOpenAIResponses } from "../openai-responses-wWDdPeKC.mjs";
12
12
  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, bindResponsesInputMessage, clampOpenAIPromptCacheKey, codeModeToolSurfaceObserver, convertMessages, createResponsesToolCallTracker, encodedModelRequestBodyStream, hasResponsesWebSearchTool, independentResponsesRequest, isAzureResponsesTextDeltaEvent, isAzureResponsesTextDeltaEventType, isOpenAICompatibleAzureResponsesBaseUrl, isOpenAIGpt54MiniModel, isOpenAIGpt55Model, isOpenAIGpt56Model, isOpenAIGpt6Model, isResponsesOutputLimitToolCallError, isResponsesTextContentPartType, isResponsesTextDeltaEventType, isTraditionalAzureOpenAIHost, mapOpenAIStopReason, mapResponsesTerminalUsage, 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 "../index-DSprYWaz.mjs";
1
+ import "../index-B8ODIVmA.mjs";
2
2
  import { M as ModelThinkingLevel, Q as SimpleStreamOptions, U as ProviderStreamOptions, a as AssistantMessage, d as Context, k as Model, n as Api, nt as StreamOptions, pt as Usage, s as AssistantMessageEventStreamContract } from "../types-CVYzKrMl.mjs";
3
3
  import { i as getEventStreamCompletion } from "../event-stream-CzpE1g_o.mjs";
4
- import { a as RegisteredApiProvider, t as ApiProvider } from "../api-registry-gDt0faai.mjs";
5
- import { m as getDefaultAiTransportHost } from "../host-jJOffdlW.mjs";
6
- import "../types-CBJthzJX.mjs";
7
- import { n as isContextOverflow, t as sanitizeSurrogates } from "../sanitize-unicode-ZqVLLEKC.mjs";
8
- import { v as parseTerminalToolCallArguments } from "../transport-stream-shared-8ru8eX4s.mjs";
4
+ import { a as RegisteredApiProvider, t as ApiProvider } from "../api-registry-CkmxPPac.mjs";
5
+ import { m as getDefaultAiTransportHost } from "../host-B03VqZdH.mjs";
6
+ import "../types-BFfXm_Jr.mjs";
7
+ import { n as isContextOverflow, t as sanitizeSurrogates } from "../sanitize-unicode-CkejzD2f.mjs";
8
+ import { v as parseTerminalToolCallArguments } from "../transport-stream-shared-Dhx_37f1.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-C4YDqhFj.mjs";
3
- import { A as getSupportedThinkingLevels, D as applyProviderReportedUsageCost, E as headersToRecord, O as calculateCost, j as modelsAreEqual, k as clampThinkingLevel } from "../host-CWt55nnF.mjs";
2
+ import { r as createApiRegistry, t as createLlmRuntime } from "../stream-BRecd0FZ.mjs";
3
+ import { A as applyProviderReportedUsageCost, M as clampThinkingLevel, N as getSupportedThinkingLevels, P as modelsAreEqual, j as calculateCost, k as headersToRecord } from "../host-CyGba3M8.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 shortHash, D as parseJsonWithRepair, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, g as parseTerminalToolCallArguments, k as repairJson } from "../transport-stream-shared-lhgkTOz3.mjs";
6
+ import { A as shortHash, D as parseJsonWithRepair, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, g as parseTerminalToolCallArguments, k as repairJson } from "../transport-stream-shared-C1AtJhZA.mjs";
7
7
  import { n as getEnvApiKey, t as findEnvKeys } from "../env-api-keys-Xd8dm_aV.mjs";
8
8
  import { t as createDeferredEventBuffer } from "../deferred-event-buffer-DAvyP7qA.mjs";
9
9
  import { n as onLlmRequestActivity, t as notifyLlmRequestActivity } from "../llm-request-activity-CfMuh5cC.mjs";
@@ -1,9 +1,9 @@
1
1
  import { O as Message, Q as SimpleStreamOptions, a as AssistantMessage, at as ThinkingBudgets, k as Model, n as Api, nt as StreamOptions, st as ThinkingLevel } from "../types-CVYzKrMl.mjs";
2
2
  import { a as readAssistantThinkingAppend } from "../event-stream-CzpE1g_o.mjs";
3
- import { d as preparedRequestSuffix } from "../provider-options-DAzsyi49.mjs";
4
- import "../types-CBJthzJX.mjs";
3
+ import { d as preparedRequestSuffix } from "../provider-options-DFjnfImJ.mjs";
4
+ import "../types-BFfXm_Jr.mjs";
5
5
  import { r as serializeModelRequestBody } from "../model-request-body-BD5vy4rP.mjs";
6
- import { r as matchesContextOverflowMessage, t as sanitizeSurrogates } from "../sanitize-unicode-ZqVLLEKC.mjs";
6
+ import { r as matchesContextOverflowMessage, t as sanitizeSurrogates } from "../sanitize-unicode-CkejzD2f.mjs";
7
7
  import { i as projectProviderError } from "../provider-error-CnaWYTRY.mjs";
8
8
  import { n as createDiagnosticRecord, r as isCredentialFieldName } from "../credential-redaction-XvsPf7Yi.mjs";
9
9
  import { n as normalizeStructuredPromptSection, r as sortPromptCacheToolsByName, t as normalizePromptCapabilityIds } from "../prompt-cache-stability-Cwcjv_fx.mjs";
@@ -1,9 +1,9 @@
1
1
  import { s as readAssistantThinkingAppend } from "../event-stream-X2gmsUWv.mjs";
2
- import { M as hasMediaPayload, N 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-CWt55nnF.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-CyGba3M8.mjs";
3
3
  import { i as isCredentialFieldName, n as projectProviderError, r as createDiagnosticRecord } from "../provider-error-qtZD2inE.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-D_MeCQFI.mjs";
6
- import { C as splitSystemPromptRelocatableBoundary, S as splitSystemPromptCacheBoundary, T as stripSystemPromptRelocatableBoundary, _ as SYSTEM_PROMPT_CACHE_BOUNDARY, b as ensureSystemPromptCacheBoundary, c as serializeModelRequestBody, d as extractToolResultBlockText, f as extractToolResultText, h as preparedRequestSuffix, i as clampReasoning, l as describeToolResultMediaPlaceholder, n as buildBaseOptions, p as formatToolResultText, r as clampMaxTokensToModel, t as adjustMaxTokensForThinking, u as describeUnsupportedToolResultMedia, v as SYSTEM_PROMPT_RELOCATABLE_BOUNDARY, w as stripSystemPromptCacheBoundary, x as prependSystemPromptAdditionAfterCacheBoundary, y as SYSTEM_PROMPT_RELOCATABLE_BOUNDARY_END } from "../simple-options-xJkqrG_E.mjs";
6
+ import { C as splitSystemPromptRelocatableBoundary, S as splitSystemPromptCacheBoundary, T as stripSystemPromptRelocatableBoundary, _ as SYSTEM_PROMPT_CACHE_BOUNDARY, b as ensureSystemPromptCacheBoundary, c as serializeModelRequestBody, d as extractToolResultBlockText, f as extractToolResultText, h as preparedRequestSuffix, i as clampReasoning, l as describeToolResultMediaPlaceholder, n as buildBaseOptions, p as formatToolResultText, r as clampMaxTokensToModel, t as adjustMaxTokensForThinking, u as describeUnsupportedToolResultMedia, v as SYSTEM_PROMPT_RELOCATABLE_BOUNDARY, w as stripSystemPromptCacheBoundary, x as prependSystemPromptAdditionAfterCacheBoundary, y as SYSTEM_PROMPT_RELOCATABLE_BOUNDARY_END } from "../simple-options-Bd0STwu7.mjs";
7
7
  import { t as projectCopilotRequestFacts } from "../github-copilot-request-facts-F-EmvkpW.mjs";
8
8
  import { n as matchesContextOverflowMessage } from "../overflow-OF3PgPbw.mjs";
9
9
  //#region packages/ai/src/utils/tls-certificate-errors.ts
@@ -1,5 +1,5 @@
1
- import { m as OpenAIToolProjection } from "../provider-options-DAzsyi49.mjs";
2
- import { a as prepareAnthropicInputSchema } from "../anthropic-tool-projection-C2-d1eZ3.mjs";
1
+ import { m as OpenAIToolProjection } from "../provider-options-DFjnfImJ.mjs";
2
+ import { a as prepareAnthropicInputSchema } from "../anthropic-tool-projection-CzSSQzZL.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 { _ as SCHEMA_MAP_KEYS, d as inheritToolSchemaTruncation, f as reportToolSchemaTruncation, h as wasToolSchemaTruncated, i as publishRuntimeToolInputSchema, m as truncateToolSchemaDepth, p as toolSchemaChildPosition, r as projectRuntimeToolInputSchema, t as getPublishedRuntimeToolInputSchema, u as MAX_TOOL_SCHEMA_DEPTH, v as SCHEMA_NESTED_KEYS } from "../tool-schema-json-projection-B1sTYwfH.mjs";
2
- import { r as prepareAnthropicInputSchema } from "../anthropic-tool-projection-DZOKfAmL.mjs";
3
- import { _ as findLlamacppGbnfSchemaViolations, a as resolveOpenAIProjectedToolsStrictToolFlag, b as prepareOpenAIFunctionTool, c as extractToolSchemaModelCompat, d as shouldOmitEmptyArrayItems, g as cleanSchemaForLlamacppGbnf, h as LLAMACPP_GBNF_MAX_REPETITION_THRESHOLD, i as normalizeStrictOpenAIJsonSchema, l as normalizeToolParameterSchema, m as stripUnsupportedSchemaKeywords, n as isStrictOpenAIJsonSchemaCompatible, o as findOpenAIStrictSchemaViolations, r as normalizeOpenAIStrictToolParameters, s as normalizeOpenAIStrictCompatSchema, t as findOpenAIStrictToolProjectionDiagnostics, u as resolveUnsupportedToolSchemaKeywords, v as GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, y as cleanSchemaForGemini } from "../openai-tool-schema-BTEU2xmN.mjs";
1
+ import { _ as SCHEMA_MAP_KEYS, d as inheritToolSchemaTruncation, f as reportToolSchemaTruncation, h as wasToolSchemaTruncated, i as publishRuntimeToolInputSchema, m as truncateToolSchemaDepth, p as toolSchemaChildPosition, r as projectRuntimeToolInputSchema, t as getPublishedRuntimeToolInputSchema, u as MAX_TOOL_SCHEMA_DEPTH, v as SCHEMA_NESTED_KEYS } from "../tool-schema-json-projection-DU-FFSa7.mjs";
2
+ import { r as prepareAnthropicInputSchema } from "../anthropic-tool-projection-CrsCkF4k.mjs";
3
+ import { _ as findLlamacppGbnfSchemaViolations, a as resolveOpenAIProjectedToolsStrictToolFlag, b as prepareOpenAIFunctionTool, c as extractToolSchemaModelCompat, d as shouldOmitEmptyArrayItems, g as cleanSchemaForLlamacppGbnf, h as LLAMACPP_GBNF_MAX_REPETITION_THRESHOLD, i as normalizeStrictOpenAIJsonSchema, l as normalizeToolParameterSchema, m as stripUnsupportedSchemaKeywords, n as isStrictOpenAIJsonSchemaCompatible, o as findOpenAIStrictSchemaViolations, r as normalizeOpenAIStrictToolParameters, s as normalizeOpenAIStrictCompatSchema, t as findOpenAIStrictToolProjectionDiagnostics, u as resolveUnsupportedToolSchemaKeywords, v as GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, y as cleanSchemaForGemini } from "../openai-tool-schema-D913am3I.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, findLlamacppGbnfSchemaViolations, findOpenAIStrictSchemaViolations, findOpenAIStrictToolProjectionDiagnostics, getPublishedRuntimeToolInputSchema, inheritToolSchemaTruncation, isStrictOpenAIJsonSchemaCompatible, normalizeOpenAIStrictCompatSchema, normalizeOpenAIStrictToolParameters, normalizeStrictOpenAIJsonSchema, normalizeToolParameterSchema, prepareAnthropicInputSchema, prepareOpenAIFunctionTool, projectRuntimeToolInputSchema, publishRuntimeToolInputSchema, reportToolSchemaTruncation, resolveOpenAIProjectedToolsStrictToolFlag, resolveUnsupportedToolSchemaKeywords, shouldOmitEmptyArrayItems, stripUnsupportedSchemaKeywords, toolSchemaChildPosition, truncateToolSchemaDepth, wasToolSchemaTruncated };
@@ -1,10 +1,10 @@
1
1
  import { r as appendAssistantThinking, t as AssistantMessageEventStream } from "./event-stream-X2gmsUWv.mjs";
2
- import { N as isImageWithMediaPayload, O as calculateCost, k as clampThinkingLevel, r as getAiTransportHost } from "./host-CWt55nnF.mjs";
2
+ import { I as isImageWithMediaPayload, M as clampThinkingLevel, j as calculateCost, r as getAiTransportHost } from "./host-CyGba3M8.mjs";
3
3
  import { t as sanitizeSurrogates } from "./sanitize-unicode-CRGuMONI.mjs";
4
4
  import { r as sortPromptCacheToolsByName } from "./prompt-cache-stability-D_MeCQFI.mjs";
5
- import { f as extractToolResultText, l as describeToolResultMediaPlaceholder, n as buildBaseOptions, p as formatToolResultText, r as clampMaxTokensToModel, w as stripSystemPromptCacheBoundary } from "./simple-options-xJkqrG_E.mjs";
6
- import { A as shortHash, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, l as finalizeTerminalToolCallArguments, m as notifyProviderHttpResponse, n as assignTransportErrorDetails, u as finalizeTransportStream } from "./transport-stream-shared-lhgkTOz3.mjs";
7
- import { n as transformProviderMessages, t as createAssistantOutput } from "./assistant-output-BnQm3fov.mjs";
5
+ import { f as extractToolResultText, l as describeToolResultMediaPlaceholder, n as buildBaseOptions, p as formatToolResultText, r as clampMaxTokensToModel, w as stripSystemPromptCacheBoundary } from "./simple-options-Bd0STwu7.mjs";
6
+ import { A as shortHash, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, l as finalizeTerminalToolCallArguments, m as notifyProviderHttpResponse, n as assignTransportErrorDetails, u as finalizeTransportStream } from "./transport-stream-shared-C1AtJhZA.mjs";
7
+ import { n as transformProviderMessages, t as createAssistantOutput } from "./assistant-output-Hl3b-ViJ.mjs";
8
8
  import { t as notifyLlmRequestActivity } from "./llm-request-activity-CfMuh5cC.mjs";
9
9
  import { t as boundResponseBody } from "./streaming-byte-guard-DBXr1XYn.mjs";
10
10
  import { t as mapOpenAIStopReason } from "./openai-stop-reason-8s70vDXj.mjs";
@@ -1,5 +1,5 @@
1
1
  import { i as __toESM, n as __exportAll, t as __commonJSMin } from "./rolldown-runtime-B4iAMlE-.mjs";
2
- import { $t as isArray, Bt as formatRequestDetails, Cn as UnprocessableEntityError, Dn as __classPrivateFieldSet, En as __classPrivateFieldGet, Gt as redactURL, Ht as isSensitiveQueryParameter, Jt as ReadableStreamFrom, Kt as encodeUTF8, Qt as isAbsoluteURL, Sn as SubjectTokenProviderError, Tn as isAbortError, Ut as loggerFor, Vt as isSensitiveHeader, Wt as parseLogLevel, Xt as getDefaultFetch, Yt as ReadableStreamToAsyncIterable, Zt as hasOwn, _n as NotFoundError, an as validatePositiveInteger, bn as PermissionDeniedError, cn as APIError, dn as BadRequestError, en as isEmptyObj, fn as ConflictError, gn as LengthFinishReasonError, hn as InvalidWebhookSignatureError, in as safeJSON, ln as APIUserAbortError, mn as InternalServerError, nn as isReadonlyArray, on as APIConnectionError, pn as ContentFilterFinishReasonError, qt as CancelReadableStream, rn as maybeObj, sn as APIConnectionTimeoutError, tn as isObj, un as AuthenticationError, vn as OAuthError, wn as castToError, xn as RateLimitError, yn as OpenAIError, zt as Stream } from "./openai-responses-shared-wx9v1MCn.mjs";
2
+ import { $t as isArray, Bt as formatRequestDetails, Cn as UnprocessableEntityError, Dn as __classPrivateFieldSet, En as __classPrivateFieldGet, Gt as redactURL, Ht as isSensitiveQueryParameter, Jt as ReadableStreamFrom, Kt as encodeUTF8, Qt as isAbsoluteURL, Sn as SubjectTokenProviderError, Tn as isAbortError, Ut as loggerFor, Vt as isSensitiveHeader, Wt as parseLogLevel, Xt as getDefaultFetch, Yt as ReadableStreamToAsyncIterable, Zt as hasOwn, _n as NotFoundError, an as validatePositiveInteger, bn as PermissionDeniedError, cn as APIError, dn as BadRequestError, en as isEmptyObj, fn as ConflictError, gn as LengthFinishReasonError, hn as InvalidWebhookSignatureError, in as safeJSON, ln as APIUserAbortError, mn as InternalServerError, nn as isReadonlyArray, on as APIConnectionError, pn as ContentFilterFinishReasonError, qt as CancelReadableStream, rn as maybeObj, sn as APIConnectionTimeoutError, tn as isObj, un as AuthenticationError, vn as OAuthError, wn as castToError, xn as RateLimitError, yn as OpenAIError, zt as Stream } from "./openai-responses-shared-C8C1myRt.mjs";
3
3
  //#region node_modules/.pnpm/openai@7.28.0_@aws-sdk+credential-provider-node@3.972.84_@smithy+hash-node@4.5.2_@smith_228c78b5ff380a7908ad856e85d64d8d/node_modules/openai/internal/utils/uuid.mjs
4
4
  /**
5
5
  * https://stackoverflow.com/a/2117523
@@ -2,22 +2,22 @@ import { i as formatThrownValue, n as createAssistantMessageDiagnostic, t as app
2
2
  import { t as AssistantMessageEventStream } from "./event-stream-X2gmsUWv.mjs";
3
3
  import { o as isRecord } from "./record-coerce-CNDovvft.mjs";
4
4
  import { i as clampPositiveTimerTimeoutMs } from "./number-coercion-37gmNkuA.mjs";
5
- import { E as headersToRecord, a as resolveAiTransportHeaderSentinels, r as getAiTransportHost } from "./host-CWt55nnF.mjs";
5
+ import { a as resolveAiTransportHeaderSentinels, k as headersToRecord, r as getAiTransportHost } from "./host-CyGba3M8.mjs";
6
6
  import { g as responsesPromptObserver, j as supportsOpenAITemperature } from "./openai-responses-contracts-B5mGAbR6.mjs";
7
7
  import { r as registerSessionResourceCleanup } from "./session-resources-vKvGIE3J.mjs";
8
8
  import "./provider-error-qtZD2inE.mjs";
9
- import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-B9AvdoEo.mjs";
9
+ import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-CAo-Mah6.mjs";
10
10
  import { b as extractErrorCodeOrErrno, s as WEBSOCKET_NON_RETRYABLE_CLOSE_ERROR_CODE, x as toErrorObject } from "./diagnostics-v7oVEW59.mjs";
11
- import { l as consumeResponseBytes, s as streamFragmentError, t as MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "./transport-utils-DwOpuTjL.mjs";
11
+ import { l as consumeResponseBytes, s as streamFragmentError, t as MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "./transport-utils-4xPfuKp2.mjs";
12
12
  import { parseRetryAfterHeadersSeconds } from "./internal/retry-after.mjs";
13
- import { c as resolveOpenAIResponsesTextFormat } from "./openai-completions-compat-bNQXF1y9.mjs";
14
- import { n as buildManagedModelFetch } from "./host-policy-Dm7PM6AD.mjs";
15
- import { n as buildBaseOptions, w as stripSystemPromptCacheBoundary } from "./simple-options-xJkqrG_E.mjs";
16
- import { S as withProviderResponseHook, b as transportAbortError, h as notifyProviderStreamOpened, n as assignTransportErrorDetails } from "./transport-stream-shared-lhgkTOz3.mjs";
17
- import { t as createAssistantOutput } from "./assistant-output-BnQm3fov.mjs";
18
- import { Dt as createOpenAIResponseHook, E as ResponsesStreamFailure, Et as createOpenAIProviderAcceptanceHook, F as convertProviderResponsesMessages, Ot as createResponseModelTracker, S as isInvalidEncryptedContentError, T as resolveNextResponsesEncryptedContentAttempt, _t as resolveOpenAIRequestReasoning, b as commitResponsesEncryptedContentAttempt, i as convertResponsesToolPayload, j as recordResponsesContextUsage, n as applyResponsesServiceTierPricing, o as readOpenAIMisalignmentReview, ot as suppressOpenAIResponsesCompaction, rt as buildOpenAIResponsesReasoningReplayMetadata, s as processResponsesStream, vt as resolveOpenAISimpleReasoningEffort } from "./openai-responses-shared-wx9v1MCn.mjs";
13
+ import { c as resolveOpenAIResponsesTextFormat } from "./openai-completions-compat-D9KEUevM.mjs";
14
+ import { n as buildManagedModelFetch } from "./host-policy-CNQztzZm.mjs";
15
+ import { n as buildBaseOptions, w as stripSystemPromptCacheBoundary } from "./simple-options-Bd0STwu7.mjs";
16
+ import { S as withProviderResponseHook, b as transportAbortError, h as notifyProviderStreamOpened, n as assignTransportErrorDetails } from "./transport-stream-shared-C1AtJhZA.mjs";
17
+ import { t as createAssistantOutput } from "./assistant-output-Hl3b-ViJ.mjs";
18
+ import { Dt as createOpenAIResponseHook, E as ResponsesStreamFailure, Et as createOpenAIProviderAcceptanceHook, F as convertProviderResponsesMessages, Ot as createResponseModelTracker, S as isInvalidEncryptedContentError, T as resolveNextResponsesEncryptedContentAttempt, _t as resolveOpenAIRequestReasoning, b as commitResponsesEncryptedContentAttempt, i as convertResponsesToolPayload, j as recordResponsesContextUsage, n as applyResponsesServiceTierPricing, o as readOpenAIMisalignmentReview, ot as suppressOpenAIResponsesCompaction, rt as buildOpenAIResponsesReasoningReplayMetadata, s as processResponsesStream, vt as resolveOpenAISimpleReasoningEffort } from "./openai-responses-shared-C8C1myRt.mjs";
19
19
  import { a as withFirstStreamEventTimeout, i as getFirstStreamEventTimeoutMs, r as getFirstStreamEventTimeoutHandler, t as createFirstStreamEventAbortController } from "./stream-first-event-timeout-D_TfJHRJ.mjs";
20
- 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-CTqHc02t.mjs";
20
+ 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-CQBkk3bx.mjs";
21
21
  import { t as requireApiKey } from "./required-api-key-D088S4Cd.mjs";
22
22
  import { n as resolveOpenAICodexAccountId } from "./openai-chatgpt-jwt-KWcgd0d_.mjs";
23
23
  //#region packages/ai/src/providers/openai-chatgpt-responses-events.ts
@@ -1,6 +1,6 @@
1
1
  import { o as isRecord } from "./record-coerce-CNDovvft.mjs";
2
2
  import { A as supportsOpenAIReasoningEffort, O as resolveOpenAIReasoningEffortMapping } from "./openai-responses-contracts-B5mGAbR6.mjs";
3
- import { a as resolveProviderRequestCapabilities } from "./host-policy-Dm7PM6AD.mjs";
3
+ import { a as resolveProviderRequestCapabilities } from "./host-policy-CNQztzZm.mjs";
4
4
  //#region packages/ai/src/providers/openai-response-format.ts
5
5
  const JSON_SCHEMA_RESPONSE_FORMAT_NAME = "openclaw_response";
6
6
  const OLLAMA_CLOUD_ORIGIN = "https://ollama.com";
@@ -1,6 +1,6 @@
1
- import "./index-DSprYWaz.mjs";
1
+ import "./index-B8ODIVmA.mjs";
2
2
  import { N as OpenAICompletionsCompat, k as Model } from "./types-CVYzKrMl.mjs";
3
- import { a as AiProviderRequestPolicyInput, i as AiProviderRequestCapabilities } from "./host-jJOffdlW.mjs";
3
+ import { a as AiProviderRequestPolicyInput, i as AiProviderRequestCapabilities } from "./host-B03VqZdH.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 { n as __exportAll } from "./rolldown-runtime-B4iAMlE-.mjs";
2
- import { k as clampThinkingLevel } from "./host-CWt55nnF.mjs";
3
- import { n as buildBaseOptions } from "./simple-options-xJkqrG_E.mjs";
4
- import { n as streamOpenAICompletionsRequest, s as convertMessages } from "./openai-completions-transport-DFvSBbUT.mjs";
2
+ import { M as clampThinkingLevel } from "./host-CyGba3M8.mjs";
3
+ import { n as buildBaseOptions } from "./simple-options-Bd0STwu7.mjs";
4
+ import { n as streamOpenAICompletionsRequest, s as convertMessages } from "./openai-completions-transport-bgZfY_xa.mjs";
5
5
  import { t as requireApiKey } from "./required-api-key-D088S4Cd.mjs";
6
6
  //#region packages/ai/src/providers/openai-completions.ts
7
7
  var openai_completions_exports = /* @__PURE__ */ __exportAll({
@@ -5,40 +5,40 @@ import { r as appendAssistantThinking } from "./event-stream-X2gmsUWv.mjs";
5
5
  import { i as asOptionalRecord, o as isRecord, r as asOptionalObjectRecord } from "./record-coerce-CNDovvft.mjs";
6
6
  import { c as readNonEmptyStringPreservingWhitespace, t as hasNonEmptyString } from "./string-coerce-Cj8sqWHx.mjs";
7
7
  import { n as asNonNegativeFiniteNumber, r as asPositiveFiniteNumber } from "./number-coercion-37gmNkuA.mjs";
8
- import { N as isImageWithMediaPayload, a as resolveAiTransportHeaderSentinels, r as getAiTransportHost } from "./host-CWt55nnF.mjs";
8
+ import { I as isImageWithMediaPayload, a as resolveAiTransportHeaderSentinels, r as getAiTransportHost } from "./host-CyGba3M8.mjs";
9
9
  import { L as resolveOpenAIThinkingApi, _ as responsesServiceTierObserver, b as applyOpenAICompletionsToolReasoning, d as OpenAIResponsesWebSocketSafeRetryError, h as parseOpenAIResponsesWebSocketServerError, j as supportsOpenAITemperature, l as OpenAIResponsesWebSocketPostDispatchError, r as OPENAI_CODEX_RESPONSES_DEFAULT_INSTRUCTIONS, t as AZURE_RESPONSES_FIRST_EVENT_TIMEOUT_MS, u as OpenAIResponsesWebSocketPreDispatchError, v as isResponsesServiceTierRejection, w as isOpenAIGpt6Model, y as nextResponsesServiceTier } from "./openai-responses-contracts-B5mGAbR6.mjs";
10
10
  import { n as getSessionResourceOwnerId, r as registerSessionResourceCleanup } from "./session-resources-vKvGIE3J.mjs";
11
11
  import { c as stableStringify, s as truncateUtf16Safe } from "./provider-error-qtZD2inE.mjs";
12
- import { r as resolveOpenAIPromptCacheParams } from "./openai-prompt-cache-B9AvdoEo.mjs";
12
+ import { r as resolveOpenAIPromptCacheParams } from "./openai-prompt-cache-CAo-Mah6.mjs";
13
13
  import { i as emitModelTransportError, p as hasOnlyResponsesFunctionTools, r as emitModelTransportDebug, t as formatModelTransportDebugBaseUrl, u as DegenerateToolCallArgumentsError } from "./diagnostics-v7oVEW59.mjs";
14
- import { c as supportsModelTools, n as estimateStringChars } from "./transport-utils-DwOpuTjL.mjs";
15
- import { c as resolveOpenAIResponsesTextFormat, i as resolveOpenAICompletionsCompat, l as shouldOmitOllamaCompatResponseFormat, n as isNativeOpenAIEndpoint, o as usesNativeOpenAICodexResponsesBackend, r as isOpenAICodexResponsesModel, s as resolveOpenAICompletionsResponseFormat, t as detectOpenAICompletionsCompat } from "./openai-completions-compat-bNQXF1y9.mjs";
16
- import { i as resolveProviderEndpoint, t as buildGuardedModelFetch } from "./host-policy-Dm7PM6AD.mjs";
14
+ import { c as supportsModelTools, n as estimateStringChars } from "./transport-utils-4xPfuKp2.mjs";
15
+ import { c as resolveOpenAIResponsesTextFormat, i as resolveOpenAICompletionsCompat, l as shouldOmitOllamaCompatResponseFormat, n as isNativeOpenAIEndpoint, o as usesNativeOpenAICodexResponsesBackend, r as isOpenAICodexResponsesModel, s as resolveOpenAICompletionsResponseFormat, t as detectOpenAICompletionsCompat } from "./openai-completions-compat-D9KEUevM.mjs";
16
+ import { i as resolveProviderEndpoint, t as buildGuardedModelFetch } from "./host-policy-CNQztzZm.mjs";
17
17
  import { i as resolveCacheRetention, r as buildCopilotDynamicHeaders } from "./cloudflare-Dttf8jKq.mjs";
18
18
  import { t as sanitizeSurrogates } from "./sanitize-unicode-CRGuMONI.mjs";
19
19
  import { r as sortPromptCacheToolsByName } from "./prompt-cache-stability-D_MeCQFI.mjs";
20
- import { C as splitSystemPromptRelocatableBoundary, S as splitSystemPromptCacheBoundary, T as stripSystemPromptRelocatableBoundary, f as extractToolResultText, g as reasoningTagTextPolicy, h as preparedRequestSuffix, l as describeToolResultMediaPlaceholder, m as codeModeToolSurfaceObserver, r as clampMaxTokensToModel, s as prepareModelRequestBody, w as stripSystemPromptCacheBoundary } from "./simple-options-xJkqrG_E.mjs";
21
- import { A as shortHash, E as createToolArgumentPreviewSchedule, M as racePromiseWithAbortSignal, O as parseStreamingJson, S as withProviderResponseHook, b as transportAbortError, c as failTransportStream, d as iterateModelStream, h as notifyProviderStreamOpened, l as finalizeTerminalToolCallArguments, s as createWritableTransportEventStream, u as finalizeTransportStream, v as sanitizeTransportPayloadText, y as throwIfModelStreamAborted } from "./transport-stream-shared-lhgkTOz3.mjs";
22
- import { C as redactIdentifier, w as sha256Hex } from "./tool-schema-json-projection-B1sTYwfH.mjs";
20
+ import { C as splitSystemPromptRelocatableBoundary, S as splitSystemPromptCacheBoundary, T as stripSystemPromptRelocatableBoundary, f as extractToolResultText, g as reasoningTagTextPolicy, h as preparedRequestSuffix, l as describeToolResultMediaPlaceholder, m as codeModeToolSurfaceObserver, r as clampMaxTokensToModel, s as prepareModelRequestBody, w as stripSystemPromptCacheBoundary } from "./simple-options-Bd0STwu7.mjs";
21
+ import { A as shortHash, E as createToolArgumentPreviewSchedule, M as racePromiseWithAbortSignal, O as parseStreamingJson, S as withProviderResponseHook, b as transportAbortError, c as failTransportStream, d as iterateModelStream, h as notifyProviderStreamOpened, l as finalizeTerminalToolCallArguments, s as createWritableTransportEventStream, u as finalizeTransportStream, v as sanitizeTransportPayloadText, y as throwIfModelStreamAborted } from "./transport-stream-shared-C1AtJhZA.mjs";
22
+ import { C as redactIdentifier, w as sha256Hex } from "./tool-schema-json-projection-DU-FFSa7.mjs";
23
23
  import { n as getEnvApiKey } from "./env-api-keys-Xd8dm_aV.mjs";
24
- import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-4vxI7p4V.mjs";
25
- import { n as transformProviderMessages, t as createAssistantOutput } from "./assistant-output-BnQm3fov.mjs";
24
+ import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-BWgW0iTm.mjs";
25
+ import { n as transformProviderMessages, t as createAssistantOutput } from "./assistant-output-Hl3b-ViJ.mjs";
26
26
  import { t as notifyLlmRequestActivity } from "./llm-request-activity-CfMuh5cC.mjs";
27
27
  import { n as resolveOpencodeSessionHeaders } from "./session-affinity-DA4WHv1h.mjs";
28
28
  import { isGoogleGemini3ThinkingLevelModel } from "./internal/google-model-family.mjs";
29
- import { $ as isConfigurationUpdate, A as summarizeResponsesPayload, At as isOpenAICompletionsThinkingEnabled, B as recordResponsesInputReplay, C as readResponsesRecoveryEvent, Ct as reconcileOpenAIResponsesToolChoice, D as logResponsesFailedNoDetails, E as ResponsesStreamFailure, Et as createOpenAIProviderAcceptanceHook, Ft as readOpenAICompletionsReasoningBatch, G as responsesContinuationPrefixFingerprint, H as claimOpenAIResponsesHttpContinuation, I as convertResponsesMessages, It as resolveOpenAIClientBaseUrl, K as responsesContinuationRequestFingerprint, Lt as resolvePromptCacheKey, Mt as measureUtf8AppendBytes, Nt as parseOpenAICompletionsUsage, O as safeDebugValue, Ot as createResponseModelTracker, P as buildResponsesInputMessage, Pt as readOpenAICompletionsContentDeltas, Rt as withOpenAIErrorResponseHook, S as isInvalidEncryptedContentError, St as reconcileOpenAICompletionsToolChoice, T as resolveNextResponsesEncryptedContentAttempt, Tt as GEMINI_THOUGHT_SIGNATURE_VALIDATOR_SKIP, U as recordResponsesContinuationState, V as responsesInputFingerprint, W as resolveResponsesContinuationRequest, _t as resolveOpenAIRequestReasoning, a as prepareResponsesTools, bt as prepareOpenAITools, c as observeResponsesStream, ct as buildOpenAIClientHeaders, dt as enforceCodeModeResponsesToolSurface, et as replayResponsesReasoningUpdates, gt as resolveOpenAIStrictToolFlagWithDiagnostics, ht as resolveCodeModeResponsesVisibleToolNames, j as recordResponsesContextUsage, jt as log, k as summarizeOpenAITransportError, kt as detachPartialSnapshot, lt as buildOpenAISdkClientOptions, n as applyResponsesServiceTierPricing, ot as suppressOpenAIResponsesCompaction, pt as getCompat, rt as buildOpenAIResponsesReasoningReplayMetadata, s as processResponsesStream, st as assertCodeModeResponsesToolSurface, tt as supportsResponsesReasoningUpdate, ut as buildOpenAISdkRequestOptions, vt as resolveOpenAISimpleReasoningEffort, w as resolveAzureOpenAIApiVersion, wt as toOpenAIResponsesToolChoice, x as createResponsesStreamWithRecovery, xt as projectOpenAITools, z as readResponsesInputReplayState } from "./openai-responses-shared-wx9v1MCn.mjs";
30
- import { n as OpenAI, r as require_x509_transport_state, t as AzureOpenAI } from "./openai-CiRi-nVE.mjs";
29
+ import { $ as isConfigurationUpdate, A as summarizeResponsesPayload, At as isOpenAICompletionsThinkingEnabled, B as recordResponsesInputReplay, C as readResponsesRecoveryEvent, Ct as reconcileOpenAIResponsesToolChoice, D as logResponsesFailedNoDetails, E as ResponsesStreamFailure, Et as createOpenAIProviderAcceptanceHook, Ft as readOpenAICompletionsReasoningBatch, G as responsesContinuationPrefixFingerprint, H as claimOpenAIResponsesHttpContinuation, I as convertResponsesMessages, It as resolveOpenAIClientBaseUrl, K as responsesContinuationRequestFingerprint, Lt as resolvePromptCacheKey, Mt as measureUtf8AppendBytes, Nt as parseOpenAICompletionsUsage, O as safeDebugValue, Ot as createResponseModelTracker, P as buildResponsesInputMessage, Pt as readOpenAICompletionsContentDeltas, Rt as withOpenAIErrorResponseHook, S as isInvalidEncryptedContentError, St as reconcileOpenAICompletionsToolChoice, T as resolveNextResponsesEncryptedContentAttempt, Tt as GEMINI_THOUGHT_SIGNATURE_VALIDATOR_SKIP, U as recordResponsesContinuationState, V as responsesInputFingerprint, W as resolveResponsesContinuationRequest, _t as resolveOpenAIRequestReasoning, a as prepareResponsesTools, bt as prepareOpenAITools, c as observeResponsesStream, ct as buildOpenAIClientHeaders, dt as enforceCodeModeResponsesToolSurface, et as replayResponsesReasoningUpdates, gt as resolveOpenAIStrictToolFlagWithDiagnostics, ht as resolveCodeModeResponsesVisibleToolNames, j as recordResponsesContextUsage, jt as log, k as summarizeOpenAITransportError, kt as detachPartialSnapshot, lt as buildOpenAISdkClientOptions, n as applyResponsesServiceTierPricing, ot as suppressOpenAIResponsesCompaction, pt as getCompat, rt as buildOpenAIResponsesReasoningReplayMetadata, s as processResponsesStream, st as assertCodeModeResponsesToolSurface, tt as supportsResponsesReasoningUpdate, ut as buildOpenAISdkRequestOptions, vt as resolveOpenAISimpleReasoningEffort, w as resolveAzureOpenAIApiVersion, wt as toOpenAIResponsesToolChoice, x as createResponsesStreamWithRecovery, xt as projectOpenAITools, z as readResponsesInputReplayState } from "./openai-responses-shared-C8C1myRt.mjs";
30
+ import { n as OpenAI, r as require_x509_transport_state, t as AzureOpenAI } from "./openai-DAGvHDxa.mjs";
31
31
  import "./types.mjs";
32
- import { i as createOpenAIProviderClient, n as resolveProviderSimpleCompletionHeaders, r as resolveProviderTransportTurnState, t as filterProviderTurnHeadersForExplicitOpencodeSession } from "./provider-transport-turn-state-D_GjPJHe.mjs";
32
+ import { i as createOpenAIProviderClient, n as resolveProviderSimpleCompletionHeaders, r as resolveProviderTransportTurnState, t as filterProviderTurnHeadersForExplicitOpencodeSession } from "./provider-transport-turn-state-CxXS1_Cv.mjs";
33
33
  import { a as withFirstStreamEventTimeout, i as getFirstStreamEventTimeoutMs, r as getFirstStreamEventTimeoutHandler, t as createFirstStreamEventAbortController } from "./stream-first-event-timeout-D_TfJHRJ.mjs";
34
34
  import { t as boundResponseBody } from "./streaming-byte-guard-DBXr1XYn.mjs";
35
- import { b as prepareOpenAIFunctionTool, f as normalizeToolSchema, p as withPreparedToolSchemaNormalization, r as normalizeOpenAIStrictToolParameters } from "./openai-tool-schema-BTEU2xmN.mjs";
35
+ import { b as prepareOpenAIFunctionTool, f as normalizeToolSchema, p as withPreparedToolSchemaNormalization, r as normalizeOpenAIStrictToolParameters } from "./openai-tool-schema-D913am3I.mjs";
36
36
  import { t as requiresReasoningContentReplay } from "./openai-completions-reasoning-replay-BwT1xwRI.mjs";
37
37
  import { t as mapOpenAIStopReason } from "./openai-stop-reason-8s70vDXj.mjs";
38
38
  import { t as createReasoningTagTextPartitioner } from "./reasoning-tag-text-partitioner-CU9A4Lg8.mjs";
39
39
  import { i as resolveAzureDeploymentNameFromMap, t as isOpenAICompatibleAzureResponsesBaseUrl } from "./azure-openai-responses-client-compat-D0dvJMbZ.mjs";
40
- import { a as isOpenAIResponsesCompactionOutput, c as applyOpenAIResponsesPayloadPolicy, d as resolveOpenAIResponsesPayloadPolicy, i as getOpenAIResponsesCompactionOutputError, n as supportsNativeOpenAIResponsesEndpoint, r as createBoundedOpenAIResponsesCompactionFetch, s as sanitizeResponsesImagePayload, t as isOfficialOpenAIResponsesBaseUrl } from "./openai-responses-endpoint-CfKR6N5f.mjs";
41
- import { a as createResponsesV2CompactionCollector, i as createResponsesPromptEgressObserver, n as responsesRequestLifecycle, o as claimResponsesCompactRequest, r as withResponsesRequestAcceptance, t as independentResponsesRequest } from "./openai-responses-request-lifecycle-CTqHc02t.mjs";
40
+ import { a as isOpenAIResponsesCompactionOutput, c as applyOpenAIResponsesPayloadPolicy, d as resolveOpenAIResponsesPayloadPolicy, i as getOpenAIResponsesCompactionOutputError, n as supportsNativeOpenAIResponsesEndpoint, r as createBoundedOpenAIResponsesCompactionFetch, s as sanitizeResponsesImagePayload, t as isOfficialOpenAIResponsesBaseUrl } from "./openai-responses-endpoint-DJwbSy3n.mjs";
41
+ import { a as createResponsesV2CompactionCollector, i as createResponsesPromptEgressObserver, n as responsesRequestLifecycle, o as claimResponsesCompactRequest, r as withResponsesRequestAcceptance, t as independentResponsesRequest } from "./openai-responses-request-lifecycle-CQBkk3bx.mjs";
42
42
  import { randomUUID } from "node:crypto";
43
43
  //#region packages/ai/src/transports/deepseek-dsml-grammar.ts
44
44
  const DEEPSEEK_DSML_MARKERS = [
@@ -1,4 +1,4 @@
1
- import { n as isNativeOpenAIEndpoint } from "./openai-completions-compat-bNQXF1y9.mjs";
1
+ import { n as isNativeOpenAIEndpoint } from "./openai-completions-compat-D9KEUevM.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
1
  import { N as OpenAICompletionsCompat, k as Model, l as CacheRetention } from "./types-CVYzKrMl.mjs";
2
- import "./types-CBJthzJX.mjs";
2
+ import "./types-BFfXm_Jr.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">>): {
@@ -1,7 +1,7 @@
1
- import "./index-DSprYWaz.mjs";
1
+ import "./index-B8ODIVmA.mjs";
2
2
  import { a as AssistantMessage, k as Model } from "./types-CVYzKrMl.mjs";
3
- import "./provider-options-DAzsyi49.mjs";
4
- import { i as ReplayableResponseCompactionItem, r as OpenAIResponsesReasoningReplayMetadata, u as OpenAIResponsesCompactionOutput } from "./openai-responses-contracts-B1nkeLL6.mjs";
3
+ import "./provider-options-DFjnfImJ.mjs";
4
+ import { i as ReplayableResponseCompactionItem, r as OpenAIResponsesReasoningReplayMetadata, u as OpenAIResponsesCompactionOutput } from "./openai-responses-contracts-DHtim7d_.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 captureOpenAIResponsesCompaction(output: Pick<AssistantMessage, "providerReplay">, item: ReplayableResponseCompactionItem, boundary: number | "retained-users", model: Model, captureMetadata?: OpenAIResponsesReasoningReplayMetadata, compactedOutput?: OpenAIResponsesCompactionOutput, outputTokens?: number): void;
@@ -1,7 +1,7 @@
1
- import "./index-DSprYWaz.mjs";
1
+ import "./index-B8ODIVmA.mjs";
2
2
  import { M as ModelThinkingLevel, k as Model, n as Api } from "./types-CVYzKrMl.mjs";
3
- import { a as BaseOpenAIStreamOptions, y as OpenAIReasoningEffort } from "./provider-options-DAzsyi49.mjs";
4
- import "./types-CBJthzJX.mjs";
3
+ import { a as BaseOpenAIStreamOptions, y as OpenAIReasoningEffort } from "./provider-options-DFjnfImJ.mjs";
4
+ import "./types-BFfXm_Jr.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";
@@ -70,6 +70,7 @@ function resolveOpenAIResponsesPayloadCapabilities(model) {
70
70
  allowsOpenAIServiceTier: provider === "openai" && (api === "openai-responses" || api === "openclaw-openai-responses-transport") || isOpenAIProvider && (api === "openai-chatgpt-responses" || api === "openclaw-openai-chatgpt-responses-transport") && endpointClass === "openai",
71
71
  allowsResponsesStore: supportsResponsesStoreField && api !== "openai-chatgpt-responses" && api !== "openclaw-openai-chatgpt-responses-transport" && provider !== void 0 && OPENAI_RESPONSES_PROVIDERS.has(provider) && usesKnownNativeOpenAIEndpoint,
72
72
  explicitContinuationOptIn,
73
+ requiresStatelessCompactionReplay: endpointClass === "openai-public" || isOpenAIProvider && endpointClass === "default",
73
74
  shouldStripResponsesPromptCache,
74
75
  supportsResponsesStoreField,
75
76
  usesKnownNativeOpenAIRoute,
@@ -147,6 +148,7 @@ function resolveOpenAIResponsesPayloadPolicy(model, options = {}) {
147
148
  defaultManagedReasoningEffort: capabilities.usesKnownNativeOpenAIRoute && !shouldStripDisabledReasoningPayload && model.provider !== "github-copilot" ? "none" : void 0,
148
149
  explicitContinuationOptIn: capabilities.explicitContinuationOptIn,
149
150
  explicitStore,
151
+ requiresStatelessCompactionReplay: capabilities.requiresStatelessCompactionReplay,
150
152
  shouldStripDisabledReasoningPayload,
151
153
  shouldStripInputStatus,
152
154
  shouldStripPromptCache: options.enablePromptCacheStripping === true && capabilities.shouldStripResponsesPromptCache,
@@ -157,7 +159,7 @@ function resolveOpenAIResponsesPayloadPolicy(model, options = {}) {
157
159
  }
158
160
  /** Mutate a Responses request payload according to the resolved endpoint policy. */
159
161
  function applyOpenAIResponsesPayloadPolicy(payloadObj, policy) {
160
- if (policy.explicitStore !== void 0) payloadObj.store = policy.explicitStore;
162
+ if (policy.explicitStore !== void 0) payloadObj.store = policy.explicitStore && !(policy.requiresStatelessCompactionReplay && Array.isArray(payloadObj.input) && payloadObj.input.some((item) => isRecord(item) && item.type === "compaction"));
161
163
  if (policy.shouldStripStore) delete payloadObj.store;
162
164
  if (policy.shouldStripPromptCache) {
163
165
  delete payloadObj.prompt_cache_key;
@@ -20,6 +20,7 @@ type OpenAIResponsesPayloadPolicy = {
20
20
  defaultManagedReasoningEffort: "none" | undefined;
21
21
  explicitContinuationOptIn: boolean;
22
22
  explicitStore: boolean | undefined;
23
+ requiresStatelessCompactionReplay: boolean;
23
24
  shouldStripDisabledReasoningPayload: boolean;
24
25
  shouldStripInputStatus: boolean;
25
26
  shouldStripPromptCache: boolean;
@@ -1,12 +1,12 @@
1
1
  import { o as isRecord } from "./record-coerce-CNDovvft.mjs";
2
2
  import { f as RESPONSES_RETAINED_USER, g as responsesPromptObserver } from "./openai-responses-contracts-B5mGAbR6.mjs";
3
3
  import { c as stableStringify, d as estimateTokensFromChars, u as estimateStringChars } from "./provider-error-qtZD2inE.mjs";
4
- import "./transport-utils-DwOpuTjL.mjs";
5
- import { w as stripSystemPromptCacheBoundary } from "./simple-options-xJkqrG_E.mjs";
6
- import { v as sanitizeTransportPayloadText } from "./transport-stream-shared-lhgkTOz3.mjs";
7
- import { w as sha256Hex } from "./tool-schema-json-projection-B1sTYwfH.mjs";
8
- import { rt as buildOpenAIResponsesReasoningReplayMetadata } from "./openai-responses-shared-wx9v1MCn.mjs";
9
- import { a as isOpenAIResponsesCompactionOutput, s as sanitizeResponsesImagePayload } from "./openai-responses-endpoint-CfKR6N5f.mjs";
4
+ import "./transport-utils-4xPfuKp2.mjs";
5
+ import { w as stripSystemPromptCacheBoundary } from "./simple-options-Bd0STwu7.mjs";
6
+ import { v as sanitizeTransportPayloadText } from "./transport-stream-shared-C1AtJhZA.mjs";
7
+ import { w as sha256Hex } from "./tool-schema-json-projection-DU-FFSa7.mjs";
8
+ import { rt as buildOpenAIResponsesReasoningReplayMetadata } from "./openai-responses-shared-C8C1myRt.mjs";
9
+ import { a as isOpenAIResponsesCompactionOutput, s as sanitizeResponsesImagePayload } from "./openai-responses-endpoint-DJwbSy3n.mjs";
10
10
  //#region packages/ai/src/transports/openai-responses-compact-request.ts
11
11
  const COMPACT_REQUEST = Symbol("openaiResponsesCompactRequest");
12
12
  function claimResponsesCompactRequest(options) {
@@ -1,30 +1,30 @@
1
- import "./src-CyA0zJnt.mjs";
1
+ import "./src--qsViR3j.mjs";
2
2
  import { _ as runtimeContextContentToText, f as hasRuntimeContextMarker, p as isRuntimeContextMessage } from "./types-BXd0kI8-.mjs";
3
3
  import { o as readProviderRefusalReview, t as appendAssistantMessageDiagnostic } from "./diagnostics-DzrF1h4J.mjs";
4
4
  import { r as appendAssistantThinking } from "./event-stream-X2gmsUWv.mjs";
5
5
  import { o as isRecord, r as asOptionalObjectRecord } from "./record-coerce-CNDovvft.mjs";
6
6
  import { l as readStringValue, o as normalizeOptionalString, r as normalizeLowercaseStringOrEmpty, s as normalizeStringifiedOptionalString } from "./string-coerce-Cj8sqWHx.mjs";
7
7
  import { t as asFiniteNumber } from "./number-coercion-37gmNkuA.mjs";
8
- import { D as applyProviderReportedUsageCost, E as headersToRecord, N as isImageWithMediaPayload, O as calculateCost, a as resolveAiTransportHeaderSentinels, k as clampThinkingLevel, r as getAiTransportHost } from "./host-CWt55nnF.mjs";
8
+ import { A as applyProviderReportedUsageCost, I as isImageWithMediaPayload, M as clampThinkingLevel, a as resolveAiTransportHeaderSentinels, j as calculateCost, k as headersToRecord, r as getAiTransportHost } from "./host-CyGba3M8.mjs";
9
9
  import { A as supportsOpenAIReasoningEffort, D as resolveOpenAIReasoningEffortForModel, E as resolveOpenAIModelReasoningEfforts, L as resolveOpenAIThinkingApi, O as resolveOpenAIReasoningEffortMapping, P as MODEL_CATALOG_THINKING_LEVELS, T as normalizeOpenAIReasoningEffort, _ as responsesServiceTierObserver, a as OPENAI_RESPONSES_COMPACTION_REPLAY_TYPE, c as OPENAI_RESPONSES_RETAINED_COMPACTION_REPLAY_TYPE, f as RESPONSES_RETAINED_USER, i as OPENAI_RESPONSES_APIS, j as supportsOpenAITemperature, m as isPreviousResponseRejection, o as OPENAI_RESPONSES_REASONING_REPLAY_BLOCK_META_KEY, p as RESPONSE_FAILED_NO_DETAILS_MESSAGE, s as OPENAI_RESPONSES_REASONING_REPLAY_META_KEY, v as isResponsesServiceTierRejection, y as nextResponsesServiceTier } from "./openai-responses-contracts-B5mGAbR6.mjs";
10
10
  import { n as getSessionResourceOwnerId, r as registerSessionResourceCleanup } from "./session-resources-vKvGIE3J.mjs";
11
11
  import { c as stableStringify, s as truncateUtf16Safe } from "./provider-error-qtZD2inE.mjs";
12
- import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-B9AvdoEo.mjs";
12
+ import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-CAo-Mah6.mjs";
13
13
  import { _ as mapResponsesTerminalUsage, a as resolveModelPayloadDebugMode, d as ResponsesOutputIdentityError, f as countToolCallTrailingWhitespace, m as isResponsesProviderTool, p as hasOnlyResponsesFunctionTools, r as emitModelTransportDebug, v as readResponsesReasoningTokens, y as resolveResponsesTerminalStopReason } from "./diagnostics-v7oVEW59.mjs";
14
- import { a as redactSensitiveText, r as isCodeModeModelVisibleToolName } from "./transport-utils-DwOpuTjL.mjs";
15
- import { c as resolveOpenAIResponsesTextFormat, i as resolveOpenAICompletionsCompat, o as usesNativeOpenAICodexResponsesBackend } from "./openai-completions-compat-bNQXF1y9.mjs";
16
- import { r as resolveModelRequestTimeoutMs } from "./host-policy-Dm7PM6AD.mjs";
14
+ import { a as redactSensitiveText, r as isCodeModeModelVisibleToolName } from "./transport-utils-4xPfuKp2.mjs";
15
+ import { c as resolveOpenAIResponsesTextFormat, i as resolveOpenAICompletionsCompat, o as usesNativeOpenAICodexResponsesBackend } from "./openai-completions-compat-D9KEUevM.mjs";
16
+ import { r as resolveModelRequestTimeoutMs } from "./host-policy-CNQztzZm.mjs";
17
17
  import { r as sortPromptCacheToolsByName } from "./prompt-cache-stability-D_MeCQFI.mjs";
18
- import { d as extractToolResultBlockText, f as extractToolResultText, h as preparedRequestSuffix, l as describeToolResultMediaPlaceholder, r as clampMaxTokensToModel, s as prepareModelRequestBody, w as stripSystemPromptCacheBoundary } from "./simple-options-xJkqrG_E.mjs";
19
- import { A as shortHash, C as parseJsonObjectPreservingUnsafeIntegers, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, S as withProviderResponseHook, b as transportAbortError, c as failTransportStream, d as iterateModelStream, g as parseTerminalToolCallArguments, m as notifyProviderHttpResponse, t as IncompleteToolCallError, u as finalizeTransportStream, v as sanitizeTransportPayloadText } from "./transport-stream-shared-lhgkTOz3.mjs";
20
- import { C as redactIdentifier, n as prepareRuntimeToolInputSchema, r as projectRuntimeToolInputSchema, w as sha256Hex } from "./tool-schema-json-projection-B1sTYwfH.mjs";
21
- import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-4vxI7p4V.mjs";
22
- import { n as transformProviderMessages } from "./assistant-output-BnQm3fov.mjs";
18
+ import { d as extractToolResultBlockText, f as extractToolResultText, h as preparedRequestSuffix, l as describeToolResultMediaPlaceholder, r as clampMaxTokensToModel, s as prepareModelRequestBody, w as stripSystemPromptCacheBoundary } from "./simple-options-Bd0STwu7.mjs";
19
+ import { A as shortHash, C as parseJsonObjectPreservingUnsafeIntegers, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, S as withProviderResponseHook, b as transportAbortError, c as failTransportStream, d as iterateModelStream, g as parseTerminalToolCallArguments, m as notifyProviderHttpResponse, t as IncompleteToolCallError, u as finalizeTransportStream, v as sanitizeTransportPayloadText } from "./transport-stream-shared-C1AtJhZA.mjs";
20
+ import { C as redactIdentifier, n as prepareRuntimeToolInputSchema, r as projectRuntimeToolInputSchema, w as sha256Hex } from "./tool-schema-json-projection-DU-FFSa7.mjs";
21
+ import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-BWgW0iTm.mjs";
22
+ import { n as transformProviderMessages } from "./assistant-output-Hl3b-ViJ.mjs";
23
23
  import { t as notifyLlmRequestActivity } from "./llm-request-activity-CfMuh5cC.mjs";
24
24
  import { n as resolveOpencodeSessionHeaders } from "./session-affinity-DA4WHv1h.mjs";
25
25
  import { a as withFirstStreamEventTimeout, i as getFirstStreamEventTimeoutMs, r as getFirstStreamEventTimeoutHandler, t as createFirstStreamEventAbortController } from "./stream-first-event-timeout-D_TfJHRJ.mjs";
26
- import { a as resolveOpenAIProjectedToolsStrictToolFlag, b as prepareOpenAIFunctionTool, p as withPreparedToolSchemaNormalization, r as normalizeOpenAIStrictToolParameters, t as findOpenAIStrictToolProjectionDiagnostics } from "./openai-tool-schema-BTEU2xmN.mjs";
27
- import { a as isOpenAIResponsesCompactionOutput, n as supportsNativeOpenAIResponsesEndpoint, o as readOpenAIResponsesCompactionWindow } from "./openai-responses-endpoint-CfKR6N5f.mjs";
26
+ import { a as resolveOpenAIProjectedToolsStrictToolFlag, b as prepareOpenAIFunctionTool, p as withPreparedToolSchemaNormalization, r as normalizeOpenAIStrictToolParameters, t as findOpenAIStrictToolProjectionDiagnostics } from "./openai-tool-schema-D913am3I.mjs";
27
+ import { a as isOpenAIResponsesCompactionOutput, n as supportsNativeOpenAIResponsesEndpoint, o as readOpenAIResponsesCompactionWindow } from "./openai-responses-endpoint-DJwbSy3n.mjs";
28
28
  import { randomUUID } from "node:crypto";
29
29
  //#region node_modules/.pnpm/openai@7.28.0_@aws-sdk+credential-provider-node@3.972.84_@smithy+hash-node@4.5.2_@smith_228c78b5ff380a7908ad856e85d64d8d/node_modules/openai/internal/tslib.mjs
30
30
  function __classPrivateFieldSet(receiver, state, value, kind, f) {
@@ -1,5 +1,5 @@
1
1
  import { $ as StopReason, a as AssistantMessage, pt as Usage } from "./types-CVYzKrMl.mjs";
2
- import "./types-CBJthzJX.mjs";
2
+ import "./types-BFfXm_Jr.mjs";
3
3
  import OpenAI from "openai";
4
4
  //#region packages/ai/src/providers/openai-responses-terminal-usage.d.ts
5
5
  /** A known output ceiling can resume sampling after admitted tools have settled. */
@@ -1,13 +1,13 @@
1
1
  import { n as __exportAll } from "./rolldown-runtime-B4iAMlE-.mjs";
2
2
  import { t as AssistantMessageEventStream } from "./event-stream-X2gmsUWv.mjs";
3
- import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams } from "./openai-prompt-cache-B9AvdoEo.mjs";
4
- import { i as resolveOpenAICompletionsCompat } from "./openai-completions-compat-bNQXF1y9.mjs";
3
+ import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams } from "./openai-prompt-cache-CAo-Mah6.mjs";
4
+ import { i as resolveOpenAICompletionsCompat } from "./openai-completions-compat-D9KEUevM.mjs";
5
5
  import { i as resolveCacheRetention, r as buildCopilotDynamicHeaders } from "./cloudflare-Dttf8jKq.mjs";
6
- import { n as buildBaseOptions } from "./simple-options-xJkqrG_E.mjs";
6
+ import { n as buildBaseOptions } from "./simple-options-Bd0STwu7.mjs";
7
7
  import { n as getEnvApiKey } from "./env-api-keys-Xd8dm_aV.mjs";
8
- import { t as createAssistantOutput } from "./assistant-output-BnQm3fov.mjs";
9
- import { F as convertProviderResponsesMessages, n as applyResponsesServiceTierPricing, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams, vt as resolveOpenAISimpleReasoningEffort } from "./openai-responses-shared-wx9v1MCn.mjs";
10
- import { i as createOpenAIProviderClient, n as resolveProviderSimpleCompletionHeaders } from "./provider-transport-turn-state-D_GjPJHe.mjs";
8
+ import { t as createAssistantOutput } from "./assistant-output-Hl3b-ViJ.mjs";
9
+ import { F as convertProviderResponsesMessages, n as applyResponsesServiceTierPricing, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams, vt as resolveOpenAISimpleReasoningEffort } from "./openai-responses-shared-C8C1myRt.mjs";
10
+ import { i as createOpenAIProviderClient, n as resolveProviderSimpleCompletionHeaders } from "./provider-transport-turn-state-CxXS1_Cv.mjs";
11
11
  import { t as requireApiKey } from "./required-api-key-D088S4Cd.mjs";
12
12
  //#region packages/ai/src/providers/openai-responses.ts
13
13
  var openai_responses_exports = /* @__PURE__ */ __exportAll({
@@ -2,7 +2,7 @@ import { o as isRecord } from "./record-coerce-CNDovvft.mjs";
2
2
  import { r as parseLocalSchemaRefPointer } from "./validation-9FSkE8T-.mjs";
3
3
  import { r as normalizeLowercaseStringOrEmpty } from "./string-coerce-Cj8sqWHx.mjs";
4
4
  import { M as normalizeStringEntries, N as uniqueValues } from "./openai-responses-contracts-B5mGAbR6.mjs";
5
- import { S as walkSchemaValue, _ as SCHEMA_MAP_KEYS, a as SCHEMA_LITERAL_KEYS, b as evaluateSchemaWalk, c as inlineLocalToolSchemaRefs, d as inheritToolSchemaTruncation, f as reportToolSchemaTruncation, g as SCHEMA_ARRAY_KEYS, h as wasToolSchemaTruncated, i as publishRuntimeToolInputSchema, l as setOwnSchemaProperty, m as truncateToolSchemaDepth, o as canPreserveRootSchemaRefs, s as copySchemaMeta$1, t as getPublishedRuntimeToolInputSchema, v as SCHEMA_NESTED_KEYS, x as walkSchemaArray, y as SCHEMA_OBJECT_KEYS } from "./tool-schema-json-projection-B1sTYwfH.mjs";
5
+ import { S as walkSchemaValue, _ as SCHEMA_MAP_KEYS, a as SCHEMA_LITERAL_KEYS, b as evaluateSchemaWalk, c as inlineLocalToolSchemaRefs, d as inheritToolSchemaTruncation, f as reportToolSchemaTruncation, g as SCHEMA_ARRAY_KEYS, h as wasToolSchemaTruncated, i as publishRuntimeToolInputSchema, l as setOwnSchemaProperty, m as truncateToolSchemaDepth, o as canPreserveRootSchemaRefs, s as copySchemaMeta$1, t as getPublishedRuntimeToolInputSchema, v as SCHEMA_NESTED_KEYS, x as walkSchemaArray, y as SCHEMA_OBJECT_KEYS } from "./tool-schema-json-projection-DU-FFSa7.mjs";
6
6
  //#region packages/ai/src/providers/openai-function-tool.ts
7
7
  const preparedTools = /* @__PURE__ */ new WeakMap();
8
8
  const MAX_DESCRIPTOR_VARIANTS = 8;
@@ -200,7 +200,8 @@ function* cleanSchemaForGeminiWithDefs(schema, defs, refStack, ancestors, budget
200
200
  for (const [key, value] of Object.entries(obj)) {
201
201
  if (GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS.has(key)) continue;
202
202
  if (key === "const" || key === "enum") {
203
- const enumValues = cleanGeminiEnumValues(key === "const" ? [value] : value);
203
+ const type = Array.isArray(obj.type) && obj.type.every((entry) => typeof entry === "string") ? obj.type.find((entry) => entry !== "null") : obj.type;
204
+ const enumValues = type === void 0 || type === "string" ? cleanGeminiEnumValues(key === "const" ? [value] : value) : void 0;
204
205
  if (enumValues) cleaned.enum = enumValues;
205
206
  continue;
206
207
  }
@@ -1,5 +1,5 @@
1
1
  import { nt as StreamOptions } from "./types-CVYzKrMl.mjs";
2
- import "./types-CBJthzJX.mjs";
2
+ import "./types-BFfXm_Jr.mjs";
3
3
  import Anthropic from "@anthropic-ai/sdk";
4
4
  import OpenAI from "openai";
5
5
  import { ResponseCreateParamsStreaming } from "openai/resources/responses/responses.js";
@@ -132,6 +132,12 @@ type AnthropicContextManagementOptions = {
132
132
  };
133
133
  /** Provider options shared by the Anthropic provider and canonical transport. */
134
134
  interface AnthropicOptions extends StreamOptions, AnthropicContextManagementOptions {
135
+ /**
136
+ * Called when Anthropic rejected an OAuth request with claude_code_version_too_old
137
+ * and the transport adopted the version it named. Owners persist it so the next
138
+ * process starts at that version instead of being rejected again.
139
+ */
140
+ onClaudeCodeVersionRequired?: (version: string) => void;
135
141
  /**
136
142
  * Enable extended thinking.
137
143
  * For Opus 4.6+ and Sonnet 4.6: uses adaptive thinking (model decides when/how much to think).
@@ -1,5 +1,5 @@
1
1
  import { o as isRecord } from "./record-coerce-CNDovvft.mjs";
2
- import { A as shortHash } from "./transport-stream-shared-lhgkTOz3.mjs";
2
+ import { A as shortHash } from "./transport-stream-shared-C1AtJhZA.mjs";
3
3
  //#region packages/ai/src/transports/provider-replay-context.ts
4
4
  function isProviderReplayContext(value) {
5
5
  return isRecord(value) && typeof value.provider === "string" && typeof value.api === "string" && typeof value.model === "string" && (value.baseUrlHash === void 0 || typeof value.baseUrlHash === "string") && (value.sessionHash === void 0 || typeof value.sessionHash === "string") && (value.authProfileHash === void 0 || typeof value.authProfileHash === "string");
@@ -1,8 +1,8 @@
1
- import { r as getAiTransportHost } from "./host-CWt55nnF.mjs";
1
+ import { r as getAiTransportHost } from "./host-CyGba3M8.mjs";
2
2
  import { n as resolveCloudflareBaseUrl, t as isCloudflareProvider } from "./cloudflare-Dttf8jKq.mjs";
3
3
  import { n as resolveOpencodeSessionHeaders, t as hasOpencodeSessionHeader } from "./session-affinity-DA4WHv1h.mjs";
4
- import { It as resolveOpenAIClientBaseUrl, Rt as withOpenAIErrorResponseHook } from "./openai-responses-shared-wx9v1MCn.mjs";
5
- import { n as OpenAI } from "./openai-CiRi-nVE.mjs";
4
+ import { It as resolveOpenAIClientBaseUrl, Rt as withOpenAIErrorResponseHook } from "./openai-responses-shared-C8C1myRt.mjs";
5
+ import { n as OpenAI } from "./openai-DAGvHDxa.mjs";
6
6
  import { randomUUID } from "node:crypto";
7
7
  //#region packages/ai/src/providers/openai-provider-client.ts
8
8
  function createOpenAIProviderClient(model, apiKey, headers, optionsHeaders, onResponse) {
@@ -1,6 +1,6 @@
1
- import { t as index_d_exports } from "./index-DSprYWaz.mjs";
1
+ import { t as index_d_exports } from "./index-B8ODIVmA.mjs";
2
2
  import { a as AssistantMessage, d as Context, dt as ToolResultMessage, k as Model, mt as UserMessage, n as Api, nt as StreamOptions, p as ImageContent, rt as TextContent, s as AssistantMessageEventStreamContract } from "./types-CVYzKrMl.mjs";
3
- import "./types-CBJthzJX.mjs";
3
+ import "./types-BFfXm_Jr.mjs";
4
4
  //#region packages/ai/src/provider-types.d.ts
5
5
  declare const PROVIDER_CONTEXT_HANDOFF: unique symbol;
6
6
  declare const PROVIDER_MODEL_INPUT: unique symbol;