@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
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
|
-
import { w as supportsClaudeAdaptiveThinking } from "./src-
|
|
2
|
+
import { w as supportsClaudeAdaptiveThinking } from "./src-VWy9E7DZ.mjs";
|
|
3
3
|
import { t as AssistantMessageEventStream } from "./event-stream-C5AbCAaZ.mjs";
|
|
4
|
-
import { S as resolveAnthropicThinkingEffort, T as usesClaudeStreamingRefusalContract, _ as buildAnthropicClaudeCodeIdentity, a as resolveAiTransportHeaderSentinels, b as prepareClaudeNoPrefillRequestContext, r as getAiTransportHost, v as defaultsClaudeAdaptiveThinking, x as requiresClaudeAdaptiveThinking } from "./host-
|
|
5
|
-
import { n as MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "./text-signature-
|
|
6
|
-
import { C as isAnthropicReplayRejection, J as usesFoundryBearerAuth, K as isAnthropicOAuthApiKey, M as isDirectAnthropicModel, T as suppressAnthropicCompaction, l as buildAnthropicRequest, q as omitFoundryBearerCredentialHeaders, t as consumeAnthropicStream, u as prepareAnthropicRequest, z as supportsAnthropicServerSideFallback } from "./anthropic-stream-reducer-
|
|
4
|
+
import { S as resolveAnthropicThinkingEffort, T as usesClaudeStreamingRefusalContract, _ as buildAnthropicClaudeCodeIdentity, a as resolveAiTransportHeaderSentinels, b as prepareClaudeNoPrefillRequestContext, r as getAiTransportHost, v as defaultsClaudeAdaptiveThinking, x as requiresClaudeAdaptiveThinking } from "./host-u3o8XiAp.mjs";
|
|
5
|
+
import { n as MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "./text-signature-D_vRrx-z.mjs";
|
|
6
|
+
import { C as isAnthropicReplayRejection, J as usesFoundryBearerAuth, K as isAnthropicOAuthApiKey, M as isDirectAnthropicModel, T as suppressAnthropicCompaction, l as buildAnthropicRequest, q as omitFoundryBearerCredentialHeaders, t as consumeAnthropicStream, u as prepareAnthropicRequest, z as supportsAnthropicServerSideFallback } from "./anthropic-stream-reducer-CWyWE21W.mjs";
|
|
7
7
|
import { i as resolveCacheRetention, n as resolveCloudflareBaseUrl, r as buildCopilotDynamicHeaders } from "./cloudflare-5qSGvIUH.mjs";
|
|
8
|
-
import { D as parseJsonWithRepair, m as notifyProviderHttpResponse, n as assignTransportErrorDetails, u as finalizeTransportStream } from "./transport-stream-shared-
|
|
9
|
-
import { n as buildBaseOptions, r as clampMaxTokensToModel, t as adjustMaxTokensForThinking } from "./simple-options-
|
|
8
|
+
import { D as parseJsonWithRepair, m as notifyProviderHttpResponse, n as assignTransportErrorDetails, u as finalizeTransportStream } from "./transport-stream-shared-CCR7hSW0.mjs";
|
|
9
|
+
import { n as buildBaseOptions, r as clampMaxTokensToModel, t as adjustMaxTokensForThinking } from "./simple-options-7QuSKriJ.mjs";
|
|
10
10
|
import { n as getEnvApiKey } from "./env-api-keys-CyX4VKGO.mjs";
|
|
11
11
|
import { t as createDeferredEventBuffer } from "./deferred-event-buffer-DAvyP7qA.mjs";
|
|
12
|
-
import { t as createAssistantOutput } from "./assistant-output-
|
|
12
|
+
import { t as createAssistantOutput } from "./assistant-output-D5762GPH.mjs";
|
|
13
13
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-D8f_oxHj.mjs";
|
|
14
14
|
import { n as resolveOpencodeSessionHeaders } from "./session-affinity-DA4WHv1h.mjs";
|
|
15
15
|
import { t as requireApiKey } from "./required-api-key-D4kn3252.mjs";
|
|
@@ -60,7 +60,7 @@ const streamAnthropic = (model, context, options) => {
|
|
|
60
60
|
(async () => {
|
|
61
61
|
const output = createAssistantOutput(model);
|
|
62
62
|
const refusalBuffer = usesClaudeStreamingRefusalContract(model) ? createDeferredEventBuffer(stream) : void 0;
|
|
63
|
-
let
|
|
63
|
+
let replayedCompaction;
|
|
64
64
|
try {
|
|
65
65
|
let client;
|
|
66
66
|
let isOAuth;
|
|
@@ -82,7 +82,7 @@ const streamAnthropic = (model, context, options) => {
|
|
|
82
82
|
claudeCodeVersion = created.claudeCodeVersion;
|
|
83
83
|
}
|
|
84
84
|
const builtParams = await buildAnthropicRequest(model, requestContext, requestOptions, "provider", isOAuth, serverSideFallback, claudeCodeVersion);
|
|
85
|
-
|
|
85
|
+
replayedCompaction = builtParams.replayedCompaction;
|
|
86
86
|
const { params, headers } = await prepareAnthropicRequest(builtParams.params, model, requestOptions, directApiKeyBetaHeader);
|
|
87
87
|
const sdkRequestOptions = {
|
|
88
88
|
...requestOptions?.signal ? { signal: requestOptions.signal } : {},
|
|
@@ -125,7 +125,7 @@ const streamAnthropic = (model, context, options) => {
|
|
|
125
125
|
refusalBuffer.discard();
|
|
126
126
|
output.content = [];
|
|
127
127
|
}
|
|
128
|
-
if (
|
|
128
|
+
if (replayedCompaction && isAnthropicReplayRejection(error)) suppressAnthropicCompaction(output, model, requestOptions, replayedCompaction);
|
|
129
129
|
stream.push({
|
|
130
130
|
type: "error",
|
|
131
131
|
reason: terminal.stopReason,
|
|
@@ -154,6 +154,7 @@ const streamSimpleAnthropic = (model, context, options) => {
|
|
|
154
154
|
anthropicServerCompaction: options?.anthropicServerCompaction,
|
|
155
155
|
anthropicCompactThreshold: options?.anthropicCompactThreshold,
|
|
156
156
|
cacheTtlPruning: options?.cacheTtlPruning,
|
|
157
|
+
onCompactionRejected: options?.onCompactionRejected,
|
|
157
158
|
authProfileId: options?.authProfileId,
|
|
158
159
|
maxTokens: clampMaxTokensToModel(model, options?.maxTokens ?? model.maxTokens),
|
|
159
160
|
toolChoice: options?.toolChoice,
|
package/dist/{anthropic-payload-policy-BZUAchqb.d.mts → anthropic-payload-policy-DD7vzpxE.d.mts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./index-
|
|
1
|
+
import "./index-D27wAoOr.mjs";
|
|
2
2
|
import { k as Model } from "./types-DvzmWW8J.mjs";
|
|
3
|
-
import { t as AnthropicContextManagementOptions } from "./provider-options-
|
|
3
|
+
import { t as AnthropicContextManagementOptions } from "./provider-options-CkieKvNJ.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. */
|
|
@@ -37,9 +37,12 @@ type AnthropicPayloadPolicy = {
|
|
|
37
37
|
};
|
|
38
38
|
/** Resolve the server-compaction gate and effective threshold for an Anthropic route. */
|
|
39
39
|
declare function resolveAnthropicServerCompactionPlan(model: {
|
|
40
|
+
id?: string;
|
|
41
|
+
params?: Record<string, unknown>;
|
|
40
42
|
provider?: unknown;
|
|
41
43
|
api?: unknown;
|
|
42
44
|
baseUrl?: string;
|
|
45
|
+
contextTokens?: unknown;
|
|
43
46
|
contextWindow?: unknown;
|
|
44
47
|
}, extraParams?: Record<string, unknown>, apiKey?: string): {
|
|
45
48
|
enabled: boolean;
|
package/dist/{anthropic-stream-reducer-DHt9uFWX.mjs → anthropic-stream-reducer-CWyWE21W.mjs}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { E as supportsClaudeInHistorySystemMessages, O as supportsClaudeNativeXhighEffort, S as resolveClaudeSonnet5ModelIdentity, b as resolveClaudeOpus5ModelIdentity, d as requiresClaudeBetweenToolsThinking, g as resolveClaudeModelIdentity, h as resolveClaudeHaiku55ModelIdentity, m as resolveClaudeFable5ModelIdentity, u as bindsClaudeThinkingPrefix, w as supportsClaudeAdaptiveThinking, x as resolveClaudeSonnet55ModelIdentity, y as resolveClaudeOpus55ModelIdentity } from "./src-
|
|
1
|
+
import { E as supportsClaudeInHistorySystemMessages, O as supportsClaudeNativeXhighEffort, S as resolveClaudeSonnet5ModelIdentity, b as resolveClaudeOpus5ModelIdentity, d as requiresClaudeBetweenToolsThinking, g as resolveClaudeModelIdentity, h as resolveClaudeHaiku55ModelIdentity, k as supportsClaudeServerCompaction, m as resolveClaudeFable5ModelIdentity, u as bindsClaudeThinkingPrefix, w as supportsClaudeAdaptiveThinking, x as resolveClaudeSonnet55ModelIdentity, y as resolveClaudeOpus55ModelIdentity } from "./src-VWy9E7DZ.mjs";
|
|
2
2
|
import { f as hasRuntimeContextMarker } from "./types-CQc6JNG4.mjs";
|
|
3
3
|
import { r as appendAssistantThinking } from "./event-stream-C5AbCAaZ.mjs";
|
|
4
4
|
import { a as asRecord, o as isRecord, r as asOptionalObjectRecord, s as readStringField } from "./record-coerce-CNDovvft.mjs";
|
|
5
5
|
import { i as normalizeOptionalLowercaseString, r as normalizeNullableString } from "./string-coerce-CtgOVOSv.mjs";
|
|
6
6
|
import { n as asNonNegativeFiniteNumber } from "./number-coercion-V8-BhME4.mjs";
|
|
7
|
-
import { N as isImageWithMediaPayload, O as calculateCost, S as resolveAnthropicThinkingEffort, g as applyClaudeRequestContract, h as ANTHROPIC_CLAUDE_CODE_VERSION, r as getAiTransportHost, u as STREAM_ERROR_FALLBACK_TEXT, v as defaultsClaudeAdaptiveThinking, w as usesClaudeFable5MessagesContract, x as requiresClaudeAdaptiveThinking, y as mapAnthropicStopReason } from "./host-
|
|
8
|
-
import "./text-signature-
|
|
7
|
+
import { N as isImageWithMediaPayload, O as calculateCost, S as resolveAnthropicThinkingEffort, g as applyClaudeRequestContract, h as ANTHROPIC_CLAUDE_CODE_VERSION, r as getAiTransportHost, u as STREAM_ERROR_FALLBACK_TEXT, v as defaultsClaudeAdaptiveThinking, w as usesClaudeFable5MessagesContract, x as requiresClaudeAdaptiveThinking, y as mapAnthropicStopReason } from "./host-u3o8XiAp.mjs";
|
|
8
|
+
import "./text-signature-D_vRrx-z.mjs";
|
|
9
9
|
import { n as estimateBase64DecodedBytes } from "./base64-C8CdcsjU.mjs";
|
|
10
|
-
import { a as resolveProviderRequestCapabilities, i as resolveProviderEndpoint } from "./host-policy-
|
|
10
|
+
import { a as resolveProviderRequestCapabilities, i as resolveProviderEndpoint } from "./host-policy-BwhNNGQR.mjs";
|
|
11
11
|
import { i as resolveCacheRetention } from "./cloudflare-5qSGvIUH.mjs";
|
|
12
|
-
import { C as parseJsonObjectPreservingUnsafeIntegers, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, P as sanitizeSurrogates, _ as sanitizeNonEmptyTransportPayloadText, b as transportAbortError, d as iterateModelStream, i as copyProviderAcceptanceObserver, l as finalizeTerminalToolCallArguments, r as coerceTransportToolCallArguments, v as sanitizeTransportPayloadText } from "./transport-stream-shared-
|
|
13
|
-
import { C as stripSystemPromptCacheBoundary, D as sortPromptCacheToolsByName, d as describeToolResultMediaPlaceholder, m as extractToolResultText, p as extractToolResultBlockText, t as adjustMaxTokensForThinking, w as stripSystemPromptRelocatableBoundary, x as splitSystemPromptCacheBoundary } from "./simple-options-
|
|
12
|
+
import { C as parseJsonObjectPreservingUnsafeIntegers, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, P as sanitizeSurrogates, _ as sanitizeNonEmptyTransportPayloadText, b as transportAbortError, d as iterateModelStream, i as copyProviderAcceptanceObserver, l as finalizeTerminalToolCallArguments, r as coerceTransportToolCallArguments, v as sanitizeTransportPayloadText } from "./transport-stream-shared-CCR7hSW0.mjs";
|
|
13
|
+
import { C as stripSystemPromptCacheBoundary, D as sortPromptCacheToolsByName, d as describeToolResultMediaPlaceholder, m as extractToolResultText, p as extractToolResultBlockText, t as adjustMaxTokensForThinking, w as stripSystemPromptRelocatableBoundary, x as splitSystemPromptCacheBoundary } from "./simple-options-7QuSKriJ.mjs";
|
|
14
14
|
import { t as parsePositiveInteger } from "./positive-integer-CwLi8LUL.mjs";
|
|
15
|
-
import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-
|
|
16
|
-
import { n as transformProviderMessages } from "./assistant-output-
|
|
15
|
+
import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-CO_Eplnc.mjs";
|
|
16
|
+
import { n as transformProviderMessages } from "./assistant-output-D5762GPH.mjs";
|
|
17
17
|
import { i as SCHEMA_MAP_KEYS, n as projectRuntimeToolInputSchema } from "./tool-schema-json-projection-Ct8SeBeJ.mjs";
|
|
18
|
-
import { i as tagPendingCommentaryText } from "./assistant-text-phase-
|
|
18
|
+
import { i as tagPendingCommentaryText } from "./assistant-text-phase-DVZOxbuR.mjs";
|
|
19
19
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-D8f_oxHj.mjs";
|
|
20
20
|
//#region packages/ai/src/providers/anthropic-auth-headers.ts
|
|
21
21
|
/** Inspect resolved credential shape for auth routing without exposing its value. */
|
|
@@ -126,19 +126,22 @@ function applyAnthropicFallbackBoundary(params) {
|
|
|
126
126
|
//#region packages/ai/src/transports/anthropic-payload-policy.ts
|
|
127
127
|
const ANTHROPIC_CACHE_CONTROL_LIMIT = 4;
|
|
128
128
|
const ANTHROPIC_COMPACT_THRESHOLD_MIN = 5e4;
|
|
129
|
+
const ANTHROPIC_COMPACTION_INSTRUCTIONS = "Summarize the transcript inside <summary></summary> tags. Include the current state, decisions, and next steps needed to continue the task in the next context window. Do not call any tools while writing this summary; respond with text only.";
|
|
129
130
|
/** Resolve the Anthropic input-token trigger, including the API's minimum. */
|
|
130
|
-
function resolveAnthropicCompactThreshold(
|
|
131
|
+
function resolveAnthropicCompactThreshold(model, configured) {
|
|
131
132
|
const configuredThreshold = parsePositiveInteger(configured);
|
|
132
133
|
if (configuredThreshold !== void 0) return Math.max(ANTHROPIC_COMPACT_THRESHOLD_MIN, configuredThreshold);
|
|
133
|
-
const
|
|
134
|
-
|
|
134
|
+
const contextTokens = parsePositiveInteger(model.contextTokens);
|
|
135
|
+
const contextWindow = parsePositiveInteger(model.contextWindow);
|
|
136
|
+
return Math.max(ANTHROPIC_COMPACT_THRESHOLD_MIN, Math.floor((contextTokens && contextWindow ? Math.min(contextTokens, contextWindow) : contextTokens ?? contextWindow ?? 0) * .7));
|
|
135
137
|
}
|
|
136
138
|
/** Resolve the server-compaction gate and effective threshold for an Anthropic route. */
|
|
137
139
|
function resolveAnthropicServerCompactionPlan(model, extraParams, apiKey) {
|
|
138
|
-
const
|
|
140
|
+
const configured = extraParams?.anthropicServerCompaction;
|
|
141
|
+
const enabled = configured !== false && (configured === true || supportsClaudeServerCompaction(model)) && !isAnthropicOAuthApiKey(apiKey) && normalizeOptionalLowercaseString(model.api) === "anthropic-messages" && isDirectAnthropicModel(model);
|
|
139
142
|
return {
|
|
140
143
|
enabled,
|
|
141
|
-
...enabled ? { threshold: resolveAnthropicCompactThreshold(model
|
|
144
|
+
...enabled ? { threshold: resolveAnthropicCompactThreshold(model, extraParams?.anthropicCompactThreshold) } : {}
|
|
142
145
|
};
|
|
143
146
|
}
|
|
144
147
|
function isDirectAnthropicModel(model, env = process.env) {
|
|
@@ -264,44 +267,29 @@ function stripAnthropicSystemPromptBoundary(system) {
|
|
|
264
267
|
/** Apply one shared deepest-stable-message cache breakpoint policy. */
|
|
265
268
|
function applyAnthropicCacheControlToMessages(messages, cacheControl, markerLimit, cacheBreakpointOptOutMessageIndexes) {
|
|
266
269
|
if (!Array.isArray(messages) || messages.length === 0 || markerLimit <= 0) return;
|
|
267
|
-
let
|
|
268
|
-
for (
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
const record =
|
|
272
|
-
if (record.role !== "user"
|
|
270
|
+
let stableEnd = messages.length;
|
|
271
|
+
for (const index of cacheBreakpointOptOutMessageIndexes) stableEnd = Math.min(stableEnd, index);
|
|
272
|
+
let marked = 0;
|
|
273
|
+
for (let i = stableEnd - 1; i >= 0 && marked < Math.min(markerLimit, 2); i--) {
|
|
274
|
+
const record = messages[i];
|
|
275
|
+
if (!isRecord(record) || record.role !== "user") continue;
|
|
273
276
|
const content = record.content;
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
}];
|
|
284
|
-
if (fallbackToolResult && markerLimit > 1) fallbackToolResult.cache_control = cacheControl;
|
|
285
|
-
return;
|
|
286
|
-
}
|
|
287
|
-
if (!Array.isArray(content)) continue;
|
|
288
|
-
for (let j = content.length - 1; j >= 0; j--) {
|
|
289
|
-
const block = content[j];
|
|
290
|
-
if (!block || typeof block !== "object") continue;
|
|
291
|
-
const blockRecord = block;
|
|
292
|
-
if (blockRecord.type === "text" || blockRecord.type === "image") {
|
|
293
|
-
if (fallbackToolResult && markerLimit === 1) {
|
|
294
|
-
fallbackToolResult.cache_control = cacheControl;
|
|
295
|
-
return;
|
|
296
|
-
}
|
|
277
|
+
const blocks = typeof content === "string" ? [{
|
|
278
|
+
type: "text",
|
|
279
|
+
text: content
|
|
280
|
+
}] : content;
|
|
281
|
+
if (!Array.isArray(blocks)) continue;
|
|
282
|
+
for (let j = blocks.length - 1; j >= 0; j--) {
|
|
283
|
+
const blockRecord = blocks[j];
|
|
284
|
+
if (!isRecord(blockRecord)) continue;
|
|
285
|
+
if (blockRecord.type === "text" || blockRecord.type === "image" || blockRecord.type === "tool_result") {
|
|
297
286
|
blockRecord.cache_control = cacheControl;
|
|
298
|
-
if (
|
|
299
|
-
|
|
287
|
+
if (typeof content === "string") record.content = blocks;
|
|
288
|
+
marked++;
|
|
289
|
+
break;
|
|
300
290
|
}
|
|
301
|
-
if (blockRecord.type === "tool_result" && fallbackToolResult === void 0) fallbackToolResult = blockRecord;
|
|
302
291
|
}
|
|
303
292
|
}
|
|
304
|
-
if (fallbackToolResult) fallbackToolResult.cache_control = cacheControl;
|
|
305
293
|
}
|
|
306
294
|
function countAnthropicCacheControlMarkers(blocks) {
|
|
307
295
|
if (!Array.isArray(blocks)) return 0;
|
|
@@ -322,7 +310,7 @@ function resolveAnthropicPayloadPolicy(input, model) {
|
|
|
322
310
|
return {
|
|
323
311
|
allowsServiceTier: capabilities.allowsAnthropicServiceTier,
|
|
324
312
|
cacheControl: input.enableCacheControl === true ? resolveAnthropicEphemeralCacheControl(input.baseUrl, input.cacheRetention) : void 0,
|
|
325
|
-
compactThreshold: serverCompactionPlan.threshold ?? resolveAnthropicCompactThreshold(input
|
|
313
|
+
compactThreshold: serverCompactionPlan.threshold ?? resolveAnthropicCompactThreshold(input, input.extraParams?.anthropicCompactThreshold),
|
|
326
314
|
serviceTier: input.serviceTier,
|
|
327
315
|
useServerCompaction: input.enableServerCompaction === true && serverCompactionPlan.enabled,
|
|
328
316
|
...input.cacheTtlPruning && normalizeOptionalLowercaseString(input.api) === "anthropic-messages" && isDirectAnthropicModel(input) ? { toolClearing: {
|
|
@@ -375,7 +363,8 @@ function applyAnthropicContextManagementEdits(payload, policy) {
|
|
|
375
363
|
trigger: {
|
|
376
364
|
type: "input_tokens",
|
|
377
365
|
value: policy.compactThreshold
|
|
378
|
-
}
|
|
366
|
+
},
|
|
367
|
+
instructions: ANTHROPIC_COMPACTION_INSTRUCTIONS
|
|
379
368
|
});
|
|
380
369
|
if (edits.length > 0) payload.context_management = { edits };
|
|
381
370
|
}
|
|
@@ -384,7 +373,7 @@ function applyAnthropicContextManagementToRequest(payload, model, options, direc
|
|
|
384
373
|
applyAnthropicContextManagementEdits(payload, resolveAnthropicPayloadPolicy({
|
|
385
374
|
...model,
|
|
386
375
|
api: "anthropic-messages",
|
|
387
|
-
enableServerCompaction: true,
|
|
376
|
+
enableServerCompaction: options?.anthropicServerCompaction === true,
|
|
388
377
|
extraParams: { ...options },
|
|
389
378
|
cacheTtlPruning: options?.cacheTtlPruning
|
|
390
379
|
}));
|
|
@@ -509,7 +498,11 @@ function captureAnthropicCompaction(output, capture, model, options) {
|
|
|
509
498
|
baseUrlHash: context.baseUrlHash
|
|
510
499
|
};
|
|
511
500
|
}
|
|
512
|
-
|
|
501
|
+
/**
|
|
502
|
+
* Record a rejected replay on the failed output and notify the transcript owner, which must
|
|
503
|
+
* durably strip the checkpoint: hosts may persist failed turns without their replay state.
|
|
504
|
+
*/
|
|
505
|
+
function suppressAnthropicCompaction(output, model, options, rejected) {
|
|
513
506
|
const context = buildProviderReplayContext(model, options);
|
|
514
507
|
if (!context.baseUrlHash) return;
|
|
515
508
|
output.providerReplay = {
|
|
@@ -519,6 +512,7 @@ function suppressAnthropicCompaction(output, model, options) {
|
|
|
519
512
|
...context,
|
|
520
513
|
baseUrlHash: context.baseUrlHash
|
|
521
514
|
};
|
|
515
|
+
options?.onCompactionRejected?.({ data: rejected.content });
|
|
522
516
|
}
|
|
523
517
|
function resolveNewestAnthropicCompaction(messages, model, options) {
|
|
524
518
|
const context = buildProviderReplayContext(model, options);
|
|
@@ -1191,7 +1185,7 @@ async function buildAnthropicRequest(model, context, options, profile, isOAuthTo
|
|
|
1191
1185
|
return {
|
|
1192
1186
|
params,
|
|
1193
1187
|
toolProjection,
|
|
1194
|
-
|
|
1188
|
+
replayedCompaction: replayPlan.compaction
|
|
1195
1189
|
};
|
|
1196
1190
|
}
|
|
1197
1191
|
/** Apply caller payload edits before restoring required request contracts and beta headers. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./index-
|
|
1
|
+
import "./index-D27wAoOr.mjs";
|
|
2
2
|
import { Q as SimpleStreamOptions, n as Api, nt as StreamOptions, tt as StreamFunction } from "./types-DvzmWW8J.mjs";
|
|
3
3
|
//#region packages/ai/src/api-registry.d.ts
|
|
4
4
|
/** Runtime stream adapter signature stored in the API provider registry. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as transformMessages } from "./host-
|
|
2
|
-
import { a as createEmptyTransportUsage } from "./transport-stream-shared-
|
|
1
|
+
import { c as transformMessages } from "./host-u3o8XiAp.mjs";
|
|
2
|
+
import { a as createEmptyTransportUsage } from "./transport-stream-shared-CCR7hSW0.mjs";
|
|
3
3
|
//#region packages/ai/src/provider-transcript-transform.ts
|
|
4
4
|
const IMAGE_OMISSION = "(image omitted: model does not support images)";
|
|
5
5
|
const VIDEO_OMISSION = "(video omitted: provider does not support video input)";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as encodeTextSignatureV1 } from "./text-signature-
|
|
1
|
+
import { t as encodeTextSignatureV1 } from "./text-signature-D_vRrx-z.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
//#region packages/ai/src/utils/assistant-text-phase.ts
|
|
4
4
|
const EMPTY_ASSISTANT_TEXT_BLOCK_SET = /* @__PURE__ */ new Set();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as AssistantMessageEventStream } from "./event-stream-C5AbCAaZ.mjs";
|
|
2
|
-
import { r as getAiTransportHost } from "./host-
|
|
3
|
-
import { n as buildBaseOptions } from "./simple-options-
|
|
4
|
-
import { g as resolveOpenAISimpleReasoningEffort, k as resolvePromptCacheKey } from "./openai-transport-params-
|
|
2
|
+
import { r as getAiTransportHost } from "./host-u3o8XiAp.mjs";
|
|
3
|
+
import { n as buildBaseOptions } from "./simple-options-7QuSKriJ.mjs";
|
|
4
|
+
import { g as resolveOpenAISimpleReasoningEffort, k as resolvePromptCacheKey } from "./openai-transport-params-D7JMUPjf.mjs";
|
|
5
5
|
import { n as getEnvApiKey } from "./env-api-keys-CyX4VKGO.mjs";
|
|
6
|
-
import { t as createAssistantOutput } from "./assistant-output-
|
|
7
|
-
import { P as convertProviderResponsesMessages, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams } from "./openai-responses-shared-
|
|
6
|
+
import { t as createAssistantOutput } from "./assistant-output-D5762GPH.mjs";
|
|
7
|
+
import { P as convertProviderResponsesMessages, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams } from "./openai-responses-shared-CKNmC3vC.mjs";
|
|
8
8
|
import { i as resolveAzureDeploymentNameFromMap, n as isTraditionalAzureOpenAIHost, t as isOpenAICompatibleAzureResponsesBaseUrl } from "./azure-openai-responses-client-compat-D0dvJMbZ.mjs";
|
|
9
9
|
import { t as requireApiKey } from "./required-api-key-D4kn3252.mjs";
|
|
10
10
|
import OpenAI, { AzureOpenAI } from "openai";
|
package/dist/diagnostics.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as ProviderRefusalReview, o as readProviderRefusalReview } from "./index-
|
|
1
|
+
import { a as ProviderRefusalReview, o as readProviderRefusalReview } from "./index-D27wAoOr.mjs";
|
|
2
2
|
import { At as extractDiagnosticError, Dt as DiagnosticErrorInfo, Et as AssistantMessageDiagnostic, Mt as isProviderRefusalAssistantError, Ot as appendAssistantMessageDiagnostic, a as AssistantMessage, jt as formatThrownValue, kt as createAssistantMessageDiagnostic } from "./types-DvzmWW8J.mjs";
|
|
3
|
-
import "./types-
|
|
4
|
-
import { n as isResponsesOutputLimitToolCallError } from "./openai-responses-terminal-usage-
|
|
3
|
+
import "./types-UlNana-2.mjs";
|
|
4
|
+
import { n as isResponsesOutputLimitToolCallError } from "./openai-responses-terminal-usage-CempLedn.mjs";
|
|
5
5
|
import { n as ProviderErrorRedactor, r as configureProviderErrorRedactor } from "./provider-error-xumb1V3F.mjs";
|
|
6
6
|
import { r as projectDiagnosticValue, t as DiagnosticProjectionPolicy } from "./credential-redaction-BKv49aiv.mjs";
|
|
7
7
|
import { n as formatModelTransportDebugUrl, r as emitModelTransportDebug, t as formatModelTransportDebugBaseUrl } from "./model-transport-url-C5f59L3Y.mjs";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as AssistantMessageEventStream } from "./event-stream-C5AbCAaZ.mjs";
|
|
2
|
-
import { a as resolveAiTransportHeaderSentinels, r as getAiTransportHost } from "./host-
|
|
3
|
-
import { n as buildManagedModelFetch } from "./host-policy-
|
|
4
|
-
import { f as mergeTransportHeaders } from "./transport-stream-shared-
|
|
5
|
-
import { n as buildBaseOptions } from "./simple-options-
|
|
2
|
+
import { a as resolveAiTransportHeaderSentinels, r as getAiTransportHost } from "./host-u3o8XiAp.mjs";
|
|
3
|
+
import { n as buildManagedModelFetch } from "./host-policy-BwhNNGQR.mjs";
|
|
4
|
+
import { f as mergeTransportHeaders } from "./transport-stream-shared-CCR7hSW0.mjs";
|
|
5
|
+
import { n as buildBaseOptions } from "./simple-options-7QuSKriJ.mjs";
|
|
6
6
|
import { n as getEnvApiKey } from "./env-api-keys-CyX4VKGO.mjs";
|
|
7
|
-
import { t as createAssistantOutput } from "./assistant-output-
|
|
7
|
+
import { t as createAssistantOutput } from "./assistant-output-D5762GPH.mjs";
|
|
8
8
|
import { n as resolveOpencodeSessionHeaders } from "./session-affinity-DA4WHv1h.mjs";
|
|
9
9
|
import { t as requireApiKey } from "./required-api-key-D4kn3252.mjs";
|
|
10
|
-
import { i as runGoogleGenerateContentLifecycle, r as buildGoogleSimpleThinking, t as buildGoogleGenerateContentParams } from "./google-shared-
|
|
10
|
+
import { i as runGoogleGenerateContentLifecycle, r as buildGoogleSimpleThinking, t as buildGoogleGenerateContentParams } from "./google-shared-V8jogVPq.mjs";
|
|
11
11
|
import { GoogleGenAI } from "@google/genai";
|
|
12
12
|
//#region packages/ai/src/providers/google.ts
|
|
13
13
|
let toolCallCounter = 0;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as AssistantMessageEventStream } from "./event-stream-C5AbCAaZ.mjs";
|
|
2
2
|
import { a as asRecord, i as asOptionalRecord, s as readStringField } from "./record-coerce-CNDovvft.mjs";
|
|
3
|
-
import { O as calculateCost, a as resolveAiTransportHeaderSentinels, r as getAiTransportHost } from "./host-
|
|
4
|
-
import { t as buildGuardedModelFetch } from "./host-policy-
|
|
5
|
-
import { P as sanitizeSurrogates, b as transportAbortError, c as failTransportStream, g as parseTerminalToolCallArguments, h as notifyProviderStreamOpened, m as notifyProviderHttpResponse, w as parseJsonPreservingUnsafeIntegers } from "./transport-stream-shared-
|
|
6
|
-
import { C as stripSystemPromptCacheBoundary, n as buildBaseOptions } from "./simple-options-
|
|
3
|
+
import { O as calculateCost, a as resolveAiTransportHeaderSentinels, r as getAiTransportHost } from "./host-u3o8XiAp.mjs";
|
|
4
|
+
import { t as buildGuardedModelFetch } from "./host-policy-BwhNNGQR.mjs";
|
|
5
|
+
import { P as sanitizeSurrogates, b as transportAbortError, c as failTransportStream, g as parseTerminalToolCallArguments, h as notifyProviderStreamOpened, m as notifyProviderHttpResponse, w as parseJsonPreservingUnsafeIntegers } from "./transport-stream-shared-CCR7hSW0.mjs";
|
|
6
|
+
import { C as stripSystemPromptCacheBoundary, n as buildBaseOptions } from "./simple-options-7QuSKriJ.mjs";
|
|
7
7
|
import { n as getEnvApiKey } from "./env-api-keys-CyX4VKGO.mjs";
|
|
8
|
-
import { n as transformProviderMessages, t as createAssistantOutput } from "./assistant-output-
|
|
9
|
-
import { n as buildGoogleInteractionsSimpleThinking } from "./google-shared-
|
|
8
|
+
import { n as transformProviderMessages, t as createAssistantOutput } from "./assistant-output-D5762GPH.mjs";
|
|
9
|
+
import { n as buildGoogleInteractionsSimpleThinking } from "./google-shared-V8jogVPq.mjs";
|
|
10
10
|
import { createRequire } from "node:module";
|
|
11
11
|
//#region packages/ai/src/providers/google-interactions-request.ts
|
|
12
12
|
const DEFAULT_GOOGLE_API_BASE_URL = "https://generativelanguage.googleapis.com";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as appendAssistantThinking } from "./event-stream-C5AbCAaZ.mjs";
|
|
2
|
-
import { N as isImageWithMediaPayload, O as calculateCost } from "./host-
|
|
3
|
-
import { P as sanitizeSurrogates, a as createEmptyTransportUsage, b as transportAbortError, r as coerceTransportToolCallArguments, v as sanitizeTransportPayloadText } from "./transport-stream-shared-
|
|
4
|
-
import { D as sortPromptCacheToolsByName, d as describeToolResultMediaPlaceholder, m as extractToolResultText } from "./simple-options-
|
|
2
|
+
import { N as isImageWithMediaPayload, O as calculateCost } from "./host-u3o8XiAp.mjs";
|
|
3
|
+
import { P as sanitizeSurrogates, a as createEmptyTransportUsage, b as transportAbortError, r as coerceTransportToolCallArguments, v as sanitizeTransportPayloadText } from "./transport-stream-shared-CCR7hSW0.mjs";
|
|
4
|
+
import { D as sortPromptCacheToolsByName, d as describeToolResultMediaPlaceholder, m as extractToolResultText } from "./simple-options-7QuSKriJ.mjs";
|
|
5
5
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-D8f_oxHj.mjs";
|
|
6
6
|
//#region packages/ai/src/transports/google-thinking-level.ts
|
|
7
7
|
/** Returns whether a Gemini Flash model accepts the MINIMAL thinking level. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { k as clampThinkingLevel } from "./host-
|
|
2
|
-
import { P as sanitizeSurrogates, b as transportAbortError, c as failTransportStream, h as notifyProviderStreamOpened } from "./transport-stream-shared-
|
|
3
|
-
import { C as stripSystemPromptCacheBoundary } from "./simple-options-
|
|
4
|
-
import { n as transformProviderMessages } from "./assistant-output-
|
|
5
|
-
import { a as googleFlashSupportsMinimalThinking, i as consumeGoogleGenerateContentStream, n as projectGoogleMessages, r as requiresGoogleToolCallId, t as convertGoogleTools } from "./google-messages-
|
|
1
|
+
import { k as clampThinkingLevel } from "./host-u3o8XiAp.mjs";
|
|
2
|
+
import { P as sanitizeSurrogates, b as transportAbortError, c as failTransportStream, h as notifyProviderStreamOpened } from "./transport-stream-shared-CCR7hSW0.mjs";
|
|
3
|
+
import { C as stripSystemPromptCacheBoundary } from "./simple-options-7QuSKriJ.mjs";
|
|
4
|
+
import { n as transformProviderMessages } from "./assistant-output-D5762GPH.mjs";
|
|
5
|
+
import { a as googleFlashSupportsMinimalThinking, i as consumeGoogleGenerateContentStream, n as projectGoogleMessages, r as requiresGoogleToolCallId, t as convertGoogleTools } from "./google-messages-l7wgIF5I.mjs";
|
|
6
6
|
import { FunctionCallingConfigMode, ThinkingLevel } from "@google/genai";
|
|
7
7
|
//#region packages/ai/src/providers/google-shared.ts
|
|
8
8
|
function convertMessages(model, context) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as AssistantMessageEventStream } from "./event-stream-C5AbCAaZ.mjs";
|
|
2
2
|
import { a as normalizeOptionalString } from "./string-coerce-CtgOVOSv.mjs";
|
|
3
|
-
import { a as resolveAiTransportHeaderSentinels, r as getAiTransportHost } from "./host-
|
|
4
|
-
import { n as buildManagedModelFetch } from "./host-policy-
|
|
5
|
-
import { n as buildBaseOptions } from "./simple-options-
|
|
6
|
-
import { t as createAssistantOutput } from "./assistant-output-
|
|
7
|
-
import { i as runGoogleGenerateContentLifecycle, r as buildGoogleSimpleThinking, t as buildGoogleGenerateContentParams } from "./google-shared-
|
|
3
|
+
import { a as resolveAiTransportHeaderSentinels, r as getAiTransportHost } from "./host-u3o8XiAp.mjs";
|
|
4
|
+
import { n as buildManagedModelFetch } from "./host-policy-BwhNNGQR.mjs";
|
|
5
|
+
import { n as buildBaseOptions } from "./simple-options-7QuSKriJ.mjs";
|
|
6
|
+
import { t as createAssistantOutput } from "./assistant-output-D5762GPH.mjs";
|
|
7
|
+
import { i as runGoogleGenerateContentLifecycle, r as buildGoogleSimpleThinking, t as buildGoogleGenerateContentParams } from "./google-shared-V8jogVPq.mjs";
|
|
8
8
|
import { GoogleGenAI, ResourceScope } from "@google/genai";
|
|
9
9
|
//#region packages/ai/src/providers/google-vertex.ts
|
|
10
10
|
const API_VERSION = "v1";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./index-
|
|
1
|
+
import "./index-D27wAoOr.mjs";
|
|
2
2
|
import { d as Context, et as StreamFn, k as Model, n as Api } from "./types-DvzmWW8J.mjs";
|
|
3
|
-
import { n as ApiRegistry } from "./api-registry-
|
|
3
|
+
import { n as ApiRegistry } from "./api-registry-B3rC2qu3.mjs";
|
|
4
4
|
//#region packages/ai/src/host.d.ts
|
|
5
5
|
/** Provider capability facts needed by the package-owned transports. */
|
|
6
6
|
interface AiProviderRequestCapabilities {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as getAiTransportHost } from "./host-
|
|
1
|
+
import { r as getAiTransportHost } from "./host-u3o8XiAp.mjs";
|
|
2
2
|
//#region packages/ai/src/transports/host-policy.ts
|
|
3
3
|
function buildGuardedModelFetch(model, timeoutMs, options) {
|
|
4
4
|
const host = getAiTransportHost();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as supportsClaudeNativeMaxEffort, O as supportsClaudeNativeXhighEffort, S as resolveClaudeSonnet5ModelIdentity, _ as resolveClaudeMythos5ModelIdentity, a as CLAUDE_HAIKU_55_THINKING_PROFILE, b as resolveClaudeOpus5ModelIdentity, c as CLAUDE_SONNET_55_THINKING_PROFILE, f as requiresClaudeDefaultSampling, h as resolveClaudeHaiku55ModelIdentity, i as CLAUDE_FABLE_5_THINKING_PROFILE, m as resolveClaudeFable5ModelIdentity, o as CLAUDE_OPUS_55_THINKING_PROFILE, p as requiresClaudeMandatoryAdaptiveThinking, t as calculateUsageCost, v as resolveClaudeNativeThinkingLevelMap, x as resolveClaudeSonnet55ModelIdentity, y as resolveClaudeOpus55ModelIdentity } from "./src-
|
|
1
|
+
import { D as supportsClaudeNativeMaxEffort, O as supportsClaudeNativeXhighEffort, S as resolveClaudeSonnet5ModelIdentity, _ as resolveClaudeMythos5ModelIdentity, a as CLAUDE_HAIKU_55_THINKING_PROFILE, b as resolveClaudeOpus5ModelIdentity, c as CLAUDE_SONNET_55_THINKING_PROFILE, f as requiresClaudeDefaultSampling, h as resolveClaudeHaiku55ModelIdentity, i as CLAUDE_FABLE_5_THINKING_PROFILE, m as resolveClaudeFable5ModelIdentity, o as CLAUDE_OPUS_55_THINKING_PROFILE, p as requiresClaudeMandatoryAdaptiveThinking, t as calculateUsageCost, v as resolveClaudeNativeThinkingLevelMap, x as resolveClaudeSonnet55ModelIdentity, y as resolveClaudeOpus55ModelIdentity } from "./src-VWy9E7DZ.mjs";
|
|
2
2
|
import { t as DEFAULT_MISSING_TOOL_RESULT_TEXT } from "./types-CQc6JNG4.mjs";
|
|
3
3
|
import { i as asOptionalRecord, o as isRecord } from "./record-coerce-CNDovvft.mjs";
|
|
4
4
|
import { n as normalizeLowercaseStringOrEmpty } from "./string-coerce-CtgOVOSv.mjs";
|
|
@@ -142,6 +142,8 @@ declare function resolveClaudeOpus55ModelIdentity(ref: ClaudeModelRef): string |
|
|
|
142
142
|
declare function supportsClaudeAdaptiveThinking(ref: ClaudeModelRef): boolean;
|
|
143
143
|
/** Return whether a Claude model has a native 1M-token context window. */
|
|
144
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;
|
|
145
147
|
/** Return whether a Claude model supports Anthropic's native fast mode. */
|
|
146
148
|
declare function supportsClaudeFastMode(ref: ClaudeModelRef): boolean;
|
|
147
149
|
/** Return whether a Claude model supports native max effort. */
|
|
@@ -174,7 +176,7 @@ declare function normalizeResolvedPricing(cost: Partial<RawModelCostConfig>): Mo
|
|
|
174
176
|
/** Price one model call, selecting its tier before billing the separate token buckets. */
|
|
175
177
|
declare function calculateUsageCost(usage: Partial<Pick<Usage, "input" | "output" | "cacheRead" | "cacheWrite" | "cacheWrite1h">>, pricing: RawModelCostConfig): Usage["cost"];
|
|
176
178
|
declare namespace index_d_exports {
|
|
177
|
-
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, 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, validateToolArguments, validateToolCall };
|
|
179
|
+
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, 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 };
|
|
178
180
|
}
|
|
179
181
|
//#endregion
|
|
180
|
-
export { supportsClaudeNativeMaxEffort as A, resolveClaudeOpus5ModelIdentity as C, supportsClaudeAdaptiveThinking as D, supportsClaude1MContext as E, supportsClaudeFastMode as O, resolveClaudeOpus55ModelIdentity as S, resolveClaudeSonnet5ModelIdentity as T, resolveClaudeFable5ModelIdentity as _, ProviderRefusalReview as a, resolveClaudeMythos5ModelIdentity as b, CLAUDE_HAIKU_55_THINKING_PROFILE as c, CLAUDE_SONNET_55_THINKING_PROFILE as d, CLAUDE_SONNET_5_THINKING_PROFILE as f, requiresClaudeMandatoryAdaptiveThinking as g, requiresClaudeDefaultSampling as h, normalizeResolvedPricing as i, supportsClaudeNativeXhighEffort as j, supportsClaudeInHistorySystemMessages as k, CLAUDE_OPUS_55_THINKING_PROFILE as l, requiresClaudeBetweenToolsThinking as m, calculateUsageCost as n, readProviderRefusalReview as o, bindsClaudeThinkingPrefix as p, normalizeModelCostConfig as r, CLAUDE_FABLE_5_THINKING_PROFILE as s, index_d_exports as t, CLAUDE_OPUS_5_THINKING_PROFILE as u, resolveClaudeHaiku55ModelIdentity as v, resolveClaudeSonnet55ModelIdentity as w, resolveClaudeNativeThinkingLevelMap as x, resolveClaudeModelIdentity as y };
|
|
182
|
+
export { supportsClaudeNativeMaxEffort as A, resolveClaudeOpus5ModelIdentity as C, supportsClaudeAdaptiveThinking as D, supportsClaude1MContext as E, supportsClaudeServerCompaction as M, supportsClaudeFastMode as O, resolveClaudeOpus55ModelIdentity as S, resolveClaudeSonnet5ModelIdentity as T, resolveClaudeFable5ModelIdentity as _, ProviderRefusalReview as a, resolveClaudeMythos5ModelIdentity as b, CLAUDE_HAIKU_55_THINKING_PROFILE as c, CLAUDE_SONNET_55_THINKING_PROFILE as d, CLAUDE_SONNET_5_THINKING_PROFILE as f, requiresClaudeMandatoryAdaptiveThinking as g, requiresClaudeDefaultSampling as h, normalizeResolvedPricing as i, supportsClaudeNativeXhighEffort as j, supportsClaudeInHistorySystemMessages as k, CLAUDE_OPUS_55_THINKING_PROFILE as l, requiresClaudeBetweenToolsThinking as m, calculateUsageCost as n, readProviderRefusalReview as o, bindsClaudeThinkingPrefix as p, normalizeModelCostConfig as r, CLAUDE_FABLE_5_THINKING_PROFILE as s, index_d_exports as t, CLAUDE_OPUS_5_THINKING_PROFILE as u, resolveClaudeHaiku55ModelIdentity as v, resolveClaudeSonnet55ModelIdentity as w, resolveClaudeNativeThinkingLevelMap as x, resolveClaudeModelIdentity as y };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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, 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-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 RegisteredApiProvider, i as ApiStreamSimpleFunction, n as ApiRegistry, o as createApiRegistry, r as ApiStreamFunction, t as ApiProvider } from "./api-registry-
|
|
6
|
-
import { _ as supportsScopedAiTransportHosts, a as AiProviderRequestPolicyInput, c as AiTransportHost, d as configureAiTransportHost, f as createAiTransportHost, g as runWithAiTransportHost, h as resolveAiTransportHeaderSentinels, i as AiProviderRequestCapabilities, l as AiTransportPluginHost, m as getDefaultAiTransportHost, n as AiInlineImageBlock, o as AiProviderStreamHookContext, p as getAiTransportHost, r as AiInlineTextBlock, s as AiTransformTransportMessages, t as AiInlineContentBlock, u as OpenAIStrictToolSettingOptions } from "./host-
|
|
5
|
+
import { a as RegisteredApiProvider, i as ApiStreamSimpleFunction, n as ApiRegistry, o as createApiRegistry, r as ApiStreamFunction, t as ApiProvider } from "./api-registry-B3rC2qu3.mjs";
|
|
6
|
+
import { _ as supportsScopedAiTransportHosts, a as AiProviderRequestPolicyInput, c as AiTransportHost, d as configureAiTransportHost, f as createAiTransportHost, g as runWithAiTransportHost, h as resolveAiTransportHeaderSentinels, i as AiProviderRequestCapabilities, l as AiTransportPluginHost, m as getDefaultAiTransportHost, n as AiInlineImageBlock, o as AiProviderStreamHookContext, p as getAiTransportHost, r as AiInlineTextBlock, s as AiTransformTransportMessages, t as AiInlineContentBlock, u as OpenAIStrictToolSettingOptions } from "./host-DiPhRjrc.mjs";
|
|
7
7
|
//#region packages/ai/src/stream.d.ts
|
|
8
8
|
/** Creates an isolated LLM runtime backed by the supplied provider registry. */
|
|
9
9
|
export declare function createLlmRuntime(registry?: ApiRegistry): {
|
|
@@ -37,4 +37,4 @@ export declare function createNodeLlmRuntime(registry?: ApiRegistry, transportHo
|
|
|
37
37
|
};
|
|
38
38
|
export type LlmRuntime = ReturnType<typeof createLlmRuntime>;
|
|
39
39
|
//#endregion
|
|
40
|
-
export { AiInlineContentBlock, AiInlineImageBlock, AiInlineTextBlock, AiProviderRequestCapabilities, AiProviderRequestPolicyInput, AiProviderStreamHookContext, AiTransformTransportMessages, AiTransportHost, AiTransportPluginHost, AnthropicMessagesCompat, Api, ApiProvider, ApiRegistry, ApiStreamFunction, ApiStreamSimpleFunction, 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, OpenAIStrictToolSettingOptions, OpenRouterRouting, PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, PricingTier, Provider, ProviderImagesOptions, type ProviderRefusalReview, ProviderReplayState, ProviderResponse, ProviderStreamOptions, RUNTIME_CONTEXT_BEGIN_MARKER, RUNTIME_CONTEXT_CUSTOM_TYPE, RUNTIME_CONTEXT_END_MARKER, RUNTIME_CONTEXT_FOOTER, RUNTIME_CONTEXT_HEADER, RawModelCostConfig, RawPricingTier, RegisteredApiProvider, RuntimeContextMessage, SimpleStreamOptions, StopReason, StreamFn, StreamFunction, StreamOptions, TextContent, TextSignatureV1, ThinkingBudgets, ThinkingContent, ThinkingLevel, ThinkingLevelMap, Tool, ToolCall, ToolResultMessage, Transport, Usage, UserMessage, ValidateToolArgumentsFn, VercelGatewayRouting, appendAssistantMessageDiagnostic, bindsClaudeThinkingPrefix, calculateUsageCost, configureAiTransportHost, createAiTransportHost, createApiRegistry, createAssistantMessageDiagnostic, createAssistantMessageEventStream, escapeRuntimeContextFooter, extractDiagnosticError, formatThrownValue, getAiTransportHost, getDefaultAiTransportHost, hasLegacyRuntimeContextEnvelope, hasRuntimeContextMarker, isProviderRefusalAssistantError, isRuntimeContextMessage, labelRuntimeContextContent, labelRuntimeContextText, normalizeModelCostConfig, normalizeResolvedPricing, readProviderRefusalReview, readRuntimeContextMetadata, requiresClaudeBetweenToolsThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAiTransportHeaderSentinels, resolveClaudeFable5ModelIdentity, resolveClaudeHaiku55ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus55ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet55ModelIdentity, resolveClaudeSonnet5ModelIdentity, runWithAiTransportHost, runtimeContextContentToText, setRuntimeContextRetention, supportsClaude1MContext, supportsClaudeAdaptiveThinking, supportsClaudeFastMode, supportsClaudeInHistorySystemMessages, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, supportsScopedAiTransportHosts, validateToolArguments, validateToolCall };
|
|
40
|
+
export { AiInlineContentBlock, AiInlineImageBlock, AiInlineTextBlock, AiProviderRequestCapabilities, AiProviderRequestPolicyInput, AiProviderStreamHookContext, AiTransformTransportMessages, AiTransportHost, AiTransportPluginHost, AnthropicMessagesCompat, Api, ApiProvider, ApiRegistry, ApiStreamFunction, ApiStreamSimpleFunction, 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, OpenAIStrictToolSettingOptions, OpenRouterRouting, PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, PricingTier, Provider, ProviderImagesOptions, type ProviderRefusalReview, ProviderReplayState, ProviderResponse, ProviderStreamOptions, RUNTIME_CONTEXT_BEGIN_MARKER, RUNTIME_CONTEXT_CUSTOM_TYPE, RUNTIME_CONTEXT_END_MARKER, RUNTIME_CONTEXT_FOOTER, RUNTIME_CONTEXT_HEADER, RawModelCostConfig, RawPricingTier, RegisteredApiProvider, RuntimeContextMessage, SimpleStreamOptions, StopReason, StreamFn, StreamFunction, StreamOptions, TextContent, TextSignatureV1, ThinkingBudgets, ThinkingContent, ThinkingLevel, ThinkingLevelMap, Tool, ToolCall, ToolResultMessage, Transport, Usage, UserMessage, ValidateToolArgumentsFn, VercelGatewayRouting, appendAssistantMessageDiagnostic, bindsClaudeThinkingPrefix, calculateUsageCost, configureAiTransportHost, createAiTransportHost, createApiRegistry, createAssistantMessageDiagnostic, createAssistantMessageEventStream, escapeRuntimeContextFooter, extractDiagnosticError, formatThrownValue, getAiTransportHost, getDefaultAiTransportHost, hasLegacyRuntimeContextEnvelope, hasRuntimeContextMarker, isProviderRefusalAssistantError, isRuntimeContextMessage, labelRuntimeContextContent, labelRuntimeContextText, normalizeModelCostConfig, normalizeResolvedPricing, readProviderRefusalReview, readRuntimeContextMetadata, requiresClaudeBetweenToolsThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAiTransportHeaderSentinels, resolveClaudeFable5ModelIdentity, resolveClaudeHaiku55ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus55ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet55ModelIdentity, resolveClaudeSonnet5ModelIdentity, runWithAiTransportHost, runtimeContextContentToText, setRuntimeContextRetention, supportsClaude1MContext, supportsClaudeAdaptiveThinking, supportsClaudeFastMode, supportsClaudeInHistorySystemMessages, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, supportsClaudeServerCompaction, supportsScopedAiTransportHosts, validateToolArguments, validateToolCall };
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as supportsClaude1MContext, D as supportsClaudeNativeMaxEffort, E as supportsClaudeInHistorySystemMessages, O as supportsClaudeNativeXhighEffort, S as resolveClaudeSonnet5ModelIdentity, T as supportsClaudeFastMode, _ as resolveClaudeMythos5ModelIdentity, a as CLAUDE_HAIKU_55_THINKING_PROFILE, b as resolveClaudeOpus5ModelIdentity, c as CLAUDE_SONNET_55_THINKING_PROFILE, d as requiresClaudeBetweenToolsThinking, f as requiresClaudeDefaultSampling, g as resolveClaudeModelIdentity, h as resolveClaudeHaiku55ModelIdentity, i as CLAUDE_FABLE_5_THINKING_PROFILE, l as CLAUDE_SONNET_5_THINKING_PROFILE, m as resolveClaudeFable5ModelIdentity, n as normalizeModelCostConfig, o as CLAUDE_OPUS_55_THINKING_PROFILE, p as requiresClaudeMandatoryAdaptiveThinking, r as normalizeResolvedPricing, s as CLAUDE_OPUS_5_THINKING_PROFILE, t as calculateUsageCost, u as bindsClaudeThinkingPrefix, v as resolveClaudeNativeThinkingLevelMap, w as supportsClaudeAdaptiveThinking, x as resolveClaudeSonnet55ModelIdentity, y as resolveClaudeOpus55ModelIdentity } from "./src-
|
|
1
|
+
import { C as supportsClaude1MContext, D as supportsClaudeNativeMaxEffort, E as supportsClaudeInHistorySystemMessages, O as supportsClaudeNativeXhighEffort, S as resolveClaudeSonnet5ModelIdentity, T as supportsClaudeFastMode, _ as resolveClaudeMythos5ModelIdentity, a as CLAUDE_HAIKU_55_THINKING_PROFILE, b as resolveClaudeOpus5ModelIdentity, c as CLAUDE_SONNET_55_THINKING_PROFILE, d as requiresClaudeBetweenToolsThinking, f as requiresClaudeDefaultSampling, g as resolveClaudeModelIdentity, h as resolveClaudeHaiku55ModelIdentity, i as CLAUDE_FABLE_5_THINKING_PROFILE, k as supportsClaudeServerCompaction, l as CLAUDE_SONNET_5_THINKING_PROFILE, m as resolveClaudeFable5ModelIdentity, n as normalizeModelCostConfig, o as CLAUDE_OPUS_55_THINKING_PROFILE, p as requiresClaudeMandatoryAdaptiveThinking, r as normalizeResolvedPricing, s as CLAUDE_OPUS_5_THINKING_PROFILE, t as calculateUsageCost, u as bindsClaudeThinkingPrefix, v as resolveClaudeNativeThinkingLevelMap, w as supportsClaudeAdaptiveThinking, x as resolveClaudeSonnet55ModelIdentity, y as resolveClaudeOpus55ModelIdentity } from "./src-VWy9E7DZ.mjs";
|
|
2
2
|
import { _ as runtimeContextContentToText, a as RUNTIME_CONTEXT_BEGIN_MARKER, c as RUNTIME_CONTEXT_FOOTER, d as hasLegacyRuntimeContextEnvelope, f as hasRuntimeContextMarker, g as readRuntimeContextMetadata, h as labelRuntimeContextText, i as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, l as RUNTIME_CONTEXT_HEADER, m as labelRuntimeContextContent, n as MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, o as RUNTIME_CONTEXT_CUSTOM_TYPE, p as isRuntimeContextMessage, r as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, s as RUNTIME_CONTEXT_END_MARKER, t as DEFAULT_MISSING_TOOL_RESULT_TEXT, u as escapeRuntimeContextFooter, v as setRuntimeContextRetention } from "./types-CQc6JNG4.mjs";
|
|
3
3
|
import { a as isProviderRefusalAssistantError, i as formatThrownValue, n as createAssistantMessageDiagnostic, o as readProviderRefusalReview, r as extractDiagnosticError, t as appendAssistantMessageDiagnostic } from "./diagnostics-DzrF1h4J.mjs";
|
|
4
4
|
import { a as createAssistantMessageEventStream, n as EventStream, t as AssistantMessageEventStream } from "./event-stream-C5AbCAaZ.mjs";
|
|
5
5
|
import { n as validateToolCall, t as validateToolArguments } from "./validation-DbqlIfDn.mjs";
|
|
6
|
-
import { n as createNodeLlmRuntime, r as createApiRegistry, t as createLlmRuntime } from "./stream-
|
|
7
|
-
import { a as resolveAiTransportHeaderSentinels, i as getDefaultAiTransportHost, n as createAiTransportHost, o as runWithAiTransportHost, r as getAiTransportHost, s as supportsScopedAiTransportHosts, t as configureAiTransportHost } from "./host-
|
|
8
|
-
export { AssistantMessageEventStream, 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, DEFAULT_MISSING_TOOL_RESULT_TEXT, EventStream, MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, RUNTIME_CONTEXT_BEGIN_MARKER, RUNTIME_CONTEXT_CUSTOM_TYPE, RUNTIME_CONTEXT_END_MARKER, RUNTIME_CONTEXT_FOOTER, RUNTIME_CONTEXT_HEADER, appendAssistantMessageDiagnostic, bindsClaudeThinkingPrefix, calculateUsageCost, configureAiTransportHost, createAiTransportHost, createApiRegistry, createAssistantMessageDiagnostic, createAssistantMessageEventStream, createLlmRuntime, createNodeLlmRuntime, escapeRuntimeContextFooter, extractDiagnosticError, formatThrownValue, getAiTransportHost, getDefaultAiTransportHost, hasLegacyRuntimeContextEnvelope, hasRuntimeContextMarker, isProviderRefusalAssistantError, isRuntimeContextMessage, labelRuntimeContextContent, labelRuntimeContextText, normalizeModelCostConfig, normalizeResolvedPricing, readProviderRefusalReview, readRuntimeContextMetadata, requiresClaudeBetweenToolsThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAiTransportHeaderSentinels, resolveClaudeFable5ModelIdentity, resolveClaudeHaiku55ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus55ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet55ModelIdentity, resolveClaudeSonnet5ModelIdentity, runWithAiTransportHost, runtimeContextContentToText, setRuntimeContextRetention, supportsClaude1MContext, supportsClaudeAdaptiveThinking, supportsClaudeFastMode, supportsClaudeInHistorySystemMessages, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, supportsScopedAiTransportHosts, validateToolArguments, validateToolCall };
|
|
6
|
+
import { n as createNodeLlmRuntime, r as createApiRegistry, t as createLlmRuntime } from "./stream-DFaRxi2D.mjs";
|
|
7
|
+
import { a as resolveAiTransportHeaderSentinels, i as getDefaultAiTransportHost, n as createAiTransportHost, o as runWithAiTransportHost, r as getAiTransportHost, s as supportsScopedAiTransportHosts, t as configureAiTransportHost } from "./host-u3o8XiAp.mjs";
|
|
8
|
+
export { AssistantMessageEventStream, 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, DEFAULT_MISSING_TOOL_RESULT_TEXT, EventStream, MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, RUNTIME_CONTEXT_BEGIN_MARKER, RUNTIME_CONTEXT_CUSTOM_TYPE, RUNTIME_CONTEXT_END_MARKER, RUNTIME_CONTEXT_FOOTER, RUNTIME_CONTEXT_HEADER, appendAssistantMessageDiagnostic, bindsClaudeThinkingPrefix, calculateUsageCost, configureAiTransportHost, createAiTransportHost, createApiRegistry, createAssistantMessageDiagnostic, createAssistantMessageEventStream, createLlmRuntime, createNodeLlmRuntime, escapeRuntimeContextFooter, extractDiagnosticError, formatThrownValue, getAiTransportHost, getDefaultAiTransportHost, hasLegacyRuntimeContextEnvelope, hasRuntimeContextMarker, isProviderRefusalAssistantError, isRuntimeContextMessage, labelRuntimeContextContent, labelRuntimeContextText, normalizeModelCostConfig, normalizeResolvedPricing, readProviderRefusalReview, readRuntimeContextMetadata, requiresClaudeBetweenToolsThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAiTransportHeaderSentinels, resolveClaudeFable5ModelIdentity, resolveClaudeHaiku55ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus55ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet55ModelIdentity, resolveClaudeSonnet5ModelIdentity, runWithAiTransportHost, runtimeContextContentToText, setRuntimeContextRetention, supportsClaude1MContext, supportsClaudeAdaptiveThinking, supportsClaudeFastMode, supportsClaudeInHistorySystemMessages, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, supportsClaudeServerCompaction, supportsScopedAiTransportHosts, validateToolArguments, validateToolCall };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as supportsClaudeNativeMaxEffort, C as resolveClaudeOpus5ModelIdentity, D as supportsClaudeAdaptiveThinking, S as resolveClaudeOpus55ModelIdentity, T as resolveClaudeSonnet5ModelIdentity, _ as resolveClaudeFable5ModelIdentity, b as resolveClaudeMythos5ModelIdentity, g as requiresClaudeMandatoryAdaptiveThinking, h as requiresClaudeDefaultSampling, j as supportsClaudeNativeXhighEffort, m as requiresClaudeBetweenToolsThinking, p as bindsClaudeThinkingPrefix, 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, S as resolveClaudeOpus55ModelIdentity, T as resolveClaudeSonnet5ModelIdentity, _ as resolveClaudeFable5ModelIdentity, b as resolveClaudeMythos5ModelIdentity, g as requiresClaudeMandatoryAdaptiveThinking, h as requiresClaudeDefaultSampling, j as supportsClaudeNativeXhighEffort, m as requiresClaudeBetweenToolsThinking, p as bindsClaudeThinkingPrefix, v as resolveClaudeHaiku55ModelIdentity, w as resolveClaudeSonnet55ModelIdentity, x as resolveClaudeNativeThinkingLevelMap, y as resolveClaudeModelIdentity } from "../index-D27wAoOr.mjs";
|
|
2
2
|
import { $ as StopReason, Et as AssistantMessageDiagnostic, Q as SimpleStreamOptions, d as Context, k as Model, pt as Usage, tt as StreamFunction } from "../types-DvzmWW8J.mjs";
|
|
3
|
-
import { i as AnthropicThinkingDisplay, n as AnthropicEffort, r as AnthropicOptions, t as AnthropicContextManagementOptions } from "../provider-options-
|
|
4
|
-
import "../types-
|
|
5
|
-
import { p as resolveAnthropicServerCompactionPlan, s as isDirectAnthropicModel } from "../anthropic-payload-policy-
|
|
3
|
+
import { i as AnthropicThinkingDisplay, n as AnthropicEffort, r as AnthropicOptions, t as AnthropicContextManagementOptions } from "../provider-options-CkieKvNJ.mjs";
|
|
4
|
+
import "../types-UlNana-2.mjs";
|
|
5
|
+
import { p as resolveAnthropicServerCompactionPlan, s as isDirectAnthropicModel } from "../anthropic-payload-policy-DD7vzpxE.mjs";
|
|
6
6
|
import { Tool } from "@anthropic-ai/sdk/resources/messages.js";
|
|
7
7
|
//#region packages/ai/src/providers/anthropic.d.ts
|
|
8
8
|
type AnthropicCompactionOptions = AnthropicOptions & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as supportsClaudeNativeMaxEffort, O as supportsClaudeNativeXhighEffort, S as resolveClaudeSonnet5ModelIdentity, _ as resolveClaudeMythos5ModelIdentity, b as resolveClaudeOpus5ModelIdentity, d as requiresClaudeBetweenToolsThinking, f as requiresClaudeDefaultSampling, g as resolveClaudeModelIdentity, h as resolveClaudeHaiku55ModelIdentity, m as resolveClaudeFable5ModelIdentity, p as requiresClaudeMandatoryAdaptiveThinking, u as bindsClaudeThinkingPrefix, v as resolveClaudeNativeThinkingLevelMap, w as supportsClaudeAdaptiveThinking, x as resolveClaudeSonnet55ModelIdentity, y as resolveClaudeOpus55ModelIdentity } from "../src-
|
|
2
|
-
import { C as resolveModelBoundThinkingReplayMode, S as resolveAnthropicThinkingEffort, T as usesClaudeStreamingRefusalContract, _ as buildAnthropicClaudeCodeIdentity, b as prepareClaudeNoPrefillRequestContext, g as applyClaudeRequestContract, h as ANTHROPIC_CLAUDE_CODE_VERSION, v as defaultsClaudeAdaptiveThinking, w as usesClaudeFable5MessagesContract, x as requiresClaudeAdaptiveThinking, y as mapAnthropicStopReason } from "../host-
|
|
3
|
-
import { B as ANTHROPIC_SERVER_SIDE_FALLBACKS, G as resolveAnthropicFallbackServingModelCost, H as CLAUDE_OPUS_FALLBACK_MODEL_COST, J as usesFoundryBearerAuth, K as isAnthropicOAuthApiKey, M as isDirectAnthropicModel, R as resolveAnthropicServerCompactionPlan, S as readAnthropicInputTransformations, U as applyAnthropicFallbackBoundary, V as ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, W as readAnthropicFallbackBoundary, _ as toClaudeCodeToolName, a as readAnthropicPromptUsageSnapshot, b as findActiveAnthropicToolTurnAssistantIndex, c as applyAnthropicRefusal, f as normalizeAnthropicToolCallId, g as resolveOriginalAnthropicToolName, h as reconcileAnthropicToolChoice, i as readAnthropicCacheWriteUsage, m as projectAnthropicTools, n as applyAnthropicMessageDeltaUsage, o as readAnthropicUsageTokenCount, p as normalizeAnthropicToolChoice, q as omitFoundryBearerCredentialHeaders, r as applyAnthropicMessageStartUsage, s as readLastAnthropicIterationUsage, v as ANTHROPIC_OMITTED_REASONING_TEXT, x as logAnthropicThinkingDrops, y as applyAnthropicThinkingBindingControls } from "../anthropic-stream-reducer-
|
|
4
|
-
import { n as streamAnthropic, r as streamSimpleAnthropic } from "../anthropic-
|
|
1
|
+
import { D as supportsClaudeNativeMaxEffort, O as supportsClaudeNativeXhighEffort, S as resolveClaudeSonnet5ModelIdentity, _ as resolveClaudeMythos5ModelIdentity, b as resolveClaudeOpus5ModelIdentity, d as requiresClaudeBetweenToolsThinking, f as requiresClaudeDefaultSampling, g as resolveClaudeModelIdentity, h as resolveClaudeHaiku55ModelIdentity, m as resolveClaudeFable5ModelIdentity, p as requiresClaudeMandatoryAdaptiveThinking, u as bindsClaudeThinkingPrefix, v as resolveClaudeNativeThinkingLevelMap, w as supportsClaudeAdaptiveThinking, x as resolveClaudeSonnet55ModelIdentity, y as resolveClaudeOpus55ModelIdentity } from "../src-VWy9E7DZ.mjs";
|
|
2
|
+
import { C as resolveModelBoundThinkingReplayMode, S as resolveAnthropicThinkingEffort, T as usesClaudeStreamingRefusalContract, _ as buildAnthropicClaudeCodeIdentity, b as prepareClaudeNoPrefillRequestContext, g as applyClaudeRequestContract, h as ANTHROPIC_CLAUDE_CODE_VERSION, v as defaultsClaudeAdaptiveThinking, w as usesClaudeFable5MessagesContract, x as requiresClaudeAdaptiveThinking, y as mapAnthropicStopReason } from "../host-u3o8XiAp.mjs";
|
|
3
|
+
import { B as ANTHROPIC_SERVER_SIDE_FALLBACKS, G as resolveAnthropicFallbackServingModelCost, H as CLAUDE_OPUS_FALLBACK_MODEL_COST, J as usesFoundryBearerAuth, K as isAnthropicOAuthApiKey, M as isDirectAnthropicModel, R as resolveAnthropicServerCompactionPlan, S as readAnthropicInputTransformations, U as applyAnthropicFallbackBoundary, V as ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, W as readAnthropicFallbackBoundary, _ as toClaudeCodeToolName, a as readAnthropicPromptUsageSnapshot, b as findActiveAnthropicToolTurnAssistantIndex, c as applyAnthropicRefusal, f as normalizeAnthropicToolCallId, g as resolveOriginalAnthropicToolName, h as reconcileAnthropicToolChoice, i as readAnthropicCacheWriteUsage, m as projectAnthropicTools, n as applyAnthropicMessageDeltaUsage, o as readAnthropicUsageTokenCount, p as normalizeAnthropicToolChoice, q as omitFoundryBearerCredentialHeaders, r as applyAnthropicMessageStartUsage, s as readLastAnthropicIterationUsage, v as ANTHROPIC_OMITTED_REASONING_TEXT, x as logAnthropicThinkingDrops, y as applyAnthropicThinkingBindingControls } from "../anthropic-stream-reducer-CWyWE21W.mjs";
|
|
4
|
+
import { n as streamAnthropic, r as streamSimpleAnthropic } from "../anthropic-C4qygbtf.mjs";
|
|
5
5
|
export { ANTHROPIC_CLAUDE_CODE_VERSION, ANTHROPIC_OMITTED_REASONING_TEXT, ANTHROPIC_SERVER_SIDE_FALLBACKS, ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, CLAUDE_OPUS_FALLBACK_MODEL_COST, applyAnthropicFallbackBoundary, applyAnthropicMessageDeltaUsage, applyAnthropicMessageStartUsage, applyAnthropicRefusal, applyAnthropicThinkingBindingControls, applyClaudeRequestContract, bindsClaudeThinkingPrefix, buildAnthropicClaudeCodeIdentity, defaultsClaudeAdaptiveThinking, findActiveAnthropicToolTurnAssistantIndex, isAnthropicOAuthApiKey, isDirectAnthropicModel, logAnthropicThinkingDrops, mapAnthropicStopReason, normalizeAnthropicToolCallId, normalizeAnthropicToolChoice, omitFoundryBearerCredentialHeaders, prepareClaudeNoPrefillRequestContext, projectAnthropicTools, readAnthropicCacheWriteUsage, readAnthropicFallbackBoundary, readAnthropicInputTransformations, readAnthropicPromptUsageSnapshot, readAnthropicUsageTokenCount, readLastAnthropicIterationUsage, reconcileAnthropicToolChoice, requiresClaudeAdaptiveThinking, requiresClaudeBetweenToolsThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAnthropicFallbackServingModelCost, resolveAnthropicServerCompactionPlan, resolveAnthropicThinkingEffort, resolveClaudeFable5ModelIdentity, resolveClaudeHaiku55ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus55ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet55ModelIdentity, resolveClaudeSonnet5ModelIdentity, resolveModelBoundThinkingReplayMode, resolveOriginalAnthropicToolName, streamAnthropic, streamSimpleAnthropic, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, toClaudeCodeToolName, usesClaudeFable5MessagesContract, usesClaudeStreamingRefusalContract, usesFoundryBearerAuth };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as resolveOpenAICompletionsCompat } from "../openai-completions-compat-
|
|
1
|
+
import { a as resolveOpenAICompletionsCompat } from "../openai-completions-compat-BgPg1BRs.mjs";
|
|
2
2
|
export { resolveOpenAICompletionsCompat };
|