@openclaw/ai 2026.9.6 → 2026.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{anthropic-DZQ_7gD1.mjs → anthropic-Cw2pgccz.mjs} +37 -66
- package/dist/{anthropic-payload-policy-DyfwikYJ.d.mts → anthropic-payload-policy-NIPVYXPq.d.mts} +7 -5
- package/dist/{anthropic-stream-reducer-D6ZI1wwj.mjs → anthropic-stream-reducer-D9MCkl8Z.mjs} +192 -261
- package/dist/{api-registry-C2T3lTV7.d.mts → api-registry-D-nbmSqr.d.mts} +2 -2
- package/dist/{azure-openai-responses-DS86GYzq.mjs → azure-openai-responses-BwT3-X8P.mjs} +22 -33
- package/dist/{base64-CPmadnUf.mjs → base64-C1PsYcRQ.mjs} +15 -9
- package/dist/{diagnostics-CH8j2wIG.mjs → diagnostics-CJaB6g8J.mjs} +3 -3
- package/dist/diagnostics.d.mts +4 -4
- package/dist/diagnostics.mjs +2 -2
- package/dist/{env-api-keys-bktO00EJ.mjs → env-api-keys-CyX4VKGO.mjs} +7 -5
- package/dist/event-stream-CMQfX_yr.d.mts +1 -0
- package/dist/{event-stream-CjnIZZst.d.mts → event-stream-DOPFYVqs.d.mts} +2 -2
- package/dist/{event-stream-D8PARQfL.mjs → event-stream-vd9UnCAU.mjs} +10 -0
- package/dist/event-stream.d.mts +2 -2
- package/dist/event-stream.mjs +1 -1
- package/dist/{google-BZJFjhuC.mjs → google-BfapkS_K.mjs} +8 -11
- package/dist/google-interactions-DW3iXzjc.mjs +574 -0
- package/dist/{google-messages-DB7GKkDk.mjs → google-messages-CtjVtVot.mjs} +35 -71
- package/dist/{google-shared-Bok4I6zB.mjs → google-shared-Y2YfotEu.mjs} +43 -47
- package/dist/{google-vertex-3eVNR2qW.mjs → google-vertex-Dov4kBWu.mjs} +16 -30
- package/dist/{host-yTvBrYM2.mjs → host-CHi3X87F.mjs} +29 -188
- package/dist/{host-policy-DZO3oPPk.mjs → host-policy-BOAwRg_M.mjs} +2 -14
- package/dist/{host-DH-Z-LDb.d.mts → host-rxlNaBwm.d.mts} +9 -3
- package/dist/{index-C25RT6bP.d.mts → index-D6KsSE74.d.mts} +28 -8
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +6 -6
- package/dist/internal/anthropic.d.mts +8 -7
- package/dist/internal/anthropic.mjs +5 -5
- 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 +1 -1
- package/dist/internal/openai-responses-payload-policy.mjs +2 -2
- package/dist/internal/openai.d.mts +31 -8
- package/dist/internal/openai.mjs +13 -13
- package/dist/internal/runtime.d.mts +31 -70
- package/dist/internal/runtime.mjs +10 -65
- package/dist/internal/shared.d.mts +14 -12
- package/dist/internal/shared.mjs +5 -4
- package/dist/internal/tool-schema.d.mts +1 -1
- package/dist/internal/tool-schema.mjs +2 -2
- package/dist/{mistral-C_13dVBn.mjs → mistral-RS6mboC-.mjs} +46 -93
- package/dist/{openai-chatgpt-responses-sTxPl4zM.mjs → openai-chatgpt-responses-CYbidtrn.mjs} +26 -30
- package/dist/{openai-completions-BO6D_hrB.mjs → openai-completions-D14ihPYk.mjs} +14 -12
- package/dist/{openai-completions-compat-CUollwl6.mjs → openai-completions-compat-BOVWBZDn.mjs} +3 -5
- package/dist/{openai-completions-compat-DfJG1wSO.d.mts → openai-completions-compat-qJjmqQ71.d.mts} +3 -3
- package/dist/{openai-completions-stream-BpuJ0ZOA.mjs → openai-completions-stream-CDCuw3DP.mjs} +101 -173
- package/dist/{openai-prompt-cache-C4RHdN4n.d.mts → openai-prompt-cache-CouErLh7.d.mts} +2 -2
- package/dist/{openai-prompt-cache-CjV_2IRI.mjs → openai-prompt-cache-D2V7MqR7.mjs} +1 -1
- package/dist/{openai-provider-client-BP8J1aeg.mjs → openai-provider-client-CwfsGBbA.mjs} +2 -2
- package/dist/{openai-reasoning-effort-ash8dPrd.mjs → openai-reasoning-effort-ConhwkeX.mjs} +2 -1
- package/dist/{openai-responses-BJ_IEoMU.mjs → openai-responses-CKCBEc2W.mjs} +12 -11
- package/dist/openai-responses-compaction-replay-DiYn-gFM.d.mts +12 -0
- package/dist/{openai-responses-compaction-window-BiNCT0bS.mjs → openai-responses-compaction-window-UNK1GDpy.mjs} +5 -5
- package/dist/{openai-responses-contracts-DWrfMODE.mjs → openai-responses-contracts-CLxnqS9p.mjs} +1 -1
- package/dist/{openai-responses-contracts-B1ENJFpI.d.mts → openai-responses-contracts-D1iZ0njF.d.mts} +4 -4
- package/dist/{openai-responses-prompt-observer-internal-DPHWgbBH.mjs → openai-responses-prompt-observer-internal-iAqLb4tk.mjs} +12 -12
- package/dist/{openai-responses-request-lifecycle-DFuyO1pQ.mjs → openai-responses-request-lifecycle-Fsag-IGZ.mjs} +1 -1
- package/dist/{openai-responses-shared-DvSqtJ6_.mjs → openai-responses-shared-DL4ulQn7.mjs} +312 -122
- package/dist/{openai-responses-terminal-usage-BNFbvY9f.d.mts → openai-responses-terminal-usage-BE7lf7nW.d.mts} +2 -2
- package/dist/{openai-stop-reason-Drnn_6Qj.mjs → openai-stop-reason-8s70vDXj.mjs} +2 -12
- package/dist/{openai-tool-schema-ynZBgqW-.d.mts → openai-tool-schema-a5ysBBga.d.mts} +0 -6
- package/dist/{openai-tool-schema-D4BMcj2D.mjs → openai-tool-schema-vsl-cE-n.mjs} +243 -383
- package/dist/{openai-transport-params-DZKOTSfH.mjs → openai-transport-params-BwlpzX-2.mjs} +60 -105
- package/dist/{positive-integer-BiUxrd71.mjs → positive-integer-CjN5OJbH.mjs} +1 -1
- package/dist/{provider-error-CRhW7lkJ.mjs → provider-error-CwT_j2v0.mjs} +43 -4
- package/dist/{provider-options-DZYq53lj.d.mts → provider-options-Df7ov0K1.d.mts} +2 -2
- package/dist/{provider-replay-context-DPr3w20a.mjs → provider-replay-context-DsyI5jOP.mjs} +1 -1
- package/dist/{provider-transcript-transform-BTocjCRs.mjs → provider-transcript-transform-JbFbHV8h.mjs} +17 -2
- package/dist/{provider-transport-turn-state-lrXEFkYr.mjs → provider-transport-turn-state-BheUi_hl.mjs} +1 -1
- package/dist/{provider-types-w1rEqrGP.d.mts → provider-types-d4XnoZMd.d.mts} +3 -3
- package/dist/provider-types.d.mts +6 -6
- package/dist/providers.d.mts +2 -2
- package/dist/providers.mjs +15 -11
- package/dist/{reasoning-tag-text-partitioner-Di38crhI.mjs → reasoning-tag-text-partitioner-B6FIIBt6.mjs} +47 -71
- package/dist/{record-coerce-DwRYMj3t.mjs → record-coerce-CNDovvft.mjs} +1 -1
- package/dist/simple-options-CGAkCwtM.mjs +349 -0
- package/dist/{src-DwGYYyZp.mjs → src-H4aXcFuX.mjs} +43 -25
- package/dist/{stream-CREqxHgU.mjs → stream-DDsCBgd-.mjs} +1 -7
- package/dist/{stream-first-event-timeout-BeptfRL6.mjs → stream-first-event-timeout-B9o0S4SZ.mjs} +1 -1
- package/dist/{tool-schema-json-projection-CD9c_fK8.mjs → tool-schema-json-projection-Ct8SeBeJ.mjs} +63 -23
- package/dist/{transport-stream-shared-B5RioB_Q.mjs → transport-stream-shared-Dh5qKJ8e.mjs} +62 -28
- package/dist/{transport-stream-shared-B7Z9oCYg.d.mts → transport-stream-shared-yYhXa4kX.d.mts} +12 -6
- package/dist/{transport-utils-03Qi0CN2.mjs → transport-utils-C-4bf2Ok.mjs} +3 -4
- package/dist/transports.d.mts +36 -32
- package/dist/transports.mjs +160 -216
- package/dist/types-CB-_vNyI.d.mts +1 -0
- package/dist/{types-qZFbaDbK.d.mts → types-CLLR3eB4.d.mts} +3 -1
- package/dist/types.d.mts +6 -6
- package/dist/types.mjs +4 -4
- package/dist/{validation-Dw7cb6BV.mjs → validation-BFZc40Ig.mjs} +80 -54
- package/dist/{validation-DhQhmt6t.d.mts → validation-Cat2wQsc.d.mts} +1 -1
- package/dist/validation.d.mts +1 -1
- package/dist/validation.mjs +1 -1
- package/package.json +5 -5
- package/dist/assistant-output-DM1JBNs1.mjs +0 -16
- package/dist/event-stream-C0nsgbj2.d.mts +0 -1
- package/dist/simple-options-np1XPuhm.mjs +0 -175
- package/dist/types-DTvddOfm.d.mts +0 -1
- package/dist/utf16-slice-CvGodqok.mjs +0 -29
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { t as AssistantMessageEventStream } from "./event-stream-
|
|
4
|
-
import {
|
|
5
|
-
import { t as MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "./transport-utils-
|
|
6
|
-
import {
|
|
2
|
+
import { S as supportsClaudeAdaptiveThinking, b as resolveClaudeSonnet5ModelIdentity, v as resolveClaudeOpus5ModelIdentity, y as resolveClaudeSonnet55ModelIdentity } from "./src-H4aXcFuX.mjs";
|
|
3
|
+
import { t as AssistantMessageEventStream } from "./event-stream-vd9UnCAU.mjs";
|
|
4
|
+
import { _ as requiresClaudeAdaptiveThinking, b as usesClaudeFable5MessagesContract, f as applyClaudeRequestContract, g as prepareClaudeNoPrefillRequestContext, n as getAiTransportHost, p as buildAnthropicClaudeCodeIdentity, r as resolveAiTransportHeaderSentinels, v as resolveAnthropicThinkingEffort, x as usesClaudeStreamingRefusalContract } from "./host-CHi3X87F.mjs";
|
|
5
|
+
import { t as MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "./transport-utils-C-4bf2Ok.mjs";
|
|
6
|
+
import { A as applyAnthropicRequestCacheControl, B as ANTHROPIC_SERVER_SIDE_FALLBACKS, C as applyAnthropicThinkingBindingControls, D as applyAnthropicContextManagementToRequest, F as resolveAnthropicCacheOptions, J as usesFoundryBearerAuth, K as isAnthropicOAuthApiKey, N as isDirectAnthropicModel, R as resolveAnthropicRequestBetaHeader, d as convertAnthropicTools, f as buildAnthropicReplayPlan, g as normalizeAnthropicToolCallId, h as suppressAnthropicCompaction, j as buildAnthropicSystemBlocks, l as buildAnthropicGenerationParams, p as isAnthropicReplayRejection, q as omitFoundryBearerCredentialHeaders, t as consumeAnthropicStream, u as convertAnthropicMessages } from "./anthropic-stream-reducer-D9MCkl8Z.mjs";
|
|
7
7
|
import { t as resolveCacheRetention } from "./cache-retention-0x979a5V.mjs";
|
|
8
|
-
import {
|
|
9
|
-
import { n as
|
|
10
|
-
import {
|
|
8
|
+
import { D as parseJsonWithRepair, m as notifyProviderHttpResponse, n as assignTransportErrorDetails, u as finalizeTransportStream } from "./transport-stream-shared-Dh5qKJ8e.mjs";
|
|
9
|
+
import { n as buildBaseOptions, r as clampMaxTokensToModel, t as adjustMaxTokensForThinking } from "./simple-options-CGAkCwtM.mjs";
|
|
10
|
+
import { n as getEnvApiKey } from "./env-api-keys-CyX4VKGO.mjs";
|
|
11
11
|
import { t as createDeferredEventBuffer } from "./deferred-event-buffer-DAvyP7qA.mjs";
|
|
12
12
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-BjtkplhG.mjs";
|
|
13
|
-
import {
|
|
13
|
+
import { n as createAssistantOutput, t as transformProviderMessages } from "./provider-transcript-transform-JbFbHV8h.mjs";
|
|
14
14
|
import { n as resolveOpencodeSessionHeaders } from "./session-affinity-Bcunsn4I.mjs";
|
|
15
|
-
import { t as transformProviderMessages } from "./provider-transcript-transform-BTocjCRs.mjs";
|
|
16
15
|
import { i as resolveCloudflareBaseUrl, n as hasCopilotVisionInput, t as buildCopilotDynamicHeaders } from "./github-copilot-headers-B37TB3rB.mjs";
|
|
17
16
|
import Anthropic from "@anthropic-ai/sdk";
|
|
18
17
|
import { Stream } from "@anthropic-ai/sdk/core/streaming.js";
|
|
@@ -34,9 +33,7 @@ function getAnthropicCompat(model) {
|
|
|
34
33
|
};
|
|
35
34
|
}
|
|
36
35
|
function mergeHeaders(...headerSources) {
|
|
37
|
-
|
|
38
|
-
for (const headers of headerSources) if (headers) Object.assign(merged, headers);
|
|
39
|
-
return merged;
|
|
36
|
+
return Object.assign({}, ...headerSources);
|
|
40
37
|
}
|
|
41
38
|
const ANTHROPIC_MESSAGE_EVENTS = /* @__PURE__ */ new Set([
|
|
42
39
|
"message_start",
|
|
@@ -103,7 +100,7 @@ const streamAnthropic = (model, context, options) => {
|
|
|
103
100
|
const nextParams = await requestOptions?.onPayload?.(params, model);
|
|
104
101
|
if (nextParams !== void 0) params = nextParams;
|
|
105
102
|
applyClaudeRequestContract(params, model);
|
|
106
|
-
const betaHeader =
|
|
103
|
+
const betaHeader = resolveAnthropicRequestBetaHeader(params, directApiKeyBetaHeader);
|
|
107
104
|
const sdkRequestOptions = {
|
|
108
105
|
...requestOptions?.signal ? { signal: requestOptions.signal } : {},
|
|
109
106
|
...requestOptions?.timeoutMs !== void 0 ? { timeout: requestOptions.timeoutMs } : {},
|
|
@@ -177,7 +174,8 @@ const streamSimpleAnthropic = (model, context, options) => {
|
|
|
177
174
|
cacheTtlPruning: options?.cacheTtlPruning,
|
|
178
175
|
authProfileId: options?.authProfileId,
|
|
179
176
|
maxTokens: clampMaxTokensToModel(model, options?.maxTokens ?? model.maxTokens),
|
|
180
|
-
toolChoice: options?.toolChoice
|
|
177
|
+
toolChoice: options?.toolChoice,
|
|
178
|
+
thinkingDisplay: options?.thinkingDisplay
|
|
181
179
|
};
|
|
182
180
|
const mandatoryAdaptiveThinking = requiresClaudeAdaptiveThinking(model);
|
|
183
181
|
if (options?.reasoning === "off" && !mandatoryAdaptiveThinking) return streamAnthropic(model, context, {
|
|
@@ -218,7 +216,7 @@ const streamSimpleAnthropic = (model, context, options) => {
|
|
|
218
216
|
* identity) requests are excluded until the beta is verified there.
|
|
219
217
|
*/
|
|
220
218
|
function supportsAnthropicServerSideFallback(model) {
|
|
221
|
-
if (!usesClaudeFable5MessagesContract(model) && resolveClaudeOpus5ModelIdentity(model) === void 0 || model.provider !== "anthropic") return false;
|
|
219
|
+
if (!usesClaudeFable5MessagesContract(model) && resolveClaudeOpus5ModelIdentity(model) === void 0 && resolveClaudeSonnet55ModelIdentity(model) === void 0 || model.provider !== "anthropic") return false;
|
|
222
220
|
return isDirectAnthropicModel(model);
|
|
223
221
|
}
|
|
224
222
|
function createClient(model, apiKey, thinkingEnabled, interleavedThinking, useFineGrainedToolStreamingBeta, optionsHeaders, dynamicHeaders, sessionId) {
|
|
@@ -227,58 +225,43 @@ function createClient(model, apiKey, thinkingEnabled, interleavedThinking, useFi
|
|
|
227
225
|
if (useFineGrainedToolStreamingBeta) betaFeatures.push(FINE_GRAINED_TOOL_STREAMING_BETA);
|
|
228
226
|
if (needsInterleavedBeta) betaFeatures.push(INTERLEAVED_THINKING_BETA);
|
|
229
227
|
const fetchOptions = /^kimi(?:-|$)/.test(model.provider) && thinkingEnabled ? { sanitizeSse: false } : void 0;
|
|
230
|
-
const
|
|
228
|
+
const clientOptions = {
|
|
229
|
+
baseURL: model.baseUrl,
|
|
230
|
+
dangerouslyAllowBrowser: true,
|
|
231
|
+
fetch: getAiTransportHost().buildModelFetch(model, void 0, fetchOptions),
|
|
232
|
+
maxRetries: 0
|
|
233
|
+
};
|
|
234
|
+
const baseHeaders = {
|
|
235
|
+
accept: "application/json",
|
|
236
|
+
"anthropic-dangerous-direct-browser-access": "true",
|
|
237
|
+
...betaFeatures.length > 0 ? { "anthropic-beta": betaFeatures.join(",") } : {}
|
|
238
|
+
};
|
|
231
239
|
if (model.provider === "cloudflare-ai-gateway") return {
|
|
232
240
|
client: new Anthropic({
|
|
241
|
+
...clientOptions,
|
|
233
242
|
apiKey,
|
|
234
243
|
authToken: null,
|
|
235
244
|
baseURL: resolveCloudflareBaseUrl(model),
|
|
236
|
-
dangerouslyAllowBrowser: true,
|
|
237
245
|
defaultHeaders: mergeHeaders({
|
|
238
|
-
accept:
|
|
246
|
+
accept: baseHeaders.accept,
|
|
239
247
|
"anthropic-dangerous-direct-browser-access": "true",
|
|
240
248
|
Authorization: null,
|
|
241
249
|
...betaFeatures.length > 0 ? { "anthropic-beta": betaFeatures.join(",") } : {}
|
|
242
|
-
}, model.headers, optionsHeaders)
|
|
243
|
-
fetch,
|
|
244
|
-
maxRetries: 0
|
|
250
|
+
}, model.headers, optionsHeaders)
|
|
245
251
|
}),
|
|
246
252
|
isOAuthToken: false,
|
|
247
253
|
serverSideFallback: false
|
|
248
254
|
};
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
apiKey: null,
|
|
252
|
-
authToken: apiKey,
|
|
253
|
-
baseURL: model.baseUrl,
|
|
254
|
-
dangerouslyAllowBrowser: true,
|
|
255
|
-
defaultHeaders: mergeHeaders({
|
|
256
|
-
accept: "application/json",
|
|
257
|
-
"anthropic-dangerous-direct-browser-access": "true",
|
|
258
|
-
...betaFeatures.length > 0 ? { "anthropic-beta": betaFeatures.join(",") } : {}
|
|
259
|
-
}, model.headers, dynamicHeaders, optionsHeaders),
|
|
260
|
-
fetch,
|
|
261
|
-
maxRetries: 0
|
|
262
|
-
}),
|
|
263
|
-
isOAuthToken: false,
|
|
264
|
-
serverSideFallback: false
|
|
265
|
-
};
|
|
266
|
-
if (usesFoundryBearerAuth({
|
|
255
|
+
const isCopilot = model.provider === "github-copilot";
|
|
256
|
+
if (isCopilot || usesFoundryBearerAuth({
|
|
267
257
|
...model,
|
|
268
258
|
headers: resolveAiTransportHeaderSentinels(model.headers)
|
|
269
259
|
})) return {
|
|
270
260
|
client: new Anthropic({
|
|
261
|
+
...clientOptions,
|
|
271
262
|
apiKey: null,
|
|
272
263
|
authToken: apiKey,
|
|
273
|
-
|
|
274
|
-
dangerouslyAllowBrowser: true,
|
|
275
|
-
defaultHeaders: mergeHeaders({
|
|
276
|
-
accept: "application/json",
|
|
277
|
-
"anthropic-dangerous-direct-browser-access": "true",
|
|
278
|
-
...betaFeatures.length > 0 ? { "anthropic-beta": betaFeatures.join(",") } : {}
|
|
279
|
-
}, omitFoundryBearerCredentialHeaders(model.headers), dynamicHeaders, optionsHeaders),
|
|
280
|
-
fetch,
|
|
281
|
-
maxRetries: 0
|
|
264
|
+
defaultHeaders: mergeHeaders(baseHeaders, isCopilot ? model.headers : omitFoundryBearerCredentialHeaders(model.headers), dynamicHeaders, optionsHeaders)
|
|
282
265
|
}),
|
|
283
266
|
isOAuthToken: false,
|
|
284
267
|
serverSideFallback: false
|
|
@@ -291,13 +274,10 @@ function createClient(model, apiKey, thinkingEnabled, interleavedThinking, useFi
|
|
|
291
274
|
].join(","), model.headers, optionsHeaders);
|
|
292
275
|
return {
|
|
293
276
|
client: new Anthropic({
|
|
277
|
+
...clientOptions,
|
|
294
278
|
apiKey: null,
|
|
295
279
|
authToken: apiKey,
|
|
296
|
-
|
|
297
|
-
dangerouslyAllowBrowser: true,
|
|
298
|
-
defaultHeaders: identity.headers,
|
|
299
|
-
fetch,
|
|
300
|
-
maxRetries: 0
|
|
280
|
+
defaultHeaders: identity.headers
|
|
301
281
|
}),
|
|
302
282
|
isOAuthToken: true,
|
|
303
283
|
serverSideFallback: false,
|
|
@@ -305,22 +285,13 @@ function createClient(model, apiKey, thinkingEnabled, interleavedThinking, useFi
|
|
|
305
285
|
};
|
|
306
286
|
}
|
|
307
287
|
const serverSideFallback = supportsAnthropicServerSideFallback(model);
|
|
308
|
-
|
|
309
|
-
const sessionAffinityHeaders = sessionId && getAnthropicCompat(model).sendSessionAffinityHeaders ? { "x-session-affinity": sessionId } : {};
|
|
310
|
-
const defaultHeaders = mergeHeaders({
|
|
311
|
-
accept: "application/json",
|
|
312
|
-
"anthropic-dangerous-direct-browser-access": "true",
|
|
313
|
-
...betaFeatures.length > 0 ? { "anthropic-beta": betaFeatures.join(",") } : {}
|
|
314
|
-
}, sessionAffinityHeaders, model.headers, optionsHeaders);
|
|
288
|
+
const defaultHeaders = mergeHeaders(baseHeaders, sessionId && getAnthropicCompat(model).sendSessionAffinityHeaders ? { "x-session-affinity": sessionId } : {}, model.headers, optionsHeaders);
|
|
315
289
|
return {
|
|
316
290
|
client: new Anthropic({
|
|
291
|
+
...clientOptions,
|
|
317
292
|
apiKey,
|
|
318
293
|
authToken: null,
|
|
319
|
-
|
|
320
|
-
dangerouslyAllowBrowser: true,
|
|
321
|
-
defaultHeaders,
|
|
322
|
-
fetch,
|
|
323
|
-
maxRetries: 0
|
|
294
|
+
defaultHeaders
|
|
324
295
|
}),
|
|
325
296
|
isOAuthToken: false,
|
|
326
297
|
serverSideFallback,
|
package/dist/{anthropic-payload-policy-DyfwikYJ.d.mts → anthropic-payload-policy-NIPVYXPq.d.mts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { O as Model } from "./types-
|
|
3
|
-
import { t as AnthropicContextManagementOptions } from "./provider-options-
|
|
1
|
+
import "./index-D6KsSE74.mjs";
|
|
2
|
+
import { O as Model } from "./types-CLLR3eB4.mjs";
|
|
3
|
+
import { t as AnthropicContextManagementOptions } from "./provider-options-Df7ov0K1.mjs";
|
|
4
4
|
import { TextBlockParam } from "@anthropic-ai/sdk/resources/messages.js";
|
|
5
5
|
//#region packages/ai/src/transports/anthropic-payload-policy.d.ts
|
|
6
6
|
/** @deprecated Anthropic-family provider payload helper; do not use from third-party plugins. */
|
|
@@ -75,11 +75,13 @@ type AnthropicContextManagementPayload = {
|
|
|
75
75
|
messages?: unknown;
|
|
76
76
|
};
|
|
77
77
|
declare function applyAnthropicContextManagementToRequest(payload: AnthropicContextManagementPayload, model: Model, options: AnthropicContextManagementOptions | undefined, directApiKeyBetaHeader: string | undefined): void;
|
|
78
|
-
declare function
|
|
78
|
+
declare function resolveAnthropicRequestBetaHeader(payload: AnthropicContextManagementPayload & {
|
|
79
|
+
fallbacks?: unknown;
|
|
80
|
+
}, directApiKeyBetaHeader: string | undefined): string | undefined;
|
|
79
81
|
declare function logAnthropicContextEdits(event: unknown): void;
|
|
80
82
|
/** @deprecated Anthropic-family provider payload helper; do not use from third-party plugins. */
|
|
81
83
|
declare function applyAnthropicPayloadPolicyToParams(payloadObj: Record<string, unknown>, policy: AnthropicPayloadPolicy, cacheBreakpointOptOutMessageIndexes: ReadonlySet<number>): void;
|
|
82
84
|
/** @deprecated Anthropic-family provider payload helper; do not use from third-party plugins. */
|
|
83
85
|
declare function applyAnthropicEphemeralCacheControlMarkers(payloadObj: Record<string, unknown>, cacheControl?: AnthropicEphemeralCacheControl | null): void;
|
|
84
86
|
//#endregion
|
|
85
|
-
export { buildAnthropicSystemBlocks as a, logAnthropicContextEdits as c,
|
|
87
|
+
export { buildAnthropicSystemBlocks as a, logAnthropicContextEdits as c, resolveAnthropicPayloadPolicy as d, resolveAnthropicRequestBetaHeader as f, applyAnthropicRequestCacheControl as i, resolveAnthropicCacheOptions as l, applyAnthropicEphemeralCacheControlMarkers as n, isAnthropicServerToolClearingEnabled as o, resolveAnthropicServerCompactionPlan as p, applyAnthropicPayloadPolicyToParams as r, isDirectAnthropicModel as s, applyAnthropicContextManagementToRequest as t, resolveAnthropicEphemeralCacheControl as u };
|