@openclaw/ai 2026.10.10 → 2026.11.5-beta.1
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/README.md +11 -1
- package/dist/.source-module-urls/fe058cc430242ce2ab0dfbcbe153e240a52cf9c3072c3dc0a73e5f956b6ba49b.json +1 -0
- package/dist/anthropic-CTND83W3.mjs +182 -0
- package/dist/{anthropic-payload-policy-rqCq9sT_.d.mts → anthropic-payload-policy-CXCJ5Pmj.d.mts} +21 -4
- package/dist/{anthropic-stream-reducer-C__ByTq1.mjs → anthropic-stream-lifecycle-rJe4OH5H.mjs} +845 -649
- package/dist/{anthropic-tool-projection-JTvMo4KG.d.mts → anthropic-tool-projection-D5DyrL6C.d.mts} +6 -7
- package/dist/{anthropic-tool-projection-DA_KeluM.mjs → anthropic-tool-projection-dGRfr4iT.mjs} +22 -32
- package/dist/{api-registry-gDt0faai.d.mts → api-registry-DY2MLUyg.d.mts} +2 -2
- package/dist/assistant-output-CD4kY9gu.mjs +16 -0
- package/dist/{azure-openai-responses-DHzTwi-y.mjs → azure-openai-responses-BhoLtP4Z.mjs} +46 -52
- package/dist/{cloudflare-Dttf8jKq.mjs → cloudflare-BJ2_Xabx.mjs} +1 -1
- package/dist/{credential-redaction-XvsPf7Yi.d.mts → credential-redaction-DrgndwTJ.d.mts} +5 -3
- package/dist/{deferred-event-buffer-DAvyP7qA.mjs → deferred-event-buffer-tIGkTkTm.mjs} +1 -2
- package/dist/{diagnostics-Cv7cW3pS.mjs → diagnostics-CloVGQiK.mjs} +42 -19
- package/dist/{diagnostics-DzrF1h4J.mjs → diagnostics-o1PrVNQb.mjs} +11 -4
- package/dist/diagnostics.d.mts +6 -7
- package/dist/diagnostics.mjs +4 -4
- package/dist/{env-api-keys-Xd8dm_aV.mjs → env-api-keys-BuHc86ya.mjs} +1 -26
- package/dist/event-stream-B4ZcSvsu.d.mts +1 -0
- package/dist/{event-stream-CzpE1g_o.d.mts → event-stream-BYmtRe8-.d.mts} +1 -1
- package/dist/event-stream.d.mts +2 -2
- package/dist/event-stream.mjs +1 -2
- package/dist/expect-lbe3Hgrh.mjs +8 -0
- package/dist/{github-copilot-request-facts-F-EmvkpW.mjs → github-copilot-request-facts-BZ_EMo7X.mjs} +1 -1
- package/dist/{google-CZ6uGVkV.mjs → google-1uObh-eI.mjs} +7 -8
- package/dist/{google-interactions-qd4flmND.mjs → google-interactions-CY8Xb87S.mjs} +208 -233
- package/dist/{google-messages-B-svbJuN.mjs → google-messages-CwBqSoa4.mjs} +16 -13
- package/dist/{google-provider-stream-DlhaCvCf.mjs → google-provider-stream-D30s9EZp.mjs} +17 -10
- package/dist/{google-shared-Cif7nve-.mjs → google-shared-li0lmEZK.mjs} +70 -42
- package/dist/{google-vertex-BZTcYnWU.mjs → google-vertex-B5CHglca.mjs} +3 -3
- package/dist/{host-rCxf5Tjd.mjs → host-DX7ORpeH.mjs} +57 -46
- package/dist/{host-jJOffdlW.d.mts → host-ccbwPC3A.d.mts} +17 -9
- package/dist/{host-policy-Ci1cKluf.mjs → host-policy-jCZebuXx.mjs} +2 -2
- package/dist/index-Bczt0MnO.d.mts +17 -0
- package/dist/index.d.mts +8 -7
- package/dist/index.mjs +9 -7
- package/dist/internal/anthropic.d.mts +21 -26
- package/dist/internal/anthropic.mjs +6 -6
- package/dist/internal/google-model-family.mjs +1 -1
- package/dist/internal/google.d.mts +15 -0
- package/dist/internal/google.mjs +1 -0
- package/dist/internal/model-request-body.d.mts +37 -0
- package/dist/internal/model-request-body.mjs +106 -0
- package/dist/internal/openai-completions-compat.d.mts +5 -1
- package/dist/internal/openai-completions-compat.mjs +3 -2
- package/dist/internal/openai-responses-payload-policy.d.mts +2 -2
- package/dist/internal/openai-responses-payload-policy.mjs +2 -2
- package/dist/internal/openai.d.mts +14 -12
- package/dist/internal/openai.mjs +11 -10
- package/dist/internal/reasoning-tag-text-partitioner.d.mts +26 -0
- package/dist/{reasoning-tag-text-partitioner-DzlRubwU.mjs → internal/reasoning-tag-text-partitioner.mjs} +313 -122
- package/dist/internal/retry-after.d.mts +2 -2
- package/dist/internal/retry-after.mjs +165 -27
- package/dist/internal/runtime.d.mts +15 -41
- package/dist/internal/runtime.mjs +9 -10
- package/dist/internal/shared.d.mts +21 -25
- package/dist/internal/shared.mjs +9 -98
- package/dist/internal/tool-schema.d.mts +10 -10
- package/dist/internal/tool-schema.mjs +4 -4
- package/dist/{llm-request-activity-CfMuh5cC.mjs → llm-request-activity-DzaHoRAU.mjs} +2 -2
- package/dist/mistral-F5_asrmU.mjs +3741 -0
- package/dist/mistral.LICENSE +201 -0
- package/dist/{model-transport-url-BrsjjdjR.d.mts → model-transport-url-BdksnBqu.d.mts} +6 -8
- package/dist/{number-coercion-37gmNkuA.mjs → number-coercion-C7HsBgUL.mjs} +7 -2
- package/dist/observe-async-iterator-AlARO5wS.d.mts +178 -0
- package/dist/observe-async-iterator-DgmegcZR.mjs +181 -0
- package/dist/{openai-chatgpt-responses-iGYDPbmc.mjs → openai-chatgpt-responses-BIK7HROH.mjs} +61 -80
- package/dist/{openai-completions-CDy5u1mv.mjs → openai-completions-ClJ7QHEB.mjs} +5 -5
- package/dist/{openai-completions-compat-CBvb2eld.d.mts → openai-completions-compat-CJ-NsDzg.d.mts} +12 -6
- package/dist/{openai-completions-compat-CJ0OXZgi.mjs → openai-completions-compat-CstlTQuF.mjs} +74 -50
- package/dist/openai-completions-reasoning-replay-BwT1xwRI.mjs +45 -0
- package/dist/{openai-completions-transport-DLrm5EWi.mjs → openai-completions-transport-C6J4_oGf.mjs} +501 -563
- package/dist/{openai-prompt-cache-DgjD-UL5.d.mts → openai-prompt-cache-BZGaIWYh.d.mts} +4 -4
- package/dist/{openai-prompt-cache-h8vXRiaH.mjs → openai-prompt-cache-CgDoFhO0.mjs} +5 -4
- package/dist/openai-responses-Beifmf1s.mjs +89 -0
- package/dist/{openai-responses-compaction-replay-DUBbsfku.d.mts → openai-responses-compaction-replay-CNHk6k53.d.mts} +4 -4
- package/dist/{openai-responses-contracts-gnl6ZRs1.d.mts → openai-responses-contracts-BXMcvO7F.d.mts} +4 -10
- package/dist/{openai-responses-contracts-DCG51Us0.mjs → openai-responses-contracts-xU-n9AJJ.mjs} +36 -37
- package/dist/{openai-responses-endpoint-JbBT8IDv.mjs → openai-responses-endpoint-DCkURKS0.mjs} +55 -8
- package/dist/{openai-responses-payload-policy-BzM52TTH.d.mts → openai-responses-payload-policy-DyE30gdD.d.mts} +7 -7
- package/dist/{openai-responses-request-lifecycle-DuMpdA6y.mjs → openai-responses-request-lifecycle-o-ODC_rF.mjs} +12 -26
- package/dist/{openai-responses-shared-CNfHudFg.mjs → openai-responses-shared-CrFDkZ0N.mjs} +637 -389
- package/dist/{openai-responses-terminal-usage-CpVjkqn-.d.mts → openai-responses-terminal-usage-D7IhRA6i.d.mts} +9 -3
- package/dist/{openai-tool-schema-CGhEl7ao.mjs → openai-tool-schema-CsoYgnWy.mjs} +97 -122
- package/dist/otel-D-BkX8bB.mjs +766 -0
- package/dist/{overflow-OF3PgPbw.mjs → overflow-CpApyjG2.mjs} +1 -1
- package/dist/{positive-integer-Bb4Evc7L.mjs → positive-integer-DiqE5vNi.mjs} +2 -3
- package/dist/{prompt-cache-stability-D_MeCQFI.mjs → prompt-cache-stability-w-ICeyOI.mjs} +1 -1
- package/dist/{provider-error-qtZD2inE.mjs → provider-error-DD-fo4Rz.mjs} +71 -234
- package/dist/{provider-options-Bo8GzTGX.d.mts → provider-options-Mo8NM5d1.d.mts} +15 -4
- package/dist/{provider-replay-context-BC23HyZo.mjs → provider-replay-context-xyU7-CiT.mjs} +2 -2
- package/dist/provider-transcript-transform-BHq3Q4nc.mjs +32 -0
- package/dist/{provider-transport-turn-state-B11rmZpv.mjs → provider-transport-turn-state-DQd9K4Pd.mjs} +3 -3
- package/dist/{provider-types-ODq57rG_.d.mts → provider-types-B1e98js5.d.mts} +6 -4
- package/dist/provider-types.d.mts +7 -6
- package/dist/provider-types.mjs +2 -1
- package/dist/providers.d.mts +2 -2
- package/dist/providers.mjs +26 -29
- package/dist/{record-coerce-CNDovvft.mjs → record-coerce-BQaoiN3r.mjs} +4 -1
- package/dist/request-headers-DO4Mqhw1.mjs +10 -0
- package/dist/{required-api-key-D088S4Cd.mjs → required-api-key-2zZTkmsi.mjs} +1 -1
- package/dist/retry-after-DnHBlFS2.d.mts +45 -0
- package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
- package/dist/{sanitize-unicode-ZqVLLEKC.d.mts → sanitize-unicode-BISmUlUv.d.mts} +2 -2
- package/dist/{simple-options-BdJJbzZk.mjs → simple-options-tLSeECry.mjs} +108 -82
- package/dist/src-BUsVkrNt.mjs +105 -0
- package/dist/{src-CyA0zJnt.mjs → src-CQ7nH2mL.mjs} +4 -7
- package/dist/stable-stringify-CchQEmeA.mjs +84 -0
- package/dist/{stream-DQqGjhbq.mjs → stream-DrtAWu7c.mjs} +2 -6
- package/dist/{stream-first-event-timeout-D_TfJHRJ.mjs → stream-first-event-timeout-B7RcufAV.mjs} +16 -13
- package/dist/{string-coerce-Cj8sqWHx.mjs → string-coerce-BCuWMIrk.mjs} +1 -1
- package/dist/string-normalization-B8TDDBX_.mjs +32 -0
- package/dist/telemetry-B9f7K_Xe.mjs +582 -0
- package/dist/{tool-schema-json-projection-Cvq69Ajp.mjs → tool-schema-json-projection-BQpiJlXJ.mjs} +53 -69
- package/dist/{transport-stream-shared-DdnJGEj0.mjs → transport-stream-shared-D2uFMhMc.mjs} +177 -93
- package/dist/{transport-stream-shared-8ru8eX4s.d.mts → transport-stream-shared-D3IAU4jn.d.mts} +29 -15
- package/dist/{transport-utils-CcCAuFVS.mjs → transport-utils-Da_39MYi.mjs} +23 -38
- package/dist/transports.d.mts +39 -38
- package/dist/transports.mjs +214 -295
- package/dist/{types-CVYzKrMl.d.mts → types-BVdTf0YV.d.mts} +38 -3
- package/dist/types-Cb3-5WM9.d.mts +1 -0
- package/dist/{types-BXd0kI8-.mjs → types-OVEWUaDh.mjs} +3 -1
- package/dist/types.d.mts +7 -6
- package/dist/types.mjs +7 -5
- package/dist/{validation-9FSkE8T-.mjs → validation-DGXqfvkj.mjs} +45 -27
- package/dist/{validation-BQ5u20Ru.d.mts → validation-QmyD0E5A.d.mts} +1 -1
- package/dist/validation.d.mts +1 -1
- package/dist/validation.mjs +1 -2
- package/package.json +40 -6
- package/dist/anthropic-B54Ts1tV.mjs +0 -221
- package/dist/assistant-output-DbgdWAhJ.mjs +0 -47
- package/dist/event-stream-CDpFza-M.d.mts +0 -1
- package/dist/index-DSprYWaz.d.mts +0 -185
- package/dist/mistral-C_ImzxlK.mjs +0 -512
- package/dist/model-request-body-BD5vy4rP.d.mts +0 -17
- package/dist/openai-responses-Cp2QPq7K.mjs +0 -87
- package/dist/retry-after-sw-XX8aC.d.mts +0 -15
- package/dist/types-CBJthzJX.d.mts +0 -1
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import { n as __exportAll } from "./reasoning-tag-text-partitioner-DzlRubwU.mjs";
|
|
2
|
-
import { w as supportsClaudeAdaptiveThinking } from "./src-CyA0zJnt.mjs";
|
|
3
|
-
import { t as AssistantMessageEventStream } from "./event-stream-X2gmsUWv.mjs";
|
|
4
|
-
import { T as usesClaudeStreamingRefusalContract, _ as buildAnthropicClaudeCodeIdentity, a as resolveAiTransportHeaderSentinels, b as prepareClaudeNoPrefillRequestContext, r as getAiTransportHost } from "./host-rCxf5Tjd.mjs";
|
|
5
|
-
import { s as streamFragmentError } from "./transport-utils-CcCAuFVS.mjs";
|
|
6
|
-
import { F as supportsAnthropicServerSideFallback, H as isAnthropicOAuthApiKey, O as isDirectAnthropicModel, U as omitFoundryBearerCredentialHeaders, W as usesFoundryBearerAuth, d as applyAnthropicThinkingOptions, l as buildAnthropicRequest, t as consumeAnthropicStream, u as prepareAnthropicRequest, x as suppressAnthropicCompaction, y as isAnthropicReplayRejection } from "./anthropic-stream-reducer-C__ByTq1.mjs";
|
|
7
|
-
import { i as resolveCacheRetention, n as resolveCloudflareBaseUrl, r as buildCopilotDynamicHeaders } from "./cloudflare-Dttf8jKq.mjs";
|
|
8
|
-
import { n as buildBaseOptions, r as clampMaxTokensToModel } from "./simple-options-BdJJbzZk.mjs";
|
|
9
|
-
import { D as parseJsonWithRepair, m as notifyProviderHttpResponse, n as assignTransportErrorDetails, u as finalizeTransportStream } from "./transport-stream-shared-DdnJGEj0.mjs";
|
|
10
|
-
import { n as getEnvApiKey } from "./env-api-keys-Xd8dm_aV.mjs";
|
|
11
|
-
import { t as createDeferredEventBuffer } from "./deferred-event-buffer-DAvyP7qA.mjs";
|
|
12
|
-
import { t as createAssistantOutput } from "./assistant-output-DbgdWAhJ.mjs";
|
|
13
|
-
import { t as notifyLlmRequestActivity } from "./llm-request-activity-CfMuh5cC.mjs";
|
|
14
|
-
import { n as resolveOpencodeSessionHeaders } from "./session-affinity-DA4WHv1h.mjs";
|
|
15
|
-
import { t as requireApiKey } from "./required-api-key-D088S4Cd.mjs";
|
|
16
|
-
import Anthropic from "@anthropic-ai/sdk";
|
|
17
|
-
import { Stream } from "@anthropic-ai/sdk/core/streaming.js";
|
|
18
|
-
//#region packages/ai/src/providers/anthropic.ts
|
|
19
|
-
var anthropic_exports = /* @__PURE__ */ __exportAll({
|
|
20
|
-
streamAnthropic: () => streamAnthropic,
|
|
21
|
-
streamSimpleAnthropic: () => streamSimpleAnthropic
|
|
22
|
-
});
|
|
23
|
-
const FINE_GRAINED_TOOL_STREAMING_BETA = "fine-grained-tool-streaming-2025-05-14";
|
|
24
|
-
const INTERLEAVED_THINKING_BETA = "interleaved-thinking-2025-05-14";
|
|
25
|
-
const ANTHROPIC_MIN_THINKING_BUDGET_TOKENS = 1024;
|
|
26
|
-
function getAnthropicCompat(model) {
|
|
27
|
-
const isFireworks = model.provider === "fireworks";
|
|
28
|
-
const isCloudflareAiGatewayAnthropic = model.provider === "cloudflare-ai-gateway" && model.baseUrl.includes("anthropic");
|
|
29
|
-
return {
|
|
30
|
-
supportsEagerToolInputStreaming: model.compat?.supportsEagerToolInputStreaming ?? !isFireworks,
|
|
31
|
-
sendSessionAffinityHeaders: model.compat?.sendSessionAffinityHeaders ?? (isFireworks || isCloudflareAiGatewayAnthropic)
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
const ANTHROPIC_MESSAGE_EVENTS = /* @__PURE__ */ new Set([
|
|
35
|
-
"message_start",
|
|
36
|
-
"message_delta",
|
|
37
|
-
"message_stop",
|
|
38
|
-
"content_block_start",
|
|
39
|
-
"content_block_delta",
|
|
40
|
-
"content_block_stop"
|
|
41
|
-
]);
|
|
42
|
-
async function* iterateAnthropicEvents(response, signal) {
|
|
43
|
-
if (!response.body) throw new Error("Attempted to iterate over an Anthropic response with no body");
|
|
44
|
-
for await (const sse of Stream.rawEvents(response)) {
|
|
45
|
-
if (sse.event === "error") throw new Error(sse.data);
|
|
46
|
-
notifyLlmRequestActivity(signal);
|
|
47
|
-
if (!ANTHROPIC_MESSAGE_EVENTS.has(sse.event ?? "")) continue;
|
|
48
|
-
try {
|
|
49
|
-
yield parseJsonWithRepair(sse.data);
|
|
50
|
-
} catch (error) {
|
|
51
|
-
throw streamFragmentError(error);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
const streamAnthropic = (model, context, options) => {
|
|
56
|
-
const stream = new AssistantMessageEventStream();
|
|
57
|
-
const requestContext = prepareClaudeNoPrefillRequestContext(model, context);
|
|
58
|
-
const requestOptions = normalizeAnthropicThinkingOptions(model, options);
|
|
59
|
-
(async () => {
|
|
60
|
-
const output = createAssistantOutput(model);
|
|
61
|
-
const refusalBuffer = usesClaudeStreamingRefusalContract(model) ? createDeferredEventBuffer(stream) : void 0;
|
|
62
|
-
let replayedCompaction;
|
|
63
|
-
try {
|
|
64
|
-
const { client, isOAuthToken, serverSideFallback, directApiKeyBetaHeader, claudeCodeVersion } = createClient(model, requestContext, requestOptions);
|
|
65
|
-
const builtParams = await buildAnthropicRequest(model, requestContext, requestOptions, "provider", isOAuthToken, serverSideFallback, claudeCodeVersion);
|
|
66
|
-
replayedCompaction = builtParams.replayedCompaction;
|
|
67
|
-
const { params, headers } = await prepareAnthropicRequest(builtParams.params, model, requestOptions, directApiKeyBetaHeader);
|
|
68
|
-
const sdkRequestOptions = {
|
|
69
|
-
...requestOptions?.signal ? { signal: requestOptions.signal } : {},
|
|
70
|
-
...requestOptions?.timeoutMs !== void 0 ? { timeout: requestOptions.timeoutMs } : {},
|
|
71
|
-
maxRetries: 0,
|
|
72
|
-
headers
|
|
73
|
-
};
|
|
74
|
-
const response = await client.messages.create({
|
|
75
|
-
...params,
|
|
76
|
-
stream: true
|
|
77
|
-
}, sdkRequestOptions).asResponse();
|
|
78
|
-
await notifyProviderHttpResponse({
|
|
79
|
-
options: requestOptions,
|
|
80
|
-
response,
|
|
81
|
-
model
|
|
82
|
-
});
|
|
83
|
-
await consumeAnthropicStream({
|
|
84
|
-
events: iterateAnthropicEvents(response, requestOptions?.signal),
|
|
85
|
-
model,
|
|
86
|
-
options: requestOptions ?? {},
|
|
87
|
-
output,
|
|
88
|
-
stream,
|
|
89
|
-
refusalBuffer,
|
|
90
|
-
isOAuthToken,
|
|
91
|
-
toolProjection: builtParams.toolProjection,
|
|
92
|
-
profile: "provider"
|
|
93
|
-
});
|
|
94
|
-
finalizeTransportStream({
|
|
95
|
-
stream,
|
|
96
|
-
output
|
|
97
|
-
});
|
|
98
|
-
} catch (error) {
|
|
99
|
-
const terminal = assignTransportErrorDetails(output, error, requestOptions?.signal);
|
|
100
|
-
output.content = output.content.filter((block) => block.type !== "toolCall");
|
|
101
|
-
for (const block of output.content) delete block.index;
|
|
102
|
-
if (refusalBuffer) {
|
|
103
|
-
refusalBuffer.discard();
|
|
104
|
-
output.content = [];
|
|
105
|
-
}
|
|
106
|
-
if (replayedCompaction && isAnthropicReplayRejection(error)) suppressAnthropicCompaction(output, model, requestOptions, replayedCompaction);
|
|
107
|
-
stream.push({
|
|
108
|
-
type: "error",
|
|
109
|
-
reason: terminal.stopReason,
|
|
110
|
-
error: output
|
|
111
|
-
});
|
|
112
|
-
stream.end();
|
|
113
|
-
}
|
|
114
|
-
})();
|
|
115
|
-
return stream;
|
|
116
|
-
};
|
|
117
|
-
function normalizeAnthropicThinkingOptions(model, options) {
|
|
118
|
-
if (options?.thinkingEnabled !== true || supportsClaudeAdaptiveThinking(model)) return options;
|
|
119
|
-
const budgetTokens = options.thinkingBudgetTokens ?? ANTHROPIC_MIN_THINKING_BUDGET_TOKENS;
|
|
120
|
-
const maxTokens = options.maxTokens ?? model.maxTokens;
|
|
121
|
-
if (budgetTokens >= ANTHROPIC_MIN_THINKING_BUDGET_TOKENS && budgetTokens < maxTokens) return options;
|
|
122
|
-
return {
|
|
123
|
-
...options,
|
|
124
|
-
thinkingEnabled: false,
|
|
125
|
-
thinkingBudgetTokens: void 0
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
const streamSimpleAnthropic = (model, context, options) => {
|
|
129
|
-
const apiKey = requireApiKey(model.provider, options?.apiKey);
|
|
130
|
-
const base = {
|
|
131
|
-
...buildBaseOptions(model, options, apiKey),
|
|
132
|
-
anthropicServerCompaction: options?.anthropicServerCompaction,
|
|
133
|
-
anthropicCompactThreshold: options?.anthropicCompactThreshold,
|
|
134
|
-
cacheTtlPruning: options?.cacheTtlPruning,
|
|
135
|
-
onCompactionRejected: options?.onCompactionRejected,
|
|
136
|
-
authProfileId: options?.authProfileId,
|
|
137
|
-
maxTokens: clampMaxTokensToModel(model, options?.maxTokens ?? model.maxTokens),
|
|
138
|
-
toolChoice: options?.toolChoice,
|
|
139
|
-
thinkingDisplay: options?.thinkingDisplay
|
|
140
|
-
};
|
|
141
|
-
applyAnthropicThinkingOptions(model, base, options, "provider");
|
|
142
|
-
return streamAnthropic(model, context, base);
|
|
143
|
-
};
|
|
144
|
-
function createClient(model, context, options) {
|
|
145
|
-
if (options?.client) return {
|
|
146
|
-
client: options.client,
|
|
147
|
-
isOAuthToken: false,
|
|
148
|
-
serverSideFallback: false
|
|
149
|
-
};
|
|
150
|
-
const apiKey = options?.apiKey ?? getEnvApiKey(model.provider) ?? "";
|
|
151
|
-
const dynamicHeaders = model.provider === "github-copilot" ? buildCopilotDynamicHeaders(context.messages) : void 0;
|
|
152
|
-
const sessionId = (options?.cacheRetention ?? resolveCacheRetention()) === "none" ? void 0 : options?.sessionId;
|
|
153
|
-
const thinkingEnabled = options?.thinkingEnabled === true;
|
|
154
|
-
const interleavedThinking = options?.interleavedThinking ?? true;
|
|
155
|
-
const useFineGrainedToolStreamingBeta = Boolean(context.tools?.length) && !getAnthropicCompat(model).supportsEagerToolInputStreaming;
|
|
156
|
-
const optionsHeaders = resolveOpencodeSessionHeaders(model, options);
|
|
157
|
-
const needsInterleavedBeta = interleavedThinking && !supportsClaudeAdaptiveThinking(model);
|
|
158
|
-
const betaFeatures = [];
|
|
159
|
-
if (useFineGrainedToolStreamingBeta) betaFeatures.push(FINE_GRAINED_TOOL_STREAMING_BETA);
|
|
160
|
-
if (needsInterleavedBeta) betaFeatures.push(INTERLEAVED_THINKING_BETA);
|
|
161
|
-
const fetchOptions = /^kimi(?:-|$)/.test(model.provider) && thinkingEnabled ? { sanitizeSse: false } : void 0;
|
|
162
|
-
const clientOptions = {
|
|
163
|
-
baseURL: model.baseUrl,
|
|
164
|
-
dangerouslyAllowBrowser: true,
|
|
165
|
-
fetch: getAiTransportHost().buildModelFetch(model, void 0, fetchOptions),
|
|
166
|
-
maxRetries: 0
|
|
167
|
-
};
|
|
168
|
-
const baseHeaders = {
|
|
169
|
-
accept: "application/json",
|
|
170
|
-
"anthropic-dangerous-direct-browser-access": "true",
|
|
171
|
-
...betaFeatures.length > 0 ? { "anthropic-beta": betaFeatures.join(",") } : {}
|
|
172
|
-
};
|
|
173
|
-
let configuredApiKey = apiKey;
|
|
174
|
-
let authToken = null;
|
|
175
|
-
let defaultHeaders;
|
|
176
|
-
let isOAuthToken = false;
|
|
177
|
-
let serverSideFallback = false;
|
|
178
|
-
let directApiKeyBetaHeader;
|
|
179
|
-
let claudeCodeVersion;
|
|
180
|
-
const isCopilot = model.provider === "github-copilot";
|
|
181
|
-
if (model.provider === "cloudflare-ai-gateway") {
|
|
182
|
-
clientOptions.baseURL = resolveCloudflareBaseUrl(model);
|
|
183
|
-
defaultHeaders = Object.assign({}, baseHeaders, { Authorization: null }, model.headers, optionsHeaders);
|
|
184
|
-
} else if (isCopilot || usesFoundryBearerAuth({
|
|
185
|
-
...model,
|
|
186
|
-
headers: resolveAiTransportHeaderSentinels(model.headers)
|
|
187
|
-
})) {
|
|
188
|
-
configuredApiKey = null;
|
|
189
|
-
authToken = apiKey;
|
|
190
|
-
defaultHeaders = Object.assign({}, baseHeaders, isCopilot ? model.headers : omitFoundryBearerCredentialHeaders(model.headers), dynamicHeaders, optionsHeaders);
|
|
191
|
-
} else if (isAnthropicOAuthApiKey(apiKey)) {
|
|
192
|
-
const identity = buildAnthropicClaudeCodeIdentity([
|
|
193
|
-
"claude-code-20250219",
|
|
194
|
-
"oauth-2025-04-20",
|
|
195
|
-
...betaFeatures
|
|
196
|
-
].join(","), model.headers, optionsHeaders);
|
|
197
|
-
configuredApiKey = null;
|
|
198
|
-
authToken = apiKey;
|
|
199
|
-
defaultHeaders = identity.headers;
|
|
200
|
-
isOAuthToken = true;
|
|
201
|
-
claudeCodeVersion = identity.version;
|
|
202
|
-
} else {
|
|
203
|
-
serverSideFallback = model.provider === "anthropic" && supportsAnthropicServerSideFallback(model);
|
|
204
|
-
defaultHeaders = Object.assign({}, baseHeaders, sessionId && getAnthropicCompat(model).sendSessionAffinityHeaders ? { "x-session-affinity": sessionId } : {}, model.headers, optionsHeaders);
|
|
205
|
-
if (isDirectAnthropicModel(model)) directApiKeyBetaHeader = Object.entries(defaultHeaders).findLast(([name]) => name.toLowerCase() === "anthropic-beta")?.[1] ?? "";
|
|
206
|
-
}
|
|
207
|
-
return {
|
|
208
|
-
client: new Anthropic({
|
|
209
|
-
...clientOptions,
|
|
210
|
-
apiKey: configuredApiKey,
|
|
211
|
-
authToken,
|
|
212
|
-
defaultHeaders
|
|
213
|
-
}),
|
|
214
|
-
isOAuthToken,
|
|
215
|
-
serverSideFallback,
|
|
216
|
-
directApiKeyBetaHeader,
|
|
217
|
-
claudeCodeVersion
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
//#endregion
|
|
221
|
-
export { streamAnthropic as n, streamSimpleAnthropic as r, anthropic_exports as t };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { c as transformMessages } from "./host-rCxf5Tjd.mjs";
|
|
2
|
-
import { a as createEmptyTransportUsage } from "./transport-stream-shared-DdnJGEj0.mjs";
|
|
3
|
-
//#region packages/ai/src/provider-transcript-transform.ts
|
|
4
|
-
const IMAGE_OMISSION = "(image omitted: model does not support images)";
|
|
5
|
-
const VIDEO_OMISSION = "(video omitted: provider does not support video input)";
|
|
6
|
-
function projectUserMediaForTransport(content, supportsImages, supportsVideo) {
|
|
7
|
-
const result = [];
|
|
8
|
-
for (const block of content) {
|
|
9
|
-
if (block.type === "text" || block.type === "image" && supportsImages || block.type === "video" && supportsVideo) {
|
|
10
|
-
result.push(block);
|
|
11
|
-
continue;
|
|
12
|
-
}
|
|
13
|
-
const text = block.type === "video" ? VIDEO_OMISSION : IMAGE_OMISSION;
|
|
14
|
-
const previous = result.at(-1);
|
|
15
|
-
if (block.data.trim() && !(previous?.type === "text" && previous.text === text)) result.push({
|
|
16
|
-
type: "text",
|
|
17
|
-
text
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return result;
|
|
21
|
-
}
|
|
22
|
-
function transformProviderMessages(messages, model, normalizeToolCallId) {
|
|
23
|
-
const target = {
|
|
24
|
-
...model,
|
|
25
|
-
input: model.input.filter((type) => type !== "video")
|
|
26
|
-
};
|
|
27
|
-
return transformMessages(messages.map((message) => {
|
|
28
|
-
if (message.role !== "user" || !Array.isArray(message.content)) return message;
|
|
29
|
-
return Object.assign({}, message, { content: projectUserMediaForTransport(message.content, model.input.includes("image"), model.api === "openai-completions" && model.input.includes("video")) });
|
|
30
|
-
}), target, normalizeToolCallId);
|
|
31
|
-
}
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region packages/ai/src/transports/assistant-output.ts
|
|
34
|
-
function createAssistantOutput(model, api = model.api) {
|
|
35
|
-
return {
|
|
36
|
-
role: "assistant",
|
|
37
|
-
content: [],
|
|
38
|
-
api,
|
|
39
|
-
provider: model.provider,
|
|
40
|
-
model: model.id,
|
|
41
|
-
usage: createEmptyTransportUsage(),
|
|
42
|
-
stopReason: "stop",
|
|
43
|
-
timestamp: Date.now()
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
//#endregion
|
|
47
|
-
export { transformProviderMessages as n, createAssistantOutput as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./event-stream-CzpE1g_o.mjs";
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
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, O as Message, Ot as appendAssistantMessageDiagnostic, P as OpenAIResponsesCompat, Q as SimpleStreamOptions, R as PricingTier, S as ImagesStopReason, St as labelRuntimeContextText, T as KnownImagesProvider, Tt as setRuntimeContextRetention, U as ProviderStreamOptions, 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, d as Context, 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, k as Model, 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, tt as StreamFunction, 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-CVYzKrMl.mjs";
|
|
2
|
-
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-CzpE1g_o.mjs";
|
|
3
|
-
import { n as validateToolCall, t as validateToolArguments } from "./validation-BQ5u20Ru.mjs";
|
|
4
|
-
//#region packages/llm-core/src/model-contracts/anthropic.d.ts
|
|
5
|
-
type ClaudeModelRef = {
|
|
6
|
-
id?: string;
|
|
7
|
-
params?: Record<string, unknown>;
|
|
8
|
-
};
|
|
9
|
-
type ClaudeEffortModelRef = ClaudeModelRef & {
|
|
10
|
-
thinkingLevelMap?: Record<string, string | null | undefined>;
|
|
11
|
-
};
|
|
12
|
-
declare const CLAUDE_FABLE_5_THINKING_PROFILE: {
|
|
13
|
-
readonly levels: readonly [{
|
|
14
|
-
readonly id: "low";
|
|
15
|
-
}, {
|
|
16
|
-
readonly id: "medium";
|
|
17
|
-
}, {
|
|
18
|
-
readonly id: "high";
|
|
19
|
-
}, {
|
|
20
|
-
readonly id: "xhigh";
|
|
21
|
-
}, {
|
|
22
|
-
readonly id: "max";
|
|
23
|
-
}];
|
|
24
|
-
readonly defaultLevel: "medium";
|
|
25
|
-
readonly preserveWhenCatalogReasoningFalse: true;
|
|
26
|
-
};
|
|
27
|
-
declare const CLAUDE_SONNET_5_THINKING_PROFILE: {
|
|
28
|
-
readonly levels: readonly [{
|
|
29
|
-
readonly id: "off";
|
|
30
|
-
}, {
|
|
31
|
-
readonly id: "minimal";
|
|
32
|
-
}, {
|
|
33
|
-
readonly id: "low";
|
|
34
|
-
}, {
|
|
35
|
-
readonly id: "medium";
|
|
36
|
-
}, {
|
|
37
|
-
readonly id: "high";
|
|
38
|
-
}, {
|
|
39
|
-
readonly id: "xhigh";
|
|
40
|
-
}, {
|
|
41
|
-
readonly id: "adaptive";
|
|
42
|
-
}, {
|
|
43
|
-
readonly id: "max";
|
|
44
|
-
}];
|
|
45
|
-
readonly defaultLevel: "high";
|
|
46
|
-
};
|
|
47
|
-
declare const CLAUDE_OPUS_5_THINKING_PROFILE: {
|
|
48
|
-
readonly levels: readonly [{
|
|
49
|
-
readonly id: "off";
|
|
50
|
-
}, {
|
|
51
|
-
readonly id: "minimal";
|
|
52
|
-
}, {
|
|
53
|
-
readonly id: "low";
|
|
54
|
-
}, {
|
|
55
|
-
readonly id: "medium";
|
|
56
|
-
}, {
|
|
57
|
-
readonly id: "high";
|
|
58
|
-
}, {
|
|
59
|
-
readonly id: "xhigh";
|
|
60
|
-
}, {
|
|
61
|
-
readonly id: "adaptive";
|
|
62
|
-
}, {
|
|
63
|
-
readonly id: "max";
|
|
64
|
-
}];
|
|
65
|
-
readonly defaultLevel: "high";
|
|
66
|
-
};
|
|
67
|
-
declare const CLAUDE_OPUS_55_THINKING_PROFILE: {
|
|
68
|
-
readonly levels: readonly [{
|
|
69
|
-
readonly id: "low";
|
|
70
|
-
}, {
|
|
71
|
-
readonly id: "medium";
|
|
72
|
-
}, {
|
|
73
|
-
readonly id: "high";
|
|
74
|
-
}, {
|
|
75
|
-
readonly id: "xhigh";
|
|
76
|
-
}, {
|
|
77
|
-
readonly id: "max";
|
|
78
|
-
}];
|
|
79
|
-
readonly defaultLevel: "medium";
|
|
80
|
-
readonly preserveWhenCatalogReasoningFalse: true;
|
|
81
|
-
};
|
|
82
|
-
declare const CLAUDE_SONNET_55_THINKING_PROFILE: {
|
|
83
|
-
readonly levels: readonly [{
|
|
84
|
-
readonly id: "off";
|
|
85
|
-
}, {
|
|
86
|
-
readonly id: "low";
|
|
87
|
-
}, {
|
|
88
|
-
readonly id: "medium";
|
|
89
|
-
}, {
|
|
90
|
-
readonly id: "high";
|
|
91
|
-
}, {
|
|
92
|
-
readonly id: "xhigh";
|
|
93
|
-
}, {
|
|
94
|
-
readonly id: "max";
|
|
95
|
-
}];
|
|
96
|
-
readonly defaultLevel: "high";
|
|
97
|
-
};
|
|
98
|
-
declare const CLAUDE_HAIKU_55_THINKING_PROFILE: {
|
|
99
|
-
readonly levels: readonly [{
|
|
100
|
-
readonly id: "off";
|
|
101
|
-
}, {
|
|
102
|
-
readonly id: "low";
|
|
103
|
-
}, {
|
|
104
|
-
readonly id: "medium";
|
|
105
|
-
}, {
|
|
106
|
-
readonly id: "high";
|
|
107
|
-
}, {
|
|
108
|
-
readonly id: "xhigh";
|
|
109
|
-
}, {
|
|
110
|
-
readonly id: "max";
|
|
111
|
-
}];
|
|
112
|
-
readonly defaultLevel: "medium";
|
|
113
|
-
};
|
|
114
|
-
/** Resolve Haiku 5.5 through direct ids, cloud ids, aliases, or deployment metadata. */
|
|
115
|
-
declare function resolveClaudeHaiku55ModelIdentity(ref: ClaudeModelRef): string | undefined;
|
|
116
|
-
/** Resolve the canonical normalized Claude model id for one runtime model ref. */
|
|
117
|
-
declare function resolveClaudeModelIdentity(ref: ClaudeModelRef): string;
|
|
118
|
-
/** Resolve Claude Fable 5 through direct ids, cloud ids, or deployment metadata. */
|
|
119
|
-
declare function resolveClaudeFable5ModelIdentity(ref: ClaudeModelRef): string | undefined;
|
|
120
|
-
/** Resolve Claude Mythos 5 through direct ids, cloud ids, or deployment metadata. */
|
|
121
|
-
declare function resolveClaudeMythos5ModelIdentity(ref: ClaudeModelRef): string | undefined;
|
|
122
|
-
/**
|
|
123
|
-
* Opus 5.5, Sonnet 5.5, Haiku 5.5, and Fable 5.1 require append-only runtime context.
|
|
124
|
-
* Extend only with live replay proof (Mythos 5.1 remains unproven).
|
|
125
|
-
*/
|
|
126
|
-
declare function bindsClaudeThinkingPrefix(ref: ClaudeModelRef): boolean;
|
|
127
|
-
/** Return whether Claude accepts operator instructions within conversation history. */
|
|
128
|
-
declare function supportsClaudeInHistorySystemMessages(ref: ClaudeModelRef): boolean;
|
|
129
|
-
/** Return whether a Claude model requires adaptive thinking instead of manual budgets. */
|
|
130
|
-
declare function requiresClaudeMandatoryAdaptiveThinking(ref: ClaudeModelRef): boolean;
|
|
131
|
-
/** Resolve Claude Sonnet 5 through aliases, direct ids, cloud ids, or deployment metadata. */
|
|
132
|
-
declare function resolveClaudeSonnet5ModelIdentity(ref: ClaudeModelRef): string | undefined;
|
|
133
|
-
/** Resolve the Sonnet 5.5 contract without matching other Sonnet 5 generations. */
|
|
134
|
-
declare function resolveClaudeSonnet55ModelIdentity(ref: ClaudeModelRef): string | undefined;
|
|
135
|
-
/** Sonnet 5.5 replaces disabled thinking with between-tool progress updates. */
|
|
136
|
-
declare function requiresClaudeBetweenToolsThinking(ref: ClaudeModelRef): boolean;
|
|
137
|
-
/** Resolve Claude Opus 5 through aliases, direct ids, cloud ids, or deployment metadata. */
|
|
138
|
-
declare function resolveClaudeOpus5ModelIdentity(ref: ClaudeModelRef): string | undefined;
|
|
139
|
-
/** Resolve the Opus 5.5 contract without matching other Opus 5 generations. */
|
|
140
|
-
declare function resolveClaudeOpus55ModelIdentity(ref: ClaudeModelRef): string | undefined;
|
|
141
|
-
/** Return whether a Claude model supports adaptive thinking. */
|
|
142
|
-
declare function supportsClaudeAdaptiveThinking(ref: ClaudeModelRef): boolean;
|
|
143
|
-
/** Return whether a Claude model has a native 1M-token context window. */
|
|
144
|
-
declare function supportsClaude1MContext(ref: ClaudeModelRef): boolean;
|
|
145
|
-
/** Return whether Anthropic documents threshold compaction (`compact_20260112`) for a Claude model. */
|
|
146
|
-
declare function supportsClaudeServerCompaction(ref: ClaudeModelRef): boolean;
|
|
147
|
-
/** Return whether a Claude model supports Anthropic's native fast mode. */
|
|
148
|
-
declare function supportsClaudeFastMode(ref: ClaudeModelRef): boolean;
|
|
149
|
-
/** Return whether a Claude model supports native max effort. */
|
|
150
|
-
declare function supportsClaudeNativeMaxEffort(ref: ClaudeModelRef): boolean;
|
|
151
|
-
/** Return whether a Claude model supports native xhigh effort. */
|
|
152
|
-
declare function supportsClaudeNativeXhighEffort(ref: ClaudeModelRef): boolean;
|
|
153
|
-
/** Return whether a Claude model rejects caller-selected sampling parameters. */
|
|
154
|
-
declare function requiresClaudeDefaultSampling(ref: ClaudeModelRef): boolean;
|
|
155
|
-
/**
|
|
156
|
-
* Fill native Claude effort mappings only when the provider did not publish a
|
|
157
|
-
* narrower route-specific contract.
|
|
158
|
-
*/
|
|
159
|
-
declare function resolveClaudeNativeThinkingLevelMap(ref: ClaudeEffortModelRef): Record<string, string | null | undefined> | undefined;
|
|
160
|
-
//#endregion
|
|
161
|
-
//#region packages/llm-core/src/utils/provider-refusal.d.ts
|
|
162
|
-
/** Provider-authored findings; continuation is offered only after explicit user review. */
|
|
163
|
-
type ProviderRefusalReview = {
|
|
164
|
-
explanation: string;
|
|
165
|
-
continuation?: {
|
|
166
|
-
message: string;
|
|
167
|
-
};
|
|
168
|
-
errorType?: string;
|
|
169
|
-
};
|
|
170
|
-
/** Keep exact provider text. Truncation must never make an invalid continuation usable. */
|
|
171
|
-
declare function readProviderRefusalReview(value: unknown): ProviderRefusalReview | undefined;
|
|
172
|
-
//#endregion
|
|
173
|
-
//#region packages/llm-core/src/usage-cost.d.ts
|
|
174
|
-
declare function normalizeModelCostConfig(cost: RawModelCostConfig): ModelCostConfig;
|
|
175
|
-
declare function normalizeResolvedPricing(cost: Partial<RawModelCostConfig>): ModelCostConfig;
|
|
176
|
-
/** Price one model call, selecting its tier before billing the separate token buckets. */
|
|
177
|
-
declare function calculateUsageCost(usage: Partial<Pick<Usage, "input" | "output" | "cacheRead" | "cacheWrite" | "cacheWrite1h">>, pricing: RawModelCostConfig): Usage["cost"];
|
|
178
|
-
//#endregion
|
|
179
|
-
//#region packages/llm-core/src/utils/assistant-message-events.d.ts
|
|
180
|
-
declare function appendTextDeltaToAssistantMessage(message: AssistantMessage, contentIndex: number, delta: string): AssistantMessage;
|
|
181
|
-
declare namespace index_d_exports {
|
|
182
|
-
export { AnthropicMessagesCompat, Api, AssistantDeliveryTtsFacts, AssistantImages, AssistantMessage, AssistantMessageDiagnostic, AssistantMessageEvent, AssistantMessageEventStream, AssistantMessageEventStreamContract, AssistantMessageEventStreamLike, CLAUDE_FABLE_5_THINKING_PROFILE, CLAUDE_HAIKU_55_THINKING_PROFILE, CLAUDE_OPUS_55_THINKING_PROFILE, CLAUDE_OPUS_5_THINKING_PROFILE, CLAUDE_SONNET_55_THINKING_PROFILE, CLAUDE_SONNET_5_THINKING_PROFILE, CacheRetention, CompleteSimpleFn, Context, DEFAULT_MISSING_TOOL_RESULT_TEXT, DiagnosticErrorInfo, EventStream, ImageContent, ImagesApi, ImagesContext, ImagesFunction, ImagesInputContent, ImagesModel, ImagesOptions, ImagesOutputContent, ImagesProvider, ImagesStopReason, KnownApi, KnownImagesApi, KnownImagesProvider, MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, MaybePromise, Message, Model, ModelCostConfig, ModelCostRates, ModelThinkingLevel, OpenAICompletionsCompat, OpenAIResponsesCompat, OpenRouterRouting, PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, PricingTier, Provider, ProviderImagesOptions, ProviderRefusalReview, ProviderReplayState, ProviderResponse, ProviderStreamOptions, RUNTIME_CONTEXT_BEGIN_MARKER, RUNTIME_CONTEXT_CUSTOM_TYPE, RUNTIME_CONTEXT_END_MARKER, RUNTIME_CONTEXT_FOOTER, RUNTIME_CONTEXT_HEADER, RawModelCostConfig, RawPricingTier, RuntimeContextMessage, SimpleStreamOptions, StopReason, StreamFn, StreamFunction, StreamOptions, TextContent, TextSignatureV1, ThinkingBudgets, ThinkingContent, ThinkingLevel, ThinkingLevelMap, Tool, ToolCall, ToolResultMessage, Transport, Usage, UserMessage, ValidateToolArgumentsFn, VercelGatewayRouting, appendAssistantMessageDiagnostic, appendTextDeltaToAssistantMessage, bindsClaudeThinkingPrefix, calculateUsageCost, createAssistantMessageDiagnostic, createAssistantMessageEventStream, escapeRuntimeContextFooter, extractDiagnosticError, formatThrownValue, hasLegacyRuntimeContextEnvelope, hasRuntimeContextMarker, isProviderRefusalAssistantError, isRuntimeContextMessage, labelRuntimeContextContent, labelRuntimeContextText, normalizeModelCostConfig, normalizeResolvedPricing, readProviderRefusalReview, readRuntimeContextMetadata, requiresClaudeBetweenToolsThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeHaiku55ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus55ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet55ModelIdentity, resolveClaudeSonnet5ModelIdentity, runtimeContextContentToText, setRuntimeContextRetention, supportsClaude1MContext, supportsClaudeAdaptiveThinking, supportsClaudeFastMode, supportsClaudeInHistorySystemMessages, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, supportsClaudeServerCompaction, validateToolArguments, validateToolCall };
|
|
183
|
-
}
|
|
184
|
-
//#endregion
|
|
185
|
-
export { supportsClaudeInHistorySystemMessages as A, resolveClaudeOpus55ModelIdentity as C, supportsClaude1MContext as D, resolveClaudeSonnet5ModelIdentity as E, supportsClaudeNativeXhighEffort as M, supportsClaudeServerCompaction as N, supportsClaudeAdaptiveThinking as O, resolveClaudeNativeThinkingLevelMap as S, resolveClaudeSonnet55ModelIdentity as T, requiresClaudeMandatoryAdaptiveThinking as _, normalizeResolvedPricing as a, resolveClaudeModelIdentity as b, CLAUDE_FABLE_5_THINKING_PROFILE as c, CLAUDE_OPUS_5_THINKING_PROFILE as d, CLAUDE_SONNET_55_THINKING_PROFILE as f, requiresClaudeDefaultSampling as g, requiresClaudeBetweenToolsThinking as h, normalizeModelCostConfig as i, supportsClaudeNativeMaxEffort as j, supportsClaudeFastMode as k, CLAUDE_HAIKU_55_THINKING_PROFILE as l, bindsClaudeThinkingPrefix as m, appendTextDeltaToAssistantMessage as n, ProviderRefusalReview as o, CLAUDE_SONNET_5_THINKING_PROFILE as p, calculateUsageCost as r, readProviderRefusalReview as s, index_d_exports as t, CLAUDE_OPUS_55_THINKING_PROFILE as u, resolveClaudeFable5ModelIdentity as v, resolveClaudeOpus5ModelIdentity as w, resolveClaudeMythos5ModelIdentity as x, resolveClaudeHaiku55ModelIdentity as y };
|