@openclaw/ai 2026.10.1 → 2026.10.3
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/{anthropic-BDfXKgF1.mjs → anthropic-C4qygbtf.mjs} +11 -10
- package/dist/{anthropic-payload-policy-BZUAchqb.d.mts → anthropic-payload-policy-DD7vzpxE.d.mts} +5 -2
- package/dist/{anthropic-stream-reducer-DHt9uFWX.mjs → anthropic-stream-reducer-CWyWE21W.mjs} +46 -52
- package/dist/{api-registry-DcEP_o4h.d.mts → api-registry-B3rC2qu3.d.mts} +1 -1
- package/dist/{assistant-output-mJ9cL4Qg.mjs → assistant-output-D5762GPH.mjs} +2 -2
- package/dist/{assistant-text-phase-DAv1BdTm.mjs → assistant-text-phase-DVZOxbuR.mjs} +1 -1
- package/dist/{azure-openai-responses-gn9hMf8x.mjs → azure-openai-responses-DO-Fv8ha.mjs} +5 -5
- package/dist/diagnostics.d.mts +3 -3
- package/dist/{google-CyMz2jF_.mjs → google-B2g_Xn4d.mjs} +6 -6
- package/dist/{google-interactions-DXu4IYGb.mjs → google-interactions-DNXzPPwQ.mjs} +6 -6
- package/dist/{google-messages-Bmheetdg.mjs → google-messages-l7wgIF5I.mjs} +3 -3
- package/dist/{google-shared-DE_ddfsC.mjs → google-shared-V8jogVPq.mjs} +5 -5
- package/dist/{google-vertex-BEW0OQIA.mjs → google-vertex-_khoip47.mjs} +5 -5
- package/dist/{host-BjIYEjwT.d.mts → host-DiPhRjrc.d.mts} +2 -2
- package/dist/{host-policy-CC5H0iRZ.mjs → host-policy-BwhNNGQR.mjs} +1 -1
- package/dist/{host-JpNulOOs.mjs → host-u3o8XiAp.mjs} +1 -1
- package/dist/{index-DJrNQnKw.d.mts → index-D27wAoOr.d.mts} +4 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +4 -4
- package/dist/internal/anthropic.d.mts +4 -4
- package/dist/internal/anthropic.mjs +4 -4
- package/dist/internal/openai-completions-compat.d.mts +1 -1
- package/dist/internal/openai-completions-compat.mjs +1 -1
- package/dist/internal/openai-responses-payload-policy.d.mts +9 -2
- package/dist/internal/openai-responses-payload-policy.mjs +3 -2
- package/dist/internal/openai.d.mts +8 -8
- package/dist/internal/openai.mjs +7 -7
- package/dist/internal/runtime.d.mts +5 -5
- package/dist/internal/runtime.mjs +3 -3
- package/dist/internal/shared.d.mts +1 -1
- package/dist/internal/shared.mjs +3 -3
- package/dist/internal/tool-schema.mjs +1 -1
- package/dist/{mistral-1Bnbneg1.mjs → mistral-cnoBDSIg.mjs} +4 -4
- package/dist/{openai-chatgpt-responses-CB1JwNFF.mjs → openai-chatgpt-responses-Cq3Igfi3.mjs} +63 -56
- package/dist/{openai-completions-BPadHHKe.mjs → openai-completions-BxQw4S-A.mjs} +3 -3
- package/dist/{openai-completions-compat-CJ0ktmGy.d.mts → openai-completions-compat-BgPg1BRs.d.mts} +2 -2
- package/dist/{openai-completions-compat-D7hWYB0G.mjs → openai-completions-compat-GMN8A0fm.mjs} +1 -1
- package/dist/{openai-completions-transport-DITBEALX.mjs → openai-completions-transport-D_ZhLzh_.mjs} +23 -29
- package/dist/{openai-prompt-cache-Dj8qeOHT.mjs → openai-prompt-cache-BK6E2g4Q.mjs} +1 -1
- package/dist/{openai-prompt-cache-C-Q1Ksfs.d.mts → openai-prompt-cache-CFviG_D4.d.mts} +1 -1
- package/dist/{openai-responses-1_TvcWI3.mjs → openai-responses-BhAZFsL9.mjs} +7 -7
- package/dist/{openai-responses-compaction-replay-BB2SWdsx.d.mts → openai-responses-compaction-replay-BBNo098-.d.mts} +3 -3
- package/dist/{openai-responses-compaction-window-m878aVpU.mjs → openai-responses-compaction-window-tA4QkU0o.mjs} +3 -3
- package/dist/{openai-responses-contracts-sAvdqNjS.d.mts → openai-responses-contracts-D5yVZBp-.d.mts} +3 -3
- package/dist/openai-responses-endpoint-TV0y50fb.mjs +11 -0
- package/dist/{openai-responses-payload-policy-C7GsA1y0.d.mts → openai-responses-payload-policy-s1apQlZZ.d.mts} +4 -2
- package/dist/{openai-responses-prompt-observer-internal-CbH84xIS.mjs → openai-responses-prompt-observer-internal-CefUzh8M.mjs} +2 -2
- package/dist/{openai-responses-shared-TCJRAoMW.mjs → openai-responses-shared-CKNmC3vC.mjs} +11 -11
- package/dist/{openai-responses-terminal-usage-BVvyXZ8u.d.mts → openai-responses-terminal-usage-CempLedn.d.mts} +1 -1
- package/dist/{openai-tool-schema-DYNePiF8.mjs → openai-tool-schema-BIrI0mrA.mjs} +18 -1
- package/dist/{openai-transport-params-ildrm49s.mjs → openai-transport-params-D7JMUPjf.mjs} +7 -7
- package/dist/{provider-options-Dk4PeQV3.d.mts → provider-options-CkieKvNJ.d.mts} +9 -4
- package/dist/{provider-replay-context-ywPKKLjL.mjs → provider-replay-context-CO_Eplnc.mjs} +1 -1
- package/dist/{provider-transport-turn-state-8c_Nj2NS.mjs → provider-transport-turn-state-BX6TfCyW.mjs} +2 -2
- package/dist/{provider-types-De8PRdR0.d.mts → provider-types-v3bmqsfg.d.mts} +2 -2
- package/dist/provider-types.d.mts +3 -3
- package/dist/providers.d.mts +2 -2
- package/dist/providers.mjs +10 -10
- package/dist/{simple-options-wW3117Fu.mjs → simple-options-7QuSKriJ.mjs} +2 -2
- package/dist/{src-DWJq14pn.mjs → src-VWy9E7DZ.mjs} +5 -1
- package/dist/{stream-CElngO8h.mjs → stream-DFaRxi2D.mjs} +1 -1
- package/dist/{text-signature-rOn31nxc.mjs → text-signature-D_vRrx-z.mjs} +2 -2
- package/dist/{transport-stream-shared-C5TAc3U_.mjs → transport-stream-shared-CCR7hSW0.mjs} +1 -1
- package/dist/{transport-stream-shared-CAxkgOSj.d.mts → transport-stream-shared-DW-7-qLR.d.mts} +1 -1
- package/dist/transports.d.mts +13 -13
- package/dist/transports.mjs +170 -172
- package/dist/types-UlNana-2.d.mts +1 -0
- package/dist/types.d.mts +3 -3
- package/dist/types.mjs +2 -2
- package/package.json +1 -1
- package/dist/types-Dlz-8qcy.d.mts +0 -1
package/dist/{openai-responses-contracts-sAvdqNjS.d.mts → openai-responses-contracts-D5yVZBp-.d.mts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./index-
|
|
1
|
+
import "./index-D27wAoOr.mjs";
|
|
2
2
|
import { M as ModelThinkingLevel, k as Model, n as Api } from "./types-DvzmWW8J.mjs";
|
|
3
|
-
import { a as BaseOpenAIStreamOptions,
|
|
4
|
-
import "./types-
|
|
3
|
+
import { a as BaseOpenAIStreamOptions, p as OpenAIReasoningEffort } from "./provider-options-CkieKvNJ.mjs";
|
|
4
|
+
import "./types-UlNana-2.mjs";
|
|
5
5
|
import { ResponseCompactionItem, ResponseCreateParamsStreaming, ResponseInputItem } from "openai/resources/responses/responses.js";
|
|
6
6
|
//#region packages/ai/src/providers/openai-request-reasoning.d.ts
|
|
7
7
|
type OpenAIRequestReasoningEffort = ModelThinkingLevel | "none";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region packages/ai/src/transports/openai-responses-endpoint.ts
|
|
2
|
+
function isOfficialOpenAIResponsesBaseUrl(baseUrl) {
|
|
3
|
+
if (!baseUrl) return false;
|
|
4
|
+
const url = URL.parse(baseUrl);
|
|
5
|
+
return url !== null && url.origin === "https://api.openai.com" && url.username === "" && url.password === "" && url.search === "" && url.hash === "" && url.pathname.replace(/\/+$/, "") === "/v1";
|
|
6
|
+
}
|
|
7
|
+
function supportsNativeOpenAIResponsesEndpoint(params) {
|
|
8
|
+
return params.provider.trim().toLowerCase() === "openai" && params.api === "openai-responses" && isOfficialOpenAIResponsesBaseUrl(params.baseUrl);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { supportsNativeOpenAIResponsesEndpoint as n, isOfficialOpenAIResponsesBaseUrl as t };
|
|
@@ -32,8 +32,10 @@ declare function resolveOpenAIResponsesServerCompactionPlan(model: OpenAIRespons
|
|
|
32
32
|
enabled: boolean;
|
|
33
33
|
threshold: number | undefined;
|
|
34
34
|
};
|
|
35
|
-
/** Resolve the Responses compact-endpoint gate for one route
|
|
36
|
-
declare function resolveOpenAIResponsesCompactEndpointPlan(model: OpenAIResponsesPayloadModel, extraParams?: Record<string, unknown>,
|
|
35
|
+
/** Resolve the Responses compact-endpoint gate for one route. */
|
|
36
|
+
declare function resolveOpenAIResponsesCompactEndpointPlan(model: OpenAIResponsesPayloadModel, extraParams?: Record<string, unknown>,
|
|
37
|
+
/** @deprecated The policy no longer depends on purpose. */
|
|
38
|
+
_purpose?: "manual" | "budget"): {
|
|
37
39
|
enabled: boolean;
|
|
38
40
|
};
|
|
39
41
|
/** Resolve payload mutation policy for one OpenAI Responses-style model endpoint. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h as responsesPromptObserver } from "./openai-responses-contracts-BKu8O7l4.mjs";
|
|
2
|
-
import { v as sanitizeTransportPayloadText } from "./transport-stream-shared-
|
|
3
|
-
import { C as stripSystemPromptCacheBoundary } from "./simple-options-
|
|
2
|
+
import { v as sanitizeTransportPayloadText } from "./transport-stream-shared-CCR7hSW0.mjs";
|
|
3
|
+
import { C as stripSystemPromptCacheBoundary } from "./simple-options-7QuSKriJ.mjs";
|
|
4
4
|
//#region packages/ai/src/transports/openai-responses-prompt-observer-internal.ts
|
|
5
5
|
function readFinalResponsesPrompt(request) {
|
|
6
6
|
if (typeof request.instructions === "string") return ["instructions", request.instructions];
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import "./src-
|
|
1
|
+
import "./src-VWy9E7DZ.mjs";
|
|
2
2
|
import { _ as runtimeContextContentToText, f as hasRuntimeContextMarker, p as isRuntimeContextMessage } from "./types-CQc6JNG4.mjs";
|
|
3
3
|
import { o as readProviderRefusalReview, t as appendAssistantMessageDiagnostic } from "./diagnostics-DzrF1h4J.mjs";
|
|
4
4
|
import { r as appendAssistantThinking } from "./event-stream-C5AbCAaZ.mjs";
|
|
5
5
|
import { o as isRecord } from "./record-coerce-CNDovvft.mjs";
|
|
6
6
|
import { a as normalizeOptionalString, c as readStringValue, o as normalizeStringifiedOptionalString } from "./string-coerce-CtgOVOSv.mjs";
|
|
7
|
-
import { N as isImageWithMediaPayload, O as calculateCost, a as resolveAiTransportHeaderSentinels, r as getAiTransportHost } from "./host-
|
|
7
|
+
import { N as isImageWithMediaPayload, O as calculateCost, a as resolveAiTransportHeaderSentinels, r as getAiTransportHost } from "./host-u3o8XiAp.mjs";
|
|
8
8
|
import { D as supportsOpenAITemperature, a as OPENAI_RESPONSES_COMPACTION_REPLAY_TYPE, c as OPENAI_RESPONSES_RETAINED_COMPACTION_REPLAY_TYPE, f as RESPONSE_FAILED_NO_DETAILS_MESSAGE, g as responsesServiceTierObserver, o as OPENAI_RESPONSES_REASONING_REPLAY_BLOCK_META_KEY, p as isPreviousResponseRejection, s as OPENAI_RESPONSES_REASONING_REPLAY_META_KEY } from "./openai-responses-contracts-BKu8O7l4.mjs";
|
|
9
9
|
import { n as getSessionResourceOwnerId, r as registerSessionResourceCleanup } from "./session-resources-D1wgDQ8C.mjs";
|
|
10
10
|
import { o as truncateUtf16Safe, s as stableStringify } from "./provider-error-DQBE1bUQ.mjs";
|
|
11
11
|
import { a as resolveModelSseDebugMode, d as isResponsesProviderTool, g as resolveResponsesTerminalStopReason, h as readResponsesReasoningTokens, i as resolveModelPayloadDebugMode, l as ResponsesOutputIdentityError, m as mapResponsesTerminalUsage, r as emitModelTransportDebug, u as hasOnlyResponsesFunctionTools } from "./diagnostics-Caj-4RBA.mjs";
|
|
12
|
-
import { o as redactSensitiveText, t as encodeTextSignatureV1 } from "./text-signature-
|
|
13
|
-
import { c as resolveOpenAIResponsesTextFormat, i as resolveOpenAICompletionsCompat } from "./openai-completions-compat-
|
|
14
|
-
import { A as shortHash, C as parseJsonObjectPreservingUnsafeIntegers, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, S as withProviderResponseHook, _ as sanitizeNonEmptyTransportPayloadText, b as transportAbortError, c as failTransportStream, d as iterateModelStream, g as parseTerminalToolCallArguments, t as IncompleteToolCallError, u as finalizeTransportStream, v as sanitizeTransportPayloadText } from "./transport-stream-shared-
|
|
15
|
-
import { C as stripSystemPromptCacheBoundary, D as sortPromptCacheToolsByName, d as describeToolResultMediaPlaceholder, m as extractToolResultText, s as prepareModelRequestBody } from "./simple-options-
|
|
16
|
-
import { A as redactIdentifier, C as log, d as prepareOpenAITools, h as resolveOpenAIRequestReasoning, j as sha256Hex, u as resolveOpenAIStrictToolFlagWithDiagnostics, y as createOpenAIProviderAcceptanceHook } from "./openai-transport-params-
|
|
17
|
-
import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-
|
|
18
|
-
import { n as transformProviderMessages } from "./assistant-output-
|
|
12
|
+
import { o as redactSensitiveText, t as encodeTextSignatureV1 } from "./text-signature-D_vRrx-z.mjs";
|
|
13
|
+
import { c as resolveOpenAIResponsesTextFormat, i as resolveOpenAICompletionsCompat } from "./openai-completions-compat-GMN8A0fm.mjs";
|
|
14
|
+
import { A as shortHash, C as parseJsonObjectPreservingUnsafeIntegers, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, S as withProviderResponseHook, _ as sanitizeNonEmptyTransportPayloadText, b as transportAbortError, c as failTransportStream, d as iterateModelStream, g as parseTerminalToolCallArguments, t as IncompleteToolCallError, u as finalizeTransportStream, v as sanitizeTransportPayloadText } from "./transport-stream-shared-CCR7hSW0.mjs";
|
|
15
|
+
import { C as stripSystemPromptCacheBoundary, D as sortPromptCacheToolsByName, d as describeToolResultMediaPlaceholder, m as extractToolResultText, s as prepareModelRequestBody } from "./simple-options-7QuSKriJ.mjs";
|
|
16
|
+
import { A as redactIdentifier, C as log, d as prepareOpenAITools, h as resolveOpenAIRequestReasoning, j as sha256Hex, u as resolveOpenAIStrictToolFlagWithDiagnostics, y as createOpenAIProviderAcceptanceHook } from "./openai-transport-params-D7JMUPjf.mjs";
|
|
17
|
+
import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-CO_Eplnc.mjs";
|
|
18
|
+
import { n as transformProviderMessages } from "./assistant-output-D5762GPH.mjs";
|
|
19
19
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-D8f_oxHj.mjs";
|
|
20
20
|
import { a as withFirstStreamEventTimeout, i as getFirstStreamEventTimeoutMs, r as getFirstStreamEventTimeoutHandler, t as createFirstStreamEventAbortController } from "./stream-first-event-timeout-D9ZmL_s9.mjs";
|
|
21
|
-
import { a as resolveOpenAIProjectedToolsStrictToolFlag, f as withPreparedToolSchemaNormalization, r as normalizeOpenAIStrictToolParameters } from "./openai-tool-schema-
|
|
22
|
-
import { n as isOpenAIResponsesCompactionOutput, r as readOpenAIResponsesCompactionWindow } from "./openai-responses-compaction-window-
|
|
21
|
+
import { a as resolveOpenAIProjectedToolsStrictToolFlag, f as withPreparedToolSchemaNormalization, r as normalizeOpenAIStrictToolParameters } from "./openai-tool-schema-BIrI0mrA.mjs";
|
|
22
|
+
import { n as isOpenAIResponsesCompactionOutput, r as readOpenAIResponsesCompactionWindow } from "./openai-responses-compaction-window-tA4QkU0o.mjs";
|
|
23
23
|
import { randomUUID } from "node:crypto";
|
|
24
24
|
//#region packages/ai/src/transports/openai-responses-replay.ts
|
|
25
25
|
/** Resolves the assistant message id that can be replayed to OpenAI Responses. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ as StopReason, a as AssistantMessage, pt as Usage } from "./types-DvzmWW8J.mjs";
|
|
2
|
-
import "./types-
|
|
2
|
+
import "./types-UlNana-2.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. */
|
|
@@ -1009,6 +1009,21 @@ function normalizeOpenAIStrictCompatSchemaRecursive(schema, promoteEmptyObject =
|
|
|
1009
1009
|
function normalizeOpenAIStrictCompatSchema(schema) {
|
|
1010
1010
|
return normalizeOpenAIStrictCompatSchemaRecursive(schema, true);
|
|
1011
1011
|
}
|
|
1012
|
+
/**
|
|
1013
|
+
* Returns whether a regex pattern contains a lookahead or lookbehind group.
|
|
1014
|
+
* Escaped parentheses, character classes, and named groups are not lookarounds.
|
|
1015
|
+
*/
|
|
1016
|
+
function hasRegexLookaround(pattern) {
|
|
1017
|
+
let inCharacterClass = false;
|
|
1018
|
+
for (let index = 0; index < pattern.length; index += 1) {
|
|
1019
|
+
const char = pattern[index];
|
|
1020
|
+
if (char === "\\") index += 1;
|
|
1021
|
+
else if (inCharacterClass) inCharacterClass = char !== "]";
|
|
1022
|
+
else if (char === "[") inCharacterClass = true;
|
|
1023
|
+
else if (char === "(" && /^\?<?[=!]/.test(pattern.slice(index + 1, index + 4))) return true;
|
|
1024
|
+
}
|
|
1025
|
+
return false;
|
|
1026
|
+
}
|
|
1012
1027
|
/** Finds schema paths that violate OpenAI strict tool-schema requirements. */
|
|
1013
1028
|
function findOpenAIStrictSchemaViolations(schema, path, options) {
|
|
1014
1029
|
if (Array.isArray(schema)) {
|
|
@@ -1024,6 +1039,7 @@ function findOpenAIStrictSchemaViolations(schema, path, options) {
|
|
|
1024
1039
|
"allOf"
|
|
1025
1040
|
]) if (key in record) violations.push(`${path}.${key}`);
|
|
1026
1041
|
if (Array.isArray(record.type)) violations.push(`${path}.type`);
|
|
1042
|
+
if (typeof record.pattern === "string" && hasRegexLookaround(record.pattern)) violations.push(`${path}.pattern`);
|
|
1027
1043
|
const properties = isRecord(record.properties) ? record.properties : void 0;
|
|
1028
1044
|
if (record.type === "object") {
|
|
1029
1045
|
if (record.additionalProperties !== false) violations.push(`${path}.additionalProperties`);
|
|
@@ -1112,7 +1128,8 @@ function normalizeOpenAIStrictToolParameters(schema, strict, modelCompat) {
|
|
|
1112
1128
|
}
|
|
1113
1129
|
/** Returns whether a schema already satisfies OpenAI strict tool-schema constraints. */
|
|
1114
1130
|
function isStrictOpenAIJsonSchemaCompatible(schema) {
|
|
1115
|
-
|
|
1131
|
+
const normalized = normalizeStrictOpenAIJsonSchema(schema);
|
|
1132
|
+
return isStrictOpenAIJsonSchemaCompatibleRecursive(normalized) && findOpenAIStrictSchemaViolations(normalized, "parameters").length === 0;
|
|
1116
1133
|
}
|
|
1117
1134
|
/** Returns strict-schema diagnostics for an already materialized OpenAI tool projection. */
|
|
1118
1135
|
function findOpenAIStrictToolProjectionDiagnostics(projection) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { o as isRecord, r as asOptionalObjectRecord } from "./record-coerce-CNDovvft.mjs";
|
|
2
2
|
import { a as normalizeOptionalString, n as normalizeLowercaseStringOrEmpty } from "./string-coerce-CtgOVOSv.mjs";
|
|
3
|
-
import { D as applyProviderReportedUsageCost, E as headersToRecord, O as calculateCost, k as clampThinkingLevel, r as getAiTransportHost } from "./host-
|
|
3
|
+
import { D as applyProviderReportedUsageCost, E as headersToRecord, O as calculateCost, k as clampThinkingLevel, r as getAiTransportHost } from "./host-u3o8XiAp.mjs";
|
|
4
4
|
import { A as resolveOpenAIThinkingApi, C as resolveOpenAIReasoningEffortForModel, E as supportsOpenAIReasoningEffort, O as MODEL_CATALOG_THINKING_LEVELS, S as resolveOpenAIModelReasoningEfforts, i as OPENAI_RESPONSES_APIS, w as resolveOpenAIReasoningEffortMapping, x as normalizeOpenAIReasoningEffort } from "./openai-responses-contracts-BKu8O7l4.mjs";
|
|
5
|
-
import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-
|
|
6
|
-
import { i as isCodeModeModelVisibleToolName } from "./text-signature-
|
|
7
|
-
import { i as resolveOpenAICompletionsCompat, o as usesNativeOpenAICodexResponsesBackend } from "./openai-completions-compat-
|
|
8
|
-
import { r as resolveModelRequestTimeoutMs } from "./host-policy-
|
|
9
|
-
import { m as notifyProviderHttpResponse } from "./transport-stream-shared-
|
|
5
|
+
import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-BK6E2g4Q.mjs";
|
|
6
|
+
import { i as isCodeModeModelVisibleToolName } from "./text-signature-D_vRrx-z.mjs";
|
|
7
|
+
import { i as resolveOpenAICompletionsCompat, o as usesNativeOpenAICodexResponsesBackend } from "./openai-completions-compat-GMN8A0fm.mjs";
|
|
8
|
+
import { r as resolveModelRequestTimeoutMs } from "./host-policy-BwhNNGQR.mjs";
|
|
9
|
+
import { m as notifyProviderHttpResponse } from "./transport-stream-shared-CCR7hSW0.mjs";
|
|
10
10
|
import { n as projectRuntimeToolInputSchema, t as prepareRuntimeToolInputSchema } from "./tool-schema-json-projection-Ct8SeBeJ.mjs";
|
|
11
11
|
import { n as resolveOpencodeSessionHeaders } from "./session-affinity-DA4WHv1h.mjs";
|
|
12
|
-
import { a as resolveOpenAIProjectedToolsStrictToolFlag, t as findOpenAIStrictToolProjectionDiagnostics } from "./openai-tool-schema-
|
|
12
|
+
import { a as resolveOpenAIProjectedToolsStrictToolFlag, t as findOpenAIStrictToolProjectionDiagnostics } from "./openai-tool-schema-BIrI0mrA.mjs";
|
|
13
13
|
import { hash } from "node:crypto";
|
|
14
14
|
//#region packages/normalization-core/src/node-crypto.ts
|
|
15
15
|
function sha256Hex(input) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { nt as StreamOptions } from "./types-DvzmWW8J.mjs";
|
|
2
2
|
import { t as OpenAICompletionsToolChoice } from "./openai-tool-projection-793cE3QX.mjs";
|
|
3
|
-
import "./types-
|
|
3
|
+
import "./types-UlNana-2.mjs";
|
|
4
4
|
import Anthropic from "@anthropic-ai/sdk";
|
|
5
5
|
//#region packages/ai/src/providers/openai-reasoning-effort.d.ts
|
|
6
6
|
declare const ENABLED_REASONING_EFFORTS: readonly ["minimal", "low", "medium", "high", "xhigh", "max"];
|
|
@@ -45,10 +45,13 @@ declare function resolveOpenAIReasoningEffortForModel(params: {
|
|
|
45
45
|
}): OpenAIApiReasoningEffort | undefined;
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region packages/ai/src/provider-options.d.ts
|
|
48
|
-
|
|
48
|
+
/** Identity of a provider compaction checkpoint the server rejected on replay. */
|
|
49
|
+
type CompactionReplayRejection = {
|
|
49
50
|
data: string;
|
|
50
51
|
id?: string;
|
|
51
52
|
};
|
|
53
|
+
/** @deprecated Use CompactionReplayRejection. */
|
|
54
|
+
type OpenAIResponsesCompactionRejection = CompactionReplayRejection;
|
|
52
55
|
type CodeModeToolSurfaceObservation = {
|
|
53
56
|
beforeToolIdentities: readonly string[];
|
|
54
57
|
afterToolIdentities: readonly string[];
|
|
@@ -78,6 +81,8 @@ type AnthropicContextManagementOptions = {
|
|
|
78
81
|
deny?: string[];
|
|
79
82
|
};
|
|
80
83
|
};
|
|
84
|
+
/** Internal owner notification after Anthropic rejects a replayed compaction checkpoint. */
|
|
85
|
+
onCompactionRejected?: (checkpoint: CompactionReplayRejection) => void;
|
|
81
86
|
};
|
|
82
87
|
/** Provider options shared by the Anthropic provider and canonical transport. */
|
|
83
88
|
interface AnthropicOptions extends StreamOptions, AnthropicContextManagementOptions {
|
|
@@ -134,7 +139,7 @@ type BaseOpenAIStreamOptions = StreamOptions & {
|
|
|
134
139
|
firstEventTimeoutMs?: number;
|
|
135
140
|
onFirstEventTimeout?: (reason: Error) => void;
|
|
136
141
|
/** Internal owner notification after a server rejects a persisted compaction checkpoint. */
|
|
137
|
-
onCompactionRejected?: (checkpoint:
|
|
142
|
+
onCompactionRejected?: (checkpoint: CompactionReplayRejection) => void;
|
|
138
143
|
openclawCodeModeToolSurface?: boolean;
|
|
139
144
|
openclawCodeModeAllowedHostedToolTypes?: Set<string>;
|
|
140
145
|
frequencyPenalty?: number;
|
|
@@ -148,4 +153,4 @@ type OpenAICompletionsOptions = BaseOpenAIStreamOptions & {
|
|
|
148
153
|
reasoningEffort?: OpenAIReasoningEffort | "off";
|
|
149
154
|
};
|
|
150
155
|
//#endregion
|
|
151
|
-
export {
|
|
156
|
+
export { supportsOpenAIReasoningEffort as C, resolveOpenAISupportedReasoningEfforts as S, isOpenAIGpt6Model as _, BaseOpenAIStreamOptions as a, resolveOpenAIReasoningEffortForModel as b, OpenAICompletionsOptions as c, reasoningTagTextPolicy as d, OpenAIApiReasoningEffort as f, isOpenAIGpt56Model as g, isOpenAIGpt55Model as h, AnthropicThinkingDisplay as i, OpenAIResponsesCompactionRejection as l, isOpenAIGpt54MiniModel as m, AnthropicEffort as n, CodeModeToolSurfaceObservation as o, OpenAIReasoningEffort as p, AnthropicOptions as r, CompactionReplayRejection as s, AnthropicContextManagementOptions as t, codeModeToolSurfaceObserver as u, normalizeOpenAIReasoningEffort as v, supportsOpenAITemperature as w, resolveOpenAIReasoningEffortMapping as x, resolveOpenAIModelReasoningEfforts as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as isRecord } from "./record-coerce-CNDovvft.mjs";
|
|
2
|
-
import { A as shortHash } from "./transport-stream-shared-
|
|
2
|
+
import { A as shortHash } from "./transport-stream-shared-CCR7hSW0.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,6 +1,6 @@
|
|
|
1
|
-
import { r as getAiTransportHost } from "./host-
|
|
1
|
+
import { r as getAiTransportHost } from "./host-u3o8XiAp.mjs";
|
|
2
2
|
import { n as resolveCloudflareBaseUrl, t as isCloudflareProvider } from "./cloudflare-5qSGvIUH.mjs";
|
|
3
|
-
import { O as resolveOpenAIClientBaseUrl } from "./openai-transport-params-
|
|
3
|
+
import { O as resolveOpenAIClientBaseUrl } from "./openai-transport-params-D7JMUPjf.mjs";
|
|
4
4
|
import { n as resolveOpencodeSessionHeaders, t as hasOpencodeSessionHeader } from "./session-affinity-DA4WHv1h.mjs";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import OpenAI from "openai";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as index_d_exports } from "./index-
|
|
1
|
+
import { t as index_d_exports } from "./index-D27wAoOr.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-DvzmWW8J.mjs";
|
|
3
|
-
import "./types-
|
|
3
|
+
import "./types-UlNana-2.mjs";
|
|
4
4
|
//#region packages/ai/src/provider-types.d.ts
|
|
5
5
|
declare const PROVIDER_CONTEXT_HANDOFF: unique symbol;
|
|
6
6
|
type VideoContent = Omit<ImageContent, "type"> & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as supportsClaudeNativeMaxEffort, C as resolveClaudeOpus5ModelIdentity, D as supportsClaudeAdaptiveThinking, E as supportsClaude1MContext, O as supportsClaudeFastMode, S as resolveClaudeOpus55ModelIdentity, T as resolveClaudeSonnet5ModelIdentity, _ as resolveClaudeFable5ModelIdentity, a as ProviderRefusalReview, b as resolveClaudeMythos5ModelIdentity, c as CLAUDE_HAIKU_55_THINKING_PROFILE, d as CLAUDE_SONNET_55_THINKING_PROFILE, f as CLAUDE_SONNET_5_THINKING_PROFILE, g as requiresClaudeMandatoryAdaptiveThinking, h as requiresClaudeDefaultSampling, i as normalizeResolvedPricing, j as supportsClaudeNativeXhighEffort, k as supportsClaudeInHistorySystemMessages, l as CLAUDE_OPUS_55_THINKING_PROFILE, m as requiresClaudeBetweenToolsThinking, n as calculateUsageCost, o as readProviderRefusalReview, p as bindsClaudeThinkingPrefix, r as normalizeModelCostConfig, s as CLAUDE_FABLE_5_THINKING_PROFILE, u as CLAUDE_OPUS_5_THINKING_PROFILE, v as resolveClaudeHaiku55ModelIdentity, w as resolveClaudeSonnet55ModelIdentity, x as resolveClaudeNativeThinkingLevelMap, y as resolveClaudeModelIdentity } from "./index-
|
|
1
|
+
import { A as supportsClaudeNativeMaxEffort, C as resolveClaudeOpus5ModelIdentity, D as supportsClaudeAdaptiveThinking, E as supportsClaude1MContext, M as supportsClaudeServerCompaction, O as supportsClaudeFastMode, S as resolveClaudeOpus55ModelIdentity, T as resolveClaudeSonnet5ModelIdentity, _ as resolveClaudeFable5ModelIdentity, a as ProviderRefusalReview, b as resolveClaudeMythos5ModelIdentity, c as CLAUDE_HAIKU_55_THINKING_PROFILE, d as CLAUDE_SONNET_55_THINKING_PROFILE, f as CLAUDE_SONNET_5_THINKING_PROFILE, g as requiresClaudeMandatoryAdaptiveThinking, h as requiresClaudeDefaultSampling, i as normalizeResolvedPricing, j as supportsClaudeNativeXhighEffort, k as supportsClaudeInHistorySystemMessages, l as CLAUDE_OPUS_55_THINKING_PROFILE, m as requiresClaudeBetweenToolsThinking, n as calculateUsageCost, o as readProviderRefusalReview, p as bindsClaudeThinkingPrefix, r as normalizeModelCostConfig, s as CLAUDE_FABLE_5_THINKING_PROFILE, u as CLAUDE_OPUS_5_THINKING_PROFILE, v as resolveClaudeHaiku55ModelIdentity, w as resolveClaudeSonnet55ModelIdentity, x as resolveClaudeNativeThinkingLevelMap, y as resolveClaudeModelIdentity } from "./index-D27wAoOr.mjs";
|
|
2
2
|
import { $ as StopReason, A as ModelCostConfig, At as extractDiagnosticError, B as ProviderImagesOptions, C as KnownApi, Ct as readRuntimeContextMetadata, D as MaybePromise, Dt as DiagnosticErrorInfo, E as MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, Et as AssistantMessageDiagnostic, F as OpenRouterRouting, G as RUNTIME_CONTEXT_CUSTOM_TYPE, H as ProviderResponse, I as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, J as RUNTIME_CONTEXT_HEADER, K as RUNTIME_CONTEXT_END_MARKER, L as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, M as ModelThinkingLevel, Mt as isProviderRefusalAssistantError, N as OpenAICompletionsCompat, Ot as appendAssistantMessageDiagnostic, P as OpenAIResponsesCompat, Q as SimpleStreamOptions, R as PricingTier, S as ImagesStopReason, St as labelRuntimeContextText, T as KnownImagesProvider, Tt as setRuntimeContextRetention, V as ProviderReplayState, W as RUNTIME_CONTEXT_BEGIN_MARKER, X as RawPricingTier, Y as RawModelCostConfig, Z as RuntimeContextMessage, _ as ImagesInputContent, _t as escapeRuntimeContextFooter, a as AssistantMessage, at as ThinkingBudgets, b as ImagesOutputContent, bt as isRuntimeContextMessage, c as AssistantMessageEventStreamLike, ct as ThinkingLevelMap, dt as ToolResultMessage, et as StreamFn, f as DEFAULT_MISSING_TOOL_RESULT_TEXT, ft as Transport, g as ImagesFunction, gt as VercelGatewayRouting, h as ImagesContext, ht as ValidateToolArgumentsFn, i as AssistantImages, it as TextSignatureV1, j as ModelCostRates, jt as formatThrownValue, kt as createAssistantMessageDiagnostic, l as CacheRetention, lt as Tool, m as ImagesApi, mt as UserMessage, n as Api, nt as StreamOptions, o as AssistantMessageEvent, ot as ThinkingContent, p as ImageContent, pt as Usage, q as RUNTIME_CONTEXT_FOOTER, r as AssistantDeliveryTtsFacts, rt as TextContent, s as AssistantMessageEventStreamContract, st as ThinkingLevel, t as AnthropicMessagesCompat, u as CompleteSimpleFn, ut as ToolCall, v as ImagesModel, vt as hasLegacyRuntimeContextEnvelope, w as KnownImagesApi, wt as runtimeContextContentToText, x as ImagesProvider, xt as labelRuntimeContextContent, y as ImagesOptions, yt as hasRuntimeContextMarker, z as Provider } from "./types-DvzmWW8J.mjs";
|
|
3
3
|
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-DrRM_90c.mjs";
|
|
4
4
|
import { n as validateToolCall, t as validateToolArguments } from "./validation-B3lQt_VE.mjs";
|
|
5
|
-
import { a as ProviderContextHandoff, c as ProviderStreamFunction, d as VideoContent, f as resolveProviderContext, i as ProviderContext, l as ProviderStreamOptions, n as ModelInputContent, o as ProviderMessage, r as PROVIDER_CONTEXT_HANDOFF, s as ProviderModel, t as MediaContent, u as ProviderUserMessage } from "./provider-types-
|
|
6
|
-
export { type AnthropicMessagesCompat, type Api, type AssistantDeliveryTtsFacts, type AssistantImages, type AssistantMessage, type AssistantMessageDiagnostic, type AssistantMessageEvent, type AssistantMessageEventStream, type AssistantMessageEventStreamContract, type AssistantMessageEventStreamLike, type CLAUDE_FABLE_5_THINKING_PROFILE, type CLAUDE_HAIKU_55_THINKING_PROFILE, type CLAUDE_OPUS_55_THINKING_PROFILE, type CLAUDE_OPUS_5_THINKING_PROFILE, type CLAUDE_SONNET_55_THINKING_PROFILE, type CLAUDE_SONNET_5_THINKING_PROFILE, type CacheRetention, type CompleteSimpleFn, type ProviderContext as Context, ProviderContext, type DEFAULT_MISSING_TOOL_RESULT_TEXT, type DiagnosticErrorInfo, type EventStream, type ImageContent, type ImagesApi, type ImagesContext, type ImagesFunction, type ImagesInputContent, type ImagesModel, type ImagesOptions, type ImagesOutputContent, type ImagesProvider, type ImagesStopReason, type KnownApi, type KnownImagesApi, type KnownImagesProvider, type MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, type MaybePromise, MediaContent, type ProviderMessage as Message, ProviderMessage, type ProviderModel as Model, ProviderModel, type ModelCostConfig, type ModelCostRates, ModelInputContent, type ModelThinkingLevel, type OpenAICompletionsCompat, type OpenAIResponsesCompat, type OpenRouterRouting, PROVIDER_CONTEXT_HANDOFF, type PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, type PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, type PricingTier, type Provider, ProviderContextHandoff, type ProviderImagesOptions, type ProviderRefusalReview, type ProviderReplayState, type ProviderResponse, ProviderStreamFunction, type ProviderStreamFunction as StreamFunction, ProviderStreamOptions, ProviderUserMessage, type RUNTIME_CONTEXT_BEGIN_MARKER, type RUNTIME_CONTEXT_CUSTOM_TYPE, type RUNTIME_CONTEXT_END_MARKER, type RUNTIME_CONTEXT_FOOTER, type RUNTIME_CONTEXT_HEADER, type RawModelCostConfig, type RawPricingTier, type RuntimeContextMessage, type SimpleStreamOptions, type StopReason, type StreamFn, type StreamOptions, type TextContent, type TextSignatureV1, type ThinkingBudgets, type ThinkingContent, type ThinkingLevel, type ThinkingLevelMap, type Tool, type ToolCall, type ToolResultMessage, type Transport, type Usage, type UserMessage, type ValidateToolArgumentsFn, type VercelGatewayRouting, VideoContent, type appendAssistantMessageDiagnostic, type bindsClaudeThinkingPrefix, type calculateUsageCost, type createAssistantMessageDiagnostic, type createAssistantMessageEventStream, type escapeRuntimeContextFooter, type extractDiagnosticError, type formatThrownValue, type hasLegacyRuntimeContextEnvelope, type hasRuntimeContextMarker, type isProviderRefusalAssistantError, type isRuntimeContextMessage, type labelRuntimeContextContent, type labelRuntimeContextText, type normalizeModelCostConfig, type normalizeResolvedPricing, type readProviderRefusalReview, type readRuntimeContextMetadata, type requiresClaudeBetweenToolsThinking, type requiresClaudeDefaultSampling, type requiresClaudeMandatoryAdaptiveThinking, type resolveClaudeFable5ModelIdentity, type resolveClaudeHaiku55ModelIdentity, type resolveClaudeModelIdentity, type resolveClaudeMythos5ModelIdentity, type resolveClaudeNativeThinkingLevelMap, type resolveClaudeOpus55ModelIdentity, type resolveClaudeOpus5ModelIdentity, type resolveClaudeSonnet55ModelIdentity, type resolveClaudeSonnet5ModelIdentity, resolveProviderContext, type runtimeContextContentToText, type setRuntimeContextRetention, type supportsClaude1MContext, type supportsClaudeAdaptiveThinking, type supportsClaudeFastMode, type supportsClaudeInHistorySystemMessages, type supportsClaudeNativeMaxEffort, type supportsClaudeNativeXhighEffort, type validateToolArguments, type validateToolCall };
|
|
5
|
+
import { a as ProviderContextHandoff, c as ProviderStreamFunction, d as VideoContent, f as resolveProviderContext, i as ProviderContext, l as ProviderStreamOptions, n as ModelInputContent, o as ProviderMessage, r as PROVIDER_CONTEXT_HANDOFF, s as ProviderModel, t as MediaContent, u as ProviderUserMessage } from "./provider-types-v3bmqsfg.mjs";
|
|
6
|
+
export { type AnthropicMessagesCompat, type Api, type AssistantDeliveryTtsFacts, type AssistantImages, type AssistantMessage, type AssistantMessageDiagnostic, type AssistantMessageEvent, type AssistantMessageEventStream, type AssistantMessageEventStreamContract, type AssistantMessageEventStreamLike, type CLAUDE_FABLE_5_THINKING_PROFILE, type CLAUDE_HAIKU_55_THINKING_PROFILE, type CLAUDE_OPUS_55_THINKING_PROFILE, type CLAUDE_OPUS_5_THINKING_PROFILE, type CLAUDE_SONNET_55_THINKING_PROFILE, type CLAUDE_SONNET_5_THINKING_PROFILE, type CacheRetention, type CompleteSimpleFn, type ProviderContext as Context, ProviderContext, type DEFAULT_MISSING_TOOL_RESULT_TEXT, type DiagnosticErrorInfo, type EventStream, type ImageContent, type ImagesApi, type ImagesContext, type ImagesFunction, type ImagesInputContent, type ImagesModel, type ImagesOptions, type ImagesOutputContent, type ImagesProvider, type ImagesStopReason, type KnownApi, type KnownImagesApi, type KnownImagesProvider, type MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, type MaybePromise, MediaContent, type ProviderMessage as Message, ProviderMessage, type ProviderModel as Model, ProviderModel, type ModelCostConfig, type ModelCostRates, ModelInputContent, type ModelThinkingLevel, type OpenAICompletionsCompat, type OpenAIResponsesCompat, type OpenRouterRouting, PROVIDER_CONTEXT_HANDOFF, type PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, type PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, type PricingTier, type Provider, ProviderContextHandoff, type ProviderImagesOptions, type ProviderRefusalReview, type ProviderReplayState, type ProviderResponse, ProviderStreamFunction, type ProviderStreamFunction as StreamFunction, ProviderStreamOptions, ProviderUserMessage, type RUNTIME_CONTEXT_BEGIN_MARKER, type RUNTIME_CONTEXT_CUSTOM_TYPE, type RUNTIME_CONTEXT_END_MARKER, type RUNTIME_CONTEXT_FOOTER, type RUNTIME_CONTEXT_HEADER, type RawModelCostConfig, type RawPricingTier, type RuntimeContextMessage, type SimpleStreamOptions, type StopReason, type StreamFn, type StreamOptions, type TextContent, type TextSignatureV1, type ThinkingBudgets, type ThinkingContent, type ThinkingLevel, type ThinkingLevelMap, type Tool, type ToolCall, type ToolResultMessage, type Transport, type Usage, type UserMessage, type ValidateToolArgumentsFn, type VercelGatewayRouting, VideoContent, type appendAssistantMessageDiagnostic, type bindsClaudeThinkingPrefix, type calculateUsageCost, type createAssistantMessageDiagnostic, type createAssistantMessageEventStream, type escapeRuntimeContextFooter, type extractDiagnosticError, type formatThrownValue, type hasLegacyRuntimeContextEnvelope, type hasRuntimeContextMarker, type isProviderRefusalAssistantError, type isRuntimeContextMessage, type labelRuntimeContextContent, type labelRuntimeContextText, type normalizeModelCostConfig, type normalizeResolvedPricing, type readProviderRefusalReview, type readRuntimeContextMetadata, type requiresClaudeBetweenToolsThinking, type requiresClaudeDefaultSampling, type requiresClaudeMandatoryAdaptiveThinking, type resolveClaudeFable5ModelIdentity, type resolveClaudeHaiku55ModelIdentity, type resolveClaudeModelIdentity, type resolveClaudeMythos5ModelIdentity, type resolveClaudeNativeThinkingLevelMap, type resolveClaudeOpus55ModelIdentity, type resolveClaudeOpus5ModelIdentity, type resolveClaudeSonnet55ModelIdentity, type resolveClaudeSonnet5ModelIdentity, resolveProviderContext, type runtimeContextContentToText, type setRuntimeContextRetention, type supportsClaude1MContext, type supportsClaudeAdaptiveThinking, type supportsClaudeFastMode, type supportsClaudeInHistorySystemMessages, type supportsClaudeNativeMaxEffort, type supportsClaudeNativeXhighEffort, type supportsClaudeServerCompaction, type validateToolArguments, type validateToolCall };
|
package/dist/providers.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ApiRegistry } from "./api-registry-
|
|
2
|
-
import { n as clampOpenAIPromptCacheKey, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "./openai-prompt-cache-
|
|
1
|
+
import { n as ApiRegistry } from "./api-registry-B3rC2qu3.mjs";
|
|
2
|
+
import { n as clampOpenAIPromptCacheKey, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "./openai-prompt-cache-CFviG_D4.mjs";
|
|
3
3
|
//#region packages/ai/src/providers/register-builtins.d.ts
|
|
4
4
|
/** Source id used for built-in API provider registrations. */
|
|
5
5
|
export declare const BUILT_IN_API_PROVIDER_SOURCE_ID = "core:built-in";
|
package/dist/providers.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as AssistantMessageEventStream } from "./event-stream-C5AbCAaZ.mjs";
|
|
2
2
|
import { n as projectProviderError } from "./provider-error-DQBE1bUQ.mjs";
|
|
3
|
-
import { n as clampOpenAIPromptCacheKey, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "./openai-prompt-cache-
|
|
3
|
+
import { n as clampOpenAIPromptCacheKey, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "./openai-prompt-cache-BK6E2g4Q.mjs";
|
|
4
4
|
import { t as createZeroUsage } from "./usage-CJH5D6Ea.mjs";
|
|
5
5
|
//#region packages/ai/src/providers/register-builtins.ts
|
|
6
6
|
/** Source id used for built-in API provider registrations. */
|
|
@@ -50,39 +50,39 @@ function createLazyRegistration(api, importModule, select) {
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
const registerBuiltIns = [
|
|
53
|
-
createLazyRegistration("anthropic-messages", () => import("./anthropic-
|
|
53
|
+
createLazyRegistration("anthropic-messages", () => import("./anthropic-C4qygbtf.mjs").then((n) => n.t), (module) => ({
|
|
54
54
|
stream: module.streamAnthropic,
|
|
55
55
|
streamSimple: module.streamSimpleAnthropic
|
|
56
56
|
})),
|
|
57
|
-
createLazyRegistration("openai-completions", () => import("./openai-completions-
|
|
57
|
+
createLazyRegistration("openai-completions", () => import("./openai-completions-BxQw4S-A.mjs").then((n) => n.t), (module) => ({
|
|
58
58
|
stream: module.streamOpenAICompletions,
|
|
59
59
|
streamSimple: module.streamSimpleOpenAICompletions
|
|
60
60
|
})),
|
|
61
|
-
createLazyRegistration("mistral-conversations", () => import("./mistral-
|
|
61
|
+
createLazyRegistration("mistral-conversations", () => import("./mistral-cnoBDSIg.mjs"), (module) => ({
|
|
62
62
|
stream: module.streamMistral,
|
|
63
63
|
streamSimple: module.streamSimpleMistral
|
|
64
64
|
})),
|
|
65
|
-
createLazyRegistration("openai-responses", () => import("./openai-responses-
|
|
65
|
+
createLazyRegistration("openai-responses", () => import("./openai-responses-BhAZFsL9.mjs").then((n) => n.t), (module) => ({
|
|
66
66
|
stream: module.streamOpenAIResponses,
|
|
67
67
|
streamSimple: module.streamSimpleOpenAIResponses
|
|
68
68
|
})),
|
|
69
|
-
createLazyRegistration("azure-openai-responses", () => import("./azure-openai-responses-
|
|
69
|
+
createLazyRegistration("azure-openai-responses", () => import("./azure-openai-responses-DO-Fv8ha.mjs"), (module) => ({
|
|
70
70
|
stream: module.streamAzureOpenAIResponses,
|
|
71
71
|
streamSimple: module.streamSimpleAzureOpenAIResponses
|
|
72
72
|
})),
|
|
73
|
-
createLazyRegistration("openai-chatgpt-responses", () => import("./openai-chatgpt-responses-
|
|
73
|
+
createLazyRegistration("openai-chatgpt-responses", () => import("./openai-chatgpt-responses-Cq3Igfi3.mjs"), (module) => ({
|
|
74
74
|
stream: module.streamOpenAICodexResponses,
|
|
75
75
|
streamSimple: module.streamSimpleOpenAICodexResponses
|
|
76
76
|
})),
|
|
77
|
-
createLazyRegistration("google-generative-ai", () => import("./google-
|
|
77
|
+
createLazyRegistration("google-generative-ai", () => import("./google-B2g_Xn4d.mjs"), (module) => ({
|
|
78
78
|
stream: module.streamGoogle,
|
|
79
79
|
streamSimple: module.streamSimpleGoogle
|
|
80
80
|
})),
|
|
81
|
-
createLazyRegistration("google-interactions", () => import("./google-interactions-
|
|
81
|
+
createLazyRegistration("google-interactions", () => import("./google-interactions-DNXzPPwQ.mjs"), (module) => ({
|
|
82
82
|
stream: module.streamGoogleInteractions,
|
|
83
83
|
streamSimple: module.streamSimpleGoogleInteractions
|
|
84
84
|
})),
|
|
85
|
-
createLazyRegistration("google-vertex", () => import("./google-vertex-
|
|
85
|
+
createLazyRegistration("google-vertex", () => import("./google-vertex-_khoip47.mjs"), (module) => ({
|
|
86
86
|
stream: module.streamGoogleVertex,
|
|
87
87
|
streamSimple: module.streamSimpleGoogleVertex
|
|
88
88
|
}))
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { o as isRecord } from "./record-coerce-CNDovvft.mjs";
|
|
2
2
|
import { n as normalizeLowercaseStringOrEmpty } from "./string-coerce-CtgOVOSv.mjs";
|
|
3
|
-
import { M as hasMediaPayload, r as getAiTransportHost } from "./host-
|
|
3
|
+
import { M as hasMediaPayload, r as getAiTransportHost } from "./host-u3o8XiAp.mjs";
|
|
4
4
|
import { g as responsesServiceTierObserver } from "./openai-responses-contracts-BKu8O7l4.mjs";
|
|
5
5
|
import { o as truncateUtf16Safe } from "./provider-error-DQBE1bUQ.mjs";
|
|
6
|
-
import { P as sanitizeSurrogates, i as copyProviderAcceptanceObserver } from "./transport-stream-shared-
|
|
6
|
+
import { P as sanitizeSurrogates, i as copyProviderAcceptanceObserver } from "./transport-stream-shared-CCR7hSW0.mjs";
|
|
7
7
|
//#region packages/ai/src/utils/prompt-cache-stability.ts
|
|
8
8
|
/**
|
|
9
9
|
* Prompt-cache normalization helpers. They keep generated prompt sections
|
|
@@ -126,6 +126,10 @@ function supportsClaudeAdaptiveThinking(ref) {
|
|
|
126
126
|
function supportsClaude1MContext(ref) {
|
|
127
127
|
return supportsClaudeAdaptiveThinking(ref);
|
|
128
128
|
}
|
|
129
|
+
/** Return whether Anthropic documents threshold compaction (`compact_20260112`) for a Claude model. */
|
|
130
|
+
function supportsClaudeServerCompaction(ref) {
|
|
131
|
+
return supportsClaudeAdaptiveThinking(ref);
|
|
132
|
+
}
|
|
129
133
|
/** Return whether a Claude model supports Anthropic's native fast mode. */
|
|
130
134
|
function supportsClaudeFastMode(ref) {
|
|
131
135
|
const modelId = resolveClaudeModelIdentity(ref);
|
|
@@ -232,4 +236,4 @@ function calculateUsageCost(usage, pricing) {
|
|
|
232
236
|
return cost;
|
|
233
237
|
}
|
|
234
238
|
//#endregion
|
|
235
|
-
export { supportsClaude1MContext as C, supportsClaudeNativeMaxEffort as D, supportsClaudeInHistorySystemMessages as E, supportsClaudeNativeXhighEffort as O, resolveClaudeSonnet5ModelIdentity as S, supportsClaudeFastMode as T, resolveClaudeMythos5ModelIdentity as _, CLAUDE_HAIKU_55_THINKING_PROFILE as a, resolveClaudeOpus5ModelIdentity as b, CLAUDE_SONNET_55_THINKING_PROFILE as c, requiresClaudeBetweenToolsThinking as d, requiresClaudeDefaultSampling as f, resolveClaudeModelIdentity as g, resolveClaudeHaiku55ModelIdentity as h, CLAUDE_FABLE_5_THINKING_PROFILE as i, CLAUDE_SONNET_5_THINKING_PROFILE as l, resolveClaudeFable5ModelIdentity as m, normalizeModelCostConfig as n, CLAUDE_OPUS_55_THINKING_PROFILE as o, requiresClaudeMandatoryAdaptiveThinking as p, normalizeResolvedPricing as r, CLAUDE_OPUS_5_THINKING_PROFILE as s, calculateUsageCost as t, bindsClaudeThinkingPrefix as u, resolveClaudeNativeThinkingLevelMap as v, supportsClaudeAdaptiveThinking as w, resolveClaudeSonnet55ModelIdentity as x, resolveClaudeOpus55ModelIdentity as y };
|
|
239
|
+
export { supportsClaude1MContext as C, supportsClaudeNativeMaxEffort as D, supportsClaudeInHistorySystemMessages as E, supportsClaudeNativeXhighEffort as O, resolveClaudeSonnet5ModelIdentity as S, supportsClaudeFastMode as T, resolveClaudeMythos5ModelIdentity as _, CLAUDE_HAIKU_55_THINKING_PROFILE as a, resolveClaudeOpus5ModelIdentity as b, CLAUDE_SONNET_55_THINKING_PROFILE as c, requiresClaudeBetweenToolsThinking as d, requiresClaudeDefaultSampling as f, resolveClaudeModelIdentity as g, resolveClaudeHaiku55ModelIdentity as h, CLAUDE_FABLE_5_THINKING_PROFILE as i, supportsClaudeServerCompaction as k, CLAUDE_SONNET_5_THINKING_PROFILE as l, resolveClaudeFable5ModelIdentity as m, normalizeModelCostConfig as n, CLAUDE_OPUS_55_THINKING_PROFILE as o, requiresClaudeMandatoryAdaptiveThinking as p, normalizeResolvedPricing as r, CLAUDE_OPUS_5_THINKING_PROFILE as s, calculateUsageCost as t, bindsClaudeThinkingPrefix as u, resolveClaudeNativeThinkingLevelMap as v, supportsClaudeAdaptiveThinking as w, resolveClaudeSonnet55ModelIdentity as x, resolveClaudeOpus55ModelIdentity as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as bindAssistantMessageEventStream, o as getEventStreamCompletion } from "./event-stream-C5AbCAaZ.mjs";
|
|
2
|
-
import { i as getDefaultAiTransportHost, n as createAiTransportHost, o as runWithAiTransportHost, s as supportsScopedAiTransportHosts } from "./host-
|
|
2
|
+
import { i as getDefaultAiTransportHost, n as createAiTransportHost, o as runWithAiTransportHost, s as supportsScopedAiTransportHosts } from "./host-u3o8XiAp.mjs";
|
|
3
3
|
import { i as registerSessionResourceCleanupObserver, t as cleanupSessionResources } from "./session-resources-D1wgDQ8C.mjs";
|
|
4
4
|
//#region packages/ai/src/api-registry.ts
|
|
5
5
|
function wrapStream(api, stream) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as getAiTransportHost } from "./host-
|
|
1
|
+
import { r as getAiTransportHost } from "./host-u3o8XiAp.mjs";
|
|
2
2
|
import { o as truncateUtf16Safe } from "./provider-error-DQBE1bUQ.mjs";
|
|
3
3
|
import "./internal/retry-after.mjs";
|
|
4
|
-
import { N as raceWithTimeout } from "./transport-stream-shared-
|
|
4
|
+
import { N as raceWithTimeout } from "./transport-stream-shared-CCR7hSW0.mjs";
|
|
5
5
|
import "./positive-integer-CwLi8LUL.mjs";
|
|
6
6
|
//#region packages/normalization-core/src/response-bytes.ts
|
|
7
7
|
async function consumeResponseBytes(options) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as createAssistantMessageDiagnostic, t as appendAssistantMessageDiagnostic } from "./diagnostics-DzrF1h4J.mjs";
|
|
2
2
|
import { a as createAssistantMessageEventStream } from "./event-stream-C5AbCAaZ.mjs";
|
|
3
3
|
import { i as asOptionalRecord, n as asNullableRecord, t as asNonArrayRecord } from "./record-coerce-CNDovvft.mjs";
|
|
4
|
-
import { E as headersToRecord, r as getAiTransportHost } from "./host-
|
|
4
|
+
import { E as headersToRecord, r as getAiTransportHost } from "./host-u3o8XiAp.mjs";
|
|
5
5
|
import { i as projectDiagnosticValue, n as projectProviderError } from "./provider-error-DQBE1bUQ.mjs";
|
|
6
6
|
import { c as isTransientNetworkError } from "./diagnostics-Caj-4RBA.mjs";
|
|
7
7
|
import { t as createZeroUsage } from "./usage-CJH5D6Ea.mjs";
|
package/dist/{transport-stream-shared-CAxkgOSj.d.mts → transport-stream-shared-DW-7-qLR.d.mts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./index-
|
|
1
|
+
import "./index-D27wAoOr.mjs";
|
|
2
2
|
import { H as ProviderResponse, a as AssistantMessage, k as Model, nt as StreamOptions, pt as Usage } from "./types-DvzmWW8J.mjs";
|
|
3
3
|
import { r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-DrRM_90c.mjs";
|
|
4
4
|
import "./event-stream-DqDQWqiy.mjs";
|
package/dist/transports.d.mts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import "./index-
|
|
1
|
+
import "./index-D27wAoOr.mjs";
|
|
2
2
|
import { $ as StopReason, N as OpenAICompletionsCompat, Nt as ModelDataThinkingFormat, V as ProviderReplayState, a as AssistantMessage, d as Context, et as StreamFn, k as Model, l as CacheRetention, lt as Tool, n as Api, nt as StreamOptions, ot as ThinkingContent, pt as Usage, rt as TextContent, ut as ToolCall } from "./types-DvzmWW8J.mjs";
|
|
3
|
-
import { n as ApiRegistry } from "./api-registry-
|
|
4
|
-
import { o as AiProviderStreamHookContext } from "./host-
|
|
5
|
-
import { a as BaseOpenAIStreamOptions, c as OpenAIResponsesCompactionRejection, o as CodeModeToolSurfaceObservation, s as
|
|
3
|
+
import { n as ApiRegistry } from "./api-registry-B3rC2qu3.mjs";
|
|
4
|
+
import { o as AiProviderStreamHookContext } from "./host-DiPhRjrc.mjs";
|
|
5
|
+
import { a as BaseOpenAIStreamOptions, c as OpenAICompletionsOptions, l as OpenAIResponsesCompactionRejection, o as CodeModeToolSurfaceObservation, s as CompactionReplayRejection } from "./provider-options-CkieKvNJ.mjs";
|
|
6
6
|
import { n as OpenAIToolProjection } from "./openai-tool-projection-793cE3QX.mjs";
|
|
7
|
-
import "./types-
|
|
8
|
-
import { a as buildAnthropicSystemBlocks, c as logAnthropicContextEdits, d as resolveAnthropicPayloadPolicy, f as resolveAnthropicRequestBetaHeader, i as applyAnthropicRequestCacheControl, l as resolveAnthropicCacheOptions, m as supportsAnthropicServerSideFallback, n as applyAnthropicEphemeralCacheControlMarkers, o as isAnthropicServerToolClearingEnabled, p as resolveAnthropicServerCompactionPlan, r as applyAnthropicPayloadPolicyToParams, s as isDirectAnthropicModel, t as applyAnthropicContextManagementToRequest, u as resolveAnthropicEphemeralCacheControl } from "./anthropic-payload-policy-
|
|
9
|
-
import { a as resolveOpenAICompletionsCompat, i as isOpenAICodexResponsesModel, n as detectOpenAICompletionsCompat, o as resolveOpenAIPromptCacheKeySupport, r as isNativeOpenAIEndpoint, s as usesNativeOpenAICodexResponsesBackend, t as ResolvedOpenAICompletionsCompat } from "./openai-completions-compat-
|
|
10
|
-
import { l as OpenAIResponsesCompactionOutput, n as OpenAIResponsesOptions, r as OpenAIResponsesReasoningReplayMetadata } from "./openai-responses-contracts-
|
|
11
|
-
import { i as resolveOpenAIResponsesServerCompactionPlan, n as resolveOpenAIResponsesCompactEndpointPlan, r as resolveOpenAIResponsesPayloadPolicy, t as applyOpenAIResponsesPayloadPolicy } from "./openai-responses-payload-policy-
|
|
12
|
-
import { n as captureOpenAIResponsesCompaction, t as CompactionReplayRefreshRequiredError } from "./openai-responses-compaction-replay-
|
|
13
|
-
import { C as withProviderAcceptanceObserver, S as transportAbortError, _ as notifyProviderStreamOpened, a as coerceTransportToolCallArguments, b as sanitizeTransportPayloadText, c as createModelStreamCooperativeScheduler, d as finalizeTerminalToolCallArguments, f as finalizeTransportStream, g as notifyProviderHttpResponse, h as notifyProviderHttpMetadata, i as assignTransportErrorDetails, l as createWritableTransportEventStream, m as mergeTransportHeaders, n as ProviderAcceptance, o as copyProviderAcceptanceObserver, p as iterateModelStream, r as WritableTransportStream, s as createEmptyTransportUsage, t as IncompleteToolCallError, u as failTransportStream, v as parseTerminalToolCallArguments, w as withProviderResponseHook, x as throwIfModelStreamAborted, y as sanitizeNonEmptyTransportPayloadText } from "./transport-stream-shared-
|
|
7
|
+
import "./types-UlNana-2.mjs";
|
|
8
|
+
import { a as buildAnthropicSystemBlocks, c as logAnthropicContextEdits, d as resolveAnthropicPayloadPolicy, f as resolveAnthropicRequestBetaHeader, i as applyAnthropicRequestCacheControl, l as resolveAnthropicCacheOptions, m as supportsAnthropicServerSideFallback, n as applyAnthropicEphemeralCacheControlMarkers, o as isAnthropicServerToolClearingEnabled, p as resolveAnthropicServerCompactionPlan, r as applyAnthropicPayloadPolicyToParams, s as isDirectAnthropicModel, t as applyAnthropicContextManagementToRequest, u as resolveAnthropicEphemeralCacheControl } from "./anthropic-payload-policy-DD7vzpxE.mjs";
|
|
9
|
+
import { a as resolveOpenAICompletionsCompat, i as isOpenAICodexResponsesModel, n as detectOpenAICompletionsCompat, o as resolveOpenAIPromptCacheKeySupport, r as isNativeOpenAIEndpoint, s as usesNativeOpenAICodexResponsesBackend, t as ResolvedOpenAICompletionsCompat } from "./openai-completions-compat-BgPg1BRs.mjs";
|
|
10
|
+
import { l as OpenAIResponsesCompactionOutput, n as OpenAIResponsesOptions, r as OpenAIResponsesReasoningReplayMetadata } from "./openai-responses-contracts-D5yVZBp-.mjs";
|
|
11
|
+
import { i as resolveOpenAIResponsesServerCompactionPlan, n as resolveOpenAIResponsesCompactEndpointPlan, r as resolveOpenAIResponsesPayloadPolicy, t as applyOpenAIResponsesPayloadPolicy } from "./openai-responses-payload-policy-s1apQlZZ.mjs";
|
|
12
|
+
import { n as captureOpenAIResponsesCompaction, t as CompactionReplayRefreshRequiredError } from "./openai-responses-compaction-replay-BBNo098-.mjs";
|
|
13
|
+
import { C as withProviderAcceptanceObserver, S as transportAbortError, _ as notifyProviderStreamOpened, a as coerceTransportToolCallArguments, b as sanitizeTransportPayloadText, c as createModelStreamCooperativeScheduler, d as finalizeTerminalToolCallArguments, f as finalizeTransportStream, g as notifyProviderHttpResponse, h as notifyProviderHttpMetadata, i as assignTransportErrorDetails, l as createWritableTransportEventStream, m as mergeTransportHeaders, n as ProviderAcceptance, o as copyProviderAcceptanceObserver, p as iterateModelStream, r as WritableTransportStream, s as createEmptyTransportUsage, t as IncompleteToolCallError, u as failTransportStream, v as parseTerminalToolCallArguments, w as withProviderResponseHook, x as throwIfModelStreamAborted, y as sanitizeNonEmptyTransportPayloadText } from "./transport-stream-shared-DW-7-qLR.mjs";
|
|
14
14
|
import { r as sortPromptCacheToolsByName } from "./prompt-cache-stability-Cwcjv_fx.mjs";
|
|
15
15
|
import { r as normalizeOpenAIStrictToolParameters } from "./openai-tool-schema-a5ysBBga.mjs";
|
|
16
|
-
import { d as VideoContent, i as ProviderContext, s as ProviderModel } from "./provider-types-
|
|
16
|
+
import { d as VideoContent, i as ProviderContext, s as ProviderModel } from "./provider-types-v3bmqsfg.mjs";
|
|
17
17
|
import { a as resolveModelSseDebugMode, i as resolveModelPayloadDebugMode, n as formatModelTransportDebugUrl, r as emitModelTransportDebug, t as formatModelTransportDebugBaseUrl } from "./model-transport-url-C5f59L3Y.mjs";
|
|
18
18
|
import OpenAI from "openai";
|
|
19
19
|
import { Part } from "@google/genai";
|
|
@@ -431,4 +431,4 @@ export declare function convertGoogleTools(tools: Tool[]): {
|
|
|
431
431
|
functionDeclarations: Record<string, unknown>[];
|
|
432
432
|
}[] | undefined;
|
|
433
433
|
//#endregion
|
|
434
|
-
export { CompactionReplayRefreshRequiredError, type GoogleStreamChunk, IncompleteToolCallError, type OpenAICompletionsOptions, type OpenAIResponsesCompactionRejection, ProviderAcceptance, ResolvedOpenAICompletionsCompat, WritableTransportStream, applyAnthropicContextManagementToRequest, applyAnthropicEphemeralCacheControlMarkers, applyAnthropicPayloadPolicyToParams, applyAnthropicRequestCacheControl, applyOpenAIResponsesPayloadPolicy, assignTransportErrorDetails, buildAnthropicSystemBlocks, createTransportAwareStreamFnForModel as buildTransportAwareSimpleStreamFn, captureOpenAIResponsesCompaction, coerceTransportToolCallArguments, copyProviderAcceptanceObserver, createSupportedTransportStreamFn as createBoundaryAwareStreamFnForModel, createSupportedTransportStreamFn as createOpenClawTransportStreamFnForModel, createEmptyTransportUsage, createModelStreamCooperativeScheduler, createWritableTransportEventStream, detectOpenAICompletionsCompat, emitModelTransportDebug, failTransportStream, finalizeTerminalToolCallArguments, finalizeTransportStream, formatModelTransportDebugBaseUrl, formatModelTransportDebugUrl, isAnthropicServerToolClearingEnabled, isDirectAnthropicModel, isNativeOpenAIEndpoint, isOpenAICodexResponsesModel, iterateModelStream, logAnthropicContextEdits, mergeTransportHeaders, notifyProviderHttpMetadata, notifyProviderHttpResponse, notifyProviderStreamOpened, parseTerminalToolCallArguments, resolveAnthropicCacheOptions, resolveAnthropicEphemeralCacheControl, resolveAnthropicPayloadPolicy, resolveAnthropicRequestBetaHeader, resolveAnthropicServerCompactionPlan, resolveModelPayloadDebugMode, resolveModelSseDebugMode, resolveOpenAICompletionsCompat, resolveOpenAIPromptCacheKeySupport, resolveOpenAIResponsesCompactEndpointPlan, resolveOpenAIResponsesPayloadPolicy, resolveOpenAIResponsesServerCompactionPlan, sanitizeNonEmptyTransportPayloadText, sanitizeTransportPayloadText, sortPromptCacheToolsByName as sortTransportToolsByName, supportsAnthropicServerSideFallback, throwIfModelStreamAborted, transportAbortError, usesNativeOpenAICodexResponsesBackend, withProviderAcceptanceObserver, withProviderResponseHook };
|
|
434
|
+
export { CompactionReplayRefreshRequiredError, type CompactionReplayRejection, type GoogleStreamChunk, IncompleteToolCallError, type OpenAICompletionsOptions, type OpenAIResponsesCompactionRejection, ProviderAcceptance, ResolvedOpenAICompletionsCompat, WritableTransportStream, applyAnthropicContextManagementToRequest, applyAnthropicEphemeralCacheControlMarkers, applyAnthropicPayloadPolicyToParams, applyAnthropicRequestCacheControl, applyOpenAIResponsesPayloadPolicy, assignTransportErrorDetails, buildAnthropicSystemBlocks, createTransportAwareStreamFnForModel as buildTransportAwareSimpleStreamFn, captureOpenAIResponsesCompaction, coerceTransportToolCallArguments, copyProviderAcceptanceObserver, createSupportedTransportStreamFn as createBoundaryAwareStreamFnForModel, createSupportedTransportStreamFn as createOpenClawTransportStreamFnForModel, createEmptyTransportUsage, createModelStreamCooperativeScheduler, createWritableTransportEventStream, detectOpenAICompletionsCompat, emitModelTransportDebug, failTransportStream, finalizeTerminalToolCallArguments, finalizeTransportStream, formatModelTransportDebugBaseUrl, formatModelTransportDebugUrl, isAnthropicServerToolClearingEnabled, isDirectAnthropicModel, isNativeOpenAIEndpoint, isOpenAICodexResponsesModel, iterateModelStream, logAnthropicContextEdits, mergeTransportHeaders, notifyProviderHttpMetadata, notifyProviderHttpResponse, notifyProviderStreamOpened, parseTerminalToolCallArguments, resolveAnthropicCacheOptions, resolveAnthropicEphemeralCacheControl, resolveAnthropicPayloadPolicy, resolveAnthropicRequestBetaHeader, resolveAnthropicServerCompactionPlan, resolveModelPayloadDebugMode, resolveModelSseDebugMode, resolveOpenAICompletionsCompat, resolveOpenAIPromptCacheKeySupport, resolveOpenAIResponsesCompactEndpointPlan, resolveOpenAIResponsesPayloadPolicy, resolveOpenAIResponsesServerCompactionPlan, sanitizeNonEmptyTransportPayloadText, sanitizeTransportPayloadText, sortPromptCacheToolsByName as sortTransportToolsByName, supportsAnthropicServerSideFallback, throwIfModelStreamAborted, transportAbortError, usesNativeOpenAICodexResponsesBackend, withProviderAcceptanceObserver, withProviderResponseHook };
|