@openclaw/ai 2026.9.9 → 2026.9.34
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-DfsDsNJl.mjs → anthropic-BL3z3SiB.mjs} +7 -7
- package/dist/{anthropic-payload-policy-BVcxWtQD.d.mts → anthropic-payload-policy-CFbalbbU.d.mts} +3 -3
- package/dist/{anthropic-stream-reducer-CiVXqWLP.mjs → anthropic-stream-reducer-XCL_L8KJ.mjs} +7 -7
- package/dist/{api-registry-pGjnPg1z.d.mts → api-registry-BLbq15N5.d.mts} +2 -2
- package/dist/{azure-openai-responses-DUQuNQL6.mjs → azure-openai-responses-DqXyjyTC.mjs} +6 -6
- package/dist/diagnostics.d.mts +4 -4
- package/dist/env-api-keys-BR0MUYYD.d.mts +17 -0
- package/dist/event-stream-B0vjWzHd.d.mts +1 -0
- package/dist/{event-stream-DOPFYVqs.d.mts → event-stream-CiaHxSK0.d.mts} +1 -1
- package/dist/event-stream.d.mts +2 -2
- package/dist/{google-CyeM7l4M.mjs → google-D9zpPelZ.mjs} +5 -5
- package/dist/{google-interactions-BvbVUFzr.mjs → google-interactions-Br_n4tZB.mjs} +19 -16
- package/dist/{google-messages-BAiONu4V.mjs → google-messages-pvt0rKfN.mjs} +6 -4
- package/dist/{google-shared-tpqMugao.mjs → google-shared-DPeR7LLA.mjs} +13 -18
- package/dist/{google-vertex-BTwRIP8v.mjs → google-vertex-D4Qde9Qq.mjs} +4 -4
- package/dist/{host-COwfRiSL.d.mts → host-BhpDO5Sy.d.mts} +3 -3
- package/dist/{host-l5VGgsa2.mjs → host-DqhMLv8J.mjs} +1 -1
- package/dist/{host-policy-D8HBI2Pv.mjs → host-policy-B3DuH3Le.mjs} +1 -1
- package/dist/{index-DHeFfpcz.d.mts → index-Iw8l620S.d.mts} +3 -3
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +3 -3
- package/dist/internal/anthropic.d.mts +5 -5
- package/dist/internal/anthropic.mjs +4 -4
- package/dist/internal/env-api-keys.d.mts +2 -0
- package/dist/internal/env-api-keys.mjs +2 -0
- package/dist/internal/google-model-family.d.mts +2 -0
- package/dist/internal/google-model-family.mjs +6 -2
- 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.d.mts +9 -9
- package/dist/internal/openai.mjs +7 -7
- package/dist/internal/runtime.d.mts +8 -23
- package/dist/internal/runtime.mjs +2 -2
- package/dist/internal/shared.d.mts +3 -3
- package/dist/internal/shared.mjs +3 -3
- package/dist/internal/tool-schema.mjs +1 -1
- package/dist/{mistral-Cxbukk9d.mjs → mistral-ytNCcQhM.mjs} +4 -4
- package/dist/{openai-chatgpt-responses-CUuh4TkA.mjs → openai-chatgpt-responses-CHluxZ0P.mjs} +66 -56
- package/dist/{openai-completions-CVwOQW-U.mjs → openai-completions-D0f28olp.mjs} +9 -9
- package/dist/{openai-completions-compat-CqWP1fn5.d.mts → openai-completions-compat-CQbGsPt0.d.mts} +3 -3
- package/dist/{openai-completions-compat-W0ykoT4z.mjs → openai-completions-compat-D1q02qdx.mjs} +1 -1
- package/dist/{openai-completions-stream-Crkc597h.mjs → openai-completions-stream-iagLwGz6.mjs} +26 -31
- package/dist/{openai-prompt-cache-YTmJ_iMS.d.mts → openai-prompt-cache-CuY5QDIc.d.mts} +2 -2
- package/dist/{openai-prompt-cache-D0e4t5-3.mjs → openai-prompt-cache-DHxMpeRz.mjs} +1 -1
- package/dist/{openai-provider-client-evrjHyOl.mjs → openai-provider-client-Bcjj6_fK.mjs} +2 -2
- package/dist/{openai-responses-cNWyKDF8.mjs → openai-responses-D2ElJYAb.mjs} +8 -8
- package/dist/{openai-responses-compaction-replay-CQHR2isp.d.mts → openai-responses-compaction-replay-DiGjwK4d.d.mts} +4 -4
- package/dist/{openai-responses-contracts-C2H8pffb.d.mts → openai-responses-contracts-CYScOS7J.d.mts} +4 -4
- package/dist/{openai-responses-prompt-observer-internal-Do_oXZf7.mjs → openai-responses-prompt-observer-internal-CWhVpkYl.mjs} +8 -8
- package/dist/{openai-responses-shared-6QypGhvL.mjs → openai-responses-shared-BUaK4Pb3.mjs} +508 -16
- package/dist/{openai-responses-terminal-usage-D0WZQlIF.d.mts → openai-responses-terminal-usage-CLzeNWqW.d.mts} +2 -2
- package/dist/{openai-tool-schema-vsl-cE-n.mjs → openai-tool-schema-DSAxYnHW.mjs} +18 -1
- package/dist/{openai-transport-params-a_8s6k6d.mjs → openai-transport-params-CqLxK93q.mjs} +20 -8
- package/dist/{provider-options-yDbWMoEr.d.mts → provider-options-CFiaIG4K.d.mts} +2 -2
- package/dist/{provider-replay-context-Cy7RdZ2C.mjs → provider-replay-context-BwVRJUQZ.mjs} +1 -1
- package/dist/{provider-transcript-transform-B-bAzjo8.mjs → provider-transcript-transform-Cg-36VSt.mjs} +2 -2
- package/dist/{provider-transport-turn-state-CE0dp-UO.mjs → provider-transport-turn-state-CUUfdJPN.mjs} +1 -1
- package/dist/{provider-types-CHsKHBBD.d.mts → provider-types-Bx_6hBmK.d.mts} +3 -3
- package/dist/provider-types.d.mts +5 -5
- package/dist/providers.d.mts +2 -2
- package/dist/providers.mjs +10 -10
- package/dist/{simple-options-ueGsZ3Rz.mjs → simple-options-B9u6-CF3.mjs} +2 -2
- package/dist/{src-Dw59CBue.mjs → src-Dq6VRdeL.mjs} +1 -1
- package/dist/{transport-stream-shared-CYLM2HEK.d.mts → transport-stream-shared-B_REuIea.d.mts} +4 -4
- package/dist/{transport-stream-shared-Bz9YwuQ0.mjs → transport-stream-shared-Dt7VrJFd.mjs} +1 -1
- package/dist/{transport-utils-CEKSacZh.mjs → transport-utils-B11GlmDO.mjs} +6 -2
- package/dist/transports.d.mts +14 -13
- package/dist/transports.mjs +26 -511
- package/dist/{types-CLLR3eB4.d.mts → types-B89w6ly2.d.mts} +11 -0
- package/dist/types-DbmNRKvK.d.mts +1 -0
- package/dist/types.d.mts +5 -5
- package/dist/types.mjs +2 -2
- package/dist/{validation-Cat2wQsc.d.mts → validation-DblQWSRA.d.mts} +1 -1
- package/dist/{validation-BFZc40Ig.mjs → validation-Fe6RtKI6.mjs} +1 -6
- package/dist/validation.d.mts +1 -1
- package/dist/validation.mjs +1 -1
- package/package.json +6 -1
- package/dist/event-stream-CMQfX_yr.d.mts +0 -1
- package/dist/types-CoL-LJ7j.d.mts +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
|
-
import { b as resolveClaudeOpus5ModelIdentity, w as supportsClaudeAdaptiveThinking, x as resolveClaudeSonnet55ModelIdentity } from "./src-
|
|
2
|
+
import { b as resolveClaudeOpus5ModelIdentity, w as supportsClaudeAdaptiveThinking, x as resolveClaudeSonnet55ModelIdentity } from "./src-Dq6VRdeL.mjs";
|
|
3
3
|
import { t as AssistantMessageEventStream } from "./event-stream-vd9UnCAU.mjs";
|
|
4
|
-
import { _ as requiresClaudeAdaptiveThinking, b as usesClaudeFable5MessagesContract, f as applyClaudeRequestContract, g as prepareClaudeNoPrefillRequestContext, m as defaultsClaudeAdaptiveThinking, n as getAiTransportHost, p as buildAnthropicClaudeCodeIdentity, r as resolveAiTransportHeaderSentinels, v as resolveAnthropicThinkingEffort, x as usesClaudeStreamingRefusalContract } from "./host-
|
|
5
|
-
import { t as MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "./transport-utils-
|
|
6
|
-
import { A as applyAnthropicRequestCacheControl, B as ANTHROPIC_SERVER_SIDE_FALLBACKS, C as applyAnthropicThinkingBindingControls, D as applyAnthropicContextManagementToRequest, F as resolveAnthropicCacheOptions, J as usesFoundryBearerAuth, K as isAnthropicOAuthApiKey, N as isDirectAnthropicModel, R as resolveAnthropicRequestBetaHeader, d as convertAnthropicTools, f as buildAnthropicReplayPlan, g as normalizeAnthropicToolCallId, h as suppressAnthropicCompaction, j as buildAnthropicSystemBlocks, l as buildAnthropicGenerationParams, p as isAnthropicReplayRejection, q as omitFoundryBearerCredentialHeaders, t as consumeAnthropicStream, u as convertAnthropicMessages } from "./anthropic-stream-reducer-
|
|
4
|
+
import { _ as requiresClaudeAdaptiveThinking, b as usesClaudeFable5MessagesContract, f as applyClaudeRequestContract, g as prepareClaudeNoPrefillRequestContext, m as defaultsClaudeAdaptiveThinking, n as getAiTransportHost, p as buildAnthropicClaudeCodeIdentity, r as resolveAiTransportHeaderSentinels, v as resolveAnthropicThinkingEffort, x as usesClaudeStreamingRefusalContract } from "./host-DqhMLv8J.mjs";
|
|
5
|
+
import { t as MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "./transport-utils-B11GlmDO.mjs";
|
|
6
|
+
import { A as applyAnthropicRequestCacheControl, B as ANTHROPIC_SERVER_SIDE_FALLBACKS, C as applyAnthropicThinkingBindingControls, D as applyAnthropicContextManagementToRequest, F as resolveAnthropicCacheOptions, J as usesFoundryBearerAuth, K as isAnthropicOAuthApiKey, N as isDirectAnthropicModel, R as resolveAnthropicRequestBetaHeader, d as convertAnthropicTools, f as buildAnthropicReplayPlan, g as normalizeAnthropicToolCallId, h as suppressAnthropicCompaction, j as buildAnthropicSystemBlocks, l as buildAnthropicGenerationParams, p as isAnthropicReplayRejection, q as omitFoundryBearerCredentialHeaders, t as consumeAnthropicStream, u as convertAnthropicMessages } from "./anthropic-stream-reducer-XCL_L8KJ.mjs";
|
|
7
7
|
import { t as resolveCacheRetention } from "./cache-retention-0x979a5V.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-Dt7VrJFd.mjs";
|
|
9
|
+
import { n as buildBaseOptions, r as clampMaxTokensToModel, t as adjustMaxTokensForThinking } from "./simple-options-B9u6-CF3.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
12
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-BjtkplhG.mjs";
|
|
13
|
-
import { n as createAssistantOutput, t as transformProviderMessages } from "./provider-transcript-transform-
|
|
13
|
+
import { n as createAssistantOutput, t as transformProviderMessages } from "./provider-transcript-transform-Cg-36VSt.mjs";
|
|
14
14
|
import { n as resolveOpencodeSessionHeaders } from "./session-affinity-Bcunsn4I.mjs";
|
|
15
15
|
import { i as resolveCloudflareBaseUrl, n as hasCopilotVisionInput, t as buildCopilotDynamicHeaders } from "./github-copilot-headers-B37TB3rB.mjs";
|
|
16
16
|
import Anthropic from "@anthropic-ai/sdk";
|
package/dist/{anthropic-payload-policy-BVcxWtQD.d.mts → anthropic-payload-policy-CFbalbbU.d.mts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { O as Model } from "./types-
|
|
3
|
-
import { t as AnthropicContextManagementOptions } from "./provider-options-
|
|
1
|
+
import "./index-Iw8l620S.mjs";
|
|
2
|
+
import { O as Model } from "./types-B89w6ly2.mjs";
|
|
3
|
+
import { t as AnthropicContextManagementOptions } from "./provider-options-CFiaIG4K.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. */
|
package/dist/{anthropic-stream-reducer-CiVXqWLP.mjs → anthropic-stream-reducer-XCL_L8KJ.mjs}
RENAMED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { D as supportsClaudeNativeXhighEffort, 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 { D as supportsClaudeNativeXhighEffort, 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-Dq6VRdeL.mjs";
|
|
2
2
|
import { r as appendAssistantThinking } from "./event-stream-vd9UnCAU.mjs";
|
|
3
3
|
import { a as asRecord, o as isRecord, r as asOptionalObjectRecord, s as readStringField } from "./record-coerce-CNDovvft.mjs";
|
|
4
|
-
import { _ as requiresClaudeAdaptiveThinking, d as ANTHROPIC_CLAUDE_CODE_VERSION, h as mapAnthropicStopReason, k as isImageWithMediaPayload, n as getAiTransportHost, v as resolveAnthropicThinkingEffort, w as calculateCost } from "./host-
|
|
4
|
+
import { _ as requiresClaudeAdaptiveThinking, d as ANTHROPIC_CLAUDE_CODE_VERSION, h as mapAnthropicStopReason, k as isImageWithMediaPayload, n as getAiTransportHost, v as resolveAnthropicThinkingEffort, w as calculateCost } from "./host-DqhMLv8J.mjs";
|
|
5
5
|
import { i as normalizeOptionalLowercaseString, r as normalizeNullableString } from "./string-coerce-fsri9iCu.mjs";
|
|
6
6
|
import { i as asNonNegativeFiniteNumber, n as estimateBase64DecodedBytes } from "./base64-C1PsYcRQ.mjs";
|
|
7
|
-
import "./transport-utils-
|
|
8
|
-
import { i as resolveProviderRequestCapabilities, r as resolveProviderEndpoint } from "./host-policy-
|
|
7
|
+
import "./transport-utils-B11GlmDO.mjs";
|
|
8
|
+
import { i as resolveProviderRequestCapabilities, r as resolveProviderEndpoint } from "./host-policy-B3DuH3Le.mjs";
|
|
9
9
|
import { t as resolveCacheRetention } from "./cache-retention-0x979a5V.mjs";
|
|
10
|
-
import { C as parseJsonObjectPreservingUnsafeIntegers, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, _ as sanitizeNonEmptyTransportPayloadText, b as transportAbortError, d as iterateModelStream, j as sanitizeSurrogates, l as finalizeTerminalToolCallArguments, r as coerceTransportToolCallArguments, v as sanitizeTransportPayloadText } from "./transport-stream-shared-
|
|
11
|
-
import { C as stripSystemPromptCacheBoundary, D as sortPromptCacheToolsByName, d as describeToolResultMediaPlaceholder, m as extractToolResultText, p as extractToolResultBlockText, w as stripSystemPromptRelocatableBoundary, x as splitSystemPromptCacheBoundary } from "./simple-options-
|
|
10
|
+
import { C as parseJsonObjectPreservingUnsafeIntegers, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, _ as sanitizeNonEmptyTransportPayloadText, b as transportAbortError, d as iterateModelStream, j as sanitizeSurrogates, l as finalizeTerminalToolCallArguments, r as coerceTransportToolCallArguments, v as sanitizeTransportPayloadText } from "./transport-stream-shared-Dt7VrJFd.mjs";
|
|
11
|
+
import { C as stripSystemPromptCacheBoundary, D as sortPromptCacheToolsByName, d as describeToolResultMediaPlaceholder, m as extractToolResultText, p as extractToolResultBlockText, w as stripSystemPromptRelocatableBoundary, x as splitSystemPromptCacheBoundary } from "./simple-options-B9u6-CF3.mjs";
|
|
12
12
|
import { t as parsePositiveInteger } from "./positive-integer-CjN5OJbH.mjs";
|
|
13
13
|
import { i as SCHEMA_MAP_KEYS, n as projectRuntimeToolInputSchema } from "./tool-schema-json-projection-Ct8SeBeJ.mjs";
|
|
14
|
-
import { n as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-
|
|
14
|
+
import { n as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-BwVRJUQZ.mjs";
|
|
15
15
|
import { i as tagPendingCommentaryText } from "./assistant-text-phase-C20rxWwP.mjs";
|
|
16
16
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-BjtkplhG.mjs";
|
|
17
17
|
//#region packages/ai/src/providers/anthropic-auth-headers.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { G as SimpleStreamOptions, J as StreamFunction, O as Model, Y as StreamOptions, d as Context, n as Api, s as AssistantMessageEventStreamContract } from "./types-
|
|
1
|
+
import "./index-Iw8l620S.mjs";
|
|
2
|
+
import { G as SimpleStreamOptions, J as StreamFunction, O as Model, Y as StreamOptions, d as Context, n as Api, s as AssistantMessageEventStreamContract } from "./types-B89w6ly2.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 = (model: Model, context: Context, options?: StreamOptions) => AssistantMessageEventStreamContract;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as AssistantMessageEventStream } from "./event-stream-vd9UnCAU.mjs";
|
|
2
|
-
import { n as getAiTransportHost } from "./host-
|
|
3
|
-
import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-
|
|
4
|
-
import { n as buildBaseOptions } from "./simple-options-
|
|
5
|
-
import { g as resolveOpenAISimpleReasoningEffort } from "./openai-transport-params-
|
|
2
|
+
import { n as getAiTransportHost } from "./host-DqhMLv8J.mjs";
|
|
3
|
+
import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-DHxMpeRz.mjs";
|
|
4
|
+
import { n as buildBaseOptions } from "./simple-options-B9u6-CF3.mjs";
|
|
5
|
+
import { g as resolveOpenAISimpleReasoningEffort } from "./openai-transport-params-CqLxK93q.mjs";
|
|
6
6
|
import { n as getEnvApiKey } from "./env-api-keys-CyX4VKGO.mjs";
|
|
7
|
-
import { n as createAssistantOutput } from "./provider-transcript-transform-
|
|
8
|
-
import { P as convertProviderResponsesMessages, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams } from "./openai-responses-shared-
|
|
7
|
+
import { n as createAssistantOutput } from "./provider-transcript-transform-Cg-36VSt.mjs";
|
|
8
|
+
import { P as convertProviderResponsesMessages, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams } from "./openai-responses-shared-BUaK4Pb3.mjs";
|
|
9
9
|
import { i as resolveAzureDeploymentNameFromMap, n as isTraditionalAzureOpenAIHost, t as isOpenAICompatibleAzureResponsesBaseUrl } from "./azure-openai-responses-client-compat-C7K7QfUE.mjs";
|
|
10
10
|
import OpenAI, { AzureOpenAI } from "openai";
|
|
11
11
|
//#region packages/ai/src/providers/azure-openai-responses.ts
|
package/dist/diagnostics.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as ProviderRefusalReview, o as readProviderRefusalReview } from "./index-
|
|
2
|
-
import { a as AssistantMessage, dt as DiagnosticErrorInfo, ft as appendAssistantMessageDiagnostic, gt as isProviderRefusalAssistantError, ht as formatThrownValue, mt as extractDiagnosticError, pt as createAssistantMessageDiagnostic, ut as AssistantMessageDiagnostic } from "./types-
|
|
3
|
-
import "./types-
|
|
4
|
-
import { n as isResponsesOutputLimitToolCallError } from "./openai-responses-terminal-usage-
|
|
1
|
+
import { a as ProviderRefusalReview, o as readProviderRefusalReview } from "./index-Iw8l620S.mjs";
|
|
2
|
+
import { a as AssistantMessage, dt as DiagnosticErrorInfo, ft as appendAssistantMessageDiagnostic, gt as isProviderRefusalAssistantError, ht as formatThrownValue, mt as extractDiagnosticError, pt as createAssistantMessageDiagnostic, ut as AssistantMessageDiagnostic } from "./types-B89w6ly2.mjs";
|
|
3
|
+
import "./types-DbmNRKvK.mjs";
|
|
4
|
+
import { n as isResponsesOutputLimitToolCallError } from "./openai-responses-terminal-usage-CLzeNWqW.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";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region packages/ai/src/env-api-keys.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Find configured environment variables that can provide an API key for a provider.
|
|
4
|
+
*
|
|
5
|
+
* This only reports actual API key variables. It intentionally excludes ambient
|
|
6
|
+
* credential sources such as AWS profiles, AWS IAM credentials, and Google
|
|
7
|
+
* Application Default Credentials.
|
|
8
|
+
*/
|
|
9
|
+
declare function findEnvKeys(provider: string): string[] | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Get API key for provider from known environment variables, e.g. OPENAI_API_KEY.
|
|
12
|
+
*
|
|
13
|
+
* Will not return API keys for providers that require OAuth tokens.
|
|
14
|
+
*/
|
|
15
|
+
declare function getEnvApiKey(provider: string): string | undefined;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { getEnvApiKey as n, findEnvKeys as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./event-stream-CiaHxSK0.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as ThinkingContent, a as AssistantMessage, o as AssistantMessageEvent, s as AssistantMessageEventStreamContract } from "./types-
|
|
1
|
+
import { $ as ThinkingContent, a as AssistantMessage, o as AssistantMessageEvent, s as AssistantMessageEventStreamContract } from "./types-B89w6ly2.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-CiaHxSK0.mjs";
|
|
2
|
+
import "./event-stream-B0vjWzHd.mjs";
|
|
3
3
|
export { AssistantMessageEventStream, EventStream, createAssistantMessageEventStream };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as AssistantMessageEventStream } from "./event-stream-vd9UnCAU.mjs";
|
|
2
|
-
import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels } from "./host-
|
|
3
|
-
import { f as mergeTransportHeaders } from "./transport-stream-shared-
|
|
4
|
-
import { n as buildBaseOptions } from "./simple-options-
|
|
2
|
+
import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels } from "./host-DqhMLv8J.mjs";
|
|
3
|
+
import { f as mergeTransportHeaders } from "./transport-stream-shared-Dt7VrJFd.mjs";
|
|
4
|
+
import { n as buildBaseOptions } from "./simple-options-B9u6-CF3.mjs";
|
|
5
5
|
import { n as getEnvApiKey } from "./env-api-keys-CyX4VKGO.mjs";
|
|
6
|
-
import { n as createAssistantOutput } from "./provider-transcript-transform-
|
|
6
|
+
import { n as createAssistantOutput } from "./provider-transcript-transform-Cg-36VSt.mjs";
|
|
7
7
|
import { n as resolveOpencodeSessionHeaders } from "./session-affinity-Bcunsn4I.mjs";
|
|
8
|
-
import { i as runGoogleGenerateContentLifecycle, r as buildGoogleSimpleThinking, t as buildGoogleGenerateContentParams } from "./google-shared-
|
|
8
|
+
import { i as runGoogleGenerateContentLifecycle, r as buildGoogleSimpleThinking, t as buildGoogleGenerateContentParams } from "./google-shared-DPeR7LLA.mjs";
|
|
9
9
|
import { GoogleGenAI } from "@google/genai";
|
|
10
10
|
//#region packages/ai/src/providers/google.ts
|
|
11
11
|
let toolCallCounter = 0;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { t as AssistantMessageEventStream } from "./event-stream-vd9UnCAU.mjs";
|
|
2
2
|
import { a as asRecord, i as asOptionalRecord, s as readStringField } from "./record-coerce-CNDovvft.mjs";
|
|
3
|
-
import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels, w as calculateCost } from "./host-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels, w as calculateCost } from "./host-DqhMLv8J.mjs";
|
|
4
|
+
import { c as streamFragmentError } from "./transport-utils-B11GlmDO.mjs";
|
|
5
|
+
import { t as buildGuardedModelFetch } from "./host-policy-B3DuH3Le.mjs";
|
|
6
|
+
import { b as transportAbortError, c as failTransportStream, g as parseTerminalToolCallArguments, h as notifyProviderStreamOpened, j as sanitizeSurrogates, m as notifyProviderHttpResponse, w as parseJsonPreservingUnsafeIntegers } from "./transport-stream-shared-Dt7VrJFd.mjs";
|
|
7
|
+
import { C as stripSystemPromptCacheBoundary, n as buildBaseOptions } from "./simple-options-B9u6-CF3.mjs";
|
|
7
8
|
import { n as getEnvApiKey } from "./env-api-keys-CyX4VKGO.mjs";
|
|
8
|
-
import { n as createAssistantOutput, t as transformProviderMessages } from "./provider-transcript-transform-
|
|
9
|
-
import { n as buildGoogleInteractionsSimpleThinking } from "./google-shared-
|
|
9
|
+
import { n as createAssistantOutput, t as transformProviderMessages } from "./provider-transcript-transform-Cg-36VSt.mjs";
|
|
10
|
+
import { n as buildGoogleInteractionsSimpleThinking } from "./google-shared-DPeR7LLA.mjs";
|
|
10
11
|
import { createRequire } from "node:module";
|
|
11
12
|
//#region packages/ai/src/providers/google-interactions-request.ts
|
|
12
13
|
const DEFAULT_GOOGLE_API_BASE_URL = "https://generativelanguage.googleapis.com";
|
|
@@ -366,14 +367,16 @@ async function runGoogleInteractionsLifecycle(params) {
|
|
|
366
367
|
let sawCompletion = false;
|
|
367
368
|
while (!streamDone) {
|
|
368
369
|
const { done, value } = await reader.read();
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
370
|
+
buffer += decoder.decode(value, { stream: !done });
|
|
371
|
+
const frames = buffer.split(/(?:\r\n|\r(?!\n)|\n)(?:\r\n|\r(?!\n)|\n)/);
|
|
372
|
+
buffer = frames.pop() ?? "";
|
|
373
|
+
if (done) {
|
|
374
|
+
if (/[\r\n]$/.test(buffer)) frames.push(buffer);
|
|
375
|
+
streamDone = true;
|
|
376
|
+
}
|
|
377
|
+
for (const frame of frames) {
|
|
378
|
+
const dataStr = frame.split(/\r\n|\r|\n/).filter((line) => line.startsWith("data:")).map((line) => line.slice(5)).join("\n").trim();
|
|
379
|
+
if (!dataStr) continue;
|
|
377
380
|
if (dataStr === "[DONE]") {
|
|
378
381
|
streamDone = true;
|
|
379
382
|
break;
|
|
@@ -381,8 +384,8 @@ async function runGoogleInteractionsLifecycle(params) {
|
|
|
381
384
|
let event;
|
|
382
385
|
try {
|
|
383
386
|
event = asRecord(parseJsonPreservingUnsafeIntegers(dataStr));
|
|
384
|
-
} catch {
|
|
385
|
-
|
|
387
|
+
} catch (error) {
|
|
388
|
+
throw streamFragmentError(error);
|
|
386
389
|
}
|
|
387
390
|
const eventType = event.event_type || event.type;
|
|
388
391
|
logGoogleInteractionsDebug("stream event", { eventType: typeof eventType === "string" ? eventType : "unknown" });
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { r as appendAssistantThinking } from "./event-stream-vd9UnCAU.mjs";
|
|
2
|
-
import { k as isImageWithMediaPayload, w as calculateCost } from "./host-
|
|
3
|
-
import { a as createEmptyTransportUsage, b as transportAbortError, j as sanitizeSurrogates, 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 { k as isImageWithMediaPayload, w as calculateCost } from "./host-DqhMLv8J.mjs";
|
|
3
|
+
import { a as createEmptyTransportUsage, b as transportAbortError, j as sanitizeSurrogates, r as coerceTransportToolCallArguments, v as sanitizeTransportPayloadText } from "./transport-stream-shared-Dt7VrJFd.mjs";
|
|
4
|
+
import { D as sortPromptCacheToolsByName, d as describeToolResultMediaPlaceholder, m as extractToolResultText } from "./simple-options-B9u6-CF3.mjs";
|
|
5
5
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-BjtkplhG.mjs";
|
|
6
|
+
import { isGoogleGemini4Model } from "./internal/google-model-family.mjs";
|
|
6
7
|
//#region packages/ai/src/transports/google-thinking-level.ts
|
|
7
|
-
/**
|
|
8
|
+
/** Reports MINIMAL support for Gemini Flash and Gemini 4 models. */
|
|
8
9
|
function googleFlashSupportsMinimalThinking(modelId) {
|
|
10
|
+
if (isGoogleGemini4Model(modelId)) return false;
|
|
9
11
|
const match = modelId.toLowerCase().match(/(?:^|\/)gemini-3\.(\d+)-flash(?:-|$)/);
|
|
10
12
|
if (!match) return true;
|
|
11
13
|
return Number.parseInt(match[1] ?? "0", 10) < 7;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { T as clampThinkingLevel } from "./host-
|
|
2
|
-
import { b as transportAbortError, c as failTransportStream, h as notifyProviderStreamOpened, j as sanitizeSurrogates } from "./transport-stream-shared-
|
|
3
|
-
import { C as stripSystemPromptCacheBoundary } from "./simple-options-
|
|
4
|
-
import { t as transformProviderMessages } from "./provider-transcript-transform-
|
|
5
|
-
import {
|
|
1
|
+
import { T as clampThinkingLevel } from "./host-DqhMLv8J.mjs";
|
|
2
|
+
import { b as transportAbortError, c as failTransportStream, h as notifyProviderStreamOpened, j as sanitizeSurrogates } from "./transport-stream-shared-Dt7VrJFd.mjs";
|
|
3
|
+
import { C as stripSystemPromptCacheBoundary } from "./simple-options-B9u6-CF3.mjs";
|
|
4
|
+
import { t as transformProviderMessages } from "./provider-transcript-transform-Cg-36VSt.mjs";
|
|
5
|
+
import { isGoogleGemini3ProModel, isGoogleGemini3ThinkingLevelModel } from "./internal/google-model-family.mjs";
|
|
6
|
+
import { a as googleFlashSupportsMinimalThinking, i as consumeGoogleGenerateContentStream, n as projectGoogleMessages, r as requiresGoogleToolCallId, t as convertGoogleTools } from "./google-messages-pvt0rKfN.mjs";
|
|
6
7
|
import { FunctionCallingConfigMode, ThinkingLevel } from "@google/genai";
|
|
7
8
|
//#region packages/ai/src/providers/google-shared.ts
|
|
8
9
|
function convertMessages(model, context) {
|
|
@@ -10,7 +11,7 @@ function convertMessages(model, context) {
|
|
|
10
11
|
model,
|
|
11
12
|
messages: transformProviderMessages(context.messages, model, (id) => requiresGoogleToolCallId(model.id) ? id.replace(/[^a-zA-Z0-9_-]/g, "_").slice(0, 64) : id),
|
|
12
13
|
replay: "signed-parts",
|
|
13
|
-
requiresToolCallSignature: model.provider !== "google-gemini-cli" && (
|
|
14
|
+
requiresToolCallSignature: model.provider !== "google-gemini-cli" && isGoogleGemini3ThinkingLevelModel(model.id)
|
|
14
15
|
});
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
@@ -99,7 +100,7 @@ function buildGoogleSimpleThinking(model, options) {
|
|
|
99
100
|
enabled: true,
|
|
100
101
|
level: ThinkingLevel.HIGH
|
|
101
102
|
};
|
|
102
|
-
return
|
|
103
|
+
return isGoogleGemini3ThinkingLevelModel(model.id) ? { enabled: true } : {
|
|
103
104
|
enabled: true,
|
|
104
105
|
budgetTokens: -1
|
|
105
106
|
};
|
|
@@ -107,7 +108,7 @@ function buildGoogleSimpleThinking(model, options) {
|
|
|
107
108
|
const clampedReasoning = clampThinkingLevel(model, options.reasoning);
|
|
108
109
|
if (clampedReasoning === "off") return { enabled: false };
|
|
109
110
|
const effort = clampedReasoning === "max" ? "high" : clampedReasoning;
|
|
110
|
-
if (
|
|
111
|
+
if (isGoogleGemini3ThinkingLevelModel(model.id) || isGemma4Model(model)) return {
|
|
111
112
|
enabled: true,
|
|
112
113
|
level: getGoogleThinkingLevel(effort, model)
|
|
113
114
|
};
|
|
@@ -139,8 +140,8 @@ function buildGoogleInteractionsSimpleThinking(model, options) {
|
|
|
139
140
|
};
|
|
140
141
|
}
|
|
141
142
|
function getDisabledGoogleThinkingConfig(model) {
|
|
142
|
-
if (
|
|
143
|
-
if (
|
|
143
|
+
if (isGoogleGemini3ProModel(model.id)) return { thinkingLevel: ThinkingLevel.LOW };
|
|
144
|
+
if (isGoogleGemini3ThinkingLevelModel(model.id)) return { thinkingLevel: googleFlashSupportsMinimalThinking(model.id) ? ThinkingLevel.MINIMAL : ThinkingLevel.LOW };
|
|
144
145
|
if (isGemma4Model(model) || model.id.toLowerCase().includes("gemini-2.5-pro")) return {};
|
|
145
146
|
return { thinkingBudget: 0 };
|
|
146
147
|
}
|
|
@@ -148,18 +149,12 @@ function getDisabledGoogleThinkingConfig(model) {
|
|
|
148
149
|
function isGemma4Model(model) {
|
|
149
150
|
return /gemma-?4/.test(model.id.toLowerCase());
|
|
150
151
|
}
|
|
151
|
-
function isGemini3ProModel(model) {
|
|
152
|
-
return /gemini-(?:3(?:\.\d+)?-pro|pro-latest)/.test(model.id.toLowerCase());
|
|
153
|
-
}
|
|
154
|
-
function isGemini3FlashModel(model) {
|
|
155
|
-
return /gemini-(?:3(?:\.\d+)?-flash|flash(?:-lite)?-latest)/.test(model.id.toLowerCase());
|
|
156
|
-
}
|
|
157
152
|
function getGoogleThinkingLevel(effort, model) {
|
|
158
153
|
const lowEffort = effort === "minimal" || effort === "low";
|
|
159
|
-
if (
|
|
154
|
+
if (isGoogleGemini3ProModel(model.id)) return lowEffort ? ThinkingLevel.LOW : ThinkingLevel.HIGH;
|
|
160
155
|
if (isGemma4Model(model)) return lowEffort ? ThinkingLevel.MINIMAL : ThinkingLevel.HIGH;
|
|
161
156
|
switch (effort) {
|
|
162
|
-
case "minimal": return
|
|
157
|
+
case "minimal": return googleFlashSupportsMinimalThinking(model.id) ? ThinkingLevel.MINIMAL : ThinkingLevel.LOW;
|
|
163
158
|
case "low": return ThinkingLevel.LOW;
|
|
164
159
|
case "medium": return ThinkingLevel.MEDIUM;
|
|
165
160
|
case "high": return ThinkingLevel.HIGH;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as AssistantMessageEventStream } from "./event-stream-vd9UnCAU.mjs";
|
|
2
|
-
import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels } from "./host-
|
|
2
|
+
import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels } from "./host-DqhMLv8J.mjs";
|
|
3
3
|
import { a as normalizeOptionalString } from "./string-coerce-fsri9iCu.mjs";
|
|
4
|
-
import { n as buildBaseOptions } from "./simple-options-
|
|
5
|
-
import { n as createAssistantOutput } from "./provider-transcript-transform-
|
|
6
|
-
import { i as runGoogleGenerateContentLifecycle, r as buildGoogleSimpleThinking, t as buildGoogleGenerateContentParams } from "./google-shared-
|
|
4
|
+
import { n as buildBaseOptions } from "./simple-options-B9u6-CF3.mjs";
|
|
5
|
+
import { n as createAssistantOutput } from "./provider-transcript-transform-Cg-36VSt.mjs";
|
|
6
|
+
import { i as runGoogleGenerateContentLifecycle, r as buildGoogleSimpleThinking, t as buildGoogleGenerateContentParams } from "./google-shared-DPeR7LLA.mjs";
|
|
7
7
|
import { GoogleGenAI, ResourceScope } from "@google/genai";
|
|
8
8
|
//#region packages/ai/src/providers/google-vertex.ts
|
|
9
9
|
const API_VERSION = "v1";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { O as Model, d as Context, n as Api, q as StreamFn } from "./types-
|
|
3
|
-
import { n as ApiRegistry } from "./api-registry-
|
|
1
|
+
import "./index-Iw8l620S.mjs";
|
|
2
|
+
import { O as Model, d as Context, n as Api, q as StreamFn } from "./types-B89w6ly2.mjs";
|
|
3
|
+
import { n as ApiRegistry } from "./api-registry-BLbq15N5.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 { D as supportsClaudeNativeXhighEffort, E as supportsClaudeNativeMaxEffort, 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 supportsClaudeNativeXhighEffort, E as supportsClaudeNativeMaxEffort, 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-Dq6VRdeL.mjs";
|
|
2
2
|
import { i as asOptionalRecord, o as isRecord } from "./record-coerce-CNDovvft.mjs";
|
|
3
3
|
import { n as normalizeLowercaseStringOrEmpty } from "./string-coerce-fsri9iCu.mjs";
|
|
4
4
|
import { f as MODEL_CATALOG_THINKING_LEVELS, m as resolveOpenAIThinkingApi, o as resolveOpenAIModelReasoningEfforts, p as listMappedModelThinkingLevels } from "./openai-reasoning-effort-C_0p3psG.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getAiTransportHost } from "./host-
|
|
1
|
+
import { n as getAiTransportHost } from "./host-DqhMLv8J.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 { $ as ThinkingContent, A as ModelCostRates, B as ProviderReplayState, C as KnownImagesApi, D as Message, E as MaybePromise, F as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, G as SimpleStreamOptions, H as ProviderStreamOptions, I as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, J as StreamFunction, K as StopReason, L as PricingTier, M as OpenAICompletionsCompat, N as OpenAIResponsesCompat, O as Model, P as OpenRouterRouting, Q as ThinkingBudgets, R as Provider, S as KnownApi, T as MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, U as RawModelCostConfig, V as ProviderResponse, W as RawPricingTier, X as TextContent, Y as StreamOptions, Z as TextSignatureV1, _ as ImagesModel, a as AssistantMessage, at as Transport, b as ImagesProvider, c as AssistantMessageEventStreamLike, ct as ValidateToolArgumentsFn, d as Context, dt as DiagnosticErrorInfo, et as ThinkingLevel, f as ImageContent, ft as appendAssistantMessageDiagnostic, g as ImagesInputContent, gt as isProviderRefusalAssistantError, h as ImagesFunction, ht as formatThrownValue, i as AssistantImages, it as ToolResultMessage, j as ModelThinkingLevel, k as ModelCostConfig, l as CacheRetention, lt as VercelGatewayRouting, m as ImagesContext, mt as extractDiagnosticError, n as Api, nt as Tool, o as AssistantMessageEvent, ot as Usage, p as ImagesApi, pt as createAssistantMessageDiagnostic, q as StreamFn, r as AssistantDeliveryTtsFacts, rt as ToolCall, s as AssistantMessageEventStreamContract, st as UserMessage, t as AnthropicMessagesCompat, tt as ThinkingLevelMap, u as CompleteSimpleFn, ut as AssistantMessageDiagnostic, v as ImagesOptions, w as KnownImagesProvider, x as ImagesStopReason, y as ImagesOutputContent, z as ProviderImagesOptions } from "./types-
|
|
2
|
-
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-
|
|
3
|
-
import { n as validateToolCall, t as validateToolArguments } from "./validation-
|
|
1
|
+
import { $ as ThinkingContent, A as ModelCostRates, B as ProviderReplayState, C as KnownImagesApi, D as Message, E as MaybePromise, F as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, G as SimpleStreamOptions, H as ProviderStreamOptions, I as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, J as StreamFunction, K as StopReason, L as PricingTier, M as OpenAICompletionsCompat, N as OpenAIResponsesCompat, O as Model, P as OpenRouterRouting, Q as ThinkingBudgets, R as Provider, S as KnownApi, T as MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, U as RawModelCostConfig, V as ProviderResponse, W as RawPricingTier, X as TextContent, Y as StreamOptions, Z as TextSignatureV1, _ as ImagesModel, a as AssistantMessage, at as Transport, b as ImagesProvider, c as AssistantMessageEventStreamLike, ct as ValidateToolArgumentsFn, d as Context, dt as DiagnosticErrorInfo, et as ThinkingLevel, f as ImageContent, ft as appendAssistantMessageDiagnostic, g as ImagesInputContent, gt as isProviderRefusalAssistantError, h as ImagesFunction, ht as formatThrownValue, i as AssistantImages, it as ToolResultMessage, j as ModelThinkingLevel, k as ModelCostConfig, l as CacheRetention, lt as VercelGatewayRouting, m as ImagesContext, mt as extractDiagnosticError, n as Api, nt as Tool, o as AssistantMessageEvent, ot as Usage, p as ImagesApi, pt as createAssistantMessageDiagnostic, q as StreamFn, r as AssistantDeliveryTtsFacts, rt as ToolCall, s as AssistantMessageEventStreamContract, st as UserMessage, t as AnthropicMessagesCompat, tt as ThinkingLevelMap, u as CompleteSimpleFn, ut as AssistantMessageDiagnostic, v as ImagesOptions, w as KnownImagesProvider, x as ImagesStopReason, y as ImagesOutputContent, z as ProviderImagesOptions } from "./types-B89w6ly2.mjs";
|
|
2
|
+
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-CiaHxSK0.mjs";
|
|
3
|
+
import { n as validateToolCall, t as validateToolArguments } from "./validation-DblQWSRA.mjs";
|
|
4
4
|
//#region packages/llm-core/src/model-contracts/anthropic.d.ts
|
|
5
5
|
type ClaudeModelRef = {
|
|
6
6
|
id?: string;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as supportsClaudeNativeXhighEffort, 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, k as supportsClaudeNativeMaxEffort, 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-
|
|
2
|
-
import { $ as ThinkingContent, A as ModelCostRates, B as ProviderReplayState, C as KnownImagesApi, D as Message, E as MaybePromise, F as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, G as SimpleStreamOptions, H as ProviderStreamOptions, I as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, J as StreamFunction, K as StopReason, L as PricingTier, M as OpenAICompletionsCompat, N as OpenAIResponsesCompat, O as Model, P as OpenRouterRouting, Q as ThinkingBudgets, R as Provider, S as KnownApi, T as MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, U as RawModelCostConfig, V as ProviderResponse, W as RawPricingTier, X as TextContent, Y as StreamOptions, Z as TextSignatureV1, _ as ImagesModel, a as AssistantMessage, at as Transport, b as ImagesProvider, c as AssistantMessageEventStreamLike, ct as ValidateToolArgumentsFn, d as Context, dt as DiagnosticErrorInfo, et as ThinkingLevel, f as ImageContent, ft as appendAssistantMessageDiagnostic, g as ImagesInputContent, gt as isProviderRefusalAssistantError, h as ImagesFunction, ht as formatThrownValue, i as AssistantImages, it as ToolResultMessage, j as ModelThinkingLevel, k as ModelCostConfig, l as CacheRetention, lt as VercelGatewayRouting, m as ImagesContext, mt as extractDiagnosticError, n as Api, nt as Tool, o as AssistantMessageEvent, ot as Usage, p as ImagesApi, pt as createAssistantMessageDiagnostic, q as StreamFn, r as AssistantDeliveryTtsFacts, rt as ToolCall, s as AssistantMessageEventStreamContract, st as UserMessage, t as AnthropicMessagesCompat, tt as ThinkingLevelMap, u as CompleteSimpleFn, ut as AssistantMessageDiagnostic, v as ImagesOptions, w as KnownImagesProvider, x as ImagesStopReason, y as ImagesOutputContent, z as ProviderImagesOptions } from "./types-
|
|
3
|
-
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-
|
|
4
|
-
import { n as validateToolCall, t as validateToolArguments } from "./validation-
|
|
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 { a as AiProviderRequestPolicyInput, c as AiTransportHost, d as configureAiTransportHost, f as getAiTransportHost, i as AiProviderRequestCapabilities, l as AiTransportPluginHost, n as AiInlineImageBlock, o as AiProviderStreamHookContext, p as resolveAiTransportHeaderSentinels, r as AiInlineTextBlock, s as AiTransformTransportMessages, t as AiInlineContentBlock, u as OpenAIStrictToolSettingOptions } from "./host-
|
|
1
|
+
import { A as supportsClaudeNativeXhighEffort, 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, k as supportsClaudeNativeMaxEffort, 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-Iw8l620S.mjs";
|
|
2
|
+
import { $ as ThinkingContent, A as ModelCostRates, B as ProviderReplayState, C as KnownImagesApi, D as Message, E as MaybePromise, F as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, G as SimpleStreamOptions, H as ProviderStreamOptions, I as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, J as StreamFunction, K as StopReason, L as PricingTier, M as OpenAICompletionsCompat, N as OpenAIResponsesCompat, O as Model, P as OpenRouterRouting, Q as ThinkingBudgets, R as Provider, S as KnownApi, T as MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, U as RawModelCostConfig, V as ProviderResponse, W as RawPricingTier, X as TextContent, Y as StreamOptions, Z as TextSignatureV1, _ as ImagesModel, a as AssistantMessage, at as Transport, b as ImagesProvider, c as AssistantMessageEventStreamLike, ct as ValidateToolArgumentsFn, d as Context, dt as DiagnosticErrorInfo, et as ThinkingLevel, f as ImageContent, ft as appendAssistantMessageDiagnostic, g as ImagesInputContent, gt as isProviderRefusalAssistantError, h as ImagesFunction, ht as formatThrownValue, i as AssistantImages, it as ToolResultMessage, j as ModelThinkingLevel, k as ModelCostConfig, l as CacheRetention, lt as VercelGatewayRouting, m as ImagesContext, mt as extractDiagnosticError, n as Api, nt as Tool, o as AssistantMessageEvent, ot as Usage, p as ImagesApi, pt as createAssistantMessageDiagnostic, q as StreamFn, r as AssistantDeliveryTtsFacts, rt as ToolCall, s as AssistantMessageEventStreamContract, st as UserMessage, t as AnthropicMessagesCompat, tt as ThinkingLevelMap, u as CompleteSimpleFn, ut as AssistantMessageDiagnostic, v as ImagesOptions, w as KnownImagesProvider, x as ImagesStopReason, y as ImagesOutputContent, z as ProviderImagesOptions } from "./types-B89w6ly2.mjs";
|
|
3
|
+
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-CiaHxSK0.mjs";
|
|
4
|
+
import { n as validateToolCall, t as validateToolArguments } from "./validation-DblQWSRA.mjs";
|
|
5
|
+
import { a as RegisteredApiProvider, i as ApiStreamSimpleFunction, n as ApiRegistry, o as createApiRegistry, r as ApiStreamFunction, t as ApiProvider } from "./api-registry-BLbq15N5.mjs";
|
|
6
|
+
import { a as AiProviderRequestPolicyInput, c as AiTransportHost, d as configureAiTransportHost, f as getAiTransportHost, i as AiProviderRequestCapabilities, l as AiTransportPluginHost, n as AiInlineImageBlock, o as AiProviderStreamHookContext, p as resolveAiTransportHeaderSentinels, r as AiInlineTextBlock, s as AiTransformTransportMessages, t as AiInlineContentBlock, u as OpenAIStrictToolSettingOptions } from "./host-BhpDO5Sy.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): {
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as supportsClaude1MContext, D as supportsClaudeNativeXhighEffort, E as supportsClaudeNativeMaxEffort, 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 supportsClaudeNativeXhighEffort, E as supportsClaudeNativeMaxEffort, 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-Dq6VRdeL.mjs";
|
|
2
2
|
import { n as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, r as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, t as MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE } from "./types-LFWwv0cF.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 { i as createAssistantMessageEventStream, n as EventStream, t as AssistantMessageEventStream } from "./event-stream-vd9UnCAU.mjs";
|
|
5
|
-
import { n as validateToolCall, t as validateToolArguments } from "./validation-
|
|
5
|
+
import { n as validateToolCall, t as validateToolArguments } from "./validation-Fe6RtKI6.mjs";
|
|
6
6
|
import { n as createApiRegistry, t as createLlmRuntime } from "./stream-DDsCBgd-.mjs";
|
|
7
|
-
import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels, t as configureAiTransportHost } from "./host-
|
|
7
|
+
import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels, t as configureAiTransportHost } from "./host-DqhMLv8J.mjs";
|
|
8
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, EventStream, MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, appendAssistantMessageDiagnostic, bindsClaudeThinkingPrefix, calculateUsageCost, configureAiTransportHost, createApiRegistry, createAssistantMessageDiagnostic, createAssistantMessageEventStream, createLlmRuntime, extractDiagnosticError, formatThrownValue, getAiTransportHost, isProviderRefusalAssistantError, normalizeModelCostConfig, normalizeResolvedPricing, readProviderRefusalReview, requiresClaudeBetweenToolsThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAiTransportHeaderSentinels, resolveClaudeFable5ModelIdentity, resolveClaudeHaiku55ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus55ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet55ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaude1MContext, supportsClaudeAdaptiveThinking, supportsClaudeFastMode, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as supportsClaudeNativeXhighEffort, C as resolveClaudeOpus5ModelIdentity, D as supportsClaudeAdaptiveThinking, S as resolveClaudeOpus55ModelIdentity, T as resolveClaudeSonnet5ModelIdentity, _ as resolveClaudeFable5ModelIdentity, b as resolveClaudeMythos5ModelIdentity, g as requiresClaudeMandatoryAdaptiveThinking, h as requiresClaudeDefaultSampling, k as supportsClaudeNativeMaxEffort, m as requiresClaudeBetweenToolsThinking, p as bindsClaudeThinkingPrefix, v as resolveClaudeHaiku55ModelIdentity, w as resolveClaudeSonnet55ModelIdentity, x as resolveClaudeNativeThinkingLevelMap, y as resolveClaudeModelIdentity } from "../index-
|
|
2
|
-
import { G as SimpleStreamOptions, J as StreamFunction, K as StopReason, O as Model, d as Context, ot as Usage, ut as AssistantMessageDiagnostic } from "../types-
|
|
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 } from "../anthropic-payload-policy-
|
|
1
|
+
import { A as supportsClaudeNativeXhighEffort, C as resolveClaudeOpus5ModelIdentity, D as supportsClaudeAdaptiveThinking, S as resolveClaudeOpus55ModelIdentity, T as resolveClaudeSonnet5ModelIdentity, _ as resolveClaudeFable5ModelIdentity, b as resolveClaudeMythos5ModelIdentity, g as requiresClaudeMandatoryAdaptiveThinking, h as requiresClaudeDefaultSampling, k as supportsClaudeNativeMaxEffort, m as requiresClaudeBetweenToolsThinking, p as bindsClaudeThinkingPrefix, v as resolveClaudeHaiku55ModelIdentity, w as resolveClaudeSonnet55ModelIdentity, x as resolveClaudeNativeThinkingLevelMap, y as resolveClaudeModelIdentity } from "../index-Iw8l620S.mjs";
|
|
2
|
+
import { G as SimpleStreamOptions, J as StreamFunction, K as StopReason, O as Model, d as Context, ot as Usage, ut as AssistantMessageDiagnostic } from "../types-B89w6ly2.mjs";
|
|
3
|
+
import { i as AnthropicThinkingDisplay, n as AnthropicEffort, r as AnthropicOptions, t as AnthropicContextManagementOptions } from "../provider-options-CFiaIG4K.mjs";
|
|
4
|
+
import "../types-DbmNRKvK.mjs";
|
|
5
|
+
import { p as resolveAnthropicServerCompactionPlan } from "../anthropic-payload-policy-CFbalbbU.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 supportsClaudeNativeXhighEffort, E as supportsClaudeNativeMaxEffort, 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 { _ as requiresClaudeAdaptiveThinking, b as usesClaudeFable5MessagesContract, d as ANTHROPIC_CLAUDE_CODE_VERSION, f as applyClaudeRequestContract, g as prepareClaudeNoPrefillRequestContext, h as mapAnthropicStopReason, m as defaultsClaudeAdaptiveThinking, p as buildAnthropicClaudeCodeIdentity, v as resolveAnthropicThinkingEffort, x as usesClaudeStreamingRefusalContract, y as resolveModelBoundThinkingReplayMode } from "../host-
|
|
3
|
-
import { B as ANTHROPIC_SERVER_SIDE_FALLBACKS, C as applyAnthropicThinkingBindingControls, E as readAnthropicInputTransformations, G as resolveAnthropicFallbackServingModelCost, H as CLAUDE_OPUS_FALLBACK_MODEL_COST, J as usesFoundryBearerAuth, K as isAnthropicOAuthApiKey, S as ANTHROPIC_OMITTED_REASONING_TEXT, T as logAnthropicThinkingDrops, U as applyAnthropicFallbackBoundary, V as ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, W as readAnthropicFallbackBoundary, _ as normalizeAnthropicToolChoice, a as readAnthropicPromptUsageSnapshot, b as resolveOriginalAnthropicToolName, c as applyAnthropicRefusal, g as normalizeAnthropicToolCallId, i as readAnthropicCacheWriteUsage, n as applyAnthropicMessageDeltaUsage, o as readAnthropicUsageTokenCount, q as omitFoundryBearerCredentialHeaders, r as applyAnthropicMessageStartUsage, s as readLastAnthropicIterationUsage, v as projectAnthropicTools, w as findActiveAnthropicToolTurnAssistantIndex, x as toClaudeCodeToolName, y as reconcileAnthropicToolChoice, z as resolveAnthropicServerCompactionPlan } from "../anthropic-stream-reducer-
|
|
4
|
-
import { n as streamAnthropic, r as streamSimpleAnthropic } from "../anthropic-
|
|
1
|
+
import { D as supportsClaudeNativeXhighEffort, E as supportsClaudeNativeMaxEffort, 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-Dq6VRdeL.mjs";
|
|
2
|
+
import { _ as requiresClaudeAdaptiveThinking, b as usesClaudeFable5MessagesContract, d as ANTHROPIC_CLAUDE_CODE_VERSION, f as applyClaudeRequestContract, g as prepareClaudeNoPrefillRequestContext, h as mapAnthropicStopReason, m as defaultsClaudeAdaptiveThinking, p as buildAnthropicClaudeCodeIdentity, v as resolveAnthropicThinkingEffort, x as usesClaudeStreamingRefusalContract, y as resolveModelBoundThinkingReplayMode } from "../host-DqhMLv8J.mjs";
|
|
3
|
+
import { B as ANTHROPIC_SERVER_SIDE_FALLBACKS, C as applyAnthropicThinkingBindingControls, E as readAnthropicInputTransformations, G as resolveAnthropicFallbackServingModelCost, H as CLAUDE_OPUS_FALLBACK_MODEL_COST, J as usesFoundryBearerAuth, K as isAnthropicOAuthApiKey, S as ANTHROPIC_OMITTED_REASONING_TEXT, T as logAnthropicThinkingDrops, U as applyAnthropicFallbackBoundary, V as ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, W as readAnthropicFallbackBoundary, _ as normalizeAnthropicToolChoice, a as readAnthropicPromptUsageSnapshot, b as resolveOriginalAnthropicToolName, c as applyAnthropicRefusal, g as normalizeAnthropicToolCallId, i as readAnthropicCacheWriteUsage, n as applyAnthropicMessageDeltaUsage, o as readAnthropicUsageTokenCount, q as omitFoundryBearerCredentialHeaders, r as applyAnthropicMessageStartUsage, s as readLastAnthropicIterationUsage, v as projectAnthropicTools, w as findActiveAnthropicToolTurnAssistantIndex, x as toClaudeCodeToolName, y as reconcileAnthropicToolChoice, z as resolveAnthropicServerCompactionPlan } from "../anthropic-stream-reducer-XCL_L8KJ.mjs";
|
|
4
|
+
import { n as streamAnthropic, r as streamSimpleAnthropic } from "../anthropic-BL3z3SiB.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, 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,5 +1,7 @@
|
|
|
1
1
|
//#region packages/ai/src/internal/google-model-family.d.ts
|
|
2
2
|
export declare function isGoogleGemini3ProModel(modelId: string): boolean;
|
|
3
3
|
export declare function isGoogleGemini3FlashModel(modelId: string): boolean;
|
|
4
|
+
export declare function isGoogleGemini4Model(modelId: string): boolean;
|
|
5
|
+
/** Identifies thinkingLevel-family Gemini models (3.x and 4). */
|
|
4
6
|
export declare function isGoogleGemini3ThinkingLevelModel(modelId: string): boolean;
|
|
5
7
|
//#endregion
|
|
@@ -8,8 +8,12 @@ function isGoogleGemini3FlashModel(modelId) {
|
|
|
8
8
|
const normalized = normalizeLowercaseStringOrEmpty(modelId);
|
|
9
9
|
return /(?:^|\/)gemini-(?:3(?:\.\d+)?-flash|flash(?:-lite)?-latest)(?:-|$)/.test(normalized);
|
|
10
10
|
}
|
|
11
|
+
function isGoogleGemini4Model(modelId) {
|
|
12
|
+
return /(?:^|\/)gemini-4(?:[-.]|$)/.test(normalizeLowercaseStringOrEmpty(modelId));
|
|
13
|
+
}
|
|
14
|
+
/** Identifies thinkingLevel-family Gemini models (3.x and 4). */
|
|
11
15
|
function isGoogleGemini3ThinkingLevelModel(modelId) {
|
|
12
|
-
return isGoogleGemini3ProModel(modelId) || isGoogleGemini3FlashModel(modelId);
|
|
16
|
+
return isGoogleGemini3ProModel(modelId) || isGoogleGemini3FlashModel(modelId) || isGoogleGemini4Model(modelId);
|
|
13
17
|
}
|
|
14
18
|
//#endregion
|
|
15
|
-
export { isGoogleGemini3FlashModel, isGoogleGemini3ProModel, isGoogleGemini3ThinkingLevelModel };
|
|
19
|
+
export { isGoogleGemini3FlashModel, isGoogleGemini3ProModel, isGoogleGemini3ThinkingLevelModel, isGoogleGemini4Model };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as resolveOpenAICompletionsCompat } from "../openai-completions-compat-
|
|
1
|
+
import { a as resolveOpenAICompletionsCompat } from "../openai-completions-compat-CQbGsPt0.mjs";
|
|
2
2
|
export { resolveOpenAICompletionsCompat };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as resolveOpenAICompletionsCompat } from "../openai-completions-compat-
|
|
1
|
+
import { i as resolveOpenAICompletionsCompat } from "../openai-completions-compat-D1q02qdx.mjs";
|
|
2
2
|
export { resolveOpenAICompletionsCompat };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { c as readOpenAIResponsesCompactionWindow, s as OpenAIResponsesCompactionOutput, t as OPENAI_RESPONSES_APIS } from "../openai-responses-contracts-
|
|
1
|
+
import { c as readOpenAIResponsesCompactionWindow, s as OpenAIResponsesCompactionOutput, t as OPENAI_RESPONSES_APIS } from "../openai-responses-contracts-CYScOS7J.mjs";
|
|
2
2
|
import { i as resolveOpenAIResponsesServerCompactionPlan, r as resolveOpenAIResponsesPayloadPolicy } from "../openai-responses-payload-policy-C7GsA1y0.mjs";
|
|
3
3
|
export { OPENAI_RESPONSES_APIS, type OpenAIResponsesCompactionOutput, readOpenAIResponsesCompactionWindow, resolveOpenAIResponsesPayloadPolicy, resolveOpenAIResponsesServerCompactionPlan };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
import { G as SimpleStreamOptions, J as StreamFunction, K as StopReason, O as Model, d as Context } from "../types-
|
|
3
|
-
import { C as supportsOpenAITemperature, S as supportsOpenAIReasoningEffort, _ as normalizeOpenAIReasoningEffort, a as BaseOpenAIStreamOptions, b as resolveOpenAIReasoningEffortMapping, d as OpenAIApiReasoningEffort, f as OpenAIReasoningEffort, g as isOpenAIGpt6Model, h as isOpenAIGpt56Model, l as codeModeToolSurfaceObserver, m as isOpenAIGpt55Model, o as CodeModeToolSurfaceObservation, p as isOpenAIGpt54MiniModel, s as OpenAICompletionsOptions, u as reasoningTagTextPolicy, v as resolveOpenAIModelReasoningEfforts, x as resolveOpenAISupportedReasoningEfforts, y as resolveOpenAIReasoningEffortForModel } from "../provider-options-
|
|
1
|
+
import "../index-Iw8l620S.mjs";
|
|
2
|
+
import { G as SimpleStreamOptions, J as StreamFunction, K as StopReason, O as Model, d as Context } from "../types-B89w6ly2.mjs";
|
|
3
|
+
import { C as supportsOpenAITemperature, S as supportsOpenAIReasoningEffort, _ as normalizeOpenAIReasoningEffort, a as BaseOpenAIStreamOptions, b as resolveOpenAIReasoningEffortMapping, d as OpenAIApiReasoningEffort, f as OpenAIReasoningEffort, g as isOpenAIGpt6Model, h as isOpenAIGpt56Model, l as codeModeToolSurfaceObserver, m as isOpenAIGpt55Model, o as CodeModeToolSurfaceObservation, p as isOpenAIGpt54MiniModel, s as OpenAICompletionsOptions, u as reasoningTagTextPolicy, v as resolveOpenAIModelReasoningEfforts, x as resolveOpenAISupportedReasoningEfforts, y as resolveOpenAIReasoningEffortForModel } from "../provider-options-CFiaIG4K.mjs";
|
|
4
4
|
import { a as reconcileOpenAIResponsesToolChoice, i as reconcileOpenAICompletionsToolChoice, n as OpenAIToolProjection, r as projectOpenAITools, t as OpenAICompletionsToolChoice } from "../openai-tool-projection-793cE3QX.mjs";
|
|
5
|
-
import "../types-
|
|
6
|
-
import { t as ResolvedOpenAICompletionsCompat } from "../openai-completions-compat-
|
|
7
|
-
import { a as ResponsesPromptObservation, l as OpenAIRequestReasoningEffort, o as responsesPromptObserver } from "../openai-responses-contracts-
|
|
8
|
-
import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "../openai-prompt-cache-
|
|
9
|
-
import { a as resolveResponsesTerminalStopReason, i as readResponsesReasoningTokens, n as isResponsesOutputLimitToolCallError, r as mapResponsesTerminalUsage, t as ResponsesTerminalUsagePayload } from "../openai-responses-terminal-usage-
|
|
10
|
-
import "../openai-responses-compaction-replay-
|
|
5
|
+
import "../types-DbmNRKvK.mjs";
|
|
6
|
+
import { t as ResolvedOpenAICompletionsCompat } from "../openai-completions-compat-CQbGsPt0.mjs";
|
|
7
|
+
import { a as ResponsesPromptObservation, l as OpenAIRequestReasoningEffort, o as responsesPromptObserver } from "../openai-responses-contracts-CYScOS7J.mjs";
|
|
8
|
+
import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "../openai-prompt-cache-CuY5QDIc.mjs";
|
|
9
|
+
import { a as resolveResponsesTerminalStopReason, i as readResponsesReasoningTokens, n as isResponsesOutputLimitToolCallError, r as mapResponsesTerminalUsage, t as ResponsesTerminalUsagePayload } from "../openai-responses-terminal-usage-CLzeNWqW.mjs";
|
|
10
|
+
import "../openai-responses-compaction-replay-DiGjwK4d.mjs";
|
|
11
11
|
import { ResponseCreateParamsStreaming, ResponseInputItem } from "openai/resources/responses/responses.js";
|
|
12
12
|
import { ChatCompletionMessageParam } from "openai/resources/chat/completions.js";
|
|
13
13
|
//#region packages/ai/src/providers/azure-deployment-map.d.ts
|