@openclaw/ai 2026.9.33 → 2026.9.35
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-a0uD7NUz.mjs → anthropic-BL3z3SiB.mjs} +2 -2
- package/dist/{anthropic-payload-policy-BVcxWtQD.d.mts → anthropic-payload-policy-CFbalbbU.d.mts} +3 -3
- package/dist/{anthropic-stream-reducer-Cis7c1sm.mjs → anthropic-stream-reducer-XCL_L8KJ.mjs} +1 -1
- package/dist/{api-registry-pGjnPg1z.d.mts → api-registry-BLbq15N5.d.mts} +2 -2
- package/dist/{azure-openai-responses-CqWvI8x6.mjs → azure-openai-responses-DYSS_bLh.mjs} +3 -3
- 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-BfYNxKpG.mjs → google-D9zpPelZ.mjs} +1 -1
- package/dist/{google-interactions-BJNj0ugu.mjs → google-interactions-Br_n4tZB.mjs} +14 -11
- package/dist/{google-messages-C4ZiLG1P.mjs → google-messages-pvt0rKfN.mjs} +3 -1
- package/dist/{google-shared-6u4WCDyl.mjs → google-shared-DPeR7LLA.mjs} +9 -14
- package/dist/{google-vertex-CX1QaTs3.mjs → google-vertex-D4Qde9Qq.mjs} +1 -1
- package/dist/{host-COwfRiSL.d.mts → host-BhpDO5Sy.d.mts} +3 -3
- package/dist/{index-DHeFfpcz.d.mts → index-Iw8l620S.d.mts} +3 -3
- package/dist/index.d.mts +6 -6
- package/dist/internal/anthropic.d.mts +5 -5
- package/dist/internal/anthropic.mjs +2 -2
- 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 +6 -6
- package/dist/internal/runtime.d.mts +8 -23
- package/dist/internal/shared.d.mts +3 -3
- package/dist/internal/tool-schema.mjs +1 -1
- package/dist/{openai-chatgpt-responses-L0Jc-0DF.mjs → openai-chatgpt-responses-Crt3yb4D.mjs} +59 -50
- package/dist/{openai-completions-gyTpI3xG.mjs → openai-completions-BwcqZo-Y.mjs} +4 -4
- package/dist/{openai-completions-compat-D1q02qdx.mjs → openai-completions-compat-BuszNIRF.mjs} +5 -1
- package/dist/{openai-completions-compat-CqWP1fn5.d.mts → openai-completions-compat-WTcM-PUc.d.mts} +4 -3
- package/dist/{openai-completions-stream-BrsoGafc.mjs → openai-completions-stream-D--YONza.mjs} +14 -11
- package/dist/{openai-prompt-cache-DHxMpeRz.mjs → openai-prompt-cache-BcwCks0h.mjs} +1 -1
- package/dist/{openai-prompt-cache-YTmJ_iMS.d.mts → openai-prompt-cache-CuY5QDIc.d.mts} +2 -2
- package/dist/{openai-provider-client-D1gd0dfR.mjs → openai-provider-client-Co1u7I3J.mjs} +1 -1
- package/dist/{openai-responses-DluFZzn_.mjs → openai-responses-C7B8_pLG.mjs} +5 -5
- 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-C5WB2Kxf.mjs → openai-responses-prompt-observer-internal-CGhqoBH1.mjs} +6 -6
- package/dist/{openai-responses-shared-BpGnmnV8.mjs → openai-responses-shared-DLz_xgps.mjs} +504 -12
- 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-C4eZAXf2.mjs → openai-transport-params-DzSQTRdN.mjs} +17 -5
- package/dist/{provider-options-yDbWMoEr.d.mts → provider-options-CFiaIG4K.d.mts} +2 -2
- 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 +9 -9
- package/dist/{transport-stream-shared-CYLM2HEK.d.mts → transport-stream-shared-B_REuIea.d.mts} +4 -4
- package/dist/{transport-utils-CnxX8hPj.mjs → transport-utils-B11GlmDO.mjs} +5 -1
- package/dist/transports.d.mts +15 -13
- package/dist/transports.mjs +18 -503
- 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/{validation-Cat2wQsc.d.mts → validation-DblQWSRA.d.mts} +1 -1
- package/dist/validation.d.mts +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
|
@@ -2,8 +2,8 @@ import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
|
2
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
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-
|
|
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-
|
|
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
8
|
import { D as parseJsonWithRepair, m as notifyProviderHttpResponse, n as assignTransportErrorDetails, u as finalizeTransportStream } from "./transport-stream-shared-Dt7VrJFd.mjs";
|
|
9
9
|
import { n as buildBaseOptions, r as clampMaxTokensToModel, t as adjustMaxTokensForThinking } from "./simple-options-B9u6-CF3.mjs";
|
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-Cis7c1sm.mjs → anthropic-stream-reducer-XCL_L8KJ.mjs}
RENAMED
|
@@ -4,7 +4,7 @@ import { a as asRecord, o as isRecord, r as asOptionalObjectRecord, s as readStr
|
|
|
4
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-
|
|
7
|
+
import "./transport-utils-B11GlmDO.mjs";
|
|
8
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
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";
|
|
@@ -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
2
|
import { n as getAiTransportHost } from "./host-DqhMLv8J.mjs";
|
|
3
|
-
import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-
|
|
3
|
+
import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-BcwCks0h.mjs";
|
|
4
4
|
import { n as buildBaseOptions } from "./simple-options-B9u6-CF3.mjs";
|
|
5
|
-
import { g as resolveOpenAISimpleReasoningEffort } from "./openai-transport-params-
|
|
5
|
+
import { g as resolveOpenAISimpleReasoningEffort } from "./openai-transport-params-DzSQTRdN.mjs";
|
|
6
6
|
import { n as getEnvApiKey } from "./env-api-keys-CyX4VKGO.mjs";
|
|
7
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-
|
|
8
|
+
import { P as convertProviderResponsesMessages, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams } from "./openai-responses-shared-DLz_xgps.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 };
|
|
@@ -5,7 +5,7 @@ import { n as buildBaseOptions } from "./simple-options-B9u6-CF3.mjs";
|
|
|
5
5
|
import { n as getEnvApiKey } from "./env-api-keys-CyX4VKGO.mjs";
|
|
6
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
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";
|
|
4
5
|
import { t as buildGuardedModelFetch } from "./host-policy-B3DuH3Le.mjs";
|
|
5
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";
|
|
6
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
9
|
import { n as createAssistantOutput, t as transformProviderMessages } from "./provider-transcript-transform-Cg-36VSt.mjs";
|
|
9
|
-
import { n as buildGoogleInteractionsSimpleThinking } from "./google-shared-
|
|
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" });
|
|
@@ -3,9 +3,11 @@ import { k as isImageWithMediaPayload, w as calculateCost } from "./host-DqhMLv8
|
|
|
3
3
|
import { a as createEmptyTransportUsage, b as transportAbortError, j as sanitizeSurrogates, r as coerceTransportToolCallArguments, v as sanitizeTransportPayloadText } from "./transport-stream-shared-Dt7VrJFd.mjs";
|
|
4
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;
|
|
@@ -2,7 +2,8 @@ import { T as clampThinkingLevel } from "./host-DqhMLv8J.mjs";
|
|
|
2
2
|
import { b as transportAbortError, c as failTransportStream, h as notifyProviderStreamOpened, j as sanitizeSurrogates } from "./transport-stream-shared-Dt7VrJFd.mjs";
|
|
3
3
|
import { C as stripSystemPromptCacheBoundary } from "./simple-options-B9u6-CF3.mjs";
|
|
4
4
|
import { t as transformProviderMessages } from "./provider-transcript-transform-Cg-36VSt.mjs";
|
|
5
|
-
import {
|
|
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;
|
|
@@ -3,7 +3,7 @@ import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels } from
|
|
|
3
3
|
import { a as normalizeOptionalString } from "./string-coerce-fsri9iCu.mjs";
|
|
4
4
|
import { n as buildBaseOptions } from "./simple-options-B9u6-CF3.mjs";
|
|
5
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-
|
|
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,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): {
|
|
@@ -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
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
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-
|
|
4
|
-
import { n as streamAnthropic, r as streamSimpleAnthropic } from "../anthropic-
|
|
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-WTcM-PUc.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-BuszNIRF.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-WTcM-PUc.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
|
package/dist/internal/openai.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { a as normalizeOpenAIReasoningEffort, c as resolveOpenAIReasoningEffortMapping, d as supportsOpenAITemperature, i as isOpenAIGpt6Model, l as resolveOpenAISupportedReasoningEfforts, n as isOpenAIGpt55Model, o as resolveOpenAIModelReasoningEfforts, r as isOpenAIGpt56Model, s as resolveOpenAIReasoningEffortForModel, t as isOpenAIGpt54MiniModel, u as supportsOpenAIReasoningEffort } from "../openai-reasoning-effort-C_0p3psG.mjs";
|
|
2
|
-
import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "../openai-prompt-cache-
|
|
2
|
+
import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "../openai-prompt-cache-BcwCks0h.mjs";
|
|
3
3
|
import { g as resolveResponsesTerminalStopReason, h as readResponsesReasoningTokens, m as mapResponsesTerminalUsage, p as isResponsesOutputLimitToolCallError } from "../diagnostics-CJaB6g8J.mjs";
|
|
4
4
|
import { a as encodedModelRequestBodyStream, c as serializeModelRequestBody, l as codeModeToolSurfaceObserver, o as modelRequestBodyState, u as reasoningTagTextPolicy } from "../simple-options-B9u6-CF3.mjs";
|
|
5
|
-
import { f as projectOpenAITools, m as reconcileOpenAIResponsesToolChoice, p as reconcileOpenAICompletionsToolChoice } from "../openai-transport-params-
|
|
6
|
-
import { a as convertMessages } from "../openai-completions-stream-
|
|
5
|
+
import { f as projectOpenAITools, m as reconcileOpenAIResponsesToolChoice, p as reconcileOpenAICompletionsToolChoice } from "../openai-transport-params-DzSQTRdN.mjs";
|
|
6
|
+
import { a as convertMessages } from "../openai-completions-stream-D--YONza.mjs";
|
|
7
7
|
import { h as responsesPromptObserver } from "../openai-responses-contracts-CLxnqS9p.mjs";
|
|
8
8
|
import { t as mapOpenAIStopReason } from "../openai-stop-reason-8s70vDXj.mjs";
|
|
9
|
-
import { M as bindResponsesInputMessage, _ as isResponsesTextContentPartType, d as AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, f as AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, g as isAzureResponsesTextDeltaEventType, h as isAzureResponsesTextDeltaEvent, l as createResponsesToolCallTracker, m as OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, p as OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, u as readResponsesToolCallItemIdentity, v as isResponsesTextDeltaEventType, y as resolveResponsesMessageSnapshotCollapse } from "../openai-responses-shared-
|
|
9
|
+
import { M as bindResponsesInputMessage, _ as isResponsesTextContentPartType, d as AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, f as AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, g as isAzureResponsesTextDeltaEventType, h as isAzureResponsesTextDeltaEvent, l as createResponsesToolCallTracker, m as OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, p as OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, u as readResponsesToolCallItemIdentity, v as isResponsesTextDeltaEventType, y as resolveResponsesMessageSnapshotCollapse } from "../openai-responses-shared-DLz_xgps.mjs";
|
|
10
10
|
import { i as resolveAzureDeploymentNameFromMap, n as isTraditionalAzureOpenAIHost, r as parseAzureDeploymentNameMap, t as isOpenAICompatibleAzureResponsesBaseUrl } from "../azure-openai-responses-client-compat-C7K7QfUE.mjs";
|
|
11
11
|
import { t as responsesRequestLifecycle } from "../openai-responses-request-lifecycle-Fsag-IGZ.mjs";
|
|
12
|
-
import { n as streamOpenAICompletions, r as streamSimpleOpenAICompletions } from "../openai-completions-
|
|
13
|
-
import { n as streamOpenAIResponses, r as streamSimpleOpenAIResponses } from "../openai-responses-
|
|
12
|
+
import { n as streamOpenAICompletions, r as streamSimpleOpenAICompletions } from "../openai-completions-BwcqZo-Y.mjs";
|
|
13
|
+
import { n as streamOpenAIResponses, r as streamSimpleOpenAIResponses } from "../openai-responses-C7B8_pLG.mjs";
|
|
14
14
|
export { AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH, OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, bindResponsesInputMessage, clampOpenAIPromptCacheKey, codeModeToolSurfaceObserver, convertMessages, createResponsesToolCallTracker, encodedModelRequestBodyStream, isAzureResponsesTextDeltaEvent, isAzureResponsesTextDeltaEventType, isOpenAICompatibleAzureResponsesBaseUrl, isOpenAIGpt54MiniModel, isOpenAIGpt55Model, isOpenAIGpt56Model, isOpenAIGpt6Model, isResponsesOutputLimitToolCallError, isResponsesTextContentPartType, isResponsesTextDeltaEventType, isTraditionalAzureOpenAIHost, mapOpenAIStopReason, mapResponsesTerminalUsage, modelRequestBodyState, normalizeOpenAIReasoningEffort, parseAzureDeploymentNameMap, projectOpenAITools, readResponsesReasoningTokens, readResponsesToolCallItemIdentity, reasoningTagTextPolicy, reconcileOpenAICompletionsToolChoice, reconcileOpenAIResponsesToolChoice, resolveAzureDeploymentNameFromMap, resolveOpenAIModelReasoningEfforts, resolveOpenAIPromptCacheParams, resolveOpenAIReasoningEffortForModel, resolveOpenAIReasoningEffortMapping, resolveOpenAISupportedReasoningEfforts, resolveResponsesMessageSnapshotCollapse, resolveResponsesTerminalStopReason, responsesPromptObserver, responsesRequestLifecycle, serializeModelRequestBody, streamOpenAICompletions, streamOpenAIResponses, streamSimpleOpenAICompletions, streamSimpleOpenAIResponses, supportsOpenAIReasoningEffort, supportsOpenAITemperature };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
import { G as SimpleStreamOptions, H as ProviderStreamOptions, O as Model, Y as StreamOptions, a as AssistantMessage, d as Context, j as ModelThinkingLevel, n as Api, ot as Usage, s as AssistantMessageEventStreamContract } from "../types-
|
|
3
|
-
import { i as getEventStreamCompletion } from "../event-stream-
|
|
4
|
-
import { a as RegisteredApiProvider, t as ApiProvider } from "../api-registry-
|
|
5
|
-
import "../types-
|
|
1
|
+
import "../index-Iw8l620S.mjs";
|
|
2
|
+
import { G as SimpleStreamOptions, H as ProviderStreamOptions, O as Model, Y as StreamOptions, a as AssistantMessage, d as Context, j as ModelThinkingLevel, n as Api, ot as Usage, s as AssistantMessageEventStreamContract } from "../types-B89w6ly2.mjs";
|
|
3
|
+
import { i as getEventStreamCompletion } from "../event-stream-CiaHxSK0.mjs";
|
|
4
|
+
import { a as RegisteredApiProvider, t as ApiProvider } from "../api-registry-BLbq15N5.mjs";
|
|
5
|
+
import "../types-DbmNRKvK.mjs";
|
|
6
|
+
import { n as getEnvApiKey, t as findEnvKeys } from "../env-api-keys-BR0MUYYD.mjs";
|
|
6
7
|
import { t as sanitizeSurrogates } from "../sanitize-unicode-BZiVbGwK.mjs";
|
|
7
|
-
import { v as parseTerminalToolCallArguments } from "../transport-stream-shared-
|
|
8
|
+
import { v as parseTerminalToolCallArguments } from "../transport-stream-shared-B_REuIea.mjs";
|
|
8
9
|
//#region packages/ai/src/internal/default-runtime.d.ts
|
|
9
10
|
export declare const defaultApiRegistry: {
|
|
10
11
|
registerApiProvider: <TApi extends Api, TOptions extends StreamOptions>(provider: ApiProvider<TApi, TOptions>, sourceId?: string) => void;
|
|
@@ -48,22 +49,6 @@ declare const { stream, complete, streamSimple, completeSimple }: {
|
|
|
48
49
|
completeSimple: <TApi extends Api>(model: Model<TApi>, context: Context, options?: SimpleStreamOptions) => Promise<AssistantMessage>;
|
|
49
50
|
};
|
|
50
51
|
//#endregion
|
|
51
|
-
//#region packages/ai/src/env-api-keys.d.ts
|
|
52
|
-
/**
|
|
53
|
-
* Find configured environment variables that can provide an API key for a provider.
|
|
54
|
-
*
|
|
55
|
-
* This only reports actual API key variables. It intentionally excludes ambient
|
|
56
|
-
* credential sources such as AWS profiles, AWS IAM credentials, and Google
|
|
57
|
-
* Application Default Credentials.
|
|
58
|
-
*/
|
|
59
|
-
export declare function findEnvKeys(provider: string): string[] | undefined;
|
|
60
|
-
/**
|
|
61
|
-
* Get API key for provider from known environment variables, e.g. OPENAI_API_KEY.
|
|
62
|
-
*
|
|
63
|
-
* Will not return API keys for providers that require OAuth tokens.
|
|
64
|
-
*/
|
|
65
|
-
export declare function getEnvApiKey(provider: string): string | undefined;
|
|
66
|
-
//#endregion
|
|
67
52
|
//#region packages/ai/src/model-utils.d.ts
|
|
68
53
|
/** Calculates and stores model cost fields from token usage and per-million pricing. */
|
|
69
54
|
export declare function calculateCost<TApi extends Api>(model: Model<TApi>, usage: Usage): Usage["cost"];
|
|
@@ -241,4 +226,4 @@ export type SseByteGuard = {
|
|
|
241
226
|
};
|
|
242
227
|
export declare function createSseByteGuard(reader: ReadableStreamDefaultReader<Uint8Array>, opts: ReadSseStreamWithLimitOptions): SseByteGuard;
|
|
243
228
|
//#endregion
|
|
244
|
-
export { type ReasoningTagTextDelta, type ReasoningTagTextPartitioner, complete, completeSimple, getApiProvider, getApiProviders, getEventStreamCompletion, parseTerminalToolCallArguments, sanitizeSurrogates, stream, streamSimple };
|
|
229
|
+
export { type ReasoningTagTextDelta, type ReasoningTagTextPartitioner, complete, completeSimple, findEnvKeys, getApiProvider, getApiProviders, getEnvApiKey, getEventStreamCompletion, parseTerminalToolCallArguments, sanitizeSurrogates, stream, streamSimple };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as Message, G as SimpleStreamOptions, O as Model, Q as ThinkingBudgets, Y as StreamOptions, a as AssistantMessage, et as ThinkingLevel, n as Api } from "../types-
|
|
2
|
-
import { a as readAssistantThinkingAppend } from "../event-stream-
|
|
3
|
-
import "../types-
|
|
1
|
+
import { D as Message, G as SimpleStreamOptions, O as Model, Q as ThinkingBudgets, Y as StreamOptions, a as AssistantMessage, et as ThinkingLevel, n as Api } from "../types-B89w6ly2.mjs";
|
|
2
|
+
import { a as readAssistantThinkingAppend } from "../event-stream-CiaHxSK0.mjs";
|
|
3
|
+
import "../types-DbmNRKvK.mjs";
|
|
4
4
|
import { t as sanitizeSurrogates } from "../sanitize-unicode-BZiVbGwK.mjs";
|
|
5
5
|
import { i as projectProviderError } from "../provider-error-xumb1V3F.mjs";
|
|
6
6
|
import { n as createDiagnosticRecord } from "../credential-redaction-BKv49aiv.mjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as projectRuntimeToolInputSchema } from "../tool-schema-json-projection-Ct8SeBeJ.mjs";
|
|
2
|
-
import { _ as GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, a as resolveOpenAIProjectedToolsStrictToolFlag, c as extractToolSchemaModelCompat, d as shouldOmitEmptyArrayItems, g as findLlamacppGbnfSchemaViolations, h as cleanSchemaForLlamacppGbnf, i as normalizeStrictOpenAIJsonSchema, l as normalizeToolParameterSchema, m as LLAMACPP_GBNF_MAX_REPETITION_THRESHOLD, n as isStrictOpenAIJsonSchemaCompatible, o as findOpenAIStrictSchemaViolations, p as stripUnsupportedSchemaKeywords, r as normalizeOpenAIStrictToolParameters, s as normalizeOpenAIStrictCompatSchema, t as findOpenAIStrictToolProjectionDiagnostics, u as resolveUnsupportedToolSchemaKeywords, v as cleanSchemaForGemini } from "../openai-tool-schema-
|
|
2
|
+
import { _ as GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, a as resolveOpenAIProjectedToolsStrictToolFlag, c as extractToolSchemaModelCompat, d as shouldOmitEmptyArrayItems, g as findLlamacppGbnfSchemaViolations, h as cleanSchemaForLlamacppGbnf, i as normalizeStrictOpenAIJsonSchema, l as normalizeToolParameterSchema, m as LLAMACPP_GBNF_MAX_REPETITION_THRESHOLD, n as isStrictOpenAIJsonSchemaCompatible, o as findOpenAIStrictSchemaViolations, p as stripUnsupportedSchemaKeywords, r as normalizeOpenAIStrictToolParameters, s as normalizeOpenAIStrictCompatSchema, t as findOpenAIStrictToolProjectionDiagnostics, u as resolveUnsupportedToolSchemaKeywords, v as cleanSchemaForGemini } from "../openai-tool-schema-DSAxYnHW.mjs";
|
|
3
3
|
export { GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, LLAMACPP_GBNF_MAX_REPETITION_THRESHOLD, cleanSchemaForGemini, cleanSchemaForLlamacppGbnf, extractToolSchemaModelCompat, findLlamacppGbnfSchemaViolations, findOpenAIStrictSchemaViolations, findOpenAIStrictToolProjectionDiagnostics, isStrictOpenAIJsonSchemaCompatible, normalizeOpenAIStrictCompatSchema, normalizeOpenAIStrictToolParameters, normalizeStrictOpenAIJsonSchema, normalizeToolParameterSchema, projectRuntimeToolInputSchema, resolveOpenAIProjectedToolsStrictToolFlag, resolveUnsupportedToolSchemaKeywords, shouldOmitEmptyArrayItems, stripUnsupportedSchemaKeywords };
|