@openclaw/ai 2026.11.5-beta.4 → 2026.11.5
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.
- package/dist/.source-module-urls/fe058cc430242ce2ab0dfbcbe153e240a52cf9c3072c3dc0a73e5f956b6ba49b.json +1 -1
- package/dist/{anthropic-c499kyoI.mjs → anthropic-CNEzO12C.mjs} +1 -1
- package/dist/{anthropic-stream-lifecycle-KkyqdnjW.mjs → anthropic-stream-lifecycle-DJUtasDB.mjs} +1 -2
- package/dist/{azure-openai-responses-CyuUQ3JJ.mjs → azure-openai-responses-DRkduRmW.mjs} +1 -2
- package/dist/{google-interactions-B_xZUObF.mjs → google-interactions-BE7cxFPc.mjs} +1 -1
- package/dist/internal/anthropic.mjs +2 -2
- package/dist/internal/openai.mjs +5 -5
- package/dist/{openai-chatgpt-responses-B-MopEDG.mjs → openai-chatgpt-responses-C6rEZcsZ.mjs} +4 -9
- package/dist/{openai-completions-B62Yg3hQ.mjs → openai-completions-B93R3N3b.mjs} +1 -1
- package/dist/{openai-completions-transport-BQ8dr3FV.mjs → openai-completions-transport-DHTFq-BM.mjs} +6 -13
- package/dist/{openai-responses-VUkMi_Bc.mjs → openai-responses-DSxPKV0U.mjs} +2 -3
- package/dist/{openai-responses-request-lifecycle-DNITxJPO.mjs → openai-responses-request-lifecycle-C_3FKkl7.mjs} +1 -1
- package/dist/{openai-responses-shared-WMDQDwC6.mjs → openai-responses-shared-En3Jf0Vg.mjs} +3 -11
- package/dist/{provider-replay-context-5gFUstgv.mjs → provider-replay-context--QGWotXx.mjs} +2 -3
- package/dist/{provider-transport-turn-state-d1uIBP1i.mjs → provider-transport-turn-state-DyaOKAYm.mjs} +1 -1
- package/dist/providers.mjs +6 -6
- package/dist/transports.d.mts +0 -1
- package/dist/transports.mjs +4 -4
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { w as supportsClaudeAdaptiveThinking } from "./src-CQ7nH2mL.mjs";
|
|
|
3
3
|
import { t as AssistantMessageEventStream } from "./event-stream-X2gmsUWv.mjs";
|
|
4
4
|
import { _ as buildAnthropicClaudeCodeIdentity, a as resolveAiTransportHeaderSentinels, b as prepareClaudeNoPrefillRequestContext, r as getAiTransportHost } from "./host-DqX-64Pb.mjs";
|
|
5
5
|
import { a as streamFragmentError } from "./transport-utils-rxOHnq9y.mjs";
|
|
6
|
-
import { B as usesFoundryBearerAuth, R as isAnthropicOAuthApiKey, j as supportsAnthropicServerSideFallback, n as applyAnthropicThinkingOptions, t as runAnthropicStreamLifecycle, w as isDirectAnthropicModel, z as omitFoundryBearerCredentialHeaders } from "./anthropic-stream-lifecycle-
|
|
6
|
+
import { B as usesFoundryBearerAuth, R as isAnthropicOAuthApiKey, j as supportsAnthropicServerSideFallback, n as applyAnthropicThinkingOptions, t as runAnthropicStreamLifecycle, w as isDirectAnthropicModel, z as omitFoundryBearerCredentialHeaders } from "./anthropic-stream-lifecycle-DJUtasDB.mjs";
|
|
7
7
|
import { i as resolveCacheRetention, n as resolveCloudflareBaseUrl, r as buildCopilotDynamicHeaders } from "./cloudflare-BJ2_Xabx.mjs";
|
|
8
8
|
import { n as buildBaseOptions, r as clampMaxTokensToModel } from "./simple-options-CQNPKCEb.mjs";
|
|
9
9
|
import { k as parseJsonWithRepair } from "./transport-stream-shared-CBVh6QEc.mjs";
|
package/dist/{anthropic-stream-lifecycle-KkyqdnjW.mjs → anthropic-stream-lifecycle-DJUtasDB.mjs}
RENAMED
|
@@ -16,7 +16,7 @@ import { t as parsePositiveInteger } from "./positive-integer-DiqE5vNi.mjs";
|
|
|
16
16
|
import { a as reconcileAnthropicToolChoice, i as projectAnthropicTools, n as normalizeAnthropicToolChoice, o as resolveOriginalAnthropicToolName, s as toClaudeCodeToolName, t as normalizeAnthropicToolCallId } from "./anthropic-tool-projection-DcvsDiyX.mjs";
|
|
17
17
|
import { t as createDeferredEventBuffer } from "./deferred-event-buffer-tIGkTkTm.mjs";
|
|
18
18
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-DzaHoRAU.mjs";
|
|
19
|
-
import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context
|
|
19
|
+
import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context--QGWotXx.mjs";
|
|
20
20
|
import { t as transformProviderMessages } from "./provider-transcript-transform-Hr1kCoMX.mjs";
|
|
21
21
|
import { markEncodedModelRequestBody } from "./internal/model-request-body.mjs";
|
|
22
22
|
import { t as createAssistantOutput } from "./assistant-output-C3czmoN4.mjs";
|
|
@@ -1044,7 +1044,6 @@ async function buildAnthropicRequest(model, context, options, profile, isOAuthTo
|
|
|
1044
1044
|
}
|
|
1045
1045
|
const replayPlan = buildAnthropicReplayPlan(context.messages, model, {
|
|
1046
1046
|
enabled: !isOAuthToken && options?.anthropicServerCompaction === true,
|
|
1047
|
-
authProfileId: options?.authProfileId,
|
|
1048
1047
|
sessionId: options?.sessionId
|
|
1049
1048
|
});
|
|
1050
1049
|
const cacheBreakpointOptOutMessageIndexes = /* @__PURE__ */ new Set();
|
|
@@ -3,7 +3,7 @@ import { r as getAiTransportHost } from "./host-DqX-64Pb.mjs";
|
|
|
3
3
|
import { n as buildBaseOptions } from "./simple-options-CQNPKCEb.mjs";
|
|
4
4
|
import { n as getEnvApiKey } from "./env-api-keys-BuHc86ya.mjs";
|
|
5
5
|
import { t as createAssistantOutput } from "./assistant-output-C3czmoN4.mjs";
|
|
6
|
-
import { F as convertProviderResponsesMessages, It as resolvePromptCacheKey, Lt as withOpenAIErrorResponseHook, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams, vt as resolveOpenAISimpleReasoningEffort } from "./openai-responses-shared-
|
|
6
|
+
import { F as convertProviderResponsesMessages, It as resolvePromptCacheKey, Lt as withOpenAIErrorResponseHook, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams, vt as resolveOpenAISimpleReasoningEffort } from "./openai-responses-shared-En3Jf0Vg.mjs";
|
|
7
7
|
import { i as resolveAzureDeploymentNameFromMap, n as isTraditionalAzureOpenAIHost, t as isOpenAICompatibleAzureResponsesBaseUrl } from "./azure-openai-responses-client-compat-D0dvJMbZ.mjs";
|
|
8
8
|
import { t as requireApiKey } from "./required-api-key-2zZTkmsi.mjs";
|
|
9
9
|
import OpenAI, { AzureOpenAI } from "openai";
|
|
@@ -60,7 +60,6 @@ const streamAzureOpenAIResponses = (model, context, options) => {
|
|
|
60
60
|
}),
|
|
61
61
|
input: convertProviderResponsesMessages(requestModel, context, AZURE_TOOL_CALL_PROVIDERS, {
|
|
62
62
|
sessionId: options?.sessionId,
|
|
63
|
-
authProfileId: options?.authProfileId,
|
|
64
63
|
mutableInput: Boolean(options?.onPayload),
|
|
65
64
|
replayMode
|
|
66
65
|
}),
|
|
@@ -16,7 +16,7 @@ import { a as googleToolParameters, o as mapGoogleToolArguments } from "./google
|
|
|
16
16
|
import { n as createGoogleVideoPlaceholder, r as materializeGoogleVideoSlots, t as GOOGLE_VIDEO_SLOT_OMISSION } from "./google-video-slots-Bxt-OXO8.mjs";
|
|
17
17
|
import { r as buildGoogleInteractionsSimpleThinking } from "./google-shared-BMYt1xSI.mjs";
|
|
18
18
|
//#region packages/ai/package.json
|
|
19
|
-
var version = "2026.11.5
|
|
19
|
+
var version = "2026.11.5";
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region packages/ai/src/providers/google-interactions-request.ts
|
|
22
22
|
let packageVersionMemo;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { D as supportsClaudeNativeMaxEffort, O as supportsClaudeNativeXhighEffort, S as resolveClaudeSonnet5ModelIdentity, _ as resolveClaudeMythos5ModelIdentity, b as resolveClaudeOpus5ModelIdentity, d as requiresClaudeBetweenToolsThinking, f as requiresClaudeDefaultSampling, g as resolveClaudeModelIdentity, h as resolveClaudeHaiku55ModelIdentity, m as resolveClaudeFable5ModelIdentity, p as requiresClaudeMandatoryAdaptiveThinking, u as bindsClaudeThinkingPrefix, v as resolveClaudeNativeThinkingLevelMap, w as supportsClaudeAdaptiveThinking, x as resolveClaudeSonnet55ModelIdentity, y as resolveClaudeOpus55ModelIdentity } from "../src-CQ7nH2mL.mjs";
|
|
2
2
|
import { C as readRequiredClaudeCodeVersion, D as usesClaudeFable5MessagesContract, E as resolveAnthropicThinkingEffort, O as usesClaudeStreamingRefusalContract, S as raiseClaudeCodeVersionFloor, T as resetLearnedClaudeCodeVersionForTest, _ as buildAnthropicClaudeCodeIdentity, b as prepareClaudeNoPrefillRequestContext, g as applyClaudeRequestContract, h as ANTHROPIC_CLAUDE_CODE_VERSION, v as defaultsClaudeAdaptiveThinking, w as requiresClaudeAdaptiveThinking, x as prepareModelBoundThinkingReplay, y as mapAnthropicStopReason } from "../host-DqX-64Pb.mjs";
|
|
3
|
-
import { A as resolveAnthropicServerCompactionPlan, B as usesFoundryBearerAuth, F as applyAnthropicFallbackBoundary, I as readAnthropicFallbackBoundary, L as resolveAnthropicFallbackServingModelCost, M as ANTHROPIC_SERVER_SIDE_FALLBACKS, N as ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, P as CLAUDE_OPUS_FALLBACK_MODEL_COST, R as isAnthropicOAuthApiKey, S as buildAnthropicSystemBlocks, _ as applyAnthropicRefusal, c as readAnthropicCacheWriteUsage, d as readLastAnthropicIterationUsage, f as ANTHROPIC_OMITTED_REASONING_TEXT, g as readAnthropicInputTransformations, h as logAnthropicThinkingDrops, l as readAnthropicPromptUsageSnapshot, m as findActiveAnthropicToolTurnAssistantIndex, n as applyAnthropicThinkingOptions, o as applyAnthropicMessageDeltaUsage, p as applyAnthropicThinkingBindingControls, s as applyAnthropicMessageStartUsage, u as readAnthropicUsageTokenCount, w as isDirectAnthropicModel, z as omitFoundryBearerCredentialHeaders } from "../anthropic-stream-lifecycle-
|
|
3
|
+
import { A as resolveAnthropicServerCompactionPlan, B as usesFoundryBearerAuth, F as applyAnthropicFallbackBoundary, I as readAnthropicFallbackBoundary, L as resolveAnthropicFallbackServingModelCost, M as ANTHROPIC_SERVER_SIDE_FALLBACKS, N as ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, P as CLAUDE_OPUS_FALLBACK_MODEL_COST, R as isAnthropicOAuthApiKey, S as buildAnthropicSystemBlocks, _ as applyAnthropicRefusal, c as readAnthropicCacheWriteUsage, d as readLastAnthropicIterationUsage, f as ANTHROPIC_OMITTED_REASONING_TEXT, g as readAnthropicInputTransformations, h as logAnthropicThinkingDrops, l as readAnthropicPromptUsageSnapshot, m as findActiveAnthropicToolTurnAssistantIndex, n as applyAnthropicThinkingOptions, o as applyAnthropicMessageDeltaUsage, p as applyAnthropicThinkingBindingControls, s as applyAnthropicMessageStartUsage, u as readAnthropicUsageTokenCount, w as isDirectAnthropicModel, z as omitFoundryBearerCredentialHeaders } from "../anthropic-stream-lifecycle-DJUtasDB.mjs";
|
|
4
4
|
import { a as reconcileAnthropicToolChoice, i as projectAnthropicTools, n as normalizeAnthropicToolChoice, o as resolveOriginalAnthropicToolName, r as prepareAnthropicInputSchema, s as toClaudeCodeToolName, t as normalizeAnthropicToolCallId } from "../anthropic-tool-projection-DcvsDiyX.mjs";
|
|
5
|
-
import { n as streamAnthropic, r as streamSimpleAnthropic } from "../anthropic-
|
|
5
|
+
import { n as streamAnthropic, r as streamSimpleAnthropic } from "../anthropic-CNEzO12C.mjs";
|
|
6
6
|
export { ANTHROPIC_CLAUDE_CODE_VERSION, ANTHROPIC_OMITTED_REASONING_TEXT, ANTHROPIC_SERVER_SIDE_FALLBACKS, ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, CLAUDE_OPUS_FALLBACK_MODEL_COST, applyAnthropicFallbackBoundary, applyAnthropicMessageDeltaUsage, applyAnthropicMessageStartUsage, applyAnthropicRefusal, applyAnthropicThinkingBindingControls, applyAnthropicThinkingOptions, applyClaudeRequestContract, bindsClaudeThinkingPrefix, buildAnthropicClaudeCodeIdentity, buildAnthropicSystemBlocks, defaultsClaudeAdaptiveThinking, findActiveAnthropicToolTurnAssistantIndex, isAnthropicOAuthApiKey, isDirectAnthropicModel, logAnthropicThinkingDrops, mapAnthropicStopReason, normalizeAnthropicToolCallId, normalizeAnthropicToolChoice, omitFoundryBearerCredentialHeaders, prepareAnthropicInputSchema, prepareClaudeNoPrefillRequestContext, prepareModelBoundThinkingReplay, projectAnthropicTools, raiseClaudeCodeVersionFloor, readAnthropicCacheWriteUsage, readAnthropicFallbackBoundary, readAnthropicInputTransformations, readAnthropicPromptUsageSnapshot, readAnthropicUsageTokenCount, readLastAnthropicIterationUsage, readRequiredClaudeCodeVersion, reconcileAnthropicToolChoice, requiresClaudeAdaptiveThinking, requiresClaudeBetweenToolsThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resetLearnedClaudeCodeVersionForTest, resolveAnthropicFallbackServingModelCost, resolveAnthropicServerCompactionPlan, resolveAnthropicThinkingEffort, resolveClaudeFable5ModelIdentity, resolveClaudeHaiku55ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus55ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet55ModelIdentity, resolveClaudeSonnet5ModelIdentity, resolveOriginalAnthropicToolName, streamAnthropic, streamSimpleAnthropic, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, toClaudeCodeToolName, usesClaudeFable5MessagesContract, usesClaudeStreamingRefusalContract, usesFoundryBearerAuth };
|
package/dist/internal/openai.mjs
CHANGED
|
@@ -3,11 +3,11 @@ import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams, t
|
|
|
3
3
|
import { _ as isResponsesOutputLimitToolCallError, b as resolveResponsesTerminalStopReason, g as applyResponsesCacheWritePricing, v as mapResponsesTerminalUsage, y as readResponsesReasoningTokens } from "../diagnostics-CloVGQiK.mjs";
|
|
4
4
|
import { d as measuredRequestPressure, p as reasoningTagTextPolicy, u as codeModeToolSurfaceObserver } from "../simple-options-CQNPKCEb.mjs";
|
|
5
5
|
import { encodedModelRequestBodyStream, modelRequestBodyState } from "./model-request-body.mjs";
|
|
6
|
-
import { a as hasResponsesWebSearchTool, s as convertMessages } from "../openai-completions-transport-
|
|
7
|
-
import { N as bindResponsesInputMessage, St as reconcileOpenAIResponsesToolChoice, _ as isAzureResponsesTextDeltaEventType, b as resolveResponsesMessageSnapshotCollapse, bt as projectOpenAITools, f as AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, 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, xt as reconcileOpenAICompletionsToolChoice, y as isResponsesTextDeltaEventType } from "../openai-responses-shared-
|
|
6
|
+
import { a as hasResponsesWebSearchTool, s as convertMessages } from "../openai-completions-transport-DHTFq-BM.mjs";
|
|
7
|
+
import { N as bindResponsesInputMessage, St as reconcileOpenAIResponsesToolChoice, _ as isAzureResponsesTextDeltaEventType, b as resolveResponsesMessageSnapshotCollapse, bt as projectOpenAITools, f as AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, 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, xt as reconcileOpenAICompletionsToolChoice, y as isResponsesTextDeltaEventType } from "../openai-responses-shared-En3Jf0Vg.mjs";
|
|
8
8
|
import { t as mapOpenAIStopReason } from "../openai-stop-reason-8s70vDXj.mjs";
|
|
9
9
|
import { i as resolveAzureDeploymentNameFromMap, n as isTraditionalAzureOpenAIHost, r as parseAzureDeploymentNameMap, t as isOpenAICompatibleAzureResponsesBaseUrl } from "../azure-openai-responses-client-compat-D0dvJMbZ.mjs";
|
|
10
|
-
import { n as responsesRequestLifecycle, t as independentResponsesRequest } from "../openai-responses-request-lifecycle-
|
|
11
|
-
import { n as streamOpenAICompletions, r as streamSimpleOpenAICompletions } from "../openai-completions-
|
|
12
|
-
import { n as streamOpenAIResponses, r as streamSimpleOpenAIResponses } from "../openai-responses-
|
|
10
|
+
import { n as responsesRequestLifecycle, t as independentResponsesRequest } from "../openai-responses-request-lifecycle-C_3FKkl7.mjs";
|
|
11
|
+
import { n as streamOpenAICompletions, r as streamSimpleOpenAICompletions } from "../openai-completions-B93R3N3b.mjs";
|
|
12
|
+
import { n as streamOpenAIResponses, r as streamSimpleOpenAIResponses } from "../openai-responses-DSxPKV0U.mjs";
|
|
13
13
|
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 };
|
package/dist/{openai-chatgpt-responses-B-MopEDG.mjs → openai-chatgpt-responses-C6rEZcsZ.mjs}
RENAMED
|
@@ -17,9 +17,9 @@ import { n as buildManagedModelFetch } from "./host-policy-Bk85E9ue.mjs";
|
|
|
17
17
|
import { n as buildBaseOptions, y as prepareSystemPrompt } from "./simple-options-CQNPKCEb.mjs";
|
|
18
18
|
import { C as withProviderResponseHook, g as notifyProviderStreamOpened, n as assignTransportErrorDetails, p as mergeTransportHeaders, x as transportAbortError } from "./transport-stream-shared-CBVh6QEc.mjs";
|
|
19
19
|
import { t as createAssistantOutput } from "./assistant-output-C3czmoN4.mjs";
|
|
20
|
-
import { C as isInvalidEncryptedContentError, D as ResponsesStreamFailure, Dt as createResponseModelTracker, E as resolveNextResponsesEncryptedContentAttempt, Et as createOpenAIResponseHook, F as convertProviderResponsesMessages, Tt as createOpenAIProviderAcceptanceHook, _t as resolveOpenAIRequestReasoning, i as convertResponsesToolPayload, j as recordResponsesContextUsage, n as applyResponsesServiceTierPricing, o as readOpenAIMisalignmentReview, ot as suppressOpenAIResponsesCompaction, rt as buildOpenAIResponsesReasoningReplayMetadata, s as processResponsesStream, vt as resolveOpenAISimpleReasoningEffort, x as commitResponsesEncryptedContentAttempt } from "./openai-responses-shared-
|
|
20
|
+
import { C as isInvalidEncryptedContentError, D as ResponsesStreamFailure, Dt as createResponseModelTracker, E as resolveNextResponsesEncryptedContentAttempt, Et as createOpenAIResponseHook, F as convertProviderResponsesMessages, Tt as createOpenAIProviderAcceptanceHook, _t as resolveOpenAIRequestReasoning, i as convertResponsesToolPayload, j as recordResponsesContextUsage, n as applyResponsesServiceTierPricing, o as readOpenAIMisalignmentReview, ot as suppressOpenAIResponsesCompaction, rt as buildOpenAIResponsesReasoningReplayMetadata, s as processResponsesStream, vt as resolveOpenAISimpleReasoningEffort, x as commitResponsesEncryptedContentAttempt } from "./openai-responses-shared-En3Jf0Vg.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-
|
|
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-C_3FKkl7.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
|
|
@@ -184,7 +184,6 @@ function buildRequestBody(model, context, allowedToolCallProviders, options, rep
|
|
|
184
184
|
includeSystemPrompt: false,
|
|
185
185
|
replayResponsesItemIds: false,
|
|
186
186
|
sessionId: options?.sessionId,
|
|
187
|
-
authProfileId: options?.authProfileId,
|
|
188
187
|
mutableInput: Boolean(options?.onPayload),
|
|
189
188
|
replayMode,
|
|
190
189
|
retainUserProvenance
|
|
@@ -424,10 +423,7 @@ const streamOpenAICodexResponses = (model, context, options) => {
|
|
|
424
423
|
abortFirstEventStream: firstEventAbort?.abort,
|
|
425
424
|
onFirstEventTimeout: getFirstStreamEventTimeoutHandler(streamOptions),
|
|
426
425
|
signal: activitySignal ?? streamOptions?.signal,
|
|
427
|
-
reasoningReplayMetadata: buildOpenAIResponsesReasoningReplayMetadata(model, {
|
|
428
|
-
sessionId: streamOptions?.sessionId,
|
|
429
|
-
authProfileId: streamOptions?.authProfileId
|
|
430
|
-
}),
|
|
426
|
+
reasoningReplayMetadata: buildOpenAIResponsesReasoningReplayMetadata(model, { sessionId: streamOptions?.sessionId }),
|
|
431
427
|
resolveServiceTier: resolveCodexServiceTier,
|
|
432
428
|
applyServiceTierPricing: (usage, serviceTier) => applyResponsesServiceTierPricing(usage, serviceTier, model)
|
|
433
429
|
});
|
|
@@ -979,8 +975,7 @@ async function processWebSocketStream(state, authority, body, output, stream, mo
|
|
|
979
975
|
const responseItems = convertProviderResponsesMessages(model, { messages: [output] }, CODEX_TOOL_CALL_PROVIDERS, {
|
|
980
976
|
includeSystemPrompt: false,
|
|
981
977
|
replayResponsesItemIds: false,
|
|
982
|
-
sessionId: options?.sessionId
|
|
983
|
-
authProfileId: options?.authProfileId
|
|
978
|
+
sessionId: options?.sessionId
|
|
984
979
|
}).filter((item) => item.type !== "function_call_output");
|
|
985
980
|
entry.continuation = {
|
|
986
981
|
lastRequestBody: body,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
2
|
import { M as clampThinkingLevel } from "./host-DqX-64Pb.mjs";
|
|
3
3
|
import { n as buildBaseOptions } from "./simple-options-CQNPKCEb.mjs";
|
|
4
|
-
import { n as streamOpenAICompletionsRequest, s as convertMessages } from "./openai-completions-transport-
|
|
4
|
+
import { n as streamOpenAICompletionsRequest, s as convertMessages } from "./openai-completions-transport-DHTFq-BM.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({
|
package/dist/{openai-completions-transport-BQ8dr3FV.mjs → openai-completions-transport-DHTFq-BM.mjs}
RENAMED
|
@@ -26,7 +26,7 @@ import { A as parseStreamingJson, C as withProviderResponseHook, D as shortHash,
|
|
|
26
26
|
import { C as sha256Hex, S as redactIdentifier } from "./tool-schema-json-projection-BSHb4gaJ.mjs";
|
|
27
27
|
import { n as getEnvApiKey } from "./env-api-keys-BuHc86ya.mjs";
|
|
28
28
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-DzaHoRAU.mjs";
|
|
29
|
-
import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context
|
|
29
|
+
import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context--QGWotXx.mjs";
|
|
30
30
|
import { t as transformProviderMessages } from "./provider-transcript-transform-Hr1kCoMX.mjs";
|
|
31
31
|
import { prepareModelRequestBody } from "./internal/model-request-body.mjs";
|
|
32
32
|
import { PROVIDER_MODEL_INPUT, resolveProviderContext } from "./provider-types.mjs";
|
|
@@ -34,8 +34,8 @@ import { t as createAssistantOutput } from "./assistant-output-C3czmoN4.mjs";
|
|
|
34
34
|
import { n as resolveOpencodeSessionHeaders } from "./session-affinity-DA4WHv1h.mjs";
|
|
35
35
|
import { isGoogleGemini3ThinkingLevelModel } from "./internal/google-model-family.mjs";
|
|
36
36
|
import "./types.mjs";
|
|
37
|
-
import { $ as isConfigurationUpdate, A as summarizeResponsesPayload, At as log, B as recordResponsesInputReplay, C as isInvalidEncryptedContentError, Ct as toOpenAIResponsesToolChoice, Dt as createResponseModelTracker, E as resolveNextResponsesEncryptedContentAttempt, Ft as resolveOpenAIClientBaseUrl, G as responsesContinuationPrefixFingerprint, H as claimOpenAIResponsesHttpContinuation, I as convertResponsesMessages, It as resolvePromptCacheKey, K as responsesContinuationRequestFingerprint, Lt as withOpenAIErrorResponseHook, Mt as parseOpenAICompletionsUsage, Nt as readOpenAICompletionsContentDeltas, O as observeResponsesTransportFailure, Ot as detachPartialSnapshot, P as buildResponsesInputMessage, Pt as readOpenAICompletionsReasoningBatch, S as createResponsesStreamWithRecovery, St as reconcileOpenAIResponsesToolChoice, T as resolveAzureOpenAIApiVersion, Tt as createOpenAIProviderAcceptanceHook, U as recordResponsesContinuationState, V as responsesInputFingerprint, W as resolveResponsesContinuationRequest, _t as resolveOpenAIRequestReasoning, a as prepareResponsesTools, bt as projectOpenAITools, c as observeResponsesStream, ct as buildOpenAIClientHeaders, dt as enforceCodeModeResponsesToolSurface, et as replayResponsesReasoningUpdates, gt as resolveOpenAIStrictToolFlagWithDiagnostics, ht as resolveCodeModeResponsesVisibleToolNames, j as recordResponsesContextUsage, jt as measureUtf8AppendBytes, k as safeDebugValue, kt as isOpenAICompletionsThinkingEnabled, 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 readResponsesRecoveryEvent, wt as GEMINI_THOUGHT_SIGNATURE_VALIDATOR_SKIP, xt as reconcileOpenAICompletionsToolChoice, yt as prepareOpenAITools, z as readResponsesInputReplayState } from "./openai-responses-shared-
|
|
38
|
-
import { i as createOpenAIProviderClient, n as resolveProviderSimpleCompletionHeaders, r as resolveProviderTransportTurnState, t as filterProviderTurnHeadersForExplicitOpencodeSession } from "./provider-transport-turn-state-
|
|
37
|
+
import { $ as isConfigurationUpdate, A as summarizeResponsesPayload, At as log, B as recordResponsesInputReplay, C as isInvalidEncryptedContentError, Ct as toOpenAIResponsesToolChoice, Dt as createResponseModelTracker, E as resolveNextResponsesEncryptedContentAttempt, Ft as resolveOpenAIClientBaseUrl, G as responsesContinuationPrefixFingerprint, H as claimOpenAIResponsesHttpContinuation, I as convertResponsesMessages, It as resolvePromptCacheKey, K as responsesContinuationRequestFingerprint, Lt as withOpenAIErrorResponseHook, Mt as parseOpenAICompletionsUsage, Nt as readOpenAICompletionsContentDeltas, O as observeResponsesTransportFailure, Ot as detachPartialSnapshot, P as buildResponsesInputMessage, Pt as readOpenAICompletionsReasoningBatch, S as createResponsesStreamWithRecovery, St as reconcileOpenAIResponsesToolChoice, T as resolveAzureOpenAIApiVersion, Tt as createOpenAIProviderAcceptanceHook, U as recordResponsesContinuationState, V as responsesInputFingerprint, W as resolveResponsesContinuationRequest, _t as resolveOpenAIRequestReasoning, a as prepareResponsesTools, bt as projectOpenAITools, c as observeResponsesStream, ct as buildOpenAIClientHeaders, dt as enforceCodeModeResponsesToolSurface, et as replayResponsesReasoningUpdates, gt as resolveOpenAIStrictToolFlagWithDiagnostics, ht as resolveCodeModeResponsesVisibleToolNames, j as recordResponsesContextUsage, jt as measureUtf8AppendBytes, k as safeDebugValue, kt as isOpenAICompletionsThinkingEnabled, 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 readResponsesRecoveryEvent, wt as GEMINI_THOUGHT_SIGNATURE_VALIDATOR_SKIP, xt as reconcileOpenAICompletionsToolChoice, yt as prepareOpenAITools, z as readResponsesInputReplayState } from "./openai-responses-shared-En3Jf0Vg.mjs";
|
|
38
|
+
import { i as createOpenAIProviderClient, n as resolveProviderSimpleCompletionHeaders, r as resolveProviderTransportTurnState, t as filterProviderTurnHeadersForExplicitOpencodeSession } from "./provider-transport-turn-state-DyaOKAYm.mjs";
|
|
39
39
|
import { a as withFirstStreamEventTimeout, i as getFirstStreamEventTimeoutMs, r as getFirstStreamEventTimeoutHandler, t as createFirstStreamEventAbortController } from "./stream-first-event-timeout-B7RcufAV.mjs";
|
|
40
40
|
import { t as boundResponseBody } from "./streaming-byte-guard-DBXr1XYn.mjs";
|
|
41
41
|
import { m as withPreparedToolSchemaNormalization, p as normalizeToolSchema, r as normalizeOpenAIStrictToolParameters, x as prepareOpenAIFunctionTool } from "./openai-tool-schema-CvxySRyf.mjs";
|
|
@@ -43,7 +43,7 @@ import { t as requiresReasoningContentReplay } from "./openai-completions-reason
|
|
|
43
43
|
import { t as mapOpenAIStopReason } from "./openai-stop-reason-8s70vDXj.mjs";
|
|
44
44
|
import { i as resolveAzureDeploymentNameFromMap, t as isOpenAICompatibleAzureResponsesBaseUrl } from "./azure-openai-responses-client-compat-D0dvJMbZ.mjs";
|
|
45
45
|
import { a as isOpenAIResponsesCompactionOutput, c as sanitizeResponsesImagePayload, i as getOpenAIResponsesCompactionOutputError, l as applyOpenAIResponsesPayloadPolicy, n as supportsNativeOpenAIResponsesEndpoint, p as resolveOpenAIResponsesPayloadPolicy, r as createBoundedOpenAIResponsesCompactionFetch, t as isOfficialOpenAIResponsesBaseUrl, u as enforceOpenAIResponsesCompactionReplayStorage } from "./openai-responses-endpoint-CqO3ejTe.mjs";
|
|
46
|
-
import { a as createResponsesV2CompactionCollector, i as createResponsesPromptEgressObserver, n as responsesRequestLifecycle, o as claimResponsesCompactRequest, r as withResponsesRequestAcceptance, t as independentResponsesRequest } from "./openai-responses-request-lifecycle-
|
|
46
|
+
import { a as createResponsesV2CompactionCollector, i as createResponsesPromptEgressObserver, n as responsesRequestLifecycle, o as claimResponsesCompactRequest, r as withResponsesRequestAcceptance, t as independentResponsesRequest } from "./openai-responses-request-lifecycle-C_3FKkl7.mjs";
|
|
47
47
|
import { randomUUID } from "node:crypto";
|
|
48
48
|
import { isDeepStrictEqual } from "node:util";
|
|
49
49
|
import OpenAI, { AzureOpenAI } from "openai";
|
|
@@ -1894,7 +1894,6 @@ function buildOpenAIResponsesParams(model, context, options, metadata, replayMod
|
|
|
1894
1894
|
const messages = convertResponsesMessages(model, context, OPENAI_RESPONSES_TOOL_CALL_PROVIDERS, {
|
|
1895
1895
|
includeSystemPrompt: !payloadPolicy.usesInstructionsField,
|
|
1896
1896
|
replayResponsesItemIds,
|
|
1897
|
-
authProfileId: options?.authProfileId,
|
|
1898
1897
|
mutableInput: Boolean(options?.onPayload),
|
|
1899
1898
|
sessionId: options?.sessionId,
|
|
1900
1899
|
replayMode,
|
|
@@ -2011,10 +2010,7 @@ async function postOpenAIResponsesCompaction(params) {
|
|
|
2011
2010
|
usage,
|
|
2012
2011
|
modelUsage,
|
|
2013
2012
|
model: params.model,
|
|
2014
|
-
replayMetadata: buildOpenAIResponsesReasoningReplayMetadata(params.model, {
|
|
2015
|
-
authProfileId: params.options?.authProfileId,
|
|
2016
|
-
sessionId: params.options?.sessionId
|
|
2017
|
-
})
|
|
2013
|
+
replayMetadata: buildOpenAIResponsesReasoningReplayMetadata(params.model, { sessionId: params.options?.sessionId })
|
|
2018
2014
|
};
|
|
2019
2015
|
}
|
|
2020
2016
|
//#endregion
|
|
@@ -2904,10 +2900,7 @@ function createResponsesTransportExecutor(config) {
|
|
|
2904
2900
|
abortFirstEventStream: firstEvent.abort,
|
|
2905
2901
|
onFirstEventTimeout: getFirstStreamEventTimeoutHandler(options),
|
|
2906
2902
|
signal: options?.signal,
|
|
2907
|
-
reasoningReplayMetadata: buildOpenAIResponsesReasoningReplayMetadata(model, {
|
|
2908
|
-
authProfileId: responsesOptions?.authProfileId,
|
|
2909
|
-
sessionId: options?.sessionId
|
|
2910
|
-
}),
|
|
2903
|
+
reasoningReplayMetadata: buildOpenAIResponsesReasoningReplayMetadata(model, { sessionId: options?.sessionId }),
|
|
2911
2904
|
asyncToolExecution: asyncTools,
|
|
2912
2905
|
...responseModelTracker.terminalOptions
|
|
2913
2906
|
});
|
|
@@ -6,8 +6,8 @@ import { i as resolveCacheRetention, r as buildCopilotDynamicHeaders } from "./c
|
|
|
6
6
|
import { n as buildBaseOptions } from "./simple-options-CQNPKCEb.mjs";
|
|
7
7
|
import { n as getEnvApiKey } from "./env-api-keys-BuHc86ya.mjs";
|
|
8
8
|
import { t as createAssistantOutput } from "./assistant-output-C3czmoN4.mjs";
|
|
9
|
-
import { F as convertProviderResponsesMessages, n as applyResponsesServiceTierPricing, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams, vt as resolveOpenAISimpleReasoningEffort } from "./openai-responses-shared-
|
|
10
|
-
import { i as createOpenAIProviderClient, n as resolveProviderSimpleCompletionHeaders } from "./provider-transport-turn-state-
|
|
9
|
+
import { F as convertProviderResponsesMessages, n as applyResponsesServiceTierPricing, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams, vt as resolveOpenAISimpleReasoningEffort } from "./openai-responses-shared-En3Jf0Vg.mjs";
|
|
10
|
+
import { i as createOpenAIProviderClient, n as resolveProviderSimpleCompletionHeaders } from "./provider-transport-turn-state-DyaOKAYm.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({
|
|
@@ -47,7 +47,6 @@ const streamOpenAIResponses = (model, context, options) => {
|
|
|
47
47
|
const messages = convertProviderResponsesMessages(model, context, OPENAI_TOOL_CALL_PROVIDERS, {
|
|
48
48
|
replayResponsesItemIds: options?.replayResponsesItemIds ?? false,
|
|
49
49
|
sessionId: options?.sessionId,
|
|
50
|
-
authProfileId: options?.authProfileId,
|
|
51
50
|
mutableInput: Boolean(options?.onPayload),
|
|
52
51
|
replayMode
|
|
53
52
|
});
|
|
@@ -5,7 +5,7 @@ import "./transport-utils-rxOHnq9y.mjs";
|
|
|
5
5
|
import { t as stableStringify } from "./stable-stringify-CchQEmeA.mjs";
|
|
6
6
|
import { y as prepareSystemPrompt } from "./simple-options-CQNPKCEb.mjs";
|
|
7
7
|
import { C as sha256Hex } from "./tool-schema-json-projection-BSHb4gaJ.mjs";
|
|
8
|
-
import { rt as buildOpenAIResponsesReasoningReplayMetadata } from "./openai-responses-shared-
|
|
8
|
+
import { rt as buildOpenAIResponsesReasoningReplayMetadata } from "./openai-responses-shared-En3Jf0Vg.mjs";
|
|
9
9
|
import { a as isOpenAIResponsesCompactionOutput, c as sanitizeResponsesImagePayload } from "./openai-responses-endpoint-CqO3ejTe.mjs";
|
|
10
10
|
//#region packages/ai/src/transports/openai-responses-compact-request.ts
|
|
11
11
|
const COMPACT_REQUEST = Symbol("openaiResponsesCompactRequest");
|
|
@@ -22,7 +22,7 @@ import { a as describeToolResultMediaPlaceholder, c as extractToolResultText, f
|
|
|
22
22
|
import { A as parseStreamingJson, C as withProviderResponseHook, D as shortHash, O as createToolArgumentPreviewSchedule, _ as parseTerminalToolCallArguments, c as failTransportStream, d as iterateModelStream, h as notifyProviderHttpResponse, s as decodeSseFrames, t as IncompleteToolCallError, u as finalizeTransportStream, w as parseJsonObjectPreservingUnsafeIntegers, x as transportAbortError, y as sanitizeTransportPayloadText } from "./transport-stream-shared-CBVh6QEc.mjs";
|
|
23
23
|
import { C as sha256Hex, S as redactIdentifier, n as prepareRuntimeToolInputSchema, r as projectRuntimeToolInputSchema, w as sha256StableValue } from "./tool-schema-json-projection-BSHb4gaJ.mjs";
|
|
24
24
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-DzaHoRAU.mjs";
|
|
25
|
-
import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context
|
|
25
|
+
import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context--QGWotXx.mjs";
|
|
26
26
|
import { t as transformProviderMessages } from "./provider-transcript-transform-Hr1kCoMX.mjs";
|
|
27
27
|
import { prepareModelRequestBody } from "./internal/model-request-body.mjs";
|
|
28
28
|
import "./assistant-output-C3czmoN4.mjs";
|
|
@@ -801,7 +801,6 @@ function captureOpenAIResponsesCompaction(output, item, boundary, model, capture
|
|
|
801
801
|
model: metadata.model,
|
|
802
802
|
baseUrlHash: metadata.baseUrlHash,
|
|
803
803
|
...metadata.sessionHash ? { sessionHash: metadata.sessionHash } : {},
|
|
804
|
-
...metadata.authProfileHash ? { authProfileHash: metadata.authProfileHash } : {},
|
|
805
804
|
...compactedOutput ? { compactedWindow: {
|
|
806
805
|
state: "ready",
|
|
807
806
|
output: JSON.stringify(compactedOutput),
|
|
@@ -1624,10 +1623,7 @@ function convertResponsesMessagesWithStyle(model, context, allowedToolCallProvid
|
|
|
1624
1623
|
const messages = [];
|
|
1625
1624
|
const providerStyle = conversionStyle === "provider";
|
|
1626
1625
|
const shouldReplayResponsesItemIds = options?.replayResponsesItemIds ?? true;
|
|
1627
|
-
const replayContext = buildProviderReplayContext(model, {
|
|
1628
|
-
sessionId: options?.sessionId,
|
|
1629
|
-
authProfileId: options?.authProfileId
|
|
1630
|
-
});
|
|
1626
|
+
const replayContext = buildProviderReplayContext(model, { sessionId: options?.sessionId });
|
|
1631
1627
|
const shouldNormalizeSameModelToolCallIds = model.provider === "github-copilot";
|
|
1632
1628
|
const sanitizeIdPart = (part) => {
|
|
1633
1629
|
const sanitized = part.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
@@ -1655,7 +1651,6 @@ function convertResponsesMessagesWithStyle(model, context, allowedToolCallProvid
|
|
|
1655
1651
|
};
|
|
1656
1652
|
const replayPlan = buildOpenAIResponsesCompactionReplayPlan(context.messages, model, {
|
|
1657
1653
|
sessionId: options?.sessionId,
|
|
1658
|
-
authProfileId: options?.authProfileId,
|
|
1659
1654
|
mode: options?.replayMode
|
|
1660
1655
|
});
|
|
1661
1656
|
const transformMessages = (source) => providerStyle ? transformProviderMessages(source, model, normalizeToolCallId) : getAiTransportHost().transformTransportMessages(source, model, normalizeToolCallId, {
|
|
@@ -3731,10 +3726,7 @@ async function runResponsesStreamLifecycle(params) {
|
|
|
3731
3726
|
resolveServiceTier: (responseTier, originalTier) => responseTier ?? (requestedTier === "priority" || requestedTier === "default" ? requestedTier : originalTier),
|
|
3732
3727
|
onServiceTier: (responseTier, response) => responsesServiceTierObserver.observe(options, requestedTier, responseTier, response),
|
|
3733
3728
|
canRetryIdentityConflict: () => hasOnlyResponsesFunctionTools(admittedRequest),
|
|
3734
|
-
reasoningReplayMetadata: buildOpenAIResponsesReasoningReplayMetadata(model, {
|
|
3735
|
-
sessionId: options?.sessionId,
|
|
3736
|
-
authProfileId: options?.authProfileId
|
|
3737
|
-
})
|
|
3729
|
+
reasoningReplayMetadata: buildOpenAIResponsesReasoningReplayMetadata(model, { sessionId: options?.sessionId })
|
|
3738
3730
|
});
|
|
3739
3731
|
if (terminal && admittedRequest && !options?.signal?.aborted) recordResponsesContextUsage(output, model, options, admittedRequest, terminal.output, "provider");
|
|
3740
3732
|
finalizeTransportStream({
|
|
@@ -14,12 +14,11 @@ function buildProviderReplayContext(model, options) {
|
|
|
14
14
|
api: model.api,
|
|
15
15
|
model: model.id,
|
|
16
16
|
baseUrlHash: hashReplayContextValue(model.baseUrl),
|
|
17
|
-
sessionHash: hashReplayContextValue(options?.sessionId)
|
|
18
|
-
authProfileHash: hashReplayContextValue(options?.authProfileId)
|
|
17
|
+
sessionHash: hashReplayContextValue(options?.sessionId)
|
|
19
18
|
};
|
|
20
19
|
}
|
|
21
20
|
function providerReplayContextMatches(state, context) {
|
|
22
|
-
return state.provider === context.provider && state.api === context.api && state.
|
|
21
|
+
return state.provider === context.provider && state.api === context.api && state.baseUrlHash === context.baseUrlHash && state.sessionHash === context.sessionHash;
|
|
23
22
|
}
|
|
24
23
|
//#endregion
|
|
25
24
|
export { isProviderReplayContext as n, providerReplayContextMatches as r, buildProviderReplayContext as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as getAiTransportHost } from "./host-DqX-64Pb.mjs";
|
|
2
2
|
import { n as resolveCloudflareBaseUrl, t as isCloudflareProvider } from "./cloudflare-BJ2_Xabx.mjs";
|
|
3
3
|
import { n as resolveOpencodeSessionHeaders, t as hasOpencodeSessionHeader } from "./session-affinity-DA4WHv1h.mjs";
|
|
4
|
-
import { Ft as resolveOpenAIClientBaseUrl, Lt as withOpenAIErrorResponseHook } from "./openai-responses-shared-
|
|
4
|
+
import { Ft as resolveOpenAIClientBaseUrl, Lt as withOpenAIErrorResponseHook } from "./openai-responses-shared-En3Jf0Vg.mjs";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import OpenAI from "openai";
|
|
7
7
|
//#region packages/ai/src/providers/openai-provider-client.ts
|
package/dist/providers.mjs
CHANGED
|
@@ -47,11 +47,11 @@ function createLazyRegistration(api, importModule, select) {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
const registerBuiltIns = [
|
|
50
|
-
createLazyRegistration("anthropic-messages", () => import("./anthropic-
|
|
50
|
+
createLazyRegistration("anthropic-messages", () => import("./anthropic-CNEzO12C.mjs").then((n) => n.t), (module) => ({
|
|
51
51
|
stream: module.streamAnthropic,
|
|
52
52
|
streamSimple: module.streamSimpleAnthropic
|
|
53
53
|
})),
|
|
54
|
-
createLazyRegistration("openai-completions", () => import("./openai-completions-
|
|
54
|
+
createLazyRegistration("openai-completions", () => import("./openai-completions-B93R3N3b.mjs").then((n) => n.t), (module) => ({
|
|
55
55
|
stream: module.streamOpenAICompletions,
|
|
56
56
|
streamSimple: module.streamSimpleOpenAICompletions
|
|
57
57
|
})),
|
|
@@ -59,15 +59,15 @@ const registerBuiltIns = [
|
|
|
59
59
|
stream: module.streamMistral,
|
|
60
60
|
streamSimple: module.streamSimpleMistral
|
|
61
61
|
})),
|
|
62
|
-
createLazyRegistration("openai-responses", () => import("./openai-responses-
|
|
62
|
+
createLazyRegistration("openai-responses", () => import("./openai-responses-DSxPKV0U.mjs").then((n) => n.t), (module) => ({
|
|
63
63
|
stream: module.streamOpenAIResponses,
|
|
64
64
|
streamSimple: module.streamSimpleOpenAIResponses
|
|
65
65
|
})),
|
|
66
|
-
createLazyRegistration("azure-openai-responses", () => import("./azure-openai-responses-
|
|
66
|
+
createLazyRegistration("azure-openai-responses", () => import("./azure-openai-responses-DRkduRmW.mjs"), (module) => ({
|
|
67
67
|
stream: module.streamAzureOpenAIResponses,
|
|
68
68
|
streamSimple: module.streamSimpleAzureOpenAIResponses
|
|
69
69
|
})),
|
|
70
|
-
createLazyRegistration("openai-chatgpt-responses", () => import("./openai-chatgpt-responses-
|
|
70
|
+
createLazyRegistration("openai-chatgpt-responses", () => import("./openai-chatgpt-responses-C6rEZcsZ.mjs"), (module) => ({
|
|
71
71
|
stream: module.streamOpenAICodexResponses,
|
|
72
72
|
streamSimple: module.streamSimpleOpenAICodexResponses
|
|
73
73
|
})),
|
|
@@ -75,7 +75,7 @@ const registerBuiltIns = [
|
|
|
75
75
|
stream: module.streamGoogle,
|
|
76
76
|
streamSimple: module.streamSimpleGoogle
|
|
77
77
|
})),
|
|
78
|
-
createLazyRegistration("google-interactions", () => import("./google-interactions-
|
|
78
|
+
createLazyRegistration("google-interactions", () => import("./google-interactions-BE7cxFPc.mjs"), (module) => ({
|
|
79
79
|
stream: module.streamGoogleInteractions,
|
|
80
80
|
streamSimple: module.streamSimpleGoogleInteractions
|
|
81
81
|
})),
|
package/dist/transports.d.mts
CHANGED
|
@@ -304,7 +304,6 @@ export declare function stripCompactionReplayCheckpoint(message: AssistantMessag
|
|
|
304
304
|
//#region packages/ai/src/transports/provider-compaction-replay.d.ts
|
|
305
305
|
type ReplayIdentity = {
|
|
306
306
|
sessionId?: string;
|
|
307
|
-
authProfileId?: string;
|
|
308
307
|
enabled?: boolean;
|
|
309
308
|
};
|
|
310
309
|
type ReplayMessage = {
|
package/dist/transports.mjs
CHANGED
|
@@ -9,17 +9,17 @@ import { S as toErrorObject, a as resolveModelPayloadDebugMode, i as emitModelTr
|
|
|
9
9
|
import { a as streamFragmentError, i as resolveModelHeaderSentinels, n as isCodeModeModelVisibleToolName, r as readAnthropicMessagesErrorSnippet, t as MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "./transport-utils-rxOHnq9y.mjs";
|
|
10
10
|
import { a as resolveOpenAICompletionsCompat, i as isOpenAICodexResponsesModel, n as isKnownOpenAIEndpoint, o as resolveOpenAIPromptCacheKeySupport, r as isNativeOpenAIEndpoint, s as usesNativeOpenAICodexResponsesBackend, t as detectOpenAICompletionsCompat } from "./openai-completions-compat-CS3dlDBR.mjs";
|
|
11
11
|
import { t as buildGuardedModelFetch } from "./host-policy-Bk85E9ue.mjs";
|
|
12
|
-
import { A as resolveAnthropicServerCompactionPlan, B as usesFoundryBearerAuth, C as isAnthropicServerToolClearingEnabled, D as resolveAnthropicEphemeralCacheControl, E as resolveAnthropicCacheOptions, O as resolveAnthropicPayloadPolicy, R as isAnthropicOAuthApiKey, S as buildAnthropicSystemBlocks, T as logAnthropicContextEdits, a as resolveNewestAnthropicCompaction, b as applyAnthropicPayloadPolicyToParams, i as resolveCompletionTokenReservation, j as supportsAnthropicServerSideFallback, k as resolveAnthropicRequestBetaHeader, r as resolveAnthropicTransportOptions, t as runAnthropicStreamLifecycle, v as applyAnthropicContextManagementToRequest, w as isDirectAnthropicModel, x as applyAnthropicRequestCacheControl, y as applyAnthropicEphemeralCacheControlMarkers, z as omitFoundryBearerCredentialHeaders } from "./anthropic-stream-lifecycle-
|
|
12
|
+
import { A as resolveAnthropicServerCompactionPlan, B as usesFoundryBearerAuth, C as isAnthropicServerToolClearingEnabled, D as resolveAnthropicEphemeralCacheControl, E as resolveAnthropicCacheOptions, O as resolveAnthropicPayloadPolicy, R as isAnthropicOAuthApiKey, S as buildAnthropicSystemBlocks, T as logAnthropicContextEdits, a as resolveNewestAnthropicCompaction, b as applyAnthropicPayloadPolicyToParams, i as resolveCompletionTokenReservation, j as supportsAnthropicServerSideFallback, k as resolveAnthropicRequestBetaHeader, r as resolveAnthropicTransportOptions, t as runAnthropicStreamLifecycle, v as applyAnthropicContextManagementToRequest, w as isDirectAnthropicModel, x as applyAnthropicRequestCacheControl, y as applyAnthropicEphemeralCacheControlMarkers, z as omitFoundryBearerCredentialHeaders } from "./anthropic-stream-lifecycle-DJUtasDB.mjs";
|
|
13
13
|
import { r as sortPromptCacheToolsByName } from "./prompt-cache-stability-w-ICeyOI.mjs";
|
|
14
14
|
import { C as withProviderResponseHook, E as quoteUnsafeIntegerLiterals, M as createAbortError, N as racePromiseWithAbortSignal, S as withProviderAcceptanceObserver, T as parseJsonPreservingUnsafeIntegers, _ as parseTerminalToolCallArguments, a as createEmptyTransportUsage, b as throwIfModelStreamAborted, c as failTransportStream, d as iterateModelStream, f as iterateSseFrames, g as notifyProviderStreamOpened, h as notifyProviderHttpResponse, i as copyProviderAcceptanceObserver, l as finalizeTerminalToolCallArguments, m as notifyProviderHttpMetadata, n as assignTransportErrorDetails, o as createWritableTransportEventStream, p as mergeTransportHeaders, r as coerceTransportToolCallArguments, s as decodeSseFrames, t as IncompleteToolCallError, u as finalizeTransportStream, v as sanitizeNonEmptyTransportPayloadText, w as parseJsonObjectPreservingUnsafeIntegers, x as transportAbortError, y as sanitizeTransportPayloadText } from "./transport-stream-shared-CBVh6QEc.mjs";
|
|
15
15
|
import { n as getEnvApiKey } from "./env-api-keys-BuHc86ya.mjs";
|
|
16
16
|
import { withModelRequestBodyBytes } from "./internal/model-request-body.mjs";
|
|
17
17
|
import { n as resolveOpencodeSessionHeaders } from "./session-affinity-DA4WHv1h.mjs";
|
|
18
|
-
import { c as flattenCompletionMessagesToStringContent, d as hasOpenAICompatibleConversationTurn, f as canonicalizeMaxTokensParam, i as createOpenAIResponsesTransportStreamFn, l as stripCompletionMessagesToRoleContent, m as createDeepSeekTextFilter, o as buildOpenAICompletionsParams, p as resolveMaxTokensParam, r as createAzureOpenAIResponsesTransportStreamFn, t as createOpenAICompletionsTransportStreamFn, u as applyCompletionsAnthropicCacheControl } from "./openai-completions-transport-
|
|
18
|
+
import { c as flattenCompletionMessagesToStringContent, d as hasOpenAICompatibleConversationTurn, f as canonicalizeMaxTokensParam, i as createOpenAIResponsesTransportStreamFn, l as stripCompletionMessagesToRoleContent, m as createDeepSeekTextFilter, o as buildOpenAICompletionsParams, p as resolveMaxTokensParam, r as createAzureOpenAIResponsesTransportStreamFn, t as createOpenAICompletionsTransportStreamFn, u as applyCompletionsAnthropicCacheControl } from "./openai-completions-transport-DHTFq-BM.mjs";
|
|
19
19
|
import { i as consumeGoogleGenerateContentStream, n as projectGoogleMessages, r as requiresGoogleToolCallId, s as googleFlashSupportsMinimalThinking, t as convertGoogleTools } from "./google-messages-p2iBzsAp.mjs";
|
|
20
|
-
import { At as log, Dt as createResponseModelTracker, Et as createOpenAIResponseHook, Ft as resolveOpenAIClientBaseUrl, It as resolvePromptCacheKey, J as OPENAI_RESPONSES_FUNCTION_CALL_ITEM_ID_RE, L as normalizeOpenAIResponsesReasoningReplayItem, Lt as withOpenAIErrorResponseHook, M as resolveResponsesContextUsageBoundary, Mt as parseOpenAICompletionsUsage, Nt as readOpenAICompletionsContentDeltas, Ot as detachPartialSnapshot, Pt as readOpenAICompletionsReasoningBatch, Q as splitOpenAIFunctionCallPairing, R as resolveReplayableResponsesMessageId, Tt as createOpenAIProviderAcceptanceHook, X as normalizeOpenAIResponsesFunctionCallId, Y as OPENAI_RESPONSES_ID_MAX_LENGTH, Z as shouldNormalizeOpenAIResponsesToolCallId, at as resolveNewestOpenAIResponsesCompactionReplay, ct as buildOpenAIClientHeaders, dt as enforceCodeModeResponsesToolSurface, ft as filterCodeModePayloadTools, gt as resolveOpenAIStrictToolFlagWithDiagnostics, ht as resolveCodeModeResponsesVisibleToolNames, it as captureOpenAIResponsesCompaction, jt as measureUtf8AppendBytes, kt as isOpenAICompletionsThinkingEnabled, lt as buildOpenAISdkClientOptions, mt as readCodeModePayloadToolName, nt as CompactionReplayRefreshRequiredError, pt as getCompat, q as OPENAI_RESPONSES_CALL_ID_RE, st as assertCodeModeResponsesToolSurface, ut as buildOpenAISdkRequestOptions, wt as GEMINI_THOUGHT_SIGNATURE_VALIDATOR_SKIP } from "./openai-responses-shared-
|
|
20
|
+
import { At as log, Dt as createResponseModelTracker, Et as createOpenAIResponseHook, Ft as resolveOpenAIClientBaseUrl, It as resolvePromptCacheKey, J as OPENAI_RESPONSES_FUNCTION_CALL_ITEM_ID_RE, L as normalizeOpenAIResponsesReasoningReplayItem, Lt as withOpenAIErrorResponseHook, M as resolveResponsesContextUsageBoundary, Mt as parseOpenAICompletionsUsage, Nt as readOpenAICompletionsContentDeltas, Ot as detachPartialSnapshot, Pt as readOpenAICompletionsReasoningBatch, Q as splitOpenAIFunctionCallPairing, R as resolveReplayableResponsesMessageId, Tt as createOpenAIProviderAcceptanceHook, X as normalizeOpenAIResponsesFunctionCallId, Y as OPENAI_RESPONSES_ID_MAX_LENGTH, Z as shouldNormalizeOpenAIResponsesToolCallId, at as resolveNewestOpenAIResponsesCompactionReplay, ct as buildOpenAIClientHeaders, dt as enforceCodeModeResponsesToolSurface, ft as filterCodeModePayloadTools, gt as resolveOpenAIStrictToolFlagWithDiagnostics, ht as resolveCodeModeResponsesVisibleToolNames, it as captureOpenAIResponsesCompaction, jt as measureUtf8AppendBytes, kt as isOpenAICompletionsThinkingEnabled, lt as buildOpenAISdkClientOptions, mt as readCodeModePayloadToolName, nt as CompactionReplayRefreshRequiredError, pt as getCompat, q as OPENAI_RESPONSES_CALL_ID_RE, st as assertCodeModeResponsesToolSurface, ut as buildOpenAISdkRequestOptions, wt as GEMINI_THOUGHT_SIGNATURE_VALIDATOR_SKIP } from "./openai-responses-shared-En3Jf0Vg.mjs";
|
|
21
21
|
import { c as sanitizeResponsesImagePayload, d as normalizeOpenAIServiceTier, f as resolveOpenAIResponsesCompactEndpointPlan, h as resolveOpenAIResponsesServerCompactionPlan, l as applyOpenAIResponsesPayloadPolicy, m as resolveOpenAIResponsesRequestContextTokens, p as resolveOpenAIResponsesPayloadPolicy, s as buildResponsesInputImage, u as enforceOpenAIResponsesCompactionReplayStorage } from "./openai-responses-endpoint-CqO3ejTe.mjs";
|
|
22
|
-
import { c as requestPreparedOpenAIResponsesCompaction } from "./openai-responses-request-lifecycle-
|
|
22
|
+
import { c as requestPreparedOpenAIResponsesCompaction } from "./openai-responses-request-lifecycle-C_3FKkl7.mjs";
|
|
23
23
|
import { n as createGoogleVideoPlaceholder, r as materializeGoogleVideoSlots, t as GOOGLE_VIDEO_SLOT_OMISSION } from "./google-video-slots-Bxt-OXO8.mjs";
|
|
24
24
|
import { randomUUID } from "node:crypto";
|
|
25
25
|
//#region packages/ai/src/transports/anthropic-transport-stream.ts
|