@openclaw/ai 2026.7.2-beta.2 → 2026.7.2-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/dist/{anthropic-BIRSg5x9.mjs → anthropic-CrUDIBpM.mjs} +173 -47
- package/dist/{api-registry-Byvoz8Ha.d.mts → api-registry-BMphkFf1.d.mts} +1 -2
- package/dist/{azure-openai-responses-CHi7Wo4A.mjs → azure-openai-responses-CbrpVeEv.mjs} +9 -11
- package/dist/{env-api-keys-DnhYpc27.mjs → env-api-keys-DrgeBuva.mjs} +1 -1
- package/dist/{event-stream-uQspnL8S.d.mts → event-stream-Douf9dob.d.mts} +1 -1
- package/dist/event-stream.d.mts +1 -1
- package/dist/{google-BmsqsNwR.mjs → google-Cs62KA7t.mjs} +4 -4
- package/dist/{google-shared-Dx2aba47.mjs → google-shared-CMLI-tCZ.mjs} +4 -3
- package/dist/{google-vertex-HZ_0rTwS.mjs → google-vertex-B4SD3U0f.mjs} +3 -3
- package/dist/host-WvWBo4h8.d.mts +173 -0
- package/dist/host-XYGZcgO8.mjs +98 -0
- package/dist/index-BVVgDSdq.d.mts +1 -0
- package/dist/index.d.mts +7 -50
- package/dist/index.mjs +1 -1
- package/dist/internal/anthropic.d.mts +9 -3
- package/dist/internal/anthropic.mjs +3 -3
- package/dist/internal/openai.d.mts +2 -279
- package/dist/internal/openai.mjs +5 -5
- package/dist/internal/runtime.d.mts +8 -5
- package/dist/internal/runtime.mjs +22 -12
- package/dist/internal/shared.d.mts +4 -2
- package/dist/internal/shared.mjs +2 -2
- package/dist/{mistral-DxMPt9q9.mjs → mistral-D5Ps7Led.mjs} +26 -10
- package/dist/{model-utils-Q1LSRIdo.mjs → model-utils-1GiZ2_rr.mjs} +3 -1
- package/dist/openai-CoGicoDt.d.mts +332 -0
- package/dist/{openai-chatgpt-responses-BuH2NvsR.mjs → openai-chatgpt-responses-h0o5yV8Y.mjs} +47 -48
- package/dist/{openai-completions-DPR_O2RW.mjs → openai-completions-exO8NFQf.mjs} +342 -102
- package/dist/{openai-responses-Cov-Vdc2.mjs → openai-responses-BHpmtUKo.mjs} +5 -5
- package/dist/{openai-responses-shared-Befb4D6R.mjs → openai-responses-shared-CzCurmY1.mjs} +527 -268
- package/dist/{openai-tool-projection-CFqm42J2.mjs → openai-tool-projection-ITOU9bG1.mjs} +1 -1
- package/dist/provider-error-C4VvV_3t.mjs +41 -0
- package/dist/providers.d.mts +1 -1
- package/dist/providers.mjs +8 -8
- package/dist/{stream-first-event-timeout-RjWszj8c.mjs → stream-first-event-timeout-DP4xEyBY.mjs} +45 -1
- package/dist/{transform-messages-BmS70CP5.mjs → system-prompt-cache-boundary-CbHeV4_l.mjs} +171 -161
- package/dist/transports.d.mts +590 -0
- package/dist/transports.mjs +5701 -0
- package/dist/{types-Cx2zJtyz.d.mts → types-AFwwWium.d.mts} +7 -0
- package/dist/types.d.mts +4 -4
- package/dist/{validation-Cej7htKc.d.mts → validation-sxvxC8J-.d.mts} +1 -1
- package/dist/validation.d.mts +1 -1
- package/npm-shrinkwrap.json +43 -50
- package/package.json +36 -10
- package/dist/host-4t713IeR.mjs +0 -37
- /package/dist/{index-BoTnz8cv.d.mts → anthropic-BoTnz8cv.d.mts} +0 -0
|
@@ -212,6 +212,8 @@ interface Usage {
|
|
|
212
212
|
output: number;
|
|
213
213
|
cacheRead: number;
|
|
214
214
|
cacheWrite: number;
|
|
215
|
+
/** Subset of `cacheWrite` written with 1-hour retention when reported. */
|
|
216
|
+
cacheWrite1h?: number;
|
|
215
217
|
/** Exact context snapshot for the final provider iteration. */
|
|
216
218
|
contextUsage?: {
|
|
217
219
|
state: "available";
|
|
@@ -256,6 +258,7 @@ interface AssistantMessage {
|
|
|
256
258
|
model: string;
|
|
257
259
|
responseModel?: string;
|
|
258
260
|
responseId?: string;
|
|
261
|
+
turnId?: string;
|
|
259
262
|
diagnostics?: AssistantMessageDiagnostic[];
|
|
260
263
|
usage: Usage;
|
|
261
264
|
stopReason: StopReason;
|
|
@@ -435,6 +438,8 @@ interface OpenAICompletionsCompat {
|
|
|
435
438
|
}
|
|
436
439
|
/** Compatibility settings for OpenAI Responses APIs. */
|
|
437
440
|
interface OpenAIResponsesCompat {
|
|
441
|
+
/** Whether the provider supports the `developer` role (vs `system`). Default: true. */
|
|
442
|
+
supportsDeveloperRole?: boolean;
|
|
438
443
|
/** Whether the model accepts the `temperature` parameter. Default: true. */
|
|
439
444
|
supportsTemperature?: boolean;
|
|
440
445
|
/** Whether to send the OpenAI `session_id` cache-affinity header from `options.sessionId` when caching is enabled. Default: true. */
|
|
@@ -470,6 +475,8 @@ interface AnthropicMessagesCompat {
|
|
|
470
475
|
* Default: true.
|
|
471
476
|
*/
|
|
472
477
|
supportsCacheControlOnTools?: boolean;
|
|
478
|
+
/** Whether empty thinking signatures can be replayed as native thinking blocks. Default: false. */
|
|
479
|
+
allowEmptySignature?: boolean;
|
|
473
480
|
}
|
|
474
481
|
/**
|
|
475
482
|
* OpenRouter provider routing preferences.
|
package/dist/types.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as resolveClaudeFable5ModelIdentity, c as resolveClaudeNativeThinkingLevelMap, d as supportsClaudeNativeMaxEffort, f as supportsClaudeNativeXhighEffort, i as requiresClaudeMandatoryAdaptiveThinking, l as resolveClaudeSonnet5ModelIdentity, n as CLAUDE_SONNET_5_THINKING_PROFILE, o as resolveClaudeModelIdentity, r as requiresClaudeDefaultSampling, s as resolveClaudeMythos5ModelIdentity, t as CLAUDE_FABLE_5_THINKING_PROFILE, u as supportsClaudeAdaptiveThinking } from "./
|
|
1
|
+
import { a as resolveClaudeFable5ModelIdentity, c as resolveClaudeNativeThinkingLevelMap, d as supportsClaudeNativeMaxEffort, f as supportsClaudeNativeXhighEffort, i as requiresClaudeMandatoryAdaptiveThinking, l as resolveClaudeSonnet5ModelIdentity, n as CLAUDE_SONNET_5_THINKING_PROFILE, o as resolveClaudeModelIdentity, r as requiresClaudeDefaultSampling, s as resolveClaudeMythos5ModelIdentity, t as CLAUDE_FABLE_5_THINKING_PROFILE, u as supportsClaudeAdaptiveThinking } from "./anthropic-BoTnz8cv.mjs";
|
|
2
2
|
import { a as extractDiagnosticError, i as createAssistantMessageDiagnostic, n as DiagnosticErrorInfo, o as formatThrownValue, r as appendAssistantMessageDiagnostic, t as AssistantMessageDiagnostic } from "./diagnostics-BaTA9eVl.mjs";
|
|
3
|
-
import { $ as VercelGatewayRouting, A as OpenRouterRouting, B as TextContent, C as KnownImagesProvider, D as ModelThinkingLevel, E as Model, F as SimpleStreamOptions, G as ThinkingLevelMap, H as ThinkingBudgets, I as StopReason, J as ToolResultMessage, K as Tool, L as StreamFn, M as ProviderImagesOptions, N as ProviderResponse, O as OpenAICompletionsCompat, P as ProviderStreamOptions, Q as ValidateToolArgumentsFn, R as StreamFunction, S as KnownImagesApi, T as Message, U as ThinkingContent, V as TextSignatureV1, W as ThinkingLevel, X as Usage, Y as Transport, Z as UserMessage, _ as ImagesOptions, a as AssistantMessageEvent, b as ImagesStopReason, c as CacheRetention, d as ImageContent, f as ImagesApi, g as ImagesModel, h as ImagesInputContent, i as AssistantMessage, j as Provider, k as OpenAIResponsesCompat, l as CompleteSimpleFn, m as ImagesFunction, n as Api, o as AssistantMessageEventStreamContract, p as ImagesContext, q as ToolCall, r as AssistantImages, s as AssistantMessageEventStreamLike, t as AnthropicMessagesCompat, u as Context, v as ImagesOutputContent, w as MaybePromise, x as KnownApi, y as ImagesProvider, z as StreamOptions } from "./types-
|
|
4
|
-
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-
|
|
5
|
-
import { n as validateToolCall, t as validateToolArguments } from "./validation-
|
|
3
|
+
import { $ as VercelGatewayRouting, A as OpenRouterRouting, B as TextContent, C as KnownImagesProvider, D as ModelThinkingLevel, E as Model, F as SimpleStreamOptions, G as ThinkingLevelMap, H as ThinkingBudgets, I as StopReason, J as ToolResultMessage, K as Tool, L as StreamFn, M as ProviderImagesOptions, N as ProviderResponse, O as OpenAICompletionsCompat, P as ProviderStreamOptions, Q as ValidateToolArgumentsFn, R as StreamFunction, S as KnownImagesApi, T as Message, U as ThinkingContent, V as TextSignatureV1, W as ThinkingLevel, X as Usage, Y as Transport, Z as UserMessage, _ as ImagesOptions, a as AssistantMessageEvent, b as ImagesStopReason, c as CacheRetention, d as ImageContent, f as ImagesApi, g as ImagesModel, h as ImagesInputContent, i as AssistantMessage, j as Provider, k as OpenAIResponsesCompat, l as CompleteSimpleFn, m as ImagesFunction, n as Api, o as AssistantMessageEventStreamContract, p as ImagesContext, q as ToolCall, r as AssistantImages, s as AssistantMessageEventStreamLike, t as AnthropicMessagesCompat, u as Context, v as ImagesOutputContent, w as MaybePromise, x as KnownApi, y as ImagesProvider, z as StreamOptions } from "./types-AFwwWium.mjs";
|
|
4
|
+
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-Douf9dob.mjs";
|
|
5
|
+
import { n as validateToolCall, t as validateToolArguments } from "./validation-sxvxC8J-.mjs";
|
|
6
6
|
export { AnthropicMessagesCompat, Api, AssistantImages, AssistantMessage, AssistantMessageDiagnostic, AssistantMessageEvent, AssistantMessageEventStream, AssistantMessageEventStreamContract, AssistantMessageEventStreamLike, CLAUDE_FABLE_5_THINKING_PROFILE, CLAUDE_SONNET_5_THINKING_PROFILE, CacheRetention, CompleteSimpleFn, Context, DiagnosticErrorInfo, EventStream, ImageContent, ImagesApi, ImagesContext, ImagesFunction, ImagesInputContent, ImagesModel, ImagesOptions, ImagesOutputContent, ImagesProvider, ImagesStopReason, KnownApi, KnownImagesApi, KnownImagesProvider, MaybePromise, Message, Model, ModelThinkingLevel, OpenAICompletionsCompat, OpenAIResponsesCompat, OpenRouterRouting, Provider, ProviderImagesOptions, ProviderResponse, ProviderStreamOptions, SimpleStreamOptions, StopReason, StreamFn, StreamFunction, StreamOptions, TextContent, TextSignatureV1, ThinkingBudgets, ThinkingContent, ThinkingLevel, ThinkingLevelMap, Tool, ToolCall, ToolResultMessage, Transport, Usage, UserMessage, ValidateToolArgumentsFn, VercelGatewayRouting, appendAssistantMessageDiagnostic, createAssistantMessageDiagnostic, createAssistantMessageEventStream, extractDiagnosticError, formatThrownValue, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeSonnet5ModelIdentity, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
|
package/dist/validation.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as validateToolCall, t as validateToolArguments } from "./validation-
|
|
1
|
+
import { n as validateToolCall, t as validateToolArguments } from "./validation-sxvxC8J-.mjs";
|
|
2
2
|
export { validateToolArguments, validateToolCall };
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/ai",
|
|
3
|
-
"version": "2026.7.2-beta.
|
|
3
|
+
"version": "2026.7.2-beta.4",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/ai",
|
|
9
|
-
"version": "2026.7.2-beta.
|
|
9
|
+
"version": "2026.7.2-beta.4",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@anthropic-ai/sdk": "0.
|
|
13
|
-
"@google/genai": "2.
|
|
14
|
-
"@mistralai/mistralai": "2.
|
|
15
|
-
"openai": "6.
|
|
12
|
+
"@anthropic-ai/sdk": "0.112.3",
|
|
13
|
+
"@google/genai": "2.12.0",
|
|
14
|
+
"@mistralai/mistralai": "2.5.0",
|
|
15
|
+
"openai": "6.48.0",
|
|
16
16
|
"partial-json": "0.1.7",
|
|
17
|
-
"typebox": "1.3.
|
|
17
|
+
"typebox": "1.3.6"
|
|
18
18
|
},
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=22.19.0"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"node_modules/@anthropic-ai/sdk": {
|
|
24
|
-
"version": "0.
|
|
25
|
-
"resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.
|
|
26
|
-
"integrity": "sha512-
|
|
24
|
+
"version": "0.112.3",
|
|
25
|
+
"resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.112.3.tgz",
|
|
26
|
+
"integrity": "sha512-wjcozJlitVIuBEw9cj/xBuRznwkhcLmXmNzlFoeHbh4AvrDG3HGZrdvEOTTmobcbhjGkfOpKbmDTCQ4s9LQvCg==",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"json-schema-to-ts": "^3.1.1",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"node_modules/@google/genai": {
|
|
54
|
-
"version": "2.
|
|
55
|
-
"resolved": "https://registry.npmjs.org/@google/genai/-/genai-2.
|
|
56
|
-
"integrity": "sha512-
|
|
54
|
+
"version": "2.12.0",
|
|
55
|
+
"resolved": "https://registry.npmjs.org/@google/genai/-/genai-2.12.0.tgz",
|
|
56
|
+
"integrity": "sha512-LUr972DZosqPUhf9Mb3CIVu/B99woD3QW6ZJV1T9aNgxaoimAZARmo+IyyDsxIL+zouFiYSdA4hzfEWXc9oNIQ==",
|
|
57
57
|
"hasInstallScript": true,
|
|
58
58
|
"license": "Apache-2.0",
|
|
59
59
|
"dependencies": {
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"node_modules/@mistralai/mistralai": {
|
|
78
|
-
"version": "2.
|
|
79
|
-
"resolved": "https://registry.npmjs.org/@mistralai/mistralai/-/mistralai-2.
|
|
80
|
-
"integrity": "sha512-
|
|
78
|
+
"version": "2.5.0",
|
|
79
|
+
"resolved": "https://registry.npmjs.org/@mistralai/mistralai/-/mistralai-2.5.0.tgz",
|
|
80
|
+
"integrity": "sha512-S/r6tkiUHblaDJGsb84WS0ePTF2YHVta2EoTi1NJqHNt5mfRRS2uE4v7hCYV134+an+fk6WgG3+aFfinJbQBjQ==",
|
|
81
81
|
"license": "Apache-2.0",
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"@opentelemetry/semantic-conventions": "^1.40.0",
|
|
@@ -95,9 +95,9 @@
|
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
"node_modules/@opentelemetry/semantic-conventions": {
|
|
98
|
-
"version": "1.
|
|
99
|
-
"resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.
|
|
100
|
-
"integrity": "sha512
|
|
98
|
+
"version": "1.43.0",
|
|
99
|
+
"resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.43.0.tgz",
|
|
100
|
+
"integrity": "sha512-eSYWTm620tTk45EKSedaUL8MFYI8hW164hIXsgIHyxu3VobUB3fFCu5t0hQby6OoWRPsG1KkKUG2M5UadiLiVg==",
|
|
101
101
|
"license": "Apache-2.0",
|
|
102
102
|
"engines": {
|
|
103
103
|
"node": ">=14"
|
|
@@ -142,12 +142,6 @@
|
|
|
142
142
|
"integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==",
|
|
143
143
|
"license": "BSD-3-Clause"
|
|
144
144
|
},
|
|
145
|
-
"node_modules/@protobufjs/inquire": {
|
|
146
|
-
"version": "1.1.2",
|
|
147
|
-
"resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.2.tgz",
|
|
148
|
-
"integrity": "sha512-pa0vFRuws4wkvaXKK1uXZMAwAX4/t8ANaJo45iw/oQHNQ9q5xUzwgFmVJGXiga2BeN+zpX7Vf9vmsiIa2J+MUw==",
|
|
149
|
-
"license": "BSD-3-Clause"
|
|
150
|
-
},
|
|
151
145
|
"node_modules/@protobufjs/path": {
|
|
152
146
|
"version": "1.1.2",
|
|
153
147
|
"resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
|
|
@@ -161,9 +155,9 @@
|
|
|
161
155
|
"license": "BSD-3-Clause"
|
|
162
156
|
},
|
|
163
157
|
"node_modules/@protobufjs/utf8": {
|
|
164
|
-
"version": "1.1.
|
|
165
|
-
"resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.
|
|
166
|
-
"integrity": "sha512-
|
|
158
|
+
"version": "1.1.2",
|
|
159
|
+
"resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.2.tgz",
|
|
160
|
+
"integrity": "sha512-b1UQwcEZ4yCnMCD8DAL1VlbvBJE9/IX4FTIp7BG1xYpf29SLazLSrqUkj4w7Y5y7cCVP6E5tcqqcI0xemPkHug==",
|
|
167
161
|
"license": "BSD-3-Clause"
|
|
168
162
|
},
|
|
169
163
|
"node_modules/@stablelib/base64": {
|
|
@@ -173,9 +167,9 @@
|
|
|
173
167
|
"license": "MIT"
|
|
174
168
|
},
|
|
175
169
|
"node_modules/@types/node": {
|
|
176
|
-
"version": "26.1.
|
|
177
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.1.
|
|
178
|
-
"integrity": "sha512-
|
|
170
|
+
"version": "26.1.1",
|
|
171
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.1.1.tgz",
|
|
172
|
+
"integrity": "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw==",
|
|
179
173
|
"license": "MIT",
|
|
180
174
|
"dependencies": {
|
|
181
175
|
"undici-types": "~8.3.0"
|
|
@@ -314,9 +308,9 @@
|
|
|
314
308
|
}
|
|
315
309
|
},
|
|
316
310
|
"node_modules/gaxios": {
|
|
317
|
-
"version": "7.
|
|
318
|
-
"resolved": "https://registry.npmjs.org/gaxios/-/gaxios-7.
|
|
319
|
-
"integrity": "sha512-
|
|
311
|
+
"version": "7.2.0",
|
|
312
|
+
"resolved": "https://registry.npmjs.org/gaxios/-/gaxios-7.2.0.tgz",
|
|
313
|
+
"integrity": "sha512-CUVb4wcYe+771XevyH6HtGmXFAGGKkIC3kswAP8Z1JCe0j80JMaTPZH930DWFrvo0atjh18Arc0pEyUCWa5bfg==",
|
|
320
314
|
"license": "Apache-2.0",
|
|
321
315
|
"dependencies": {
|
|
322
316
|
"extend": "^3.0.2",
|
|
@@ -359,9 +353,9 @@
|
|
|
359
353
|
}
|
|
360
354
|
},
|
|
361
355
|
"node_modules/google-logging-utils": {
|
|
362
|
-
"version": "1.1.
|
|
363
|
-
"resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-1.1.
|
|
364
|
-
"integrity": "sha512-
|
|
356
|
+
"version": "1.1.4",
|
|
357
|
+
"resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-1.1.4.tgz",
|
|
358
|
+
"integrity": "sha512-LXxE6ND+JHhDPYtPFt3oeWrjxFPrnRZCZ4At6lpbi1ZDSAN7bmGET9s53vvARbxT93p+xpeDUbc/nCR4C+7vcw==",
|
|
365
359
|
"license": "Apache-2.0",
|
|
366
360
|
"engines": {
|
|
367
361
|
"node": ">=14"
|
|
@@ -464,9 +458,9 @@
|
|
|
464
458
|
}
|
|
465
459
|
},
|
|
466
460
|
"node_modules/openai": {
|
|
467
|
-
"version": "6.
|
|
468
|
-
"resolved": "https://registry.npmjs.org/openai/-/openai-6.
|
|
469
|
-
"integrity": "sha512-
|
|
461
|
+
"version": "6.48.0",
|
|
462
|
+
"resolved": "https://registry.npmjs.org/openai/-/openai-6.48.0.tgz",
|
|
463
|
+
"integrity": "sha512-KhVp+FyV50QrXNextvL9hIU5l6ox5HYuKQjGVk7lIqprgJol90+dQXWONV6S1lRWsKA1bXjrow8RsUT14M1hNA==",
|
|
470
464
|
"license": "Apache-2.0",
|
|
471
465
|
"peerDependencies": {
|
|
472
466
|
"@aws-sdk/credential-provider-node": ">=3.972.0 <4",
|
|
@@ -513,9 +507,9 @@
|
|
|
513
507
|
"license": "MIT"
|
|
514
508
|
},
|
|
515
509
|
"node_modules/protobufjs": {
|
|
516
|
-
"version": "7.6.
|
|
517
|
-
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.
|
|
518
|
-
"integrity": "sha512
|
|
510
|
+
"version": "7.6.5",
|
|
511
|
+
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.5.tgz",
|
|
512
|
+
"integrity": "sha512-/FPD0nUc9jH6rfFjji9IBqOz4pcSE3CsT1m7Ep6Mdb0LxSUMj8hgl6GomOvZzpNpAqqGaXA0P3VSrZLFzIhQrw==",
|
|
519
513
|
"hasInstallScript": true,
|
|
520
514
|
"license": "BSD-3-Clause",
|
|
521
515
|
"dependencies": {
|
|
@@ -525,7 +519,6 @@
|
|
|
525
519
|
"@protobufjs/eventemitter": "^1.1.1",
|
|
526
520
|
"@protobufjs/fetch": "^1.1.1",
|
|
527
521
|
"@protobufjs/float": "^1.0.2",
|
|
528
|
-
"@protobufjs/inquire": "^1.1.2",
|
|
529
522
|
"@protobufjs/path": "^1.1.2",
|
|
530
523
|
"@protobufjs/pool": "^1.1.0",
|
|
531
524
|
"@protobufjs/utf8": "^1.1.1",
|
|
@@ -582,9 +575,9 @@
|
|
|
582
575
|
"license": "MIT"
|
|
583
576
|
},
|
|
584
577
|
"node_modules/typebox": {
|
|
585
|
-
"version": "1.3.
|
|
586
|
-
"resolved": "https://registry.npmjs.org/typebox/-/typebox-1.3.
|
|
587
|
-
"integrity": "sha512-
|
|
578
|
+
"version": "1.3.6",
|
|
579
|
+
"resolved": "https://registry.npmjs.org/typebox/-/typebox-1.3.6.tgz",
|
|
580
|
+
"integrity": "sha512-Sc8RA0NCMEFmApHNU9ZMzqcpQj46She44J8ffpLM/bdhLNUZKq7DJumcLcsFx1gRmDfQPgCgOmFFJ7rcnfWNyA==",
|
|
588
581
|
"license": "MIT"
|
|
589
582
|
},
|
|
590
583
|
"node_modules/undici-types": {
|
|
@@ -603,9 +596,9 @@
|
|
|
603
596
|
}
|
|
604
597
|
},
|
|
605
598
|
"node_modules/ws": {
|
|
606
|
-
"version": "8.21.
|
|
607
|
-
"resolved": "https://registry.npmjs.org/ws/-/ws-8.21.
|
|
608
|
-
"integrity": "sha512
|
|
599
|
+
"version": "8.21.1",
|
|
600
|
+
"resolved": "https://registry.npmjs.org/ws/-/ws-8.21.1.tgz",
|
|
601
|
+
"integrity": "sha512-+0NTnW77fFN/DjQi6k/Sq/Yvk4Sgajw7urW8V+asjXnRgDs9gyGkdb7EzgfhA4goXsRIZKE28fzIXBHEzhuiWw==",
|
|
609
602
|
"license": "MIT",
|
|
610
603
|
"engines": {
|
|
611
604
|
"node": ">=10.0.0"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/ai",
|
|
3
|
-
"version": "2026.7.2-beta.
|
|
3
|
+
"version": "2026.7.2-beta.4",
|
|
4
4
|
"description": "Reusable model provider adapters and streaming runtime from OpenClaw",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"url": "https://github.com/openclaw/openclaw/issues"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
|
+
"author": "OpenClaw Foundation (https://openclaw.org)",
|
|
19
20
|
"repository": {
|
|
20
21
|
"type": "git",
|
|
21
22
|
"url": "git+https://github.com/openclaw/openclaw.git",
|
|
@@ -41,6 +42,11 @@
|
|
|
41
42
|
"import": "./dist/providers.mjs",
|
|
42
43
|
"default": "./dist/providers.mjs"
|
|
43
44
|
},
|
|
45
|
+
"./transports": {
|
|
46
|
+
"types": "./dist/transports.d.mts",
|
|
47
|
+
"import": "./dist/transports.mjs",
|
|
48
|
+
"default": "./dist/transports.mjs"
|
|
49
|
+
},
|
|
44
50
|
"./diagnostics": {
|
|
45
51
|
"types": "./dist/diagnostics.d.mts",
|
|
46
52
|
"import": "./dist/diagnostics.mjs",
|
|
@@ -61,19 +67,39 @@
|
|
|
61
67
|
"import": "./dist/validation.mjs",
|
|
62
68
|
"default": "./dist/validation.mjs"
|
|
63
69
|
},
|
|
64
|
-
"./internal
|
|
65
|
-
"types": "./dist/internal
|
|
66
|
-
"import": "./dist/internal
|
|
67
|
-
"default": "./dist/internal
|
|
70
|
+
"./internal/anthropic": {
|
|
71
|
+
"types": "./dist/internal/anthropic.d.mts",
|
|
72
|
+
"import": "./dist/internal/anthropic.mjs",
|
|
73
|
+
"default": "./dist/internal/anthropic.mjs"
|
|
74
|
+
},
|
|
75
|
+
"./internal/openai": {
|
|
76
|
+
"types": "./dist/internal/openai.d.mts",
|
|
77
|
+
"import": "./dist/internal/openai.mjs",
|
|
78
|
+
"default": "./dist/internal/openai.mjs"
|
|
79
|
+
},
|
|
80
|
+
"./internal/retry-after": {
|
|
81
|
+
"types": "./dist/internal/retry-after.d.mts",
|
|
82
|
+
"import": "./dist/internal/retry-after.mjs",
|
|
83
|
+
"default": "./dist/internal/retry-after.mjs"
|
|
84
|
+
},
|
|
85
|
+
"./internal/runtime": {
|
|
86
|
+
"types": "./dist/internal/runtime.d.mts",
|
|
87
|
+
"import": "./dist/internal/runtime.mjs",
|
|
88
|
+
"default": "./dist/internal/runtime.mjs"
|
|
89
|
+
},
|
|
90
|
+
"./internal/shared": {
|
|
91
|
+
"types": "./dist/internal/shared.d.mts",
|
|
92
|
+
"import": "./dist/internal/shared.mjs",
|
|
93
|
+
"default": "./dist/internal/shared.mjs"
|
|
68
94
|
}
|
|
69
95
|
},
|
|
70
96
|
"dependencies": {
|
|
71
|
-
"@anthropic-ai/sdk": "0.
|
|
72
|
-
"@google/genai": "2.
|
|
73
|
-
"@mistralai/mistralai": "2.
|
|
74
|
-
"openai": "6.
|
|
97
|
+
"@anthropic-ai/sdk": "0.112.3",
|
|
98
|
+
"@google/genai": "2.12.0",
|
|
99
|
+
"@mistralai/mistralai": "2.5.0",
|
|
100
|
+
"openai": "6.48.0",
|
|
75
101
|
"partial-json": "0.1.7",
|
|
76
|
-
"typebox": "1.3.
|
|
102
|
+
"typebox": "1.3.6"
|
|
77
103
|
},
|
|
78
104
|
"engines": {
|
|
79
105
|
"node": ">=22.19.0"
|
package/dist/host-4t713IeR.mjs
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
//#region packages/ai/src/host.ts
|
|
2
|
-
const inertAiTransportHost = {
|
|
3
|
-
buildModelFetch: () => void 0,
|
|
4
|
-
resolveSecretSentinel: (value) => value,
|
|
5
|
-
redactSecrets: (value) => value,
|
|
6
|
-
redactToolPayloadText: (text) => text,
|
|
7
|
-
resolveOpenAIStrictToolSetting: (_model, options) => options?.supportsStrictMode ? false : void 0,
|
|
8
|
-
logDebug: () => {}
|
|
9
|
-
};
|
|
10
|
-
let activeAiTransportHost = inertAiTransportHost;
|
|
11
|
-
/** Installs host implementations for the transport policy ports. */
|
|
12
|
-
function configureAiTransportHost(host) {
|
|
13
|
-
activeAiTransportHost = {
|
|
14
|
-
...inertAiTransportHost,
|
|
15
|
-
...host
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
/** Returns the active transport host (inert defaults unless configured). */
|
|
19
|
-
function getAiTransportHost() {
|
|
20
|
-
return activeAiTransportHost;
|
|
21
|
-
}
|
|
22
|
-
/** Resolves sentinel substrings in custom headers at a no-fetch adapter boundary. */
|
|
23
|
-
function resolveAiTransportHeaderSentinels(headers) {
|
|
24
|
-
if (!headers) return;
|
|
25
|
-
const host = getAiTransportHost();
|
|
26
|
-
let resolvedHeaders;
|
|
27
|
-
for (const [name, value] of Object.entries(headers)) {
|
|
28
|
-
const resolved = host.resolveSecretSentinel(value);
|
|
29
|
-
if (resolved !== value) {
|
|
30
|
-
resolvedHeaders ??= { ...headers };
|
|
31
|
-
resolvedHeaders[name] = resolved;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return resolvedHeaders ?? headers;
|
|
35
|
-
}
|
|
36
|
-
//#endregion
|
|
37
|
-
export { getAiTransportHost as n, resolveAiTransportHeaderSentinels as r, configureAiTransportHost as t };
|
|
File without changes
|