@openclaw/ai 2026.9.33 → 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-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-DqXyjyTC.mjs} +2 -2
- 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-responses-payload-policy.d.mts +1 -1
- package/dist/internal/openai.d.mts +9 -9
- package/dist/internal/openai.mjs +5 -5
- 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-CHluxZ0P.mjs} +58 -49
- package/dist/{openai-completions-gyTpI3xG.mjs → openai-completions-D0f28olp.mjs} +3 -3
- package/dist/{openai-completions-compat-CqWP1fn5.d.mts → openai-completions-compat-CQbGsPt0.d.mts} +3 -3
- package/dist/{openai-completions-stream-BrsoGafc.mjs → openai-completions-stream-iagLwGz6.mjs} +9 -8
- 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-Bcjj6_fK.mjs} +1 -1
- package/dist/{openai-responses-DluFZzn_.mjs → openai-responses-D2ElJYAb.mjs} +3 -3
- 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-CWhVpkYl.mjs} +4 -4
- package/dist/{openai-responses-shared-BpGnmnV8.mjs → openai-responses-shared-BUaK4Pb3.mjs} +503 -11
- 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-CqLxK93q.mjs} +15 -3
- 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 +8 -8
- 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 +14 -13
- package/dist/transports.mjs +17 -502
- 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
|
@@ -3,13 +3,13 @@ import { C as applyProviderReportedUsageCost, S as headersToRecord, T as clampTh
|
|
|
3
3
|
import { a as normalizeOptionalString, n as normalizeLowercaseStringOrEmpty } from "./string-coerce-fsri9iCu.mjs";
|
|
4
4
|
import { a as normalizeOpenAIReasoningEffort, c as resolveOpenAIReasoningEffortMapping, f as MODEL_CATALOG_THINKING_LEVELS, m as resolveOpenAIThinkingApi, o as resolveOpenAIModelReasoningEfforts, s as resolveOpenAIReasoningEffortForModel, u as supportsOpenAIReasoningEffort } from "./openai-reasoning-effort-C_0p3psG.mjs";
|
|
5
5
|
import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-DHxMpeRz.mjs";
|
|
6
|
-
import { i as isCodeModeModelVisibleToolName } from "./transport-utils-
|
|
6
|
+
import { i as isCodeModeModelVisibleToolName } from "./transport-utils-B11GlmDO.mjs";
|
|
7
7
|
import { i as resolveOpenAICompletionsCompat, o as usesNativeOpenAICodexResponsesBackend } from "./openai-completions-compat-D1q02qdx.mjs";
|
|
8
8
|
import { n as resolveModelRequestTimeoutMs } from "./host-policy-B3DuH3Le.mjs";
|
|
9
9
|
import { m as notifyProviderHttpResponse } from "./transport-stream-shared-Dt7VrJFd.mjs";
|
|
10
10
|
import { n as projectRuntimeToolInputSchema, t as prepareRuntimeToolInputSchema } from "./tool-schema-json-projection-Ct8SeBeJ.mjs";
|
|
11
11
|
import { n as resolveOpencodeSessionHeaders } from "./session-affinity-Bcunsn4I.mjs";
|
|
12
|
-
import { a as resolveOpenAIProjectedToolsStrictToolFlag, t as findOpenAIStrictToolProjectionDiagnostics } from "./openai-tool-schema-
|
|
12
|
+
import { a as resolveOpenAIProjectedToolsStrictToolFlag, t as findOpenAIStrictToolProjectionDiagnostics } from "./openai-tool-schema-DSAxYnHW.mjs";
|
|
13
13
|
import { i as OPENAI_RESPONSES_APIS } from "./openai-responses-contracts-CLxnqS9p.mjs";
|
|
14
14
|
import { hash } from "node:crypto";
|
|
15
15
|
//#region packages/normalization-core/src/node-crypto.ts
|
|
@@ -203,6 +203,18 @@ function readOpenAICompletionsReasoningBatch(delta, visibleReasoningDetailTypes)
|
|
|
203
203
|
}
|
|
204
204
|
return batch ?? EMPTY_OPENAI_COMPLETIONS_REASONING_BATCH;
|
|
205
205
|
}
|
|
206
|
+
function detachPartialSnapshot(event) {
|
|
207
|
+
const source = event;
|
|
208
|
+
if (!source.partial) return event;
|
|
209
|
+
const partial = source.partial;
|
|
210
|
+
return {
|
|
211
|
+
...event,
|
|
212
|
+
partial: {
|
|
213
|
+
...partial,
|
|
214
|
+
content: partial.content.map((block) => block.type === "text" ? Object.assign({}, block) : block)
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
}
|
|
206
218
|
function parseOpenAICompletionsUsage(rawUsage, model, options) {
|
|
207
219
|
const cacheRead = rawUsage.prompt_tokens_details?.cached_tokens ?? rawUsage.prompt_cache_hit_tokens ?? 0;
|
|
208
220
|
const cacheWrite = rawUsage.prompt_tokens_details?.cache_write_tokens ?? rawUsage.prompt_tokens_details?.cache_creation_input_tokens ?? rawUsage.cache_creation_input_tokens ?? 0;
|
|
@@ -749,4 +761,4 @@ function getCompat(model) {
|
|
|
749
761
|
};
|
|
750
762
|
}
|
|
751
763
|
//#endregion
|
|
752
|
-
export {
|
|
764
|
+
export { resolvePromptCacheKey as A, isOpenAICompletionsThinkingEnabled as C, readOpenAICompletionsContentDeltas as D, parseOpenAICompletionsUsage as E, sha256Hex as M, readOpenAICompletionsReasoningBatch as O, detachPartialSnapshot as S, measureUtf8AppendBytes as T, resolveOpenAIReasoningEffortMap as _, enforceCodeModeResponsesToolSurface as a, createOpenAIResponseHook as b, readCodeModePayloadToolName as c, prepareOpenAITools as d, projectOpenAITools as f, resolveOpenAISimpleReasoningEffort as g, resolveOpenAIRequestReasoning as h, buildOpenAISdkRequestOptions as i, redactIdentifier as j, resolveOpenAIClientBaseUrl as k, resolveCodeModeResponsesVisibleToolNames as l, reconcileOpenAIResponsesToolChoice as m, buildOpenAIClientHeaders as n, filterCodeModePayloadTools as o, reconcileOpenAICompletionsToolChoice as p, buildOpenAISdkClientOptions as r, getCompat as s, assertCodeModeResponsesToolSurface as t, resolveOpenAIStrictToolFlagWithDiagnostics as u, GEMINI_THOUGHT_SIGNATURE_VALIDATOR_SKIP as v, log as w, createResponseModelTracker as x, createOpenAIProviderAcceptanceHook as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Y as StreamOptions } from "./types-
|
|
1
|
+
import { Y as StreamOptions } from "./types-B89w6ly2.mjs";
|
|
2
2
|
import { t as OpenAICompletionsToolChoice } from "./openai-tool-projection-793cE3QX.mjs";
|
|
3
|
-
import "./types-
|
|
3
|
+
import "./types-DbmNRKvK.mjs";
|
|
4
4
|
import Anthropic from "@anthropic-ai/sdk";
|
|
5
5
|
//#region packages/ai/src/providers/openai-reasoning-effort.d.ts
|
|
6
6
|
declare const ENABLED_REASONING_EFFORTS: readonly ["minimal", "low", "medium", "high", "xhigh", "max"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as index_d_exports } from "./index-
|
|
2
|
-
import { O as Model, X as TextContent, Y as StreamOptions, a as AssistantMessage, d as Context, f as ImageContent, it as ToolResultMessage, n as Api, s as AssistantMessageEventStreamContract, st as UserMessage } from "./types-
|
|
3
|
-
import "./types-
|
|
1
|
+
import { t as index_d_exports } from "./index-Iw8l620S.mjs";
|
|
2
|
+
import { O as Model, X as TextContent, Y as StreamOptions, a as AssistantMessage, d as Context, f as ImageContent, it as ToolResultMessage, n as Api, s as AssistantMessageEventStreamContract, st as UserMessage } from "./types-B89w6ly2.mjs";
|
|
3
|
+
import "./types-DbmNRKvK.mjs";
|
|
4
4
|
//#region packages/ai/src/provider-types.d.ts
|
|
5
5
|
declare const PROVIDER_CONTEXT_HANDOFF: unique symbol;
|
|
6
6
|
type VideoContent = Omit<ImageContent, "type"> & {
|
|
@@ -1,6 +1,6 @@
|
|
|
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, E as MaybePromise, F as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, G as SimpleStreamOptions, I as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, K as StopReason, L as PricingTier, M as OpenAICompletionsCompat, N as OpenAIResponsesCompat, 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, 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 ProviderContextHandoff, c as ProviderStreamFunction, d as VideoContent, f as resolveProviderContext, i as ProviderContext, l as ProviderStreamOptions, n as ModelInputContent, o as ProviderMessage, r as PROVIDER_CONTEXT_HANDOFF, s as ProviderModel, t as MediaContent, u as ProviderUserMessage } from "./provider-types-
|
|
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, E as MaybePromise, F as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, G as SimpleStreamOptions, I as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, K as StopReason, L as PricingTier, M as OpenAICompletionsCompat, N as OpenAIResponsesCompat, 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, 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 ProviderContextHandoff, c as ProviderStreamFunction, d as VideoContent, f as resolveProviderContext, i as ProviderContext, l as ProviderStreamOptions, n as ModelInputContent, o as ProviderMessage, r as PROVIDER_CONTEXT_HANDOFF, s as ProviderModel, t as MediaContent, u as ProviderUserMessage } from "./provider-types-Bx_6hBmK.mjs";
|
|
6
6
|
export { type AnthropicMessagesCompat, type Api, type AssistantDeliveryTtsFacts, type AssistantImages, type AssistantMessage, type AssistantMessageDiagnostic, type AssistantMessageEvent, type AssistantMessageEventStream, type AssistantMessageEventStreamContract, type AssistantMessageEventStreamLike, type CLAUDE_FABLE_5_THINKING_PROFILE, type CLAUDE_HAIKU_55_THINKING_PROFILE, type CLAUDE_OPUS_55_THINKING_PROFILE, type CLAUDE_OPUS_5_THINKING_PROFILE, type CLAUDE_SONNET_55_THINKING_PROFILE, type CLAUDE_SONNET_5_THINKING_PROFILE, type CacheRetention, type CompleteSimpleFn, type ProviderContext as Context, ProviderContext, type DiagnosticErrorInfo, type EventStream, type ImageContent, type ImagesApi, type ImagesContext, type ImagesFunction, type ImagesInputContent, type ImagesModel, type ImagesOptions, type ImagesOutputContent, type ImagesProvider, type ImagesStopReason, type KnownApi, type KnownImagesApi, type KnownImagesProvider, type MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, type MaybePromise, MediaContent, type ProviderMessage as Message, ProviderMessage, type ProviderModel as Model, ProviderModel, type ModelCostConfig, type ModelCostRates, ModelInputContent, type ModelThinkingLevel, type OpenAICompletionsCompat, type OpenAIResponsesCompat, type OpenRouterRouting, PROVIDER_CONTEXT_HANDOFF, type PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, type PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, type PricingTier, type Provider, ProviderContextHandoff, type ProviderImagesOptions, type ProviderRefusalReview, type ProviderReplayState, type ProviderResponse, ProviderStreamFunction, type ProviderStreamFunction as StreamFunction, ProviderStreamOptions, ProviderUserMessage, type RawModelCostConfig, type RawPricingTier, type SimpleStreamOptions, type StopReason, type StreamFn, type StreamOptions, type TextContent, type TextSignatureV1, type ThinkingBudgets, type ThinkingContent, type ThinkingLevel, type ThinkingLevelMap, type Tool, type ToolCall, type ToolResultMessage, type Transport, type Usage, type UserMessage, type ValidateToolArgumentsFn, type VercelGatewayRouting, VideoContent, type appendAssistantMessageDiagnostic, type bindsClaudeThinkingPrefix, type calculateUsageCost, type createAssistantMessageDiagnostic, type createAssistantMessageEventStream, type extractDiagnosticError, type formatThrownValue, type isProviderRefusalAssistantError, type normalizeModelCostConfig, type normalizeResolvedPricing, type readProviderRefusalReview, type requiresClaudeBetweenToolsThinking, type requiresClaudeDefaultSampling, type requiresClaudeMandatoryAdaptiveThinking, type resolveClaudeFable5ModelIdentity, type resolveClaudeHaiku55ModelIdentity, type resolveClaudeModelIdentity, type resolveClaudeMythos5ModelIdentity, type resolveClaudeNativeThinkingLevelMap, type resolveClaudeOpus55ModelIdentity, type resolveClaudeOpus5ModelIdentity, type resolveClaudeSonnet55ModelIdentity, type resolveClaudeSonnet5ModelIdentity, resolveProviderContext, type supportsClaude1MContext, type supportsClaudeAdaptiveThinking, type supportsClaudeFastMode, type supportsClaudeNativeMaxEffort, type supportsClaudeNativeXhighEffort, type validateToolArguments, type validateToolCall };
|
package/dist/providers.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ApiRegistry } from "./api-registry-
|
|
2
|
-
import { n as clampOpenAIPromptCacheKey, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "./openai-prompt-cache-
|
|
1
|
+
import { n as ApiRegistry } from "./api-registry-BLbq15N5.mjs";
|
|
2
|
+
import { n as clampOpenAIPromptCacheKey, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "./openai-prompt-cache-CuY5QDIc.mjs";
|
|
3
3
|
//#region packages/ai/src/providers/register-builtins.d.ts
|
|
4
4
|
/** Source id used for built-in API provider registrations. */
|
|
5
5
|
export declare const BUILT_IN_API_PROVIDER_SOURCE_ID = "core:built-in";
|
package/dist/providers.mjs
CHANGED
|
@@ -62,11 +62,11 @@ function createLazyRegistration(api, importModule, select) {
|
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
const registerBuiltIns = [
|
|
65
|
-
createLazyRegistration("anthropic-messages", () => import("./anthropic-
|
|
65
|
+
createLazyRegistration("anthropic-messages", () => import("./anthropic-BL3z3SiB.mjs").then((n) => n.t), (module) => ({
|
|
66
66
|
stream: module.streamAnthropic,
|
|
67
67
|
streamSimple: module.streamSimpleAnthropic
|
|
68
68
|
})),
|
|
69
|
-
createLazyRegistration("openai-completions", () => import("./openai-completions-
|
|
69
|
+
createLazyRegistration("openai-completions", () => import("./openai-completions-D0f28olp.mjs").then((n) => n.t), (module) => ({
|
|
70
70
|
stream: module.streamOpenAICompletions,
|
|
71
71
|
streamSimple: module.streamSimpleOpenAICompletions
|
|
72
72
|
})),
|
|
@@ -74,27 +74,27 @@ const registerBuiltIns = [
|
|
|
74
74
|
stream: module.streamMistral,
|
|
75
75
|
streamSimple: module.streamSimpleMistral
|
|
76
76
|
})),
|
|
77
|
-
createLazyRegistration("openai-responses", () => import("./openai-responses-
|
|
77
|
+
createLazyRegistration("openai-responses", () => import("./openai-responses-D2ElJYAb.mjs").then((n) => n.t), (module) => ({
|
|
78
78
|
stream: module.streamOpenAIResponses,
|
|
79
79
|
streamSimple: module.streamSimpleOpenAIResponses
|
|
80
80
|
})),
|
|
81
|
-
createLazyRegistration("azure-openai-responses", () => import("./azure-openai-responses-
|
|
81
|
+
createLazyRegistration("azure-openai-responses", () => import("./azure-openai-responses-DqXyjyTC.mjs"), (module) => ({
|
|
82
82
|
stream: module.streamAzureOpenAIResponses,
|
|
83
83
|
streamSimple: module.streamSimpleAzureOpenAIResponses
|
|
84
84
|
})),
|
|
85
|
-
createLazyRegistration("openai-chatgpt-responses", () => import("./openai-chatgpt-responses-
|
|
85
|
+
createLazyRegistration("openai-chatgpt-responses", () => import("./openai-chatgpt-responses-CHluxZ0P.mjs"), (module) => ({
|
|
86
86
|
stream: module.streamOpenAICodexResponses,
|
|
87
87
|
streamSimple: module.streamSimpleOpenAICodexResponses
|
|
88
88
|
})),
|
|
89
|
-
createLazyRegistration("google-generative-ai", () => import("./google-
|
|
89
|
+
createLazyRegistration("google-generative-ai", () => import("./google-D9zpPelZ.mjs"), (module) => ({
|
|
90
90
|
stream: module.streamGoogle,
|
|
91
91
|
streamSimple: module.streamSimpleGoogle
|
|
92
92
|
})),
|
|
93
|
-
createLazyRegistration("google-interactions", () => import("./google-interactions-
|
|
93
|
+
createLazyRegistration("google-interactions", () => import("./google-interactions-Br_n4tZB.mjs"), (module) => ({
|
|
94
94
|
stream: module.streamGoogleInteractions,
|
|
95
95
|
streamSimple: module.streamSimpleGoogleInteractions
|
|
96
96
|
})),
|
|
97
|
-
createLazyRegistration("google-vertex", () => import("./google-vertex-
|
|
97
|
+
createLazyRegistration("google-vertex", () => import("./google-vertex-D4Qde9Qq.mjs"), (module) => ({
|
|
98
98
|
stream: module.streamGoogleVertex,
|
|
99
99
|
streamSimple: module.streamSimpleGoogleVertex
|
|
100
100
|
}))
|
package/dist/{transport-stream-shared-CYLM2HEK.d.mts → transport-stream-shared-B_REuIea.d.mts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { O as Model, V as ProviderResponse, Y as StreamOptions, a as AssistantMessage, ot as Usage } from "./types-
|
|
3
|
-
import { r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-
|
|
4
|
-
import "./event-stream-
|
|
1
|
+
import "./index-Iw8l620S.mjs";
|
|
2
|
+
import { O as Model, V as ProviderResponse, Y as StreamOptions, a as AssistantMessage, ot as Usage } from "./types-B89w6ly2.mjs";
|
|
3
|
+
import { r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-CiaHxSK0.mjs";
|
|
4
|
+
import "./event-stream-B0vjWzHd.mjs";
|
|
5
5
|
import { t as ProviderErrorProjection } from "./provider-error-xumb1V3F.mjs";
|
|
6
6
|
//#region packages/ai/src/transports/transport-stream-shared.d.ts
|
|
7
7
|
type ContextUsage = NonNullable<Usage["contextUsage"]>;
|
|
@@ -30,6 +30,10 @@ async function consumeResponseBytes(options) {
|
|
|
30
30
|
const MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE = "OpenClaw transport error: malformed_streaming_fragment";
|
|
31
31
|
const NON_LATIN_RE = /[\u2E80-\u9FFF\uA000-\uA4FF\uAC00-\uD7AF\uF900-\uFAFF\uFF01-\uFF60\uFFE0-\uFFE6\u{20000}-\u{2FA1F}]/gu;
|
|
32
32
|
const CJK_SURROGATE_HIGH_RE = /[\uD840-\uD87E][\uDC00-\uDFFF]/g;
|
|
33
|
+
/** Keep provider payloads out of parse errors without replacing unrelated failures. */
|
|
34
|
+
function streamFragmentError(cause, ErrorType = Error) {
|
|
35
|
+
return cause instanceof SyntaxError ? new ErrorType(MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE, { cause }) : cause;
|
|
36
|
+
}
|
|
33
37
|
function redactSensitiveText(text, _options) {
|
|
34
38
|
return getAiTransportHost().redactToolPayloadText(text);
|
|
35
39
|
}
|
|
@@ -114,4 +118,4 @@ async function readResponseTextSnippet(response, options) {
|
|
|
114
118
|
return truncated ? `${collapsed}…` : collapsed;
|
|
115
119
|
}
|
|
116
120
|
//#endregion
|
|
117
|
-
export { readResponseTextSnippet as a,
|
|
121
|
+
export { readResponseTextSnippet as a, streamFragmentError as c, isCodeModeModelVisibleToolName as i, supportsModelTools as l, createAbortError as n, redactSensitiveText as o, estimateStringChars as r, resolveModelHeaderSentinels as s, MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE as t };
|
package/dist/transports.d.mts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { $ as ThinkingContent, B as ProviderReplayState, K as StopReason, M as OpenAICompletionsCompat, O as Model, X as TextContent, Y as StreamOptions, _t as ModelDataThinkingFormat, a as AssistantMessage, d as Context, l as CacheRetention, n as Api, nt as Tool, ot as Usage, q as StreamFn, rt as ToolCall } from "./types-
|
|
3
|
-
import { n as ApiRegistry } from "./api-registry-
|
|
4
|
-
import { o as AiProviderStreamHookContext } from "./host-
|
|
5
|
-
import { a as BaseOpenAIStreamOptions, c as OpenAIResponsesCompactionRejection, o as CodeModeToolSurfaceObservation, s as OpenAICompletionsOptions } from "./provider-options-
|
|
1
|
+
import "./index-Iw8l620S.mjs";
|
|
2
|
+
import { $ as ThinkingContent, B as ProviderReplayState, K as StopReason, M as OpenAICompletionsCompat, O as Model, X as TextContent, Y as StreamOptions, _t as ModelDataThinkingFormat, a as AssistantMessage, d as Context, l as CacheRetention, n as Api, nt as Tool, ot as Usage, q as StreamFn, rt as ToolCall } from "./types-B89w6ly2.mjs";
|
|
3
|
+
import { n as ApiRegistry } from "./api-registry-BLbq15N5.mjs";
|
|
4
|
+
import { o as AiProviderStreamHookContext } from "./host-BhpDO5Sy.mjs";
|
|
5
|
+
import { a as BaseOpenAIStreamOptions, c as OpenAIResponsesCompactionRejection, o as CodeModeToolSurfaceObservation, s as OpenAICompletionsOptions } from "./provider-options-CFiaIG4K.mjs";
|
|
6
6
|
import { n as OpenAIToolProjection } from "./openai-tool-projection-793cE3QX.mjs";
|
|
7
|
-
import "./types-
|
|
8
|
-
import { a as buildAnthropicSystemBlocks, c as logAnthropicContextEdits, d as resolveAnthropicPayloadPolicy, f as resolveAnthropicRequestBetaHeader, i as applyAnthropicRequestCacheControl, l as resolveAnthropicCacheOptions, n as applyAnthropicEphemeralCacheControlMarkers, o as isAnthropicServerToolClearingEnabled, p as resolveAnthropicServerCompactionPlan, r as applyAnthropicPayloadPolicyToParams, s as isDirectAnthropicModel, t as applyAnthropicContextManagementToRequest, u as resolveAnthropicEphemeralCacheControl } from "./anthropic-payload-policy-
|
|
9
|
-
import { a as resolveOpenAICompletionsCompat, i as isOpenAICodexResponsesModel, n as detectOpenAICompletionsCompat, o as resolveOpenAIPromptCacheKeySupport, r as isNativeOpenAIEndpoint, s as usesNativeOpenAICodexResponsesBackend, t as ResolvedOpenAICompletionsCompat } from "./openai-completions-compat-
|
|
10
|
-
import { n as OpenAIResponsesOptions, r as OpenAIResponsesReasoningReplayMetadata, s as OpenAIResponsesCompactionOutput } from "./openai-responses-contracts-
|
|
7
|
+
import "./types-DbmNRKvK.mjs";
|
|
8
|
+
import { a as buildAnthropicSystemBlocks, c as logAnthropicContextEdits, d as resolveAnthropicPayloadPolicy, f as resolveAnthropicRequestBetaHeader, i as applyAnthropicRequestCacheControl, l as resolveAnthropicCacheOptions, n as applyAnthropicEphemeralCacheControlMarkers, o as isAnthropicServerToolClearingEnabled, p as resolveAnthropicServerCompactionPlan, r as applyAnthropicPayloadPolicyToParams, s as isDirectAnthropicModel, t as applyAnthropicContextManagementToRequest, u as resolveAnthropicEphemeralCacheControl } from "./anthropic-payload-policy-CFbalbbU.mjs";
|
|
9
|
+
import { a as resolveOpenAICompletionsCompat, i as isOpenAICodexResponsesModel, n as detectOpenAICompletionsCompat, o as resolveOpenAIPromptCacheKeySupport, r as isNativeOpenAIEndpoint, s as usesNativeOpenAICodexResponsesBackend, t as ResolvedOpenAICompletionsCompat } from "./openai-completions-compat-CQbGsPt0.mjs";
|
|
10
|
+
import { n as OpenAIResponsesOptions, r as OpenAIResponsesReasoningReplayMetadata, s as OpenAIResponsesCompactionOutput } from "./openai-responses-contracts-CYScOS7J.mjs";
|
|
11
11
|
import { i as resolveOpenAIResponsesServerCompactionPlan, n as resolveOpenAIResponsesCompactEndpointPlan, r as resolveOpenAIResponsesPayloadPolicy, t as applyOpenAIResponsesPayloadPolicy } from "./openai-responses-payload-policy-C7GsA1y0.mjs";
|
|
12
|
-
import { n as captureOpenAIResponsesCompaction, t as CompactionReplayRefreshRequiredError } from "./openai-responses-compaction-replay-
|
|
13
|
-
import { C as withProviderAcceptanceObserver, S as transportAbortError, _ as notifyProviderStreamOpened, a as coerceTransportToolCallArguments, b as sanitizeTransportPayloadText, c as createModelStreamCooperativeScheduler, d as finalizeTerminalToolCallArguments, f as finalizeTransportStream, g as notifyProviderHttpResponse, h as notifyProviderHttpMetadata, i as assignTransportErrorDetails, l as createWritableTransportEventStream, m as mergeTransportHeaders, n as ProviderAcceptance, o as copyProviderAcceptanceObserver, p as iterateModelStream, r as WritableTransportStream, s as createEmptyTransportUsage, t as IncompleteToolCallError, u as failTransportStream, v as parseTerminalToolCallArguments, w as withProviderResponseHook, x as throwIfModelStreamAborted, y as sanitizeNonEmptyTransportPayloadText } from "./transport-stream-shared-
|
|
12
|
+
import { n as captureOpenAIResponsesCompaction, t as CompactionReplayRefreshRequiredError } from "./openai-responses-compaction-replay-DiGjwK4d.mjs";
|
|
13
|
+
import { C as withProviderAcceptanceObserver, S as transportAbortError, _ as notifyProviderStreamOpened, a as coerceTransportToolCallArguments, b as sanitizeTransportPayloadText, c as createModelStreamCooperativeScheduler, d as finalizeTerminalToolCallArguments, f as finalizeTransportStream, g as notifyProviderHttpResponse, h as notifyProviderHttpMetadata, i as assignTransportErrorDetails, l as createWritableTransportEventStream, m as mergeTransportHeaders, n as ProviderAcceptance, o as copyProviderAcceptanceObserver, p as iterateModelStream, r as WritableTransportStream, s as createEmptyTransportUsage, t as IncompleteToolCallError, u as failTransportStream, v as parseTerminalToolCallArguments, w as withProviderResponseHook, x as throwIfModelStreamAborted, y as sanitizeNonEmptyTransportPayloadText } from "./transport-stream-shared-B_REuIea.mjs";
|
|
14
14
|
import { r as sortPromptCacheToolsByName } from "./prompt-cache-stability-Cwcjv_fx.mjs";
|
|
15
15
|
import { r as normalizeOpenAIStrictToolParameters } from "./openai-tool-schema-a5ysBBga.mjs";
|
|
16
|
-
import { d as VideoContent, i as ProviderContext, s as ProviderModel } from "./provider-types-
|
|
16
|
+
import { d as VideoContent, i as ProviderContext, s as ProviderModel } from "./provider-types-Bx_6hBmK.mjs";
|
|
17
17
|
import { a as resolveModelSseDebugMode, i as resolveModelPayloadDebugMode, n as formatModelTransportDebugUrl, r as emitModelTransportDebug, t as formatModelTransportDebugBaseUrl } from "./model-transport-url-C5f59L3Y.mjs";
|
|
18
18
|
import OpenAI from "openai";
|
|
19
19
|
import { Part } from "@google/genai";
|
|
@@ -35,7 +35,7 @@ interface DeepSeekTextFilter {
|
|
|
35
35
|
export declare function createDeepSeekTextFilter(): DeepSeekTextFilter;
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region packages/ai/src/transports/google-thinking-level.d.ts
|
|
38
|
-
/**
|
|
38
|
+
/** Reports MINIMAL support for Gemini Flash and Gemini 4 models. */
|
|
39
39
|
export declare function googleFlashSupportsMinimalThinking(modelId: string): boolean;
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region packages/ai/src/transports/json-unsafe-integers.d.ts
|
|
@@ -132,6 +132,7 @@ export type MutableAssistantOutput = Omit<AssistantMessage, "content" | "usage">
|
|
|
132
132
|
reasoningTokens?: number;
|
|
133
133
|
};
|
|
134
134
|
};
|
|
135
|
+
export declare function detachPartialSnapshot<TEvent>(event: TEvent): TEvent;
|
|
135
136
|
export declare function parseOpenAICompletionsUsage(rawUsage: NonNullable<ChatCompletionChunk["usage"]> & {
|
|
136
137
|
cost?: unknown;
|
|
137
138
|
cache_creation_input_tokens?: number;
|