@openclaw/ai 2026.7.1 → 2026.7.2-beta.1
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-B5gZQM5X.mjs → anthropic-Cvm71xlk.mjs} +19 -97
- package/dist/{api-registry-BXYnCOIR.d.mts → api-registry-Byvoz8Ha.d.mts} +1 -1
- package/dist/{azure-openai-responses-DNoSk8Uy.mjs → azure-openai-responses-b4lfJxYS.mjs} +6 -6
- package/dist/{azure-openai-responses-client-compat-a_O_GVQV.mjs → azure-openai-responses-client-compat-C7K7QfUE.mjs} +23 -2
- package/dist/{env-api-keys-CtMlqaQ4.mjs → env-api-keys-DnhYpc27.mjs} +4 -3
- package/dist/{event-stream-ReMmOTzX.mjs → event-stream-D8n2uFee.mjs} +14 -6
- package/dist/{event-stream-0nZeBKl2.d.mts → event-stream-uQspnL8S.d.mts} +1 -1
- package/dist/event-stream.d.mts +1 -1
- package/dist/event-stream.mjs +1 -1
- package/dist/{google-D6sIQ1bL.mjs → google-C7PoDjpW.mjs} +4 -4
- package/dist/{google-shared-ZPSl2qTi.mjs → google-shared-C7ohrmOI.mjs} +29 -20
- package/dist/{google-vertex-rDGwkoZK.mjs → google-vertex-L_ABazIA.mjs} +5 -18
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +3 -3
- package/dist/internal/anthropic.d.mts +1 -1
- package/dist/internal/anthropic.mjs +3 -3
- package/dist/internal/openai.d.mts +14 -3
- package/dist/internal/openai.mjs +7 -7
- package/dist/internal/retry-after.d.mts +5 -0
- package/dist/internal/retry-after.mjs +101 -0
- package/dist/internal/runtime.d.mts +2 -2
- package/dist/internal/runtime.mjs +6 -5
- package/dist/internal/shared.d.mts +2 -1
- package/dist/internal/shared.mjs +1 -1
- package/dist/{json-parse-DzNSIQBq.mjs → json-parse-BvXNt1-7.mjs} +4 -6
- package/dist/{mistral-CePVNdws.mjs → mistral-D-39Trax.mjs} +114 -31
- package/dist/{model-utils-DgmOla96.mjs → model-utils-Q1LSRIdo.mjs} +5 -12
- package/dist/{openai-chatgpt-responses-DVC4Bk_A.mjs → openai-chatgpt-responses-DCA0K85L.mjs} +40 -96
- package/dist/{openai-completions-B9QLIq2U.mjs → openai-completions-B2jr3vtJ.mjs} +24 -21
- package/dist/{openai-responses-B6LylGxM.mjs → openai-responses-DTpD8YVy.mjs} +6 -6
- package/dist/{openai-responses-shared-sj2YUPYc.mjs → openai-responses-shared-B9mtGvXq.mjs} +207 -46
- package/dist/{openai-tool-projection-BknoV11q.mjs → openai-tool-projection-cTLC4F65.mjs} +8 -3
- package/dist/providers.d.mts +1 -1
- package/dist/providers.mjs +9 -9
- package/dist/{reasoning-tag-text-partitioner-axhAdUwg.mjs → reasoning-tag-text-partitioner-BlVe67g6.mjs} +14 -8
- package/dist/{src-CZ503MYJ.mjs → src-CXno1H5g.mjs} +1 -1
- package/dist/{tool-schema-json-projection-BXtBc_mD.mjs → tool-schema-json-projection-BwNu3nDi.mjs} +22 -2
- package/dist/{transform-messages-BhGF_fF4.mjs → transform-messages-DNWpwvXA.mjs} +2 -2
- package/dist/{types-DRgdPqaZ.d.mts → types-Cx2zJtyz.d.mts} +5 -0
- package/dist/types.d.mts +3 -3
- package/dist/types.mjs +3 -3
- package/dist/{validation-BDMWOr8d.d.mts → validation-Cej7htKc.d.mts} +1 -1
- package/dist/{validation-FrchoOlv.mjs → validation-DAa_yFOM.mjs} +2 -7
- package/dist/validation.d.mts +1 -1
- package/dist/validation.mjs +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveClaudeFable5ModelIdentity, i as requiresClaudeMandatoryAdaptiveThinking, l as resolveClaudeSonnet5ModelIdentity, r as requiresClaudeDefaultSampling, s as resolveClaudeMythos5ModelIdentity } from "./src-
|
|
1
|
+
import { a as resolveClaudeFable5ModelIdentity, i as requiresClaudeMandatoryAdaptiveThinking, l as resolveClaudeSonnet5ModelIdentity, r as requiresClaudeDefaultSampling, s as resolveClaudeMythos5ModelIdentity } from "./src-CXno1H5g.mjs";
|
|
2
2
|
import { n as getAiTransportHost } from "./host-4t713IeR.mjs";
|
|
3
3
|
import { t as sanitizeSurrogates } from "./sanitize-unicode-DT5o51ur.mjs";
|
|
4
4
|
//#region packages/normalization-core/src/string-coerce.ts
|
|
@@ -504,4 +504,4 @@ function transformMessages(messages, model, normalizeToolCallId) {
|
|
|
504
504
|
return result;
|
|
505
505
|
}
|
|
506
506
|
//#endregion
|
|
507
|
-
export {
|
|
507
|
+
export { normalizeStructuredPromptSection as C, normalizePromptCapabilityIds as S, normalizeOptionalString as T, SYSTEM_PROMPT_CACHE_BOUNDARY as _, truncateUtf16Safe as a, splitSystemPromptCacheBoundary as b, clampReasoning as c, defaultsClaudeAdaptiveThinking as d, prepareClaudeSonnet5RequestContext as f, usesClaudeStreamingRefusalContract as g, usesClaudeFable5MessagesContract as h, extractToolResultText as i, isRecord as l, resolveModelBoundThinkingReplayMode as m, describeToolResultMediaPlaceholder as n, adjustMaxTokensForThinking as o, requiresClaudeAdaptiveThinking as p, extractToolResultBlockText as r, buildBaseOptions as s, transformMessages as t, applyClaudeRequestContract as u, ensureSystemPromptCacheBoundary as v, normalizeLowercaseStringOrEmpty as w, stripSystemPromptCacheBoundary as x, prependSystemPromptAdditionAfterCacheBoundary as y };
|
|
@@ -69,6 +69,11 @@ interface StreamOptions {
|
|
|
69
69
|
* session-aware features. Ignored by providers that don't support it.
|
|
70
70
|
*/
|
|
71
71
|
sessionId?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Opaque per-model-call identifier for provider transport correlation.
|
|
74
|
+
* Providers that do not expose request correlation ignore it.
|
|
75
|
+
*/
|
|
76
|
+
requestId?: string;
|
|
72
77
|
/**
|
|
73
78
|
* Optional provider prompt-cache affinity key, distinct from transcript/session identity.
|
|
74
79
|
* Providers that do not support separate cache affinity ignore it.
|
package/dist/types.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
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 "./index-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-Cx2zJtyz.mjs";
|
|
4
|
+
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-uQspnL8S.mjs";
|
|
5
|
+
import { n as validateToolCall, t as validateToolArguments } from "./validation-Cej7htKc.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/types.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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 "./src-
|
|
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 "./src-CXno1H5g.mjs";
|
|
2
2
|
import { i as formatThrownValue, n as createAssistantMessageDiagnostic, r as extractDiagnosticError, t as appendAssistantMessageDiagnostic } from "./diagnostics-COpOtRwq.mjs";
|
|
3
|
-
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-
|
|
4
|
-
import { n as validateToolCall, t as validateToolArguments } from "./validation-
|
|
3
|
+
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-D8n2uFee.mjs";
|
|
4
|
+
import { n as validateToolCall, t as validateToolArguments } from "./validation-DAa_yFOM.mjs";
|
|
5
5
|
export { AssistantMessageEventStream, CLAUDE_FABLE_5_THINKING_PROFILE, CLAUDE_SONNET_5_THINKING_PROFILE, EventStream, appendAssistantMessageDiagnostic, createAssistantMessageDiagnostic, createAssistantMessageEventStream, extractDiagnosticError, formatThrownValue, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeSonnet5ModelIdentity, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Compile } from "typebox/compile";
|
|
2
|
-
import { Value } from "typebox/value";
|
|
3
2
|
//#region packages/llm-core/src/validation.ts
|
|
4
3
|
const validatorCache = /* @__PURE__ */ new WeakMap();
|
|
5
|
-
const TYPEBOX_KIND = Symbol.for("TypeBox.Kind");
|
|
6
4
|
/** Maximum string length accepted for schema-gated JSON coercion. */
|
|
7
5
|
const MAX_JSON_COERCE_LENGTH = 64 * 1024;
|
|
8
6
|
function isRecord(value) {
|
|
@@ -11,9 +9,6 @@ function isRecord(value) {
|
|
|
11
9
|
function isJsonSchemaObject(value) {
|
|
12
10
|
return isRecord(value);
|
|
13
11
|
}
|
|
14
|
-
function hasTypeBoxMetadata(schema) {
|
|
15
|
-
return isRecord(schema) && Object.getOwnPropertySymbols(schema).includes(TYPEBOX_KIND);
|
|
16
|
-
}
|
|
17
12
|
function getSchemaTypes(schema) {
|
|
18
13
|
if (typeof schema.type === "string") return [schema.type];
|
|
19
14
|
if (Array.isArray(schema.type)) return schema.type.filter((type) => typeof type === "string");
|
|
@@ -182,9 +177,9 @@ function validateToolCall(tools, toolCall) {
|
|
|
182
177
|
/** Validates tool arguments against TypeBox or plain JSON-schema parameters. */
|
|
183
178
|
function validateToolArguments(tool, toolCall) {
|
|
184
179
|
const args = structuredClone(toolCall.arguments);
|
|
185
|
-
Value.Convert(tool.parameters, args);
|
|
186
180
|
const validator = getValidator(tool.parameters);
|
|
187
|
-
|
|
181
|
+
validator.Convert(args);
|
|
182
|
+
if (isJsonSchemaObject(tool.parameters)) {
|
|
188
183
|
const coerced = coerceWithJsonSchema(args, tool.parameters);
|
|
189
184
|
if (coerced !== args) if (isRecord(args) && isRecord(coerced)) {
|
|
190
185
|
for (const key of Object.keys(args)) delete args[key];
|
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-Cej7htKc.mjs";
|
|
2
2
|
export { validateToolArguments, validateToolCall };
|
package/dist/validation.mjs
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-DAa_yFOM.mjs";
|
|
2
2
|
export { validateToolArguments, validateToolCall };
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/ai",
|
|
3
|
-
"version": "2026.7.1",
|
|
3
|
+
"version": "2026.7.2-beta.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/ai",
|
|
9
|
-
"version": "2026.7.1",
|
|
9
|
+
"version": "2026.7.2-beta.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "0.109.1",
|