@openclaw/ai 2026.11.6 → 2026.11.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/dist/.source-module-urls/fe058cc430242ce2ab0dfbcbe153e240a52cf9c3072c3dc0a73e5f956b6ba49b.json +1 -1
- package/dist/{anthropic-BNkSFJGp.mjs → anthropic-OsxZVxT3.mjs} +5 -5
- package/dist/{anthropic-payload-policy-DxijyMFH.d.mts → anthropic-payload-policy-CcIAtAos.d.mts} +3 -3
- package/dist/{anthropic-stream-lifecycle-Dp5TblwC.mjs → anthropic-stream-lifecycle-BA3FkIQn.mjs} +10 -10
- package/dist/{anthropic-tool-projection-DX_igbpX.d.mts → anthropic-tool-projection-DFvJiCQy.d.mts} +1 -1
- package/dist/{anthropic-tool-projection-DpN77rtb.mjs → anthropic-tool-projection-DP6R_sBq.mjs} +1 -1
- package/dist/{api-registry-CCdcCPSA.d.mts → api-registry-CvAtt60P.d.mts} +2 -2
- package/dist/{assistant-output-BEE6TWdj.mjs → assistant-output-ByrQmF0P.mjs} +1 -1
- package/dist/{azure-openai-responses-BjX0owXR.mjs → azure-openai-responses-NfpppzMN.mjs} +4 -4
- package/dist/diagnostics.d.mts +3 -3
- package/dist/event-stream-C1QKiamS.d.mts +1 -0
- package/dist/{event-stream-CDyUvxkI.d.mts → event-stream-DSHjzUpL.d.mts} +1 -1
- package/dist/event-stream.d.mts +2 -2
- package/dist/{google-BJwjWpAX.mjs → google-DkwM8MvM.mjs} +2 -2
- package/dist/{google-interactions-BEOEOp0d.mjs → google-interactions-BUXAmg4x.mjs} +10 -10
- package/dist/{google-messages-Bja86PP8.mjs → google-messages-ClSK5R7R.mjs} +3 -3
- package/dist/{google-provider-stream-GYgtu60C.mjs → google-provider-stream-BiDLtKTp.mjs} +6 -6
- package/dist/{google-shared-7sAuYDNq.mjs → google-shared-Bny3gZ6L.mjs} +5 -5
- package/dist/{google-vertex-2zavNJkj.mjs → google-vertex-DQ3ErTAp.mjs} +2 -2
- package/dist/{host-DZ29cEYd.mjs → host-BVynqwGC.mjs} +40 -28
- package/dist/{host-C2_6_j-L.d.mts → host-bx8W0SER.d.mts} +3 -3
- package/dist/{host-policy-DqFgGiV6.mjs → host-policy-C1VDPJqb.mjs} +1 -1
- package/dist/{index-DkF8J4yH.d.mts → index-DqIreoGH.d.mts} +3 -3
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +2 -2
- package/dist/internal/anthropic.d.mts +6 -6
- package/dist/internal/anthropic.mjs +4 -4
- package/dist/internal/google.d.mts +3 -3
- package/dist/internal/google.mjs +1 -1
- package/dist/internal/openai-completions-compat.d.mts +1 -1
- package/dist/internal/openai-completions-compat.mjs +1 -1
- package/dist/internal/openai-responses-payload-policy.d.mts +1 -1
- package/dist/internal/openai-responses-payload-policy.mjs +2 -2
- package/dist/internal/openai.d.mts +10 -10
- package/dist/internal/openai.mjs +9 -9
- package/dist/internal/runtime.d.mts +8 -8
- package/dist/internal/runtime.mjs +3 -3
- package/dist/internal/shared.d.mts +10 -10
- package/dist/internal/shared.mjs +3 -3
- package/dist/internal/tool-schema.d.mts +2 -2
- package/dist/internal/tool-schema.mjs +3 -3
- package/dist/{mistral-CjTsnfIz.mjs → mistral-C_S0gC58.mjs} +9 -9
- package/dist/{openai-chatgpt-responses-BinD_u6y.mjs → openai-chatgpt-responses-Dzj5zqW6.mjs} +11 -11
- package/dist/{openai-completions-B380Vg0n.mjs → openai-completions-7jTg6B6X.mjs} +3 -3
- package/dist/{openai-completions-compat-CEj778te.d.mts → openai-completions-compat-C26ajk4r.d.mts} +3 -3
- package/dist/{openai-completions-compat-CmyT3piu.mjs → openai-completions-compat-CDNGOoQn.mjs} +2 -2
- package/dist/{openai-completions-transport-BGoKrb3z.mjs → openai-completions-transport-DKSeBBXY.mjs} +28 -28
- package/dist/{openai-function-tool-DUT14vv6.mjs → openai-function-tool-8ION6Su5.mjs} +1 -1
- package/dist/{openai-prompt-cache-DV1t-7dP.mjs → openai-prompt-cache-CZSWH8rC.mjs} +1 -1
- package/dist/{openai-prompt-cache-C_XCgsDn.d.mts → openai-prompt-cache-rhVEVVcq.d.mts} +2 -2
- package/dist/{openai-responses-ClgomgWG.mjs → openai-responses-Dn3ad3e-.mjs} +6 -6
- package/dist/{openai-responses-compaction-replay-6MNmDBBu.d.mts → openai-responses-compaction-replay-DpVAOvpR.d.mts} +4 -4
- package/dist/{openai-responses-contracts-D-saZnr_.d.mts → openai-responses-contracts-D6OypGUv.d.mts} +4 -4
- package/dist/{openai-responses-contracts-BpyK1Ygq.mjs → openai-responses-contracts-YlVzpuW_.mjs} +1 -1
- package/dist/{openai-responses-endpoint-BGwjxesS.mjs → openai-responses-endpoint-D8fhfY4d.mjs} +1 -1
- package/dist/{openai-responses-request-lifecycle-pjoJ2KB8.mjs → openai-responses-request-lifecycle-BRnD7G5s.mjs} +6 -6
- package/dist/{openai-responses-shared-BE2zSjin.mjs → openai-responses-shared-CNBWb5iO.mjs} +14 -14
- package/dist/{openai-responses-terminal-usage-CuXS9TCK.d.mts → openai-responses-terminal-usage-B9dUhNQJ.d.mts} +2 -2
- package/dist/{openai-responses-websocket-Bzo4ykRX.mjs → openai-responses-websocket-BbTCvD64.mjs} +8 -8
- package/dist/{openai-stop-reason-8s70vDXj.mjs → openai-stop-reason-CpYv2sZh.mjs} +3 -1
- package/dist/{otel-VKlSbm9p.mjs → otel-Cmspirtq.mjs} +1 -1
- package/dist/{provider-options-Bo0XJEeK.d.mts → provider-options-2vKAAn7G.d.mts} +3 -3
- package/dist/{provider-replay-context-BAwe7OIR.mjs → provider-replay-context-CeMMMu55.mjs} +1 -1
- package/dist/{provider-transcript-transform-BA4B0NIr.mjs → provider-transcript-transform-C99cDpZV.mjs} +1 -1
- package/dist/{provider-transport-turn-state-BU7KCpkK.mjs → provider-transport-turn-state-DIis-pzH.mjs} +3 -3
- package/dist/{provider-types-wHqA9oSz.d.mts → provider-types-C8GKdM8d.d.mts} +4 -4
- package/dist/provider-types.d.mts +6 -6
- package/dist/providers.d.mts +2 -2
- package/dist/providers.mjs +10 -10
- package/dist/{sanitize-unicode-D0B2CDXP.d.mts → sanitize-unicode-DzL-LjLt.d.mts} +3 -3
- package/dist/{simple-options-BPzChce1.mjs → simple-options-M4Ngy-Ej.mjs} +3 -3
- package/dist/{stream-WbisbzUF.mjs → stream-Dm0EMT-0.mjs} +1 -1
- package/dist/{telemetry-BS2h0FVa.mjs → telemetry-X9oIHyf3.mjs} +2 -2
- package/dist/{tool-schema-json-projection-C9KSjPuG.mjs → tool-schema-json-projection-BIs0pwdB.mjs} +1 -1
- package/dist/{transport-stream-shared-DtOk207K.mjs → transport-stream-shared-CBr4U0TY.mjs} +4 -3
- package/dist/{transport-stream-shared-Cwd9ZIqy.d.mts → transport-stream-shared-CMWWoyy5.d.mts} +6 -5
- package/dist/{transport-utils-Czu6bnbQ.mjs → transport-utils-DSJQf0i_.mjs} +2 -2
- package/dist/transports.d.mts +19 -15
- package/dist/transports.mjs +21 -13
- package/dist/{types-DrqxFIh9.d.mts → types-B6vvn8is.d.mts} +10 -2
- package/dist/types-a4Eg5L2z.d.mts +1 -0
- package/dist/types.d.mts +6 -6
- package/dist/{validation-ByHJvdN2.d.mts → validation-B3VZTKei.d.mts} +1 -1
- package/dist/validation.d.mts +1 -1
- package/package.json +1 -1
- package/dist/event-stream-X0f18GAs.d.mts +0 -1
- package/dist/types-g3molYjD.d.mts +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
2
|
import { w as supportsClaudeAdaptiveThinking } from "./src-CQ7nH2mL.mjs";
|
|
3
3
|
import { t as AssistantMessageEventStream } from "./event-stream-X2gmsUWv.mjs";
|
|
4
|
-
import { _ as buildAnthropicClaudeCodeIdentity, a as resolveAiTransportHeaderSentinels, b as prepareClaudeNoPrefillRequestContext, r as getAiTransportHost } from "./host-
|
|
5
|
-
import { a as streamFragmentError } from "./transport-utils-
|
|
6
|
-
import { B as usesFoundryBearerAuth, R as isAnthropicOAuthApiKey, j as supportsAnthropicServerSideFallback, n as applyAnthropicThinkingOptions, t as runAnthropicStreamLifecycle, w as isDirectAnthropicModel, z as omitFoundryBearerCredentialHeaders } from "./anthropic-stream-lifecycle-
|
|
4
|
+
import { _ as buildAnthropicClaudeCodeIdentity, a as resolveAiTransportHeaderSentinels, b as prepareClaudeNoPrefillRequestContext, r as getAiTransportHost } from "./host-BVynqwGC.mjs";
|
|
5
|
+
import { a as streamFragmentError } from "./transport-utils-DSJQf0i_.mjs";
|
|
6
|
+
import { B as usesFoundryBearerAuth, R as isAnthropicOAuthApiKey, j as supportsAnthropicServerSideFallback, n as applyAnthropicThinkingOptions, t as runAnthropicStreamLifecycle, w as isDirectAnthropicModel, z as omitFoundryBearerCredentialHeaders } from "./anthropic-stream-lifecycle-BA3FkIQn.mjs";
|
|
7
7
|
import { i as resolveCacheRetention, n as resolveCloudflareBaseUrl, r as buildCopilotDynamicHeaders } from "./cloudflare-BJ2_Xabx.mjs";
|
|
8
|
-
import { n as buildBaseOptions, r as clampMaxTokensToModel } from "./simple-options-
|
|
9
|
-
import {
|
|
8
|
+
import { n as buildBaseOptions, r as clampMaxTokensToModel } from "./simple-options-M4Ngy-Ej.mjs";
|
|
9
|
+
import { A as parseJsonWithRepair } from "./transport-stream-shared-CBr4U0TY.mjs";
|
|
10
10
|
import { n as getEnvApiKey } from "./env-api-keys-BuHc86ya.mjs";
|
|
11
11
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-DzaHoRAU.mjs";
|
|
12
12
|
import { withModelRequestBodyBytes } from "./internal/model-request-body.mjs";
|
package/dist/{anthropic-payload-policy-DxijyMFH.d.mts → anthropic-payload-policy-CcIAtAos.d.mts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
3
|
-
import { r as AnthropicOptions, t as AnthropicContextManagementOptions } from "./provider-options-
|
|
1
|
+
import { j as Model, rt as SimpleStreamOptions } from "./types-B6vvn8is.mjs";
|
|
2
|
+
import "./index-DqIreoGH.mjs";
|
|
3
|
+
import { r as AnthropicOptions, t as AnthropicContextManagementOptions } from "./provider-options-2vKAAn7G.mjs";
|
|
4
4
|
import { TextBlockParam } from "@anthropic-ai/sdk/resources/messages.js";
|
|
5
5
|
//#region packages/ai/src/transports/anthropic-transport-options.d.ts
|
|
6
6
|
/** Keep both entry points on one thinking mode while retaining their output-budget policies. */
|
package/dist/{anthropic-stream-lifecycle-Dp5TblwC.mjs → anthropic-stream-lifecycle-BA3FkIQn.mjs}
RENAMED
|
@@ -4,22 +4,22 @@ import { r as appendAssistantThinking } from "./event-stream-X2gmsUWv.mjs";
|
|
|
4
4
|
import { a as asRecord, c as readStringField, o as isRecord, r as asOptionalObjectRecord } from "./record-coerce-BQaoiN3r.mjs";
|
|
5
5
|
import { a as normalizeOptionalLowercaseString, i as normalizeNullableString } from "./string-coerce-BCuWMIrk.mjs";
|
|
6
6
|
import { n as asNonNegativeFiniteNumber } from "./number-coercion-C7HsBgUL.mjs";
|
|
7
|
-
import { C as readRequiredClaudeCodeVersion, D as usesClaudeFable5MessagesContract, E as resolveAnthropicThinkingEffort, I as isImageWithMediaPayload, O as usesClaudeStreamingRefusalContract, S as raiseClaudeCodeVersionFloor, g as applyClaudeRequestContract, h as ANTHROPIC_CLAUDE_CODE_VERSION, j as calculateCost, r as getAiTransportHost, u as STREAM_ERROR_FALLBACK_TEXT, v as defaultsClaudeAdaptiveThinking, w as requiresClaudeAdaptiveThinking, y as mapAnthropicStopReason } from "./host-
|
|
8
|
-
import "./transport-utils-
|
|
7
|
+
import { C as readRequiredClaudeCodeVersion, D as usesClaudeFable5MessagesContract, E as resolveAnthropicThinkingEffort, I as isImageWithMediaPayload, O as usesClaudeStreamingRefusalContract, S as raiseClaudeCodeVersionFloor, g as applyClaudeRequestContract, h as ANTHROPIC_CLAUDE_CODE_VERSION, j as calculateCost, r as getAiTransportHost, u as STREAM_ERROR_FALLBACK_TEXT, v as defaultsClaudeAdaptiveThinking, w as requiresClaudeAdaptiveThinking, y as mapAnthropicStopReason } from "./host-BVynqwGC.mjs";
|
|
8
|
+
import "./transport-utils-DSJQf0i_.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-C1VDPJqb.mjs";
|
|
11
11
|
import { i as resolveCacheRetention } from "./cloudflare-BJ2_Xabx.mjs";
|
|
12
12
|
import { t as sanitizeSurrogates } from "./sanitize-unicode-CRGuMONI.mjs";
|
|
13
|
-
import { C as stripSystemPromptCacheBoundary, a as describeToolResultMediaPlaceholder, c as extractToolResultText, f as preparedRequestSuffix, s as extractToolResultBlockText, t as adjustMaxTokensForThinking, w as stripSystemPromptRelocatableBoundary, x as splitSystemPromptCacheBoundary } from "./simple-options-
|
|
14
|
-
import {
|
|
13
|
+
import { C as stripSystemPromptCacheBoundary, a as describeToolResultMediaPlaceholder, c as extractToolResultText, f as preparedRequestSuffix, s as extractToolResultBlockText, t as adjustMaxTokensForThinking, w as stripSystemPromptRelocatableBoundary, x as splitSystemPromptCacheBoundary } from "./simple-options-M4Ngy-Ej.mjs";
|
|
14
|
+
import { S as transportAbortError, T as parseJsonObjectPreservingUnsafeIntegers, a as copyProviderAcceptanceObserver, b as sanitizeTransportPayloadText, d as finalizeTransportStream, f as iterateModelStream, g as notifyProviderHttpResponse, i as coerceTransportToolCallArguments, j as parseStreamingJson, k as createToolArgumentPreviewSchedule, l as failTransportStream, r as awaitProviderLifecycleCallback, u as finalizeTerminalToolCallArguments } from "./transport-stream-shared-CBr4U0TY.mjs";
|
|
15
15
|
import { t as parsePositiveInteger } from "./positive-integer-DiqE5vNi.mjs";
|
|
16
|
-
import { a as reconcileAnthropicToolChoice, i as projectAnthropicTools, n as normalizeAnthropicToolChoice, o as resolveOriginalAnthropicToolName, s as toClaudeCodeToolName, t as normalizeAnthropicToolCallId } from "./anthropic-tool-projection-
|
|
16
|
+
import { a as reconcileAnthropicToolChoice, i as projectAnthropicTools, n as normalizeAnthropicToolChoice, o as resolveOriginalAnthropicToolName, s as toClaudeCodeToolName, t as normalizeAnthropicToolCallId } from "./anthropic-tool-projection-DP6R_sBq.mjs";
|
|
17
17
|
import { t as createDeferredEventBuffer } from "./deferred-event-buffer-tIGkTkTm.mjs";
|
|
18
18
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-DzaHoRAU.mjs";
|
|
19
|
-
import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-
|
|
20
|
-
import { t as transformProviderMessages } from "./provider-transcript-transform-
|
|
19
|
+
import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-CeMMMu55.mjs";
|
|
20
|
+
import { t as transformProviderMessages } from "./provider-transcript-transform-C99cDpZV.mjs";
|
|
21
21
|
import { markEncodedModelRequestBody } from "./internal/model-request-body.mjs";
|
|
22
|
-
import { t as createAssistantOutput } from "./assistant-output-
|
|
22
|
+
import { t as createAssistantOutput } from "./assistant-output-ByrQmF0P.mjs";
|
|
23
23
|
import { isProxy } from "node:util/types";
|
|
24
24
|
//#region packages/ai/src/providers/anthropic-auth-headers.ts
|
|
25
25
|
/** Inspect resolved credential shape for auth routing without exposing its value. */
|
|
@@ -857,7 +857,7 @@ async function applyAnthropicPayloadHook(params, model, options) {
|
|
|
857
857
|
...params,
|
|
858
858
|
messages: params.messages.map((message) => plain?.(message) ? copyPlainData(message) : message)
|
|
859
859
|
};
|
|
860
|
-
const replacement = await options.onPayload(editable, model);
|
|
860
|
+
const replacement = await awaitProviderLifecycleCallback(() => options.onPayload?.(editable, model), options.signal);
|
|
861
861
|
const unchanged = (replacement === void 0 || replacement === editable) && snapshot !== void 0 && samePlainData(snapshot, editable);
|
|
862
862
|
return {
|
|
863
863
|
params: replacement === void 0 ? editable : replacement,
|
package/dist/{anthropic-tool-projection-DX_igbpX.d.mts → anthropic-tool-projection-DFvJiCQy.d.mts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as AnthropicOptions } from "./provider-options-
|
|
1
|
+
import { r as AnthropicOptions } from "./provider-options-2vKAAn7G.mjs";
|
|
2
2
|
import { Tool } from "@anthropic-ai/sdk/resources/messages.js";
|
|
3
3
|
//#region packages/ai/src/providers/anthropic-tool-projection.d.ts
|
|
4
4
|
type AnthropicProjectedTool = {
|
package/dist/{anthropic-tool-projection-DpN77rtb.mjs → anthropic-tool-projection-DP6R_sBq.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as isRecord, s as isStringArray } from "./record-coerce-BQaoiN3r.mjs";
|
|
2
2
|
import { r as sortPromptCacheToolsByName } from "./prompt-cache-stability-w-ICeyOI.mjs";
|
|
3
|
-
import { _ as SCHEMA_ARRAY_KEYS, b as SCHEMA_OBJECT_KEYS, f as inheritToolSchemaTruncation, i as publishRuntimeToolInputSchema, r as projectRuntimeToolInputSchema, t as getPublishedRuntimeToolInputSchema, v as SCHEMA_MAP_KEYS } from "./tool-schema-json-projection-
|
|
3
|
+
import { _ as SCHEMA_ARRAY_KEYS, b as SCHEMA_OBJECT_KEYS, f as inheritToolSchemaTruncation, i as publishRuntimeToolInputSchema, r as projectRuntimeToolInputSchema, t as getPublishedRuntimeToolInputSchema, v as SCHEMA_MAP_KEYS } from "./tool-schema-json-projection-BIs0pwdB.mjs";
|
|
4
4
|
//#region packages/ai/src/providers/anthropic-tool-projection.ts
|
|
5
5
|
const CLAUDE_CODE_TOOL_LOOKUP = new Map([
|
|
6
6
|
"Read",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
1
|
+
import { n as Api, ot as StreamFunction, rt as SimpleStreamOptions, st as StreamOptions } from "./types-B6vvn8is.mjs";
|
|
2
|
+
import "./index-DqIreoGH.mjs";
|
|
3
3
|
//#region packages/ai/src/api-registry.d.ts
|
|
4
4
|
/** Runtime stream adapter signature stored in the API provider registry. */
|
|
5
5
|
type ApiStreamFunction = StreamFunction;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as createEmptyTransportUsage } from "./transport-stream-shared-CBr4U0TY.mjs";
|
|
2
2
|
//#region packages/ai/src/transports/assistant-output.ts
|
|
3
3
|
function createAssistantOutput(model, api = model.api) {
|
|
4
4
|
return {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as AssistantMessageEventStream } from "./event-stream-X2gmsUWv.mjs";
|
|
2
|
-
import { r as getAiTransportHost } from "./host-
|
|
3
|
-
import { n as buildBaseOptions } from "./simple-options-
|
|
2
|
+
import { r as getAiTransportHost } from "./host-BVynqwGC.mjs";
|
|
3
|
+
import { n as buildBaseOptions } from "./simple-options-M4Ngy-Ej.mjs";
|
|
4
4
|
import { n as getEnvApiKey } from "./env-api-keys-BuHc86ya.mjs";
|
|
5
|
-
import { t as createAssistantOutput } from "./assistant-output-
|
|
6
|
-
import { Bt as resolvePromptCacheKey, H as resolveOpenAISimpleReasoningEffort, Vt as withOpenAIErrorResponseHook, mt as convertProviderResponsesMessages, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams } from "./openai-responses-shared-
|
|
5
|
+
import { t as createAssistantOutput } from "./assistant-output-ByrQmF0P.mjs";
|
|
6
|
+
import { Bt as resolvePromptCacheKey, H as resolveOpenAISimpleReasoningEffort, Vt as withOpenAIErrorResponseHook, mt as convertProviderResponsesMessages, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams } from "./openai-responses-shared-CNBWb5iO.mjs";
|
|
7
7
|
import { n as isTraditionalAzureOpenAIHost, t as isOpenAICompatibleAzureResponsesBaseUrl } from "./azure-openai-responses-client-compat-a5PrPIdL.mjs";
|
|
8
8
|
import { n as resolveAzureDeploymentNameFromMap } from "./azure-deployment-map-DKJ8Xc4c.mjs";
|
|
9
9
|
import { t as requireApiKey } from "./required-api-key-2zZTkmsi.mjs";
|
package/dist/diagnostics.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./types-
|
|
3
|
-
import { r as isResponsesOutputLimitToolCallError } from "./openai-responses-terminal-usage-
|
|
1
|
+
import { Bt as recordSuppressedReasoning, Ft as createAssistantMessageDiagnostic, It as extractDiagnosticError, Lt as formatThrownValue, Mt as DiagnosticErrorInfo, Nt as ProviderRefusalReview, Pt as appendAssistantMessageDiagnostic, Rt as isProviderRefusalAssistantError, jt as AssistantMessageDiagnostic, o as AssistantMessage, zt as readProviderRefusalReview } from "./types-B6vvn8is.mjs";
|
|
2
|
+
import "./types-a4Eg5L2z.mjs";
|
|
3
|
+
import { r as isResponsesOutputLimitToolCallError } from "./openai-responses-terminal-usage-B9dUhNQJ.mjs";
|
|
4
4
|
import { n as ProviderErrorRedactor, r as configureProviderErrorRedactor } from "./provider-error-CnaWYTRY.mjs";
|
|
5
5
|
import { r as projectDiagnosticValue, t as DiagnosticProjectionPolicy } from "./credential-redaction-DrgndwTJ.mjs";
|
|
6
6
|
import { i as emitModelTransportError, n as formatModelTransportDebugUrl, r as emitModelTransportDebug, t as formatModelTransportDebugBaseUrl } from "./model-transport-url-BdksnBqu.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./event-stream-DSHjzUpL.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as AssistantMessageEventStreamContract, dt as ThinkingContent, o as AssistantMessage, s as AssistantMessageEvent } from "./types-B6vvn8is.mjs";
|
|
2
2
|
//#region packages/llm-core/src/utils/event-stream.d.ts
|
|
3
3
|
/** Returns only an append whose current and previously observed snapshots still match. */
|
|
4
4
|
declare function readAssistantThinkingAppend(block: ThinkingContent, previous: string): string | undefined;
|
package/dist/event-stream.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-
|
|
2
|
-
import "./event-stream-
|
|
1
|
+
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-DSHjzUpL.mjs";
|
|
2
|
+
import "./event-stream-C1QKiamS.mjs";
|
|
3
3
|
export { AssistantMessageEventStream, EventStream, createAssistantMessageEventStream };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as getAiTransportHost } from "./host-
|
|
1
|
+
import { r as getAiTransportHost } from "./host-BVynqwGC.mjs";
|
|
2
2
|
import { n as getEnvApiKey } from "./env-api-keys-BuHc86ya.mjs";
|
|
3
3
|
import { n as resolveOpencodeSessionHeaders } from "./session-affinity-DA4WHv1h.mjs";
|
|
4
4
|
import { t as requireApiKey } from "./required-api-key-2zZTkmsi.mjs";
|
|
5
|
-
import { n as buildGoogleHttpOptions, t as createGoogleGenerateContentStreams } from "./google-provider-stream-
|
|
5
|
+
import { n as buildGoogleHttpOptions, t as createGoogleGenerateContentStreams } from "./google-provider-stream-BiDLtKTp.mjs";
|
|
6
6
|
import { GoogleGenAI } from "@google/genai";
|
|
7
7
|
//#region packages/ai/src/providers/google.ts
|
|
8
8
|
const { stream: streamGoogle, streamSimple: streamSimpleGoogle } = createGoogleGenerateContentStreams("google-generative-ai", (model, options) => {
|
|
@@ -2,21 +2,21 @@ import "./src-CQ7nH2mL.mjs";
|
|
|
2
2
|
import { t as omitNullRequestHeaders } from "./request-headers-DO4Mqhw1.mjs";
|
|
3
3
|
import { t as AssistantMessageEventStream } from "./event-stream-X2gmsUWv.mjs";
|
|
4
4
|
import { a as asRecord, c as readStringField, i as asOptionalRecord } from "./record-coerce-BQaoiN3r.mjs";
|
|
5
|
-
import { a as resolveAiTransportHeaderSentinels, j as calculateCost, r as getAiTransportHost } from "./host-
|
|
6
|
-
import { a as streamFragmentError } from "./transport-utils-
|
|
7
|
-
import { t as buildGuardedModelFetch } from "./host-policy-
|
|
5
|
+
import { a as resolveAiTransportHeaderSentinels, j as calculateCost, r as getAiTransportHost } from "./host-BVynqwGC.mjs";
|
|
6
|
+
import { a as streamFragmentError } from "./transport-utils-DSJQf0i_.mjs";
|
|
7
|
+
import { t as buildGuardedModelFetch } from "./host-policy-C1VDPJqb.mjs";
|
|
8
8
|
import { t as sanitizeSurrogates } from "./sanitize-unicode-CRGuMONI.mjs";
|
|
9
|
-
import { C as stripSystemPromptCacheBoundary, n as buildBaseOptions } from "./simple-options-
|
|
10
|
-
import {
|
|
9
|
+
import { C as stripSystemPromptCacheBoundary, n as buildBaseOptions } from "./simple-options-M4Ngy-Ej.mjs";
|
|
10
|
+
import { E as parseJsonPreservingUnsafeIntegers, S as transportAbortError, _ as notifyProviderStreamOpened, g as notifyProviderHttpResponse, l as failTransportStream, p as iterateSseFrames, v as parseTerminalToolCallArguments } from "./transport-stream-shared-CBr4U0TY.mjs";
|
|
11
11
|
import { n as getEnvApiKey } from "./env-api-keys-BuHc86ya.mjs";
|
|
12
|
-
import { t as transformProviderMessages } from "./provider-transcript-transform-
|
|
12
|
+
import { t as transformProviderMessages } from "./provider-transcript-transform-C99cDpZV.mjs";
|
|
13
13
|
import { PROVIDER_MODEL_INPUT, resolveProviderContext } from "./provider-types.mjs";
|
|
14
|
-
import { t as createAssistantOutput } from "./assistant-output-
|
|
15
|
-
import { a as googleToolParameters, o as mapGoogleToolArguments } from "./google-messages-
|
|
14
|
+
import { t as createAssistantOutput } from "./assistant-output-ByrQmF0P.mjs";
|
|
15
|
+
import { a as googleToolParameters, o as mapGoogleToolArguments } from "./google-messages-ClSK5R7R.mjs";
|
|
16
16
|
import { n as createGoogleVideoPlaceholder, r as materializeGoogleVideoSlots, t as GOOGLE_VIDEO_SLOT_OMISSION } from "./google-video-slots-Bxt-OXO8.mjs";
|
|
17
|
-
import { r as buildGoogleInteractionsSimpleThinking } from "./google-shared-
|
|
17
|
+
import { r as buildGoogleInteractionsSimpleThinking } from "./google-shared-Bny3gZ6L.mjs";
|
|
18
18
|
//#region packages/ai/package.json
|
|
19
|
-
var version = "2026.11.
|
|
19
|
+
var version = "2026.11.7";
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region packages/ai/src/providers/google-interactions-request.ts
|
|
22
22
|
let packageVersionMemo;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { p as hasRuntimeContextMarker } from "./types-OVEWUaDh.mjs";
|
|
2
2
|
import { r as appendAssistantThinking } from "./event-stream-X2gmsUWv.mjs";
|
|
3
3
|
import { a as asRecord, s as isStringArray } from "./record-coerce-BQaoiN3r.mjs";
|
|
4
|
-
import { I as isImageWithMediaPayload, j as calculateCost } from "./host-
|
|
4
|
+
import { I as isImageWithMediaPayload, j as calculateCost } from "./host-BVynqwGC.mjs";
|
|
5
5
|
import { t as sanitizeSurrogates } from "./sanitize-unicode-CRGuMONI.mjs";
|
|
6
6
|
import { r as sortPromptCacheToolsByName } from "./prompt-cache-stability-w-ICeyOI.mjs";
|
|
7
|
-
import { a as describeToolResultMediaPlaceholder, c as extractToolResultText } from "./simple-options-
|
|
8
|
-
import {
|
|
7
|
+
import { a as describeToolResultMediaPlaceholder, c as extractToolResultText } from "./simple-options-M4Ngy-Ej.mjs";
|
|
8
|
+
import { S as transportAbortError, b as sanitizeTransportPayloadText, i as coerceTransportToolCallArguments, o as createEmptyTransportUsage } from "./transport-stream-shared-CBr4U0TY.mjs";
|
|
9
9
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-DzaHoRAU.mjs";
|
|
10
10
|
import { isGoogleGemini4Model } from "./internal/google-model-family.mjs";
|
|
11
11
|
import "./types.mjs";
|
|
@@ -2,12 +2,12 @@ import "./src-CQ7nH2mL.mjs";
|
|
|
2
2
|
import { t as omitNullRequestHeaders } from "./request-headers-DO4Mqhw1.mjs";
|
|
3
3
|
import { t as AssistantMessageEventStream } from "./event-stream-X2gmsUWv.mjs";
|
|
4
4
|
import { a as asRecord } from "./record-coerce-BQaoiN3r.mjs";
|
|
5
|
-
import { a as resolveAiTransportHeaderSentinels, r as getAiTransportHost } from "./host-
|
|
6
|
-
import { n as buildManagedModelFetch } from "./host-policy-
|
|
7
|
-
import { n as buildBaseOptions } from "./simple-options-
|
|
8
|
-
import {
|
|
9
|
-
import { t as createAssistantOutput } from "./assistant-output-
|
|
10
|
-
import { a as runGoogleGenerateContentLifecycle, i as buildGoogleSimpleThinking, t as buildGoogleGenerateContentParams } from "./google-shared-
|
|
5
|
+
import { a as resolveAiTransportHeaderSentinels, r as getAiTransportHost } from "./host-BVynqwGC.mjs";
|
|
6
|
+
import { n as buildManagedModelFetch } from "./host-policy-C1VDPJqb.mjs";
|
|
7
|
+
import { n as buildBaseOptions } from "./simple-options-M4Ngy-Ej.mjs";
|
|
8
|
+
import { m as mergeTransportHeaders } from "./transport-stream-shared-CBr4U0TY.mjs";
|
|
9
|
+
import { t as createAssistantOutput } from "./assistant-output-ByrQmF0P.mjs";
|
|
10
|
+
import { a as runGoogleGenerateContentLifecycle, i as buildGoogleSimpleThinking, t as buildGoogleGenerateContentParams } from "./google-shared-Bny3gZ6L.mjs";
|
|
11
11
|
import { ResourceScope } from "@google/genai";
|
|
12
12
|
//#region packages/ai/src/providers/google-http-options.ts
|
|
13
13
|
function buildGoogleHttpOptions(model, optionsHeaders, profile) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { M as clampThinkingLevel } from "./host-
|
|
1
|
+
import { M as clampThinkingLevel } from "./host-BVynqwGC.mjs";
|
|
2
2
|
import { t as sanitizeSurrogates } from "./sanitize-unicode-CRGuMONI.mjs";
|
|
3
|
-
import { C as stripSystemPromptCacheBoundary, t as adjustMaxTokensForThinking } from "./simple-options-
|
|
4
|
-
import {
|
|
5
|
-
import { t as transformProviderMessages } from "./provider-transcript-transform-
|
|
3
|
+
import { C as stripSystemPromptCacheBoundary, t as adjustMaxTokensForThinking } from "./simple-options-M4Ngy-Ej.mjs";
|
|
4
|
+
import { S as transportAbortError, _ as notifyProviderStreamOpened, l as failTransportStream } from "./transport-stream-shared-CBr4U0TY.mjs";
|
|
5
|
+
import { t as transformProviderMessages } from "./provider-transcript-transform-C99cDpZV.mjs";
|
|
6
6
|
import { isGoogleGemini3ProModel, isGoogleGemini3ThinkingLevelModel } from "./internal/google-model-family.mjs";
|
|
7
|
-
import { i as consumeGoogleGenerateContentStream, n as projectGoogleMessages, r as requiresGoogleToolCallId, s as googleFlashSupportsMinimalThinking, t as convertGoogleTools } from "./google-messages-
|
|
7
|
+
import { i as consumeGoogleGenerateContentStream, n as projectGoogleMessages, r as requiresGoogleToolCallId, s as googleFlashSupportsMinimalThinking, t as convertGoogleTools } from "./google-messages-ClSK5R7R.mjs";
|
|
8
8
|
import { FunctionCallingConfigMode, ThinkingLevel } from "@google/genai";
|
|
9
9
|
//#region packages/ai/src/providers/google-shared.ts
|
|
10
10
|
async function runGoogleGenerateContentLifecycle(params) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as normalizeOptionalString } from "./string-coerce-BCuWMIrk.mjs";
|
|
2
|
-
import { r as getAiTransportHost } from "./host-
|
|
3
|
-
import { n as buildGoogleHttpOptions, t as createGoogleGenerateContentStreams } from "./google-provider-stream-
|
|
2
|
+
import { r as getAiTransportHost } from "./host-BVynqwGC.mjs";
|
|
3
|
+
import { n as buildGoogleHttpOptions, t as createGoogleGenerateContentStreams } from "./google-provider-stream-BiDLtKTp.mjs";
|
|
4
4
|
import { GoogleGenAI } from "@google/genai";
|
|
5
5
|
//#region packages/ai/src/providers/google-vertex.ts
|
|
6
6
|
const API_VERSION = "v1";
|
|
@@ -2,7 +2,7 @@ import { D as supportsClaudeNativeMaxEffort, O as supportsClaudeNativeXhighEffor
|
|
|
2
2
|
import { t as DEFAULT_MISSING_TOOL_RESULT_TEXT } from "./types-OVEWUaDh.mjs";
|
|
3
3
|
import { i as asOptionalRecord, o as isRecord } from "./record-coerce-BQaoiN3r.mjs";
|
|
4
4
|
import { r as normalizeLowercaseStringOrEmpty } from "./string-coerce-BCuWMIrk.mjs";
|
|
5
|
-
import { F as MODEL_CATALOG_THINKING_LEVELS, I as listMappedModelThinkingLevels, O as resolveOpenAIModelReasoningEfforts, R as resolveOpenAIThinkingApi, i as OPENAI_RESPONSES_APIS } from "./openai-responses-contracts-
|
|
5
|
+
import { F as MODEL_CATALOG_THINKING_LEVELS, I as listMappedModelThinkingLevels, O as resolveOpenAIModelReasoningEfforts, R as resolveOpenAIThinkingApi, i as OPENAI_RESPONSES_APIS } from "./openai-responses-contracts-YlVzpuW_.mjs";
|
|
6
6
|
//#region packages/ai/src/media-payload.ts
|
|
7
7
|
/** Media metadata alone is not an attachment; provider emitters need inline bytes. */
|
|
8
8
|
function hasMediaPayload(block) {
|
|
@@ -485,15 +485,14 @@ function transformMessages(messages, model, normalizeToolCallId) {
|
|
|
485
485
|
//#endregion
|
|
486
486
|
//#region packages/ai/src/host.ts
|
|
487
487
|
const MAX_PENDING_CUSTOM_API_REGISTRATIONS = 32;
|
|
488
|
-
const pendingCustomApiRegistrations = [];
|
|
489
488
|
function queueCustomApiRegistration(registry, api, streamFn) {
|
|
490
|
-
const existing =
|
|
489
|
+
const existing = hostState.pendingRegistrations.find((registration) => registration.registry === registry && registration.api === api);
|
|
491
490
|
if (existing) {
|
|
492
491
|
existing.streamFn = streamFn;
|
|
493
492
|
return false;
|
|
494
493
|
}
|
|
495
|
-
if (
|
|
496
|
-
|
|
494
|
+
if (hostState.pendingRegistrations.length >= MAX_PENDING_CUSTOM_API_REGISTRATIONS) throw new Error("Too many custom transport APIs were registered before host configuration");
|
|
495
|
+
hostState.pendingRegistrations.push({
|
|
497
496
|
registry,
|
|
498
497
|
api,
|
|
499
498
|
streamFn
|
|
@@ -538,71 +537,84 @@ const inertAiTransportHost = {
|
|
|
538
537
|
logInfo: () => {},
|
|
539
538
|
logWarn: () => {}
|
|
540
539
|
};
|
|
541
|
-
let activeAiTransportHost = inertAiTransportHost;
|
|
542
540
|
function createAiTransportHostScope() {
|
|
543
541
|
if (typeof process === "undefined") return;
|
|
544
542
|
const asyncHooks = process.getBuiltinModule?.("node:async_hooks");
|
|
545
543
|
return asyncHooks ? new asyncHooks.AsyncLocalStorage() : void 0;
|
|
546
544
|
}
|
|
547
|
-
const
|
|
548
|
-
|
|
549
|
-
|
|
545
|
+
const HOST_STATE_KEY = Symbol.for("openclaw.ai.transportHost");
|
|
546
|
+
function resolveAiTransportHostState() {
|
|
547
|
+
const globalStore = globalThis;
|
|
548
|
+
const existing = globalStore[HOST_STATE_KEY];
|
|
549
|
+
if (Object.hasOwn(globalStore, HOST_STATE_KEY) && existing !== void 0) return existing;
|
|
550
|
+
const state = {
|
|
551
|
+
inert: inertAiTransportHost,
|
|
552
|
+
active: inertAiTransportHost,
|
|
553
|
+
scope: createAiTransportHostScope(),
|
|
554
|
+
pendingHost: void 0,
|
|
555
|
+
pendingOperations: 0,
|
|
556
|
+
pendingRegistrations: []
|
|
557
|
+
};
|
|
558
|
+
globalStore[HOST_STATE_KEY] = state;
|
|
559
|
+
return state;
|
|
560
|
+
}
|
|
561
|
+
const hostState = resolveAiTransportHostState();
|
|
550
562
|
function isPromiseLike(value) {
|
|
551
563
|
return value !== null && (typeof value === "object" || typeof value === "function") && typeof Reflect.get(value, "then") === "function";
|
|
552
564
|
}
|
|
553
565
|
function trackUnscopedOperation(host, result) {
|
|
554
566
|
if (!isPromiseLike(result)) return;
|
|
555
|
-
|
|
556
|
-
|
|
567
|
+
hostState.pendingHost = host;
|
|
568
|
+
hostState.pendingOperations += 1;
|
|
557
569
|
const release = () => {
|
|
558
|
-
|
|
559
|
-
if (
|
|
570
|
+
hostState.pendingOperations -= 1;
|
|
571
|
+
if (hostState.pendingOperations === 0) hostState.pendingHost = void 0;
|
|
560
572
|
};
|
|
561
573
|
Promise.resolve(result).then(release, release);
|
|
562
574
|
}
|
|
563
575
|
/** Reports whether distinct host policy can survive asynchronous work. */
|
|
564
576
|
function supportsScopedAiTransportHosts() {
|
|
565
|
-
return
|
|
577
|
+
return hostState.scope !== void 0;
|
|
566
578
|
}
|
|
567
579
|
/** Resolves an explicit embedding policy without replacing the process default. */
|
|
568
580
|
function createAiTransportHost(host = {}) {
|
|
569
581
|
return {
|
|
570
|
-
...
|
|
582
|
+
...hostState.inert,
|
|
571
583
|
...host,
|
|
572
|
-
normalizeAnthropicInlineContentBlocks: host.normalizeAnthropicInlineContentBlocks ??
|
|
584
|
+
normalizeAnthropicInlineContentBlocks: host.normalizeAnthropicInlineContentBlocks ?? hostState.inert.normalizeAnthropicInlineContentBlocks,
|
|
573
585
|
plugin: {
|
|
574
|
-
...
|
|
586
|
+
...hostState.inert.plugin,
|
|
575
587
|
...host.plugin
|
|
576
588
|
}
|
|
577
589
|
};
|
|
578
590
|
}
|
|
579
591
|
/** Provider operations retain their policy across lazy loads and asynchronous I/O. */
|
|
580
592
|
function runWithAiTransportHost(host, run) {
|
|
581
|
-
if (!
|
|
582
|
-
if (host !==
|
|
583
|
-
if (
|
|
593
|
+
if (!hostState.scope) {
|
|
594
|
+
if (host !== hostState.active) throw new Error("Scoped AI transport hosts require Node.js async context support");
|
|
595
|
+
if (hostState.pendingHost && hostState.pendingHost !== host) throw new Error("AI transport host changed while browser provider work was still pending");
|
|
584
596
|
const result = run();
|
|
585
597
|
trackUnscopedOperation(host, result);
|
|
586
598
|
return result;
|
|
587
599
|
}
|
|
588
|
-
return
|
|
600
|
+
return hostState.scope.run(host, run);
|
|
589
601
|
}
|
|
590
602
|
/** Installers must read the process default, never an unrelated operation's scoped policy. */
|
|
591
603
|
function getDefaultAiTransportHost() {
|
|
592
|
-
return
|
|
604
|
+
return hostState.active;
|
|
593
605
|
}
|
|
594
606
|
/** Installs host implementations for the transport policy ports. */
|
|
595
607
|
function configureAiTransportHost(host) {
|
|
596
|
-
if (!
|
|
597
|
-
|
|
598
|
-
const transportHost =
|
|
599
|
-
if (transportHost.registerCustomApi ===
|
|
600
|
-
const pending =
|
|
608
|
+
if (!hostState.scope && hostState.pendingOperations > 0) throw new Error("Cannot replace the AI transport host while browser provider work is pending");
|
|
609
|
+
hostState.active = createAiTransportHost(host);
|
|
610
|
+
const transportHost = hostState.active;
|
|
611
|
+
if (transportHost.registerCustomApi === hostState.inert.registerCustomApi || hostState.pendingRegistrations.length === 0) return;
|
|
612
|
+
const pending = hostState.pendingRegistrations.splice(0);
|
|
601
613
|
for (const registration of pending) transportHost.registerCustomApi(registration.registry, registration.api, registration.streamFn);
|
|
602
614
|
}
|
|
603
615
|
/** Returns the active transport host (inert defaults unless configured). */
|
|
604
616
|
function getAiTransportHost() {
|
|
605
|
-
return
|
|
617
|
+
return hostState.scope?.getStore() ?? hostState.active;
|
|
606
618
|
}
|
|
607
619
|
/** Resolves sentinel substrings in custom headers at a no-fetch adapter boundary. */
|
|
608
620
|
function resolveAiTransportHeaderSentinels(headers) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
3
|
-
import { n as ApiRegistry } from "./api-registry-
|
|
1
|
+
import { P as ModelRequestHeaders, at as StreamFn, f as Context, j as Model, n as Api } from "./types-B6vvn8is.mjs";
|
|
2
|
+
import "./index-DqIreoGH.mjs";
|
|
3
|
+
import { n as ApiRegistry } from "./api-registry-CvAtt60P.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-BVynqwGC.mjs";
|
|
2
2
|
//#region packages/ai/src/transports/host-policy.ts
|
|
3
3
|
function buildGuardedModelFetch(model, timeoutMs, options) {
|
|
4
4
|
const host = getAiTransportHost();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./event-stream-
|
|
3
|
-
import "./validation-
|
|
1
|
+
import { M as ModelCostConfig, P as ModelRequestHeaders, et as RawModelCostConfig, o as AssistantMessage, vt as Usage } from "./types-B6vvn8is.mjs";
|
|
2
|
+
import "./event-stream-DSHjzUpL.mjs";
|
|
3
|
+
import "./validation-B3VZTKei.mjs";
|
|
4
4
|
//#region packages/llm-core/src/usage-cost.d.ts
|
|
5
5
|
declare function normalizeModelCostConfig(cost: RawModelCostConfig): ModelCostConfig;
|
|
6
6
|
declare function normalizeResolvedPricing(cost: Partial<RawModelCostConfig>): ModelCostConfig;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { C as supportsClaudeFastMode, D as supportsClaudeServerCompaction, E as supportsClaudeNativeXhighEffort, S as supportsClaudeAdaptiveThinking, T as supportsClaudeNativeMaxEffort, _ as resolveClaudeOpus55ModelIdentity, a as CLAUDE_OPUS_5_THINKING_PROFILE, b as resolveClaudeSonnet5ModelIdentity, c as bindsClaudeThinkingPrefix, d as requiresClaudeMandatoryAdaptiveThinking, f as resolveClaudeFable5ModelIdentity, g as resolveClaudeNativeThinkingLevelMap, h as resolveClaudeMythos5ModelIdentity, i as CLAUDE_OPUS_55_THINKING_PROFILE, l as requiresClaudeBetweenToolsThinking, m as resolveClaudeModelIdentity, n as CLAUDE_FABLE_5_THINKING_PROFILE, o as CLAUDE_SONNET_55_THINKING_PROFILE, p as resolveClaudeHaiku55ModelIdentity, r as CLAUDE_HAIKU_55_THINKING_PROFILE, s as CLAUDE_SONNET_5_THINKING_PROFILE, t as observeAsyncIterator, u as requiresClaudeDefaultSampling, v as resolveClaudeOpus5ModelIdentity, w as supportsClaudeInHistorySystemMessages, x as supportsClaude1MContext, y as resolveClaudeSonnet55ModelIdentity } from "./observe-async-iterator-AlARO5wS.mjs";
|
|
2
|
-
import { $ as
|
|
3
|
-
import { a as normalizeResolvedPricing, i as normalizeModelCostConfig, n as appendTextDeltaToAssistantMessage, r as calculateUsageCost, t as omitNullRequestHeaders } from "./index-
|
|
4
|
-
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-
|
|
5
|
-
import { n as validateToolCall, t as validateToolArguments } from "./validation-
|
|
6
|
-
import { a as RegisteredApiProvider, i as ApiStreamSimpleFunction, n as ApiRegistry, o as createApiRegistry, r as ApiStreamFunction, t as ApiProvider } from "./api-registry-
|
|
7
|
-
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-
|
|
2
|
+
import { $ as RUNTIME_CONTEXT_HEADER, A as Message, At as setRuntimeContextRetention, B as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, Bt as recordSuppressedReasoning, C as ImagesProvider, Ct as hasLegacyRuntimeContextEnvelope, D as KnownImagesProvider, Dt as labelRuntimeContextText, E as KnownImagesApi, Et as labelRuntimeContextContent, F as ModelThinkingLevel, Ft as createAssistantMessageDiagnostic, G as ProviderReplayState, H as PricingTier, I as OpenAICompletionsCompat, It as extractDiagnosticError, J as REPETITIVE_OUTPUT_ERROR_CODE, K as ProviderResponse, L as OpenAIResponsesCompat, Lt as formatThrownValue, M as ModelCostConfig, Mt as DiagnosticErrorInfo, N as ModelCostRates, Nt as ProviderRefusalReview, O as MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, Ot as readRuntimeContextMetadata, P as ModelRequestHeaders, Pt as appendAssistantMessageDiagnostic, Q as RUNTIME_CONTEXT_FOOTER, R as OpenRouterRouting, Rt as isProviderRefusalAssistantError, S as ImagesOutputContent, St as escapeRuntimeContextFooter, T as KnownApi, Tt as isRuntimeContextMessage, U as Provider, V as PreparedSystemPrompt, W as ProviderImagesOptions, X as RUNTIME_CONTEXT_CUSTOM_TYPE, Y as RUNTIME_CONTEXT_BEGIN_MARKER, Z as RUNTIME_CONTEXT_END_MARKER, _ as ImagesContext, _t as Transport, a as AssistantImages, at as StreamFn, b as ImagesModel, bt as ValidateToolArgumentsFn, c as AssistantMessageEventStreamContract, ct as TextContent, d as CompleteSimpleFn, dt as ThinkingContent, et as RawModelCostConfig, f as Context, ft as ThinkingLevel, g as ImagesApi, gt as ToolResultMessage, h as ImageContent, ht as ToolCall, i as AssistantHistoryMessage, it as StopReason, j as Model, jt as AssistantMessageDiagnostic, k as MaybePromise, kt as runtimeContextContentToText, l as AssistantMessageEventStreamLike, lt as TextSignatureV1, m as HistoryUsage, mt as Tool, n as Api, nt as RuntimeContextMessage, o as AssistantMessage, ot as StreamFunction, p as DEFAULT_MISSING_TOOL_RESULT_TEXT, pt as ThinkingLevelMap, q as ProviderStreamOptions, r as AssistantDeliveryTtsFacts, rt as SimpleStreamOptions, s as AssistantMessageEvent, st as StreamOptions, t as AnthropicMessagesCompat, tt as RawPricingTier, u as CacheRetention, ut as ThinkingBudgets, v as ImagesFunction, vt as Usage, w as ImagesStopReason, wt as hasRuntimeContextMarker, x as ImagesOptions, xt as VercelGatewayRouting, y as ImagesInputContent, yt as UserMessage, z as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, zt as readProviderRefusalReview } from "./types-B6vvn8is.mjs";
|
|
3
|
+
import { a as normalizeResolvedPricing, i as normalizeModelCostConfig, n as appendTextDeltaToAssistantMessage, r as calculateUsageCost, t as omitNullRequestHeaders } from "./index-DqIreoGH.mjs";
|
|
4
|
+
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-DSHjzUpL.mjs";
|
|
5
|
+
import { n as validateToolCall, t as validateToolArguments } from "./validation-B3VZTKei.mjs";
|
|
6
|
+
import { a as RegisteredApiProvider, i as ApiStreamSimpleFunction, n as ApiRegistry, o as createApiRegistry, r as ApiStreamFunction, t as ApiProvider } from "./api-registry-CvAtt60P.mjs";
|
|
7
|
+
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-bx8W0SER.mjs";
|
|
8
8
|
//#region packages/ai/src/stream.d.ts
|
|
9
9
|
/** Creates an isolated LLM runtime backed by the supplied provider registry. */
|
|
10
10
|
export declare function createLlmRuntime(registry?: ApiRegistry): {
|
|
@@ -38,4 +38,4 @@ export declare function createNodeLlmRuntime(registry?: ApiRegistry, transportHo
|
|
|
38
38
|
};
|
|
39
39
|
export type LlmRuntime = ReturnType<typeof createLlmRuntime>;
|
|
40
40
|
//#endregion
|
|
41
|
-
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, ModelRequestHeaders, ModelThinkingLevel, OpenAICompletionsCompat, OpenAIResponsesCompat, OpenAIStrictToolSettingOptions, OpenRouterRouting, PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, PreparedSystemPrompt, PricingTier, Provider, ProviderImagesOptions, ProviderRefusalReview, ProviderReplayState, ProviderResponse, ProviderStreamOptions, REPETITIVE_OUTPUT_ERROR_CODE, 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, appendTextDeltaToAssistantMessage, bindsClaudeThinkingPrefix, calculateUsageCost, configureAiTransportHost, createAiTransportHost, createApiRegistry, createAssistantMessageDiagnostic, createAssistantMessageEventStream, escapeRuntimeContextFooter, extractDiagnosticError, formatThrownValue, getAiTransportHost, getDefaultAiTransportHost, hasLegacyRuntimeContextEnvelope, hasRuntimeContextMarker, isProviderRefusalAssistantError, isRuntimeContextMessage, labelRuntimeContextContent, labelRuntimeContextText, normalizeModelCostConfig, normalizeResolvedPricing, observeAsyncIterator, omitNullRequestHeaders, readProviderRefusalReview, readRuntimeContextMetadata, recordSuppressedReasoning, 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 };
|
|
41
|
+
export { AiInlineContentBlock, AiInlineImageBlock, AiInlineTextBlock, AiProviderRequestCapabilities, AiProviderRequestPolicyInput, AiProviderStreamHookContext, AiTransformTransportMessages, AiTransportHost, AiTransportPluginHost, AnthropicMessagesCompat, Api, ApiProvider, ApiRegistry, ApiStreamFunction, ApiStreamSimpleFunction, AssistantDeliveryTtsFacts, AssistantHistoryMessage, 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, HistoryUsage, ImageContent, ImagesApi, ImagesContext, ImagesFunction, ImagesInputContent, ImagesModel, ImagesOptions, ImagesOutputContent, ImagesProvider, ImagesStopReason, KnownApi, KnownImagesApi, KnownImagesProvider, MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, MaybePromise, Message, Model, ModelCostConfig, ModelCostRates, ModelRequestHeaders, ModelThinkingLevel, OpenAICompletionsCompat, OpenAIResponsesCompat, OpenAIStrictToolSettingOptions, OpenRouterRouting, PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, PreparedSystemPrompt, PricingTier, Provider, ProviderImagesOptions, ProviderRefusalReview, ProviderReplayState, ProviderResponse, ProviderStreamOptions, REPETITIVE_OUTPUT_ERROR_CODE, 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, appendTextDeltaToAssistantMessage, bindsClaudeThinkingPrefix, calculateUsageCost, configureAiTransportHost, createAiTransportHost, createApiRegistry, createAssistantMessageDiagnostic, createAssistantMessageEventStream, escapeRuntimeContextFooter, extractDiagnosticError, formatThrownValue, getAiTransportHost, getDefaultAiTransportHost, hasLegacyRuntimeContextEnvelope, hasRuntimeContextMarker, isProviderRefusalAssistantError, isRuntimeContextMessage, labelRuntimeContextContent, labelRuntimeContextText, normalizeModelCostConfig, normalizeResolvedPricing, observeAsyncIterator, omitNullRequestHeaders, readProviderRefusalReview, readRuntimeContextMetadata, recordSuppressedReasoning, 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
|
@@ -6,6 +6,6 @@ import { t as omitNullRequestHeaders } from "./request-headers-DO4Mqhw1.mjs";
|
|
|
6
6
|
import { a as createAssistantMessageEventStream, n as EventStream, t as AssistantMessageEventStream } from "./event-stream-X2gmsUWv.mjs";
|
|
7
7
|
import { n as validateToolCall, t as validateToolArguments } from "./validation-DGXqfvkj.mjs";
|
|
8
8
|
import { t as observeAsyncIterator } from "./observe-async-iterator-DgmegcZR.mjs";
|
|
9
|
-
import { n as createNodeLlmRuntime, r as createApiRegistry, t as createLlmRuntime } from "./stream-
|
|
10
|
-
import { a as resolveAiTransportHeaderSentinels, i as getDefaultAiTransportHost, n as createAiTransportHost, o as runWithAiTransportHost, r as getAiTransportHost, s as supportsScopedAiTransportHosts, t as configureAiTransportHost } from "./host-
|
|
9
|
+
import { n as createNodeLlmRuntime, r as createApiRegistry, t as createLlmRuntime } from "./stream-Dm0EMT-0.mjs";
|
|
10
|
+
import { a as resolveAiTransportHeaderSentinels, i as getDefaultAiTransportHost, n as createAiTransportHost, o as runWithAiTransportHost, r as getAiTransportHost, s as supportsScopedAiTransportHosts, t as configureAiTransportHost } from "./host-BVynqwGC.mjs";
|
|
11
11
|
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, REPETITIVE_OUTPUT_ERROR_CODE, RUNTIME_CONTEXT_BEGIN_MARKER, RUNTIME_CONTEXT_CUSTOM_TYPE, RUNTIME_CONTEXT_END_MARKER, RUNTIME_CONTEXT_FOOTER, RUNTIME_CONTEXT_HEADER, appendAssistantMessageDiagnostic, appendTextDeltaToAssistantMessage, bindsClaudeThinkingPrefix, calculateUsageCost, configureAiTransportHost, createAiTransportHost, createApiRegistry, createAssistantMessageDiagnostic, createAssistantMessageEventStream, createLlmRuntime, createNodeLlmRuntime, escapeRuntimeContextFooter, extractDiagnosticError, formatThrownValue, getAiTransportHost, getDefaultAiTransportHost, hasLegacyRuntimeContextEnvelope, hasRuntimeContextMarker, isProviderRefusalAssistantError, isRuntimeContextMessage, labelRuntimeContextContent, labelRuntimeContextText, normalizeModelCostConfig, normalizeResolvedPricing, observeAsyncIterator, omitNullRequestHeaders, readProviderRefusalReview, readRuntimeContextMetadata, recordSuppressedReasoning, 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,10 +1,10 @@
|
|
|
1
1
|
import { E as supportsClaudeNativeXhighEffort, S as supportsClaudeAdaptiveThinking, T as supportsClaudeNativeMaxEffort, _ as resolveClaudeOpus55ModelIdentity, b as resolveClaudeSonnet5ModelIdentity, c as bindsClaudeThinkingPrefix, d as requiresClaudeMandatoryAdaptiveThinking, f as resolveClaudeFable5ModelIdentity, g as resolveClaudeNativeThinkingLevelMap, h as resolveClaudeMythos5ModelIdentity, l as requiresClaudeBetweenToolsThinking, m as resolveClaudeModelIdentity, p as resolveClaudeHaiku55ModelIdentity, u as requiresClaudeDefaultSampling, v as resolveClaudeOpus5ModelIdentity, y as resolveClaudeSonnet55ModelIdentity } from "../observe-async-iterator-AlARO5wS.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import "../index-
|
|
4
|
-
import "../types-
|
|
5
|
-
import { i as AnthropicThinkingDisplay, n as AnthropicEffort, r as AnthropicOptions, t as AnthropicContextManagementOptions } from "../provider-options-
|
|
6
|
-
import { a as prepareAnthropicInputSchema, c as resolveOriginalAnthropicToolName, i as normalizeAnthropicToolChoice, l as toClaudeCodeToolName, n as AnthropicToolProjection, o as projectAnthropicTools, r as normalizeAnthropicToolCallId, s as reconcileAnthropicToolChoice, t as AnthropicProjectedToolChoice } from "../anthropic-tool-projection-
|
|
7
|
-
import { a as buildAnthropicSystemBlocks, h as applyAnthropicThinkingOptions, p as resolveAnthropicServerCompactionPlan, s as isDirectAnthropicModel } from "../anthropic-payload-policy-
|
|
2
|
+
import { P as ModelRequestHeaders, f as Context, it as StopReason, j as Model, jt as AssistantMessageDiagnostic, ot as StreamFunction, rt as SimpleStreamOptions, vt as Usage } from "../types-B6vvn8is.mjs";
|
|
3
|
+
import "../index-DqIreoGH.mjs";
|
|
4
|
+
import "../types-a4Eg5L2z.mjs";
|
|
5
|
+
import { i as AnthropicThinkingDisplay, n as AnthropicEffort, r as AnthropicOptions, t as AnthropicContextManagementOptions } from "../provider-options-2vKAAn7G.mjs";
|
|
6
|
+
import { a as prepareAnthropicInputSchema, c as resolveOriginalAnthropicToolName, i as normalizeAnthropicToolChoice, l as toClaudeCodeToolName, n as AnthropicToolProjection, o as projectAnthropicTools, r as normalizeAnthropicToolCallId, s as reconcileAnthropicToolChoice, t as AnthropicProjectedToolChoice } from "../anthropic-tool-projection-DFvJiCQy.mjs";
|
|
7
|
+
import { a as buildAnthropicSystemBlocks, h as applyAnthropicThinkingOptions, p as resolveAnthropicServerCompactionPlan, s as isDirectAnthropicModel } from "../anthropic-payload-policy-CcIAtAos.mjs";
|
|
8
8
|
//#region packages/ai/src/providers/anthropic.d.ts
|
|
9
9
|
type AnthropicCompactionOptions = AnthropicOptions & {
|
|
10
10
|
authProfileId?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { D as supportsClaudeNativeMaxEffort, O as supportsClaudeNativeXhighEffort, S as resolveClaudeSonnet5ModelIdentity, _ as resolveClaudeMythos5ModelIdentity, b as resolveClaudeOpus5ModelIdentity, d as requiresClaudeBetweenToolsThinking, f as requiresClaudeDefaultSampling, g as resolveClaudeModelIdentity, h as resolveClaudeHaiku55ModelIdentity, m as resolveClaudeFable5ModelIdentity, p as requiresClaudeMandatoryAdaptiveThinking, u as bindsClaudeThinkingPrefix, v as resolveClaudeNativeThinkingLevelMap, w as supportsClaudeAdaptiveThinking, x as resolveClaudeSonnet55ModelIdentity, y as resolveClaudeOpus55ModelIdentity } from "../src-CQ7nH2mL.mjs";
|
|
2
|
-
import { C as readRequiredClaudeCodeVersion, D as usesClaudeFable5MessagesContract, E as resolveAnthropicThinkingEffort, O as usesClaudeStreamingRefusalContract, S as raiseClaudeCodeVersionFloor, T as resetLearnedClaudeCodeVersionForTest, _ as buildAnthropicClaudeCodeIdentity, b as prepareClaudeNoPrefillRequestContext, g as applyClaudeRequestContract, h as ANTHROPIC_CLAUDE_CODE_VERSION, v as defaultsClaudeAdaptiveThinking, w as requiresClaudeAdaptiveThinking, x as prepareModelBoundThinkingReplay, y as mapAnthropicStopReason } from "../host-
|
|
3
|
-
import { A as resolveAnthropicServerCompactionPlan, B as usesFoundryBearerAuth, F as applyAnthropicFallbackBoundary, I as readAnthropicFallbackBoundary, L as resolveAnthropicFallbackServingModelCost, M as ANTHROPIC_SERVER_SIDE_FALLBACKS, N as ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, P as CLAUDE_OPUS_FALLBACK_MODEL_COST, R as isAnthropicOAuthApiKey, S as buildAnthropicSystemBlocks, _ as applyAnthropicRefusal, c as readAnthropicCacheWriteUsage, d as readLastAnthropicIterationUsage, f as ANTHROPIC_OMITTED_REASONING_TEXT, g as readAnthropicInputTransformations, h as logAnthropicThinkingDrops, l as readAnthropicPromptUsageSnapshot, m as findActiveAnthropicToolTurnAssistantIndex, n as applyAnthropicThinkingOptions, o as applyAnthropicMessageDeltaUsage, p as applyAnthropicThinkingBindingControls, s as applyAnthropicMessageStartUsage, u as readAnthropicUsageTokenCount, w as isDirectAnthropicModel, z as omitFoundryBearerCredentialHeaders } from "../anthropic-stream-lifecycle-
|
|
4
|
-
import { a as reconcileAnthropicToolChoice, i as projectAnthropicTools, n as normalizeAnthropicToolChoice, o as resolveOriginalAnthropicToolName, r as prepareAnthropicInputSchema, s as toClaudeCodeToolName, t as normalizeAnthropicToolCallId } from "../anthropic-tool-projection-
|
|
5
|
-
import { n as streamAnthropic, r as streamSimpleAnthropic } from "../anthropic-
|
|
2
|
+
import { C as readRequiredClaudeCodeVersion, D as usesClaudeFable5MessagesContract, E as resolveAnthropicThinkingEffort, O as usesClaudeStreamingRefusalContract, S as raiseClaudeCodeVersionFloor, T as resetLearnedClaudeCodeVersionForTest, _ as buildAnthropicClaudeCodeIdentity, b as prepareClaudeNoPrefillRequestContext, g as applyClaudeRequestContract, h as ANTHROPIC_CLAUDE_CODE_VERSION, v as defaultsClaudeAdaptiveThinking, w as requiresClaudeAdaptiveThinking, x as prepareModelBoundThinkingReplay, y as mapAnthropicStopReason } from "../host-BVynqwGC.mjs";
|
|
3
|
+
import { A as resolveAnthropicServerCompactionPlan, B as usesFoundryBearerAuth, F as applyAnthropicFallbackBoundary, I as readAnthropicFallbackBoundary, L as resolveAnthropicFallbackServingModelCost, M as ANTHROPIC_SERVER_SIDE_FALLBACKS, N as ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, P as CLAUDE_OPUS_FALLBACK_MODEL_COST, R as isAnthropicOAuthApiKey, S as buildAnthropicSystemBlocks, _ as applyAnthropicRefusal, c as readAnthropicCacheWriteUsage, d as readLastAnthropicIterationUsage, f as ANTHROPIC_OMITTED_REASONING_TEXT, g as readAnthropicInputTransformations, h as logAnthropicThinkingDrops, l as readAnthropicPromptUsageSnapshot, m as findActiveAnthropicToolTurnAssistantIndex, n as applyAnthropicThinkingOptions, o as applyAnthropicMessageDeltaUsage, p as applyAnthropicThinkingBindingControls, s as applyAnthropicMessageStartUsage, u as readAnthropicUsageTokenCount, w as isDirectAnthropicModel, z as omitFoundryBearerCredentialHeaders } from "../anthropic-stream-lifecycle-BA3FkIQn.mjs";
|
|
4
|
+
import { a as reconcileAnthropicToolChoice, i as projectAnthropicTools, n as normalizeAnthropicToolChoice, o as resolveOriginalAnthropicToolName, r as prepareAnthropicInputSchema, s as toClaudeCodeToolName, t as normalizeAnthropicToolCallId } from "../anthropic-tool-projection-DP6R_sBq.mjs";
|
|
5
|
+
import { n as streamAnthropic, r as streamSimpleAnthropic } from "../anthropic-OsxZVxT3.mjs";
|
|
6
6
|
export { ANTHROPIC_CLAUDE_CODE_VERSION, ANTHROPIC_OMITTED_REASONING_TEXT, ANTHROPIC_SERVER_SIDE_FALLBACKS, ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, CLAUDE_OPUS_FALLBACK_MODEL_COST, applyAnthropicFallbackBoundary, applyAnthropicMessageDeltaUsage, applyAnthropicMessageStartUsage, applyAnthropicRefusal, applyAnthropicThinkingBindingControls, applyAnthropicThinkingOptions, applyClaudeRequestContract, bindsClaudeThinkingPrefix, buildAnthropicClaudeCodeIdentity, buildAnthropicSystemBlocks, defaultsClaudeAdaptiveThinking, findActiveAnthropicToolTurnAssistantIndex, isAnthropicOAuthApiKey, isDirectAnthropicModel, logAnthropicThinkingDrops, mapAnthropicStopReason, normalizeAnthropicToolCallId, normalizeAnthropicToolChoice, omitFoundryBearerCredentialHeaders, prepareAnthropicInputSchema, prepareClaudeNoPrefillRequestContext, prepareModelBoundThinkingReplay, projectAnthropicTools, raiseClaudeCodeVersionFloor, readAnthropicCacheWriteUsage, readAnthropicFallbackBoundary, readAnthropicInputTransformations, readAnthropicPromptUsageSnapshot, readAnthropicUsageTokenCount, readLastAnthropicIterationUsage, readRequiredClaudeCodeVersion, reconcileAnthropicToolChoice, requiresClaudeAdaptiveThinking, requiresClaudeBetweenToolsThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resetLearnedClaudeCodeVersionForTest, resolveAnthropicFallbackServingModelCost, resolveAnthropicServerCompactionPlan, resolveAnthropicThinkingEffort, resolveClaudeFable5ModelIdentity, resolveClaudeHaiku55ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus55ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet55ModelIdentity, resolveClaudeSonnet5ModelIdentity, resolveOriginalAnthropicToolName, streamAnthropic, streamSimpleAnthropic, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, toClaudeCodeToolName, usesClaudeFable5MessagesContract, usesClaudeStreamingRefusalContract, usesFoundryBearerAuth };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../types-
|
|
3
|
-
import "../event-stream-
|
|
1
|
+
import { j as Model, rt as SimpleStreamOptions } from "../types-B6vvn8is.mjs";
|
|
2
|
+
import "../types-a4Eg5L2z.mjs";
|
|
3
|
+
import "../event-stream-C1QKiamS.mjs";
|
|
4
4
|
import { GenerateContentConfig, ThinkingLevel } from "@google/genai";
|
|
5
5
|
//#region packages/ai/src/providers/google-shared.d.ts
|
|
6
6
|
type GoogleThinkingOptions = {
|
package/dist/internal/google.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as buildGoogleGenerationConfig, i as buildGoogleSimpleThinking } from "../google-shared-
|
|
1
|
+
export { n as buildGoogleGenerationConfig, i as buildGoogleSimpleThinking } from "../google-shared-Bny3gZ6L.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as resolveOpenAICompletionsCompat } from "../openai-completions-compat-
|
|
1
|
+
import { o as resolveOpenAICompletionsCompat } from "../openai-completions-compat-C26ajk4r.mjs";
|
|
2
2
|
//#region packages/ai/src/transports/openai-completions-reasoning-replay.d.ts
|
|
3
3
|
/** Shared by history sanitization and wire replay, including stale model metadata. */
|
|
4
4
|
export declare function requiresReasoningContentReplay(modelId: unknown): boolean;
|