@openclaw/ai 2026.7.1-beta.5 → 2026.7.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/{api-registry-COYU2fF4.d.mts → api-registry-BXYnCOIR.d.mts} +1 -1
- package/dist/{azure-openai-responses-CkxVwqPL.mjs → azure-openai-responses-DNoSk8Uy.mjs} +1 -1
- package/dist/{event-stream-C-T9juXb.d.mts → event-stream-0nZeBKl2.d.mts} +1 -1
- package/dist/event-stream.d.mts +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/internal/anthropic.d.mts +1 -1
- package/dist/internal/openai.d.mts +4 -2
- package/dist/internal/openai.mjs +4 -4
- package/dist/internal/runtime.d.mts +2 -2
- package/dist/internal/shared.d.mts +1 -1
- package/dist/{openai-chatgpt-responses-CYqFzw4W.mjs → openai-chatgpt-responses-DVC4Bk_A.mjs} +1 -1
- package/dist/{openai-completions-IOlOeB-u.mjs → openai-completions-B9QLIq2U.mjs} +9 -6
- package/dist/{openai-responses-CKTUdtu9.mjs → openai-responses-B6LylGxM.mjs} +1 -1
- package/dist/{openai-responses-shared-CO5L7re5.mjs → openai-responses-shared-sj2YUPYc.mjs} +9 -1
- package/dist/providers.d.mts +1 -1
- package/dist/providers.mjs +4 -4
- package/dist/{types-DZAZItYw.d.mts → types-DRgdPqaZ.d.mts} +2 -0
- package/dist/types.d.mts +3 -3
- package/dist/{validation-Ctw0PWEu.d.mts → validation-BDMWOr8d.d.mts} +1 -1
- package/dist/validation.d.mts +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Model, F as SimpleStreamOptions, R as StreamFunction, n as Api, o as AssistantMessageEventStreamContract, u as Context, z as StreamOptions } from "./types-
|
|
1
|
+
import { E as Model, F as SimpleStreamOptions, R as StreamFunction, n as Api, o as AssistantMessageEventStreamContract, u as Context, z as StreamOptions } from "./types-DRgdPqaZ.mjs";
|
|
2
2
|
|
|
3
3
|
//#region packages/ai/src/api-registry.d.ts
|
|
4
4
|
/** Runtime stream adapter signature stored in the API provider registry. */
|
|
@@ -2,7 +2,7 @@ import { n as getEnvApiKey } from "./env-api-keys-CtMlqaQ4.mjs";
|
|
|
2
2
|
import { t as AssistantMessageEventStream } from "./event-stream-ReMmOTzX.mjs";
|
|
3
3
|
import { n as getAiTransportHost } from "./host-4t713IeR.mjs";
|
|
4
4
|
import { o as buildBaseOptions } from "./transform-messages-BhGF_fF4.mjs";
|
|
5
|
-
import { a as resolveResponsesReasoningEffort, n as convertResponsesMessages, o as runResponsesStreamLifecycle, r as createResponsesAssistantOutput, t as applyCommonResponsesParams } from "./openai-responses-shared-
|
|
5
|
+
import { a as resolveResponsesReasoningEffort, n as convertResponsesMessages, o as runResponsesStreamLifecycle, r as createResponsesAssistantOutput, t as applyCommonResponsesParams } from "./openai-responses-shared-sj2YUPYc.mjs";
|
|
6
6
|
import { i as resolveAzureDeploymentNameFromMap, t as isOpenAICompatibleAzureResponsesBaseUrl } from "./azure-openai-responses-client-compat-a_O_GVQV.mjs";
|
|
7
7
|
import { a as clampOpenAIPromptCacheKey } from "./openai-tool-projection-BknoV11q.mjs";
|
|
8
8
|
import OpenAI, { AzureOpenAI } from "openai";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AssistantMessageEvent, i as AssistantMessage, o as AssistantMessageEventStreamContract } from "./types-
|
|
1
|
+
import { a as AssistantMessageEvent, i as AssistantMessage, o as AssistantMessageEventStreamContract } from "./types-DRgdPqaZ.mjs";
|
|
2
2
|
|
|
3
3
|
//#region packages/llm-core/src/utils/event-stream.d.ts
|
|
4
4
|
/** Generic async-iterable event stream with a separately awaited final result. */
|
package/dist/event-stream.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-
|
|
1
|
+
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-0nZeBKl2.mjs";
|
|
2
2
|
export { AssistantMessageEventStream, EventStream, createAssistantMessageEventStream };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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-
|
|
6
|
-
import { a as RegisteredApiProvider, i as ApiStreamSimpleFunction, n as ApiRegistry, o as createApiRegistry, r as ApiStreamFunction, t as ApiProvider } from "./api-registry-
|
|
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-DRgdPqaZ.mjs";
|
|
4
|
+
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-0nZeBKl2.mjs";
|
|
5
|
+
import { n as validateToolCall, t as validateToolArguments } from "./validation-BDMWOr8d.mjs";
|
|
6
|
+
import { a as RegisteredApiProvider, i as ApiStreamSimpleFunction, n as ApiRegistry, o as createApiRegistry, r as ApiStreamFunction, t as ApiProvider } from "./api-registry-BXYnCOIR.mjs";
|
|
7
7
|
|
|
8
8
|
//#region packages/ai/src/host.d.ts
|
|
9
9
|
/** Strict-tool policy inputs for OpenAI-compatible routes. */
|
|
@@ -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, o as resolveClaudeModelIdentity, r as requiresClaudeDefaultSampling, s as resolveClaudeMythos5ModelIdentity, u as supportsClaudeAdaptiveThinking } from "../index-BoTnz8cv.mjs";
|
|
2
2
|
import { t as AssistantMessageDiagnostic } from "../diagnostics-BaTA9eVl.mjs";
|
|
3
|
-
import { E as Model, F as SimpleStreamOptions, R as StreamFunction, u as Context, z as StreamOptions } from "../types-
|
|
3
|
+
import { E as Model, F as SimpleStreamOptions, R as StreamFunction, u as Context, z as StreamOptions } from "../types-DRgdPqaZ.mjs";
|
|
4
4
|
import Anthropic from "@anthropic-ai/sdk";
|
|
5
5
|
|
|
6
6
|
//#region packages/ai/src/providers/anthropic.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Model, F as SimpleStreamOptions, I as StopReason, O as OpenAICompletionsCompat, R as StreamFunction, u as Context, z as StreamOptions } from "../types-
|
|
1
|
+
import { E as Model, F as SimpleStreamOptions, I as StopReason, O as OpenAICompletionsCompat, R as StreamFunction, u as Context, z as StreamOptions } from "../types-DRgdPqaZ.mjs";
|
|
2
2
|
import OpenAI from "openai";
|
|
3
3
|
import { TSchema } from "typebox";
|
|
4
4
|
import { ChatCompletionMessageParam } from "openai/resources/chat/completions.js";
|
|
@@ -122,6 +122,8 @@ type OpenAIReasoningModel = {
|
|
|
122
122
|
declare function isOpenAIGpt54MiniModel(model: OpenAIReasoningModel): boolean;
|
|
123
123
|
/** Return whether a model is the GPT-5.5 family. */
|
|
124
124
|
declare function isOpenAIGpt55Model(model: OpenAIReasoningModel): boolean;
|
|
125
|
+
/** Return whether a model is the GPT-5.6 family. */
|
|
126
|
+
declare function isOpenAIGpt56Model(model: OpenAIReasoningModel): boolean;
|
|
125
127
|
/** Normalize user-facing reasoning effort names to API effort names. */
|
|
126
128
|
declare function normalizeOpenAIReasoningEffort(effort: string): string;
|
|
127
129
|
/** Resolve the reasoning efforts accepted by a specific OpenAI-compatible model. */
|
|
@@ -239,4 +241,4 @@ type RuntimeToolInputSchemaProjection = {
|
|
|
239
241
|
/** Projects one runtime tool input schema to JSON and reports runtime incompatibilities. */
|
|
240
242
|
declare function projectRuntimeToolInputSchema(schema: unknown, path?: string): RuntimeToolInputSchemaProjection;
|
|
241
243
|
//#endregion
|
|
242
|
-
export { AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, AzureResponsesTextContentPart, AzureResponsesTextDeltaEvent, GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH, OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, OpenAIApiReasoningEffort, OpenAICompletionsOptions, OpenAICompletionsToolChoice, OpenAIReasoningEffort, OpenAIResponsesOptions, OpenAIStopReasonResult, OpenAIToolProjection, ResponsesMessageSnapshotCollapse, ResponsesTextContentPartType, ResponsesTextDeltaEventType, RuntimeToolInputSchemaJson, RuntimeToolInputSchemaProjection, ToolParameterSchemaOptions, ToolSchemaModelCompat, clampOpenAIPromptCacheKey, cleanSchemaForGemini, clearOpenAIToolSchemaCacheForTest, convertMessages, extractToolSchemaModelCompat, findOpenAIStrictToolProjectionDiagnostics, isAzureResponsesTextDeltaEvent, isAzureResponsesTextDeltaEventType, isOpenAICompatibleAzureResponsesBaseUrl, isOpenAIGpt54MiniModel, isOpenAIGpt55Model, isResponsesTextContentPartType, isResponsesTextDeltaEventType, isStrictOpenAIJsonSchemaCompatible, isTraditionalAzureOpenAIHost, mapOpenAIStopReason, normalizeOpenAIReasoningEffort, normalizeOpenAIStrictToolParameters, normalizeStrictOpenAIJsonSchema, normalizeToolParameterSchema, parseAzureDeploymentNameMap, projectOpenAITools, projectRuntimeToolInputSchema, reconcileOpenAICompletionsToolChoice, reconcileOpenAIResponsesToolChoice, resolveAzureDeploymentNameFromMap, resolveOpenAIProjectedToolsStrictToolFlag, resolveOpenAIReasoningEffortForModel, resolveOpenAISupportedReasoningEfforts, resolveResponsesMessageSnapshotCollapse, resolveUnsupportedToolSchemaKeywords, shouldOmitEmptyArrayItems, streamOpenAICompletions, streamOpenAIResponses, streamSimpleOpenAICompletions, streamSimpleOpenAIResponses, stripUnsupportedSchemaKeywords, supportsOpenAIReasoningEffort };
|
|
244
|
+
export { AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, AzureResponsesTextContentPart, AzureResponsesTextDeltaEvent, GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH, OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, OpenAIApiReasoningEffort, OpenAICompletionsOptions, OpenAICompletionsToolChoice, OpenAIReasoningEffort, OpenAIResponsesOptions, OpenAIStopReasonResult, OpenAIToolProjection, ResponsesMessageSnapshotCollapse, ResponsesTextContentPartType, ResponsesTextDeltaEventType, RuntimeToolInputSchemaJson, RuntimeToolInputSchemaProjection, ToolParameterSchemaOptions, ToolSchemaModelCompat, clampOpenAIPromptCacheKey, cleanSchemaForGemini, clearOpenAIToolSchemaCacheForTest, convertMessages, extractToolSchemaModelCompat, findOpenAIStrictToolProjectionDiagnostics, isAzureResponsesTextDeltaEvent, isAzureResponsesTextDeltaEventType, isOpenAICompatibleAzureResponsesBaseUrl, isOpenAIGpt54MiniModel, isOpenAIGpt55Model, isOpenAIGpt56Model, isResponsesTextContentPartType, isResponsesTextDeltaEventType, isStrictOpenAIJsonSchemaCompatible, isTraditionalAzureOpenAIHost, mapOpenAIStopReason, normalizeOpenAIReasoningEffort, normalizeOpenAIStrictToolParameters, normalizeStrictOpenAIJsonSchema, normalizeToolParameterSchema, parseAzureDeploymentNameMap, projectOpenAITools, projectRuntimeToolInputSchema, reconcileOpenAICompletionsToolChoice, reconcileOpenAIResponsesToolChoice, resolveAzureDeploymentNameFromMap, resolveOpenAIProjectedToolsStrictToolFlag, resolveOpenAIReasoningEffortForModel, resolveOpenAISupportedReasoningEfforts, resolveResponsesMessageSnapshotCollapse, resolveUnsupportedToolSchemaKeywords, shouldOmitEmptyArrayItems, streamOpenAICompletions, streamOpenAIResponses, streamSimpleOpenAICompletions, streamSimpleOpenAIResponses, stripUnsupportedSchemaKeywords, supportsOpenAIReasoningEffort };
|
package/dist/internal/openai.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as projectRuntimeToolInputSchema } from "../tool-schema-json-projection-BXtBc_mD.mjs";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as extractToolSchemaModelCompat, C as isOpenAIGpt54MiniModel, D as resolveOpenAIReasoningEffortForModel, E as normalizeOpenAIReasoningEffort, F as GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, I as cleanSchemaForGemini, M as resolveUnsupportedToolSchemaKeywords, N as shouldOmitEmptyArrayItems, O as resolveOpenAISupportedReasoningEfforts, P as stripUnsupportedSchemaKeywords, S as resolveResponsesMessageSnapshotCollapse, T as isOpenAIGpt56Model, _ as OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, b as isResponsesTextContentPartType, c as clearOpenAIToolSchemaCacheForTest, d as normalizeOpenAIStrictToolParameters, f as normalizeStrictOpenAIJsonSchema, g as OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, h as AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, j as normalizeToolParameterSchema, k as supportsOpenAIReasoningEffort, l as findOpenAIStrictToolProjectionDiagnostics, m as AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, p as resolveOpenAIProjectedToolsStrictToolFlag, u as isStrictOpenAIJsonSchemaCompatible, v as isAzureResponsesTextDeltaEvent, w as isOpenAIGpt55Model, x as isResponsesTextDeltaEventType, y as isAzureResponsesTextDeltaEventType } from "../openai-responses-shared-sj2YUPYc.mjs";
|
|
3
3
|
import { i as resolveAzureDeploymentNameFromMap, n as isTraditionalAzureOpenAIHost, r as parseAzureDeploymentNameMap, t as isOpenAICompatibleAzureResponsesBaseUrl } from "../azure-openai-responses-client-compat-a_O_GVQV.mjs";
|
|
4
4
|
import { a as clampOpenAIPromptCacheKey, i as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH, n as reconcileOpenAICompletionsToolChoice, r as reconcileOpenAIResponsesToolChoice, t as projectOpenAITools } from "../openai-tool-projection-BknoV11q.mjs";
|
|
5
|
-
import { a as mapOpenAIStopReason, i as streamSimpleOpenAICompletions, r as streamOpenAICompletions, t as convertMessages } from "../openai-completions-
|
|
6
|
-
import { n as streamOpenAIResponses, r as streamSimpleOpenAIResponses } from "../openai-responses-
|
|
7
|
-
export { AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH, OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, clampOpenAIPromptCacheKey, cleanSchemaForGemini, clearOpenAIToolSchemaCacheForTest, convertMessages, extractToolSchemaModelCompat, findOpenAIStrictToolProjectionDiagnostics, isAzureResponsesTextDeltaEvent, isAzureResponsesTextDeltaEventType, isOpenAICompatibleAzureResponsesBaseUrl, isOpenAIGpt54MiniModel, isOpenAIGpt55Model, isResponsesTextContentPartType, isResponsesTextDeltaEventType, isStrictOpenAIJsonSchemaCompatible, isTraditionalAzureOpenAIHost, mapOpenAIStopReason, normalizeOpenAIReasoningEffort, normalizeOpenAIStrictToolParameters, normalizeStrictOpenAIJsonSchema, normalizeToolParameterSchema, parseAzureDeploymentNameMap, projectOpenAITools, projectRuntimeToolInputSchema, reconcileOpenAICompletionsToolChoice, reconcileOpenAIResponsesToolChoice, resolveAzureDeploymentNameFromMap, resolveOpenAIProjectedToolsStrictToolFlag, resolveOpenAIReasoningEffortForModel, resolveOpenAISupportedReasoningEfforts, resolveResponsesMessageSnapshotCollapse, resolveUnsupportedToolSchemaKeywords, shouldOmitEmptyArrayItems, streamOpenAICompletions, streamOpenAIResponses, streamSimpleOpenAICompletions, streamSimpleOpenAIResponses, stripUnsupportedSchemaKeywords, supportsOpenAIReasoningEffort };
|
|
5
|
+
import { a as mapOpenAIStopReason, i as streamSimpleOpenAICompletions, r as streamOpenAICompletions, t as convertMessages } from "../openai-completions-B9QLIq2U.mjs";
|
|
6
|
+
import { n as streamOpenAIResponses, r as streamSimpleOpenAIResponses } from "../openai-responses-B6LylGxM.mjs";
|
|
7
|
+
export { AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH, OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, clampOpenAIPromptCacheKey, cleanSchemaForGemini, clearOpenAIToolSchemaCacheForTest, convertMessages, extractToolSchemaModelCompat, findOpenAIStrictToolProjectionDiagnostics, isAzureResponsesTextDeltaEvent, isAzureResponsesTextDeltaEventType, isOpenAICompatibleAzureResponsesBaseUrl, isOpenAIGpt54MiniModel, isOpenAIGpt55Model, isOpenAIGpt56Model, isResponsesTextContentPartType, isResponsesTextDeltaEventType, isStrictOpenAIJsonSchemaCompatible, isTraditionalAzureOpenAIHost, mapOpenAIStopReason, normalizeOpenAIReasoningEffort, normalizeOpenAIStrictToolParameters, normalizeStrictOpenAIJsonSchema, normalizeToolParameterSchema, parseAzureDeploymentNameMap, projectOpenAITools, projectRuntimeToolInputSchema, reconcileOpenAICompletionsToolChoice, reconcileOpenAIResponsesToolChoice, resolveAzureDeploymentNameFromMap, resolveOpenAIProjectedToolsStrictToolFlag, resolveOpenAIReasoningEffortForModel, resolveOpenAISupportedReasoningEfforts, resolveResponsesMessageSnapshotCollapse, resolveUnsupportedToolSchemaKeywords, shouldOmitEmptyArrayItems, streamOpenAICompletions, streamOpenAIResponses, streamSimpleOpenAICompletions, streamSimpleOpenAIResponses, stripUnsupportedSchemaKeywords, supportsOpenAIReasoningEffort };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as ModelThinkingLevel, E as Model, F as SimpleStreamOptions, P as ProviderStreamOptions, X as Usage, i as AssistantMessage, n as Api, o as AssistantMessageEventStreamContract, u as Context, z as StreamOptions } from "../types-
|
|
2
|
-
import { a as RegisteredApiProvider, t as ApiProvider } from "../api-registry-
|
|
1
|
+
import { D as ModelThinkingLevel, E as Model, F as SimpleStreamOptions, P as ProviderStreamOptions, X as Usage, i as AssistantMessage, n as Api, o as AssistantMessageEventStreamContract, u as Context, z as StreamOptions } from "../types-DRgdPqaZ.mjs";
|
|
2
|
+
import { a as RegisteredApiProvider, t as ApiProvider } from "../api-registry-BXYnCOIR.mjs";
|
|
3
3
|
import { t as sanitizeSurrogates } from "../sanitize-unicode-BZiVbGwK.mjs";
|
|
4
4
|
|
|
5
5
|
//#region packages/ai/src/internal/default-runtime.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Model, F as SimpleStreamOptions, H as ThinkingBudgets, T as Message, W as ThinkingLevel, i as AssistantMessage, n as Api, z as StreamOptions } from "../types-
|
|
1
|
+
import { E as Model, F as SimpleStreamOptions, H as ThinkingBudgets, T as Message, W as ThinkingLevel, i as AssistantMessage, n as Api, z as StreamOptions } from "../types-DRgdPqaZ.mjs";
|
|
2
2
|
import { t as sanitizeSurrogates } from "../sanitize-unicode-BZiVbGwK.mjs";
|
|
3
3
|
|
|
4
4
|
//#region packages/ai/src/providers/simple-options.d.ts
|
package/dist/{openai-chatgpt-responses-CYqFzw4W.mjs → openai-chatgpt-responses-DVC4Bk_A.mjs}
RENAMED
|
@@ -4,7 +4,7 @@ import { t as AssistantMessageEventStream } from "./event-stream-ReMmOTzX.mjs";
|
|
|
4
4
|
import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels } from "./host-4t713IeR.mjs";
|
|
5
5
|
import { t as headersToRecord } from "./headers-B_e4-1J0.mjs";
|
|
6
6
|
import { b as stripSystemPromptCacheBoundary, o as buildBaseOptions } from "./transform-messages-BhGF_fF4.mjs";
|
|
7
|
-
import { a as resolveResponsesReasoningEffort, i as processResponsesStream, n as convertResponsesMessages, s as convertResponsesToolPayload } from "./openai-responses-shared-
|
|
7
|
+
import { a as resolveResponsesReasoningEffort, i as processResponsesStream, n as convertResponsesMessages, s as convertResponsesToolPayload } from "./openai-responses-shared-sj2YUPYc.mjs";
|
|
8
8
|
import { i as getFirstStreamEventTimeoutMs, o as clampTimerTimeoutMs, r as getFirstStreamEventTimeoutHandler, s as resolveTimerTimeoutMs, t as createFirstStreamEventAbortController } from "./stream-first-event-timeout-RjWszj8c.mjs";
|
|
9
9
|
import { a as clampOpenAIPromptCacheKey } from "./openai-tool-projection-BknoV11q.mjs";
|
|
10
10
|
import { i as registerSessionResourceCleanup, n as resolveOpenAICodexAccountId } from "./openai-chatgpt-jwt-DhAAzLkj.mjs";
|
|
@@ -294,13 +294,14 @@ const streamOpenAICompletions = (model, context, options) => {
|
|
|
294
294
|
if (finishReasonResult.errorMessage) output.errorMessage = finishReasonResult.errorMessage;
|
|
295
295
|
hasFinishReason = true;
|
|
296
296
|
}
|
|
297
|
-
|
|
297
|
+
const choiceDelta = choice.delta ?? choice.message;
|
|
298
|
+
if (choiceDelta) {
|
|
298
299
|
const reasoningFields = [
|
|
299
300
|
"reasoning_content",
|
|
300
301
|
"reasoning",
|
|
301
302
|
"reasoning_text"
|
|
302
303
|
];
|
|
303
|
-
const deltaFields =
|
|
304
|
+
const deltaFields = choiceDelta;
|
|
304
305
|
const shouldEmitReasoning = Boolean(model.reasoning && options?.reasoningEffort);
|
|
305
306
|
let foundReasoningField = null;
|
|
306
307
|
for (const field of reasoningFields) {
|
|
@@ -315,11 +316,13 @@ const streamOpenAICompletions = (model, context, options) => {
|
|
|
315
316
|
const delta = deltaFields[foundReasoningField];
|
|
316
317
|
if (typeof delta === "string" && delta.length > 0) appendThinkingDelta(model.provider === "opencode-go" && foundReasoningField === "reasoning" ? "reasoning_content" : foundReasoningField, delta);
|
|
317
318
|
}
|
|
318
|
-
if (
|
|
319
|
-
|
|
319
|
+
if (choiceDelta.content !== null && choiceDelta.content !== void 0 && choiceDelta.content.length > 0) appendPartitionedContent(choiceDelta.content, Boolean(foundReasoningField));
|
|
320
|
+
const refusalText = typeof choiceDelta.refusal === "string" ? choiceDelta.refusal : "";
|
|
321
|
+
if (refusalText.length > 0) appendPartitionedContent(refusalText, Boolean(foundReasoningField));
|
|
322
|
+
if (choiceDelta.tool_calls) {
|
|
320
323
|
flushPartitionedContent();
|
|
321
324
|
sealNativeReasoningBeforeText();
|
|
322
|
-
for (const toolCall of
|
|
325
|
+
for (const toolCall of choiceDelta.tool_calls) {
|
|
323
326
|
const block = ensureToolCallBlock(toolCall);
|
|
324
327
|
if (!block.id && toolCall.id) {
|
|
325
328
|
block.id = toolCall.id;
|
|
@@ -341,7 +344,7 @@ const streamOpenAICompletions = (model, context, options) => {
|
|
|
341
344
|
});
|
|
342
345
|
}
|
|
343
346
|
}
|
|
344
|
-
const reasoningDetails =
|
|
347
|
+
const reasoningDetails = choiceDelta.reasoning_details;
|
|
345
348
|
if (reasoningDetails && Array.isArray(reasoningDetails)) {
|
|
346
349
|
for (const detail of reasoningDetails) if (detail.type === "reasoning.encrypted" && detail.id && detail.data) {
|
|
347
350
|
const matchingToolCall = toolCallBlocksByFirstId.get(detail.id);
|
|
@@ -3,7 +3,7 @@ import { t as AssistantMessageEventStream } from "./event-stream-ReMmOTzX.mjs";
|
|
|
3
3
|
import { n as getAiTransportHost } from "./host-4t713IeR.mjs";
|
|
4
4
|
import { o as buildBaseOptions } from "./transform-messages-BhGF_fF4.mjs";
|
|
5
5
|
import { a as resolveCacheRetention, i as resolveCloudflareBaseUrl, n as hasCopilotVisionInput, r as isCloudflareProvider, t as buildCopilotDynamicHeaders } from "./github-copilot-headers-BsH5cqGj.mjs";
|
|
6
|
-
import { a as resolveResponsesReasoningEffort, n as convertResponsesMessages, o as runResponsesStreamLifecycle, r as createResponsesAssistantOutput, t as applyCommonResponsesParams } from "./openai-responses-shared-
|
|
6
|
+
import { a as resolveResponsesReasoningEffort, n as convertResponsesMessages, o as runResponsesStreamLifecycle, r as createResponsesAssistantOutput, t as applyCommonResponsesParams } from "./openai-responses-shared-sj2YUPYc.mjs";
|
|
7
7
|
import { a as clampOpenAIPromptCacheKey } from "./openai-tool-projection-BknoV11q.mjs";
|
|
8
8
|
import OpenAI from "openai";
|
|
9
9
|
//#region packages/ai/src/providers/openai-responses.ts
|
|
@@ -902,6 +902,7 @@ const GPT_52_REASONING_EFFORTS = [
|
|
|
902
902
|
"xhigh"
|
|
903
903
|
];
|
|
904
904
|
const GPT_56_REASONING_EFFORTS = [
|
|
905
|
+
"none",
|
|
905
906
|
"low",
|
|
906
907
|
"medium",
|
|
907
908
|
"high",
|
|
@@ -946,6 +947,12 @@ function isOpenAIGpt55Model(model) {
|
|
|
946
947
|
const name = normalizeModelId(typeof model.name === "string" ? model.name : void 0);
|
|
947
948
|
return /^gpt-5\.5(?:-|$)/u.test(id) || /^gpt-5\.5(?:\s|\(|-|$)/u.test(name);
|
|
948
949
|
}
|
|
950
|
+
/** Return whether a model is the GPT-5.6 family. */
|
|
951
|
+
function isOpenAIGpt56Model(model) {
|
|
952
|
+
const id = normalizeModelId(typeof model.id === "string" ? model.id : void 0);
|
|
953
|
+
const name = normalizeModelId(typeof model.name === "string" ? model.name : void 0);
|
|
954
|
+
return /^gpt-5\.6(?:-|$)/u.test(id) || /^gpt-5\.6(?:\s|\(|-|$)/u.test(name);
|
|
955
|
+
}
|
|
949
956
|
/** Normalize user-facing reasoning effort names to API effort names. */
|
|
950
957
|
function normalizeOpenAIReasoningEffort(effort) {
|
|
951
958
|
return effort === "minimal" ? "minimal" : effort;
|
|
@@ -987,6 +994,7 @@ function resolveOpenAIReasoningEffortForModel(params) {
|
|
|
987
994
|
const normalized = normalizeOpenAIReasoningEffort(params.fallbackMap?.[requested] ?? requested);
|
|
988
995
|
const supported = resolveOpenAISupportedReasoningEfforts(params.model);
|
|
989
996
|
if (supported.includes(normalized)) return normalized;
|
|
997
|
+
if (requested === "off" && supported.includes("none")) return "none";
|
|
990
998
|
if (isDisabledReasoningEffort(requested) || isDisabledReasoningEffort(normalized)) return;
|
|
991
999
|
if (requested === "minimal" && supported.includes("low")) return "low";
|
|
992
1000
|
if ((requested === "minimal" || requested === "low") && supported.includes("medium")) return "medium";
|
|
@@ -1933,4 +1941,4 @@ function mapStopReason(status) {
|
|
|
1933
1941
|
}
|
|
1934
1942
|
}
|
|
1935
1943
|
//#endregion
|
|
1936
|
-
export {
|
|
1944
|
+
export { extractToolSchemaModelCompat as A, isOpenAIGpt54MiniModel as C, resolveOpenAIReasoningEffortForModel as D, normalizeOpenAIReasoningEffort as E, GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS as F, cleanSchemaForGemini as I, resolveUnsupportedToolSchemaKeywords as M, shouldOmitEmptyArrayItems as N, resolveOpenAISupportedReasoningEfforts as O, stripUnsupportedSchemaKeywords as P, resolveResponsesMessageSnapshotCollapse as S, isOpenAIGpt56Model as T, OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE as _, resolveResponsesReasoningEffort as a, isResponsesTextContentPartType as b, clearOpenAIToolSchemaCacheForTest as c, normalizeOpenAIStrictToolParameters as d, normalizeStrictOpenAIJsonSchema as f, OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE as g, AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE as h, processResponsesStream as i, normalizeToolParameterSchema as j, supportsOpenAIReasoningEffort as k, findOpenAIStrictToolProjectionDiagnostics as l, AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE as m, convertResponsesMessages as n, runResponsesStreamLifecycle as o, resolveOpenAIProjectedToolsStrictToolFlag as p, createResponsesAssistantOutput as r, convertResponsesToolPayload as s, applyCommonResponsesParams as t, isStrictOpenAIJsonSchemaCompatible as u, isAzureResponsesTextDeltaEvent as v, isOpenAIGpt55Model as w, isResponsesTextDeltaEventType as x, isAzureResponsesTextDeltaEventType as y };
|
package/dist/providers.d.mts
CHANGED
package/dist/providers.mjs
CHANGED
|
@@ -67,7 +67,7 @@ const registerBuiltIns = [
|
|
|
67
67
|
stream: module.streamAnthropic,
|
|
68
68
|
streamSimple: module.streamSimpleAnthropic
|
|
69
69
|
})),
|
|
70
|
-
createLazyRegistration("openai-completions", () => import("./openai-completions-
|
|
70
|
+
createLazyRegistration("openai-completions", () => import("./openai-completions-B9QLIq2U.mjs").then((n) => n.n), (module) => ({
|
|
71
71
|
stream: module.streamOpenAICompletions,
|
|
72
72
|
streamSimple: module.streamSimpleOpenAICompletions
|
|
73
73
|
})),
|
|
@@ -75,15 +75,15 @@ const registerBuiltIns = [
|
|
|
75
75
|
stream: module.streamMistral,
|
|
76
76
|
streamSimple: module.streamSimpleMistral
|
|
77
77
|
})),
|
|
78
|
-
createLazyRegistration("openai-responses", () => import("./openai-responses-
|
|
78
|
+
createLazyRegistration("openai-responses", () => import("./openai-responses-B6LylGxM.mjs").then((n) => n.t), (module) => ({
|
|
79
79
|
stream: module.streamOpenAIResponses,
|
|
80
80
|
streamSimple: module.streamSimpleOpenAIResponses
|
|
81
81
|
})),
|
|
82
|
-
createLazyRegistration("azure-openai-responses", () => import("./azure-openai-responses-
|
|
82
|
+
createLazyRegistration("azure-openai-responses", () => import("./azure-openai-responses-DNoSk8Uy.mjs"), (module) => ({
|
|
83
83
|
stream: module.streamAzureOpenAIResponses,
|
|
84
84
|
streamSimple: module.streamSimpleAzureOpenAIResponses
|
|
85
85
|
})),
|
|
86
|
-
createLazyRegistration("openai-chatgpt-responses", () => import("./openai-chatgpt-responses-
|
|
86
|
+
createLazyRegistration("openai-chatgpt-responses", () => import("./openai-chatgpt-responses-DVC4Bk_A.mjs"), (module) => ({
|
|
87
87
|
stream: module.streamOpenAICodexResponses,
|
|
88
88
|
streamSimple: module.streamSimpleOpenAICodexResponses
|
|
89
89
|
})),
|
|
@@ -430,6 +430,8 @@ interface OpenAICompletionsCompat {
|
|
|
430
430
|
}
|
|
431
431
|
/** Compatibility settings for OpenAI Responses APIs. */
|
|
432
432
|
interface OpenAIResponsesCompat {
|
|
433
|
+
/** Whether the model accepts the `temperature` parameter. Default: true. */
|
|
434
|
+
supportsTemperature?: boolean;
|
|
433
435
|
/** Whether to send the OpenAI `session_id` cache-affinity header from `options.sessionId` when caching is enabled. Default: true. */
|
|
434
436
|
sendSessionIdHeader?: boolean;
|
|
435
437
|
/** Whether the provider supports `prompt_cache_retention: "24h"`. Default: true. */
|
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-DRgdPqaZ.mjs";
|
|
4
|
+
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-0nZeBKl2.mjs";
|
|
5
|
+
import { n as validateToolCall, t as validateToolArguments } from "./validation-BDMWOr8d.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-BDMWOr8d.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.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.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "0.109.1",
|