@openclaw/ai 2026.10.10 → 2026.10.33
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 +9 -1
- package/dist/{anthropic-B54Ts1tV.mjs → anthropic-B58ec88k.mjs} +46 -26
- package/dist/{anthropic-payload-policy-rqCq9sT_.d.mts → anthropic-payload-policy-BCp4dUJR.d.mts} +2 -2
- package/dist/{anthropic-stream-reducer-C__ByTq1.mjs → anthropic-stream-reducer-BTcDHWGM.mjs} +11 -11
- package/dist/{anthropic-tool-projection-DA_KeluM.mjs → anthropic-tool-projection-CrsCkF4k.mjs} +1 -1
- package/dist/{anthropic-tool-projection-JTvMo4KG.d.mts → anthropic-tool-projection-CzSSQzZL.d.mts} +1 -1
- package/dist/{api-registry-gDt0faai.d.mts → api-registry-CkmxPPac.d.mts} +1 -1
- package/dist/{assistant-output-DbgdWAhJ.mjs → assistant-output-Hl3b-ViJ.mjs} +3 -3
- package/dist/{azure-openai-responses-DHzTwi-y.mjs → azure-openai-responses-B0Hi9cAV.mjs} +5 -6
- package/dist/{diagnostics-Cv7cW3pS.mjs → diagnostics-v7oVEW59.mjs} +17 -1
- package/dist/diagnostics.d.mts +3 -3
- package/dist/diagnostics.mjs +1 -1
- package/dist/{google-CZ6uGVkV.mjs → google-DuI8TLy0.mjs} +2 -2
- package/dist/{google-interactions-qd4flmND.mjs → google-interactions-9Jd_049M.mjs} +91 -30
- package/dist/{google-messages-B-svbJuN.mjs → google-messages-BWhsZ167.mjs} +9 -3
- package/dist/{google-provider-stream-DlhaCvCf.mjs → google-provider-stream-DL0bXgX5.mjs} +16 -11
- package/dist/{google-shared-Cif7nve-.mjs → google-shared-DXizMtnG.mjs} +6 -5
- package/dist/{google-vertex-BZTcYnWU.mjs → google-vertex-DnjRWo-M.mjs} +2 -2
- package/dist/google-video-slots-D8tPH8wX.mjs +29 -0
- package/dist/{host-jJOffdlW.d.mts → host-B03VqZdH.d.mts} +2 -2
- package/dist/{host-rCxf5Tjd.mjs → host-CyGba3M8.mjs} +111 -88
- package/dist/{host-policy-Ci1cKluf.mjs → host-policy-CNQztzZm.mjs} +1 -1
- package/dist/{index-DSprYWaz.d.mts → index-B8ODIVmA.d.mts} +15 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +4 -4
- package/dist/internal/anthropic.d.mts +16 -6
- package/dist/internal/anthropic.mjs +6 -6
- package/dist/internal/openai-completions-compat.d.mts +5 -1
- package/dist/internal/openai-completions-compat.mjs +3 -2
- package/dist/internal/openai-responses-payload-policy.d.mts +2 -2
- package/dist/internal/openai-responses-payload-policy.mjs +2 -2
- package/dist/internal/openai.d.mts +8 -8
- package/dist/internal/openai.mjs +9 -9
- package/dist/internal/retry-after.d.mts +2 -2
- package/dist/internal/retry-after.mjs +75 -1
- package/dist/internal/runtime.d.mts +6 -6
- package/dist/internal/runtime.mjs +4 -4
- package/dist/internal/shared.d.mts +3 -3
- package/dist/internal/shared.mjs +2 -2
- package/dist/internal/tool-schema.d.mts +2 -2
- package/dist/internal/tool-schema.mjs +3 -3
- package/dist/{mistral-C_ImzxlK.mjs → mistral-BgamhpFG.mjs} +4 -4
- package/dist/openai-BfFy1nvf.mjs +20077 -0
- package/dist/{openai-chatgpt-responses-iGYDPbmc.mjs → openai-chatgpt-responses-Biu_I7p4.mjs} +14 -19
- package/dist/{openai-completions-CDy5u1mv.mjs → openai-completions-Cbwde_Dr.mjs} +4 -4
- package/dist/{openai-completions-compat-CJ0OXZgi.mjs → openai-completions-compat-D9KEUevM.mjs} +2 -2
- package/dist/{openai-completions-compat-CBvb2eld.d.mts → openai-completions-compat-DTe2EXPi.d.mts} +2 -2
- package/dist/openai-completions-reasoning-replay-BwT1xwRI.mjs +45 -0
- package/dist/openai-completions-transport-RCOvvBq_.mjs +10874 -0
- package/dist/{openai-prompt-cache-h8vXRiaH.mjs → openai-prompt-cache-CAo-Mah6.mjs} +1 -1
- package/dist/{openai-prompt-cache-DgjD-UL5.d.mts → openai-prompt-cache-k7EPMLa0.d.mts} +1 -1
- package/dist/{openai-responses-Cp2QPq7K.mjs → openai-responses-DOgBvvca.mjs} +7 -8
- package/dist/{openai-responses-compaction-replay-DUBbsfku.d.mts → openai-responses-compaction-replay-DOJaDCUl.d.mts} +3 -3
- package/dist/{openai-responses-contracts-DCG51Us0.mjs → openai-responses-contracts-B5mGAbR6.mjs} +1 -1
- package/dist/{openai-responses-contracts-gnl6ZRs1.d.mts → openai-responses-contracts-DHtim7d_.d.mts} +3 -3
- package/dist/{openai-responses-endpoint-JbBT8IDv.mjs → openai-responses-endpoint-DJwbSy3n.mjs} +4 -2
- package/dist/{openai-responses-payload-policy-BzM52TTH.d.mts → openai-responses-payload-policy-cIaYG5ZQ.d.mts} +1 -0
- package/dist/{openai-responses-request-lifecycle-DuMpdA6y.mjs → openai-responses-request-lifecycle-bJ24Q_OK.mjs} +7 -7
- package/dist/{openai-responses-shared-CNfHudFg.mjs → openai-responses-shared-BDGaQxiw.mjs} +1130 -30
- package/dist/{openai-responses-terminal-usage-CpVjkqn-.d.mts → openai-responses-terminal-usage-BDGDBGuA.d.mts} +1 -1
- package/dist/{openai-tool-schema-CGhEl7ao.mjs → openai-tool-schema-D913am3I.mjs} +4 -3
- package/dist/openai.LICENSE +201 -0
- package/dist/{provider-options-Bo8GzTGX.d.mts → provider-options-DFjnfImJ.d.mts} +8 -2
- package/dist/{provider-replay-context-BC23HyZo.mjs → provider-replay-context-C5uMjBz4.mjs} +3 -4
- package/dist/{provider-transport-turn-state-B11rmZpv.mjs → provider-transport-turn-state-CfUfU9v1.mjs} +3 -3
- package/dist/{provider-types-ODq57rG_.d.mts → provider-types-C-67EZr8.d.mts} +5 -3
- package/dist/provider-types.d.mts +3 -3
- package/dist/provider-types.mjs +2 -1
- package/dist/providers.d.mts +2 -2
- package/dist/providers.mjs +10 -10
- package/dist/{reasoning-tag-text-partitioner-DzlRubwU.mjs → reasoning-tag-text-partitioner-CU9A4Lg8.mjs} +2 -13
- package/dist/retry-after-BrmTv0jL.d.mts +25 -0
- package/dist/rolldown-runtime-B4iAMlE-.mjs +35 -0
- package/dist/{sanitize-unicode-ZqVLLEKC.d.mts → sanitize-unicode-CkejzD2f.d.mts} +1 -1
- package/dist/{simple-options-BdJJbzZk.mjs → simple-options-Bd0STwu7.mjs} +3 -3
- package/dist/{src-CyA0zJnt.mjs → src--qsViR3j.mjs} +60 -12
- package/dist/{stream-DQqGjhbq.mjs → stream-BRecd0FZ.mjs} +1 -1
- package/dist/{tool-schema-json-projection-Cvq69Ajp.mjs → tool-schema-json-projection-DU-FFSa7.mjs} +1 -1
- package/dist/{transport-stream-shared-DdnJGEj0.mjs → transport-stream-shared-C1AtJhZA.mjs} +2 -2
- package/dist/{transport-stream-shared-8ru8eX4s.d.mts → transport-stream-shared-Dhx_37f1.d.mts} +1 -1
- package/dist/{transport-utils-CcCAuFVS.mjs → transport-utils-4xPfuKp2.mjs} +2 -2
- package/dist/transports.d.mts +23 -15
- package/dist/transports.mjs +65 -44
- package/dist/types-BFfXm_Jr.d.mts +1 -0
- package/dist/types.d.mts +3 -3
- package/dist/types.mjs +2 -2
- package/dist/ws.LICENSE +20 -0
- package/package.json +1 -1
- package/dist/openai-completions-transport-DLrm5EWi.mjs +0 -3468
- package/dist/retry-after-sw-XX8aC.d.mts +0 -15
- package/dist/types-CBJthzJX.d.mts +0 -1
package/dist/{openai-chatgpt-responses-iGYDPbmc.mjs → openai-chatgpt-responses-Biu_I7p4.mjs}
RENAMED
|
@@ -2,22 +2,22 @@ import { i as formatThrownValue, n as createAssistantMessageDiagnostic, t as app
|
|
|
2
2
|
import { t as AssistantMessageEventStream } from "./event-stream-X2gmsUWv.mjs";
|
|
3
3
|
import { o as isRecord } from "./record-coerce-CNDovvft.mjs";
|
|
4
4
|
import { i as clampPositiveTimerTimeoutMs } from "./number-coercion-37gmNkuA.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { g as responsesPromptObserver, j as supportsOpenAITemperature } from "./openai-responses-contracts-
|
|
5
|
+
import { a as resolveAiTransportHeaderSentinels, k as headersToRecord, r as getAiTransportHost } from "./host-CyGba3M8.mjs";
|
|
6
|
+
import { g as responsesPromptObserver, j as supportsOpenAITemperature } from "./openai-responses-contracts-B5mGAbR6.mjs";
|
|
7
7
|
import { r as registerSessionResourceCleanup } from "./session-resources-vKvGIE3J.mjs";
|
|
8
8
|
import "./provider-error-qtZD2inE.mjs";
|
|
9
|
-
import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-
|
|
10
|
-
import {
|
|
11
|
-
import { l as consumeResponseBytes, s as streamFragmentError, t as MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "./transport-utils-
|
|
9
|
+
import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-CAo-Mah6.mjs";
|
|
10
|
+
import { b as extractErrorCodeOrErrno, s as WEBSOCKET_NON_RETRYABLE_CLOSE_ERROR_CODE, x as toErrorObject } from "./diagnostics-v7oVEW59.mjs";
|
|
11
|
+
import { l as consumeResponseBytes, s as streamFragmentError, t as MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "./transport-utils-4xPfuKp2.mjs";
|
|
12
12
|
import { parseRetryAfterHeadersSeconds } from "./internal/retry-after.mjs";
|
|
13
|
-
import { c as resolveOpenAIResponsesTextFormat } from "./openai-completions-compat-
|
|
14
|
-
import { n as buildManagedModelFetch } from "./host-policy-
|
|
15
|
-
import { n as buildBaseOptions, w as stripSystemPromptCacheBoundary } from "./simple-options-
|
|
16
|
-
import { S as withProviderResponseHook, b as transportAbortError, h as notifyProviderStreamOpened, n as assignTransportErrorDetails } from "./transport-stream-shared-
|
|
17
|
-
import { t as createAssistantOutput } from "./assistant-output-
|
|
18
|
-
import { Dt as createOpenAIResponseHook, E as ResponsesStreamFailure, Et as createOpenAIProviderAcceptanceHook, F as convertProviderResponsesMessages, Ot as createResponseModelTracker, S as isInvalidEncryptedContentError, T as resolveNextResponsesEncryptedContentAttempt, _t as resolveOpenAIRequestReasoning, b as commitResponsesEncryptedContentAttempt, i as convertResponsesToolPayload, j as recordResponsesContextUsage, n as applyResponsesServiceTierPricing, o as readOpenAIMisalignmentReview, ot as suppressOpenAIResponsesCompaction, rt as buildOpenAIResponsesReasoningReplayMetadata, s as processResponsesStream, vt as resolveOpenAISimpleReasoningEffort } from "./openai-responses-shared-
|
|
13
|
+
import { c as resolveOpenAIResponsesTextFormat } from "./openai-completions-compat-D9KEUevM.mjs";
|
|
14
|
+
import { n as buildManagedModelFetch } from "./host-policy-CNQztzZm.mjs";
|
|
15
|
+
import { n as buildBaseOptions, w as stripSystemPromptCacheBoundary } from "./simple-options-Bd0STwu7.mjs";
|
|
16
|
+
import { S as withProviderResponseHook, b as transportAbortError, h as notifyProviderStreamOpened, n as assignTransportErrorDetails } from "./transport-stream-shared-C1AtJhZA.mjs";
|
|
17
|
+
import { t as createAssistantOutput } from "./assistant-output-Hl3b-ViJ.mjs";
|
|
18
|
+
import { Dt as createOpenAIResponseHook, E as ResponsesStreamFailure, Et as createOpenAIProviderAcceptanceHook, F as convertProviderResponsesMessages, Ot as createResponseModelTracker, S as isInvalidEncryptedContentError, T as resolveNextResponsesEncryptedContentAttempt, _t as resolveOpenAIRequestReasoning, b as commitResponsesEncryptedContentAttempt, i as convertResponsesToolPayload, j as recordResponsesContextUsage, n as applyResponsesServiceTierPricing, o as readOpenAIMisalignmentReview, ot as suppressOpenAIResponsesCompaction, rt as buildOpenAIResponsesReasoningReplayMetadata, s as processResponsesStream, vt as resolveOpenAISimpleReasoningEffort } from "./openai-responses-shared-BDGaQxiw.mjs";
|
|
19
19
|
import { a as withFirstStreamEventTimeout, i as getFirstStreamEventTimeoutMs, r as getFirstStreamEventTimeoutHandler, t as createFirstStreamEventAbortController } from "./stream-first-event-timeout-D_TfJHRJ.mjs";
|
|
20
|
-
import { a as createResponsesV2CompactionCollector, i as createResponsesPromptEgressObserver, n as responsesRequestLifecycle, o as claimResponsesCompactRequest, r as withResponsesRequestAcceptance, s as copyResponsesCompactRequest, t as independentResponsesRequest } from "./openai-responses-request-lifecycle-
|
|
20
|
+
import { a as createResponsesV2CompactionCollector, i as createResponsesPromptEgressObserver, n as responsesRequestLifecycle, o as claimResponsesCompactRequest, r as withResponsesRequestAcceptance, s as copyResponsesCompactRequest, t as independentResponsesRequest } from "./openai-responses-request-lifecycle-bJ24Q_OK.mjs";
|
|
21
21
|
import { t as requireApiKey } from "./required-api-key-D088S4Cd.mjs";
|
|
22
22
|
import { n as resolveOpenAICodexAccountId } from "./openai-chatgpt-jwt-KWcgd0d_.mjs";
|
|
23
23
|
//#region packages/ai/src/providers/openai-chatgpt-responses-events.ts
|
|
@@ -166,7 +166,6 @@ function buildRequestBody(model, context, allowedToolCallProviders, options, rep
|
|
|
166
166
|
includeSystemPrompt: false,
|
|
167
167
|
replayResponsesItemIds: false,
|
|
168
168
|
sessionId: options?.sessionId,
|
|
169
|
-
authProfileId: options?.authProfileId,
|
|
170
169
|
replayMode,
|
|
171
170
|
retainUserProvenance
|
|
172
171
|
});
|
|
@@ -430,10 +429,7 @@ const streamOpenAICodexResponses = (model, context, options) => {
|
|
|
430
429
|
abortFirstEventStream: firstEventAbort?.abort,
|
|
431
430
|
onFirstEventTimeout: getFirstStreamEventTimeoutHandler(streamOptions),
|
|
432
431
|
signal: activitySignal ?? streamOptions?.signal,
|
|
433
|
-
reasoningReplayMetadata: buildOpenAIResponsesReasoningReplayMetadata(model, {
|
|
434
|
-
sessionId: streamOptions?.sessionId,
|
|
435
|
-
authProfileId: streamOptions?.authProfileId
|
|
436
|
-
}),
|
|
432
|
+
reasoningReplayMetadata: buildOpenAIResponsesReasoningReplayMetadata(model, { sessionId: streamOptions?.sessionId }),
|
|
437
433
|
resolveServiceTier: resolveCodexServiceTier,
|
|
438
434
|
applyServiceTierPricing: (usage, serviceTier) => applyResponsesServiceTierPricing(usage, serviceTier, model)
|
|
439
435
|
});
|
|
@@ -988,8 +984,7 @@ async function processWebSocketStream(state, authority, body, output, stream, mo
|
|
|
988
984
|
const responseItems = convertProviderResponsesMessages(model, { messages: [output] }, CODEX_TOOL_CALL_PROVIDERS, {
|
|
989
985
|
includeSystemPrompt: false,
|
|
990
986
|
replayResponsesItemIds: false,
|
|
991
|
-
sessionId: options?.sessionId
|
|
992
|
-
authProfileId: options?.authProfileId
|
|
987
|
+
sessionId: options?.sessionId
|
|
993
988
|
}).filter((item) => item.type !== "function_call_output");
|
|
994
989
|
entry.continuation = {
|
|
995
990
|
lastRequestBody: body,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as __exportAll } from "./
|
|
2
|
-
import {
|
|
3
|
-
import { n as buildBaseOptions } from "./simple-options-
|
|
4
|
-
import { n as streamOpenAICompletionsRequest, s as convertMessages } from "./openai-completions-transport-
|
|
1
|
+
import { n as __exportAll } from "./rolldown-runtime-B4iAMlE-.mjs";
|
|
2
|
+
import { M as clampThinkingLevel } from "./host-CyGba3M8.mjs";
|
|
3
|
+
import { n as buildBaseOptions } from "./simple-options-Bd0STwu7.mjs";
|
|
4
|
+
import { n as streamOpenAICompletionsRequest, s as convertMessages } from "./openai-completions-transport-RCOvvBq_.mjs";
|
|
5
5
|
import { t as requireApiKey } from "./required-api-key-D088S4Cd.mjs";
|
|
6
6
|
//#region packages/ai/src/providers/openai-completions.ts
|
|
7
7
|
var openai_completions_exports = /* @__PURE__ */ __exportAll({
|
package/dist/{openai-completions-compat-CJ0OXZgi.mjs → openai-completions-compat-D9KEUevM.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as isRecord } from "./record-coerce-CNDovvft.mjs";
|
|
2
|
-
import { A as supportsOpenAIReasoningEffort, O as resolveOpenAIReasoningEffortMapping } from "./openai-responses-contracts-
|
|
3
|
-
import { a as resolveProviderRequestCapabilities } from "./host-policy-
|
|
2
|
+
import { A as supportsOpenAIReasoningEffort, O as resolveOpenAIReasoningEffortMapping } from "./openai-responses-contracts-B5mGAbR6.mjs";
|
|
3
|
+
import { a as resolveProviderRequestCapabilities } from "./host-policy-CNQztzZm.mjs";
|
|
4
4
|
//#region packages/ai/src/providers/openai-response-format.ts
|
|
5
5
|
const JSON_SCHEMA_RESPONSE_FORMAT_NAME = "openclaw_response";
|
|
6
6
|
const OLLAMA_CLOUD_ORIGIN = "https://ollama.com";
|
package/dist/{openai-completions-compat-CBvb2eld.d.mts → openai-completions-compat-DTe2EXPi.d.mts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./index-
|
|
1
|
+
import "./index-B8ODIVmA.mjs";
|
|
2
2
|
import { N as OpenAICompletionsCompat, k as Model } from "./types-CVYzKrMl.mjs";
|
|
3
|
-
import { a as AiProviderRequestPolicyInput, i as AiProviderRequestCapabilities } from "./host-
|
|
3
|
+
import { a as AiProviderRequestPolicyInput, i as AiProviderRequestCapabilities } from "./host-B03VqZdH.mjs";
|
|
4
4
|
//#region packages/ai/src/transports/openai-completions-compat.d.ts
|
|
5
5
|
type OpenAICompletionsSessionAffinity = "none" | "openai" | "openrouter";
|
|
6
6
|
type OpenAICompletionsCompatDefaults = {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
//#region packages/ai/src/transports/openai-completions-reasoning-replay.ts
|
|
2
|
+
const REASONING_CONTENT_REPLAY_MODEL_IDS = /* @__PURE__ */ new Set([
|
|
3
|
+
"deepseek-v4-flash",
|
|
4
|
+
"deepseek-v4-pro",
|
|
5
|
+
"kimi-for-coding",
|
|
6
|
+
"kimi-k2.5",
|
|
7
|
+
"kimi-k2.6",
|
|
8
|
+
"kimi-k2.7-code",
|
|
9
|
+
"kimi-k2.7-code-highspeed",
|
|
10
|
+
"kimi-k3",
|
|
11
|
+
"kimi-k3.1-pro",
|
|
12
|
+
"kimi-k3.1-pro-highspeed",
|
|
13
|
+
"kimi-k2-thinking",
|
|
14
|
+
"kimi-k2-thinking-turbo",
|
|
15
|
+
"mimo-v2-pro",
|
|
16
|
+
"mimo-v2-omni",
|
|
17
|
+
"mimo-v2.5",
|
|
18
|
+
"mimo-v2.5-pro",
|
|
19
|
+
"mimo-v2.6-flash",
|
|
20
|
+
"mimo-v2.6-pro",
|
|
21
|
+
"mimo-v2.6-pro-ultraspeed"
|
|
22
|
+
]);
|
|
23
|
+
const REASONING_CONTENT_REPLAY_TIER_SUFFIXES = [
|
|
24
|
+
"-free",
|
|
25
|
+
"-paid",
|
|
26
|
+
"-trial"
|
|
27
|
+
];
|
|
28
|
+
function stripReasoningContentReplayTierSuffix(modelId) {
|
|
29
|
+
for (const suffix of REASONING_CONTENT_REPLAY_TIER_SUFFIXES) if (modelId.length > suffix.length && modelId.endsWith(suffix)) return modelId.slice(0, -suffix.length);
|
|
30
|
+
return modelId;
|
|
31
|
+
}
|
|
32
|
+
/** Shared by history sanitization and wire replay, including stale model metadata. */
|
|
33
|
+
function requiresReasoningContentReplay(modelId) {
|
|
34
|
+
if (typeof modelId !== "string") return false;
|
|
35
|
+
const normalized = modelId.trim().toLowerCase();
|
|
36
|
+
if (!normalized) return false;
|
|
37
|
+
const parts = normalized.split("/").filter(Boolean);
|
|
38
|
+
const finalPart = parts[parts.length - 1] ?? normalized;
|
|
39
|
+
const candidates = [finalPart];
|
|
40
|
+
const colonParts = finalPart.split(":").filter(Boolean);
|
|
41
|
+
if (colonParts.length > 1) candidates.push(colonParts[0] ?? "", colonParts[colonParts.length - 1] ?? "");
|
|
42
|
+
return candidates.some((candidate) => REASONING_CONTENT_REPLAY_MODEL_IDS.has(candidate) || REASONING_CONTENT_REPLAY_MODEL_IDS.has(stripReasoningContentReplayTierSuffix(candidate)));
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { requiresReasoningContentReplay as t };
|