@openclaw/ai 2026.8.1-beta.2 → 2026.8.1-beta.3
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-B6dLpq5L.mjs → anthropic-B8KwTtlb.mjs} +37 -27
- package/dist/{anthropic-SrGtwsJu.d.mts → anthropic-BECQCNdF.d.mts} +0 -2
- package/dist/{anthropic-JsNA5KCu.mjs → anthropic-BQXQudmA.mjs} +0 -1
- package/dist/{anthropic-compaction-replay-8lJNKXOE.mjs → anthropic-compaction-replay-4Zx7-aCr.mjs} +14 -15
- package/dist/{anthropic-payload-policy-CiEuQS72.d.mts → anthropic-payload-policy-CSx7MoKH.d.mts} +2 -1
- package/dist/{api-registry-k3zTz0cV.d.mts → api-registry-DFxSnFqG.d.mts} +1 -1
- package/dist/{azure-openai-responses-mxIOtUnn.mjs → azure-openai-responses-Aa4mVcYG.mjs} +3 -3
- package/dist/diagnostics.mjs +1 -1
- package/dist/event-stream-BVVgDSdq.d.mts +1 -0
- package/dist/{event-stream-BP6AWT8j.d.mts → event-stream-D91-ohD_.d.mts} +1 -1
- package/dist/event-stream.d.mts +1 -1
- package/dist/{google-shared-B0Qr9OR7.mjs → google-shared-M1dl64nz.mjs} +12 -5
- package/dist/{google-vertex-Bhc3TjDl.mjs → google-vertex-DCJHM_a5.mjs} +3 -3
- package/dist/{google-C7h2QzDX.mjs → google-yDRnipeq.mjs} +3 -3
- package/dist/headers-B_e4-1J0.mjs +9 -0
- package/dist/{host-DTqNc7ad.mjs → host-DF_yxOsA.mjs} +40 -29
- package/dist/{host-vWgMMhiJ.d.mts → host-DJq_FGcz.d.mts} +6 -6
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +2 -2
- package/dist/internal/anthropic.d.mts +11 -5
- package/dist/internal/anthropic.mjs +4 -4
- 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 +5 -5
- package/dist/internal/openai.mjs +9 -8
- package/dist/internal/runtime.d.mts +4 -2
- package/dist/internal/runtime.mjs +4 -3
- package/dist/internal/shared.d.mts +17 -3
- package/dist/internal/shared.mjs +4 -4
- package/dist/{headers-DdOQtGuU.mjs → llm-request-activity-BjtkplhG.mjs} +1 -9
- package/dist/{mistral-CEWoQI_g.mjs → mistral-D6hRXI7A.mjs} +47 -33
- package/dist/{openai-chatgpt-responses-CrPmqERt.mjs → openai-chatgpt-responses-C339VIfT.mjs} +23 -15
- package/dist/{openai-completions-BPnt4Sml.mjs → openai-completions-D88orSJ9.mjs} +71 -35
- package/dist/{openai-completions-compat-Dt3dcawL.d.mts → openai-completions-compat-B0KTleXp.d.mts} +2 -2
- package/dist/{openai-responses-DhIKtOup.mjs → openai-responses-BXEcr-Tp.mjs} +4 -4
- package/dist/{openai-responses-contracts-XpZJxrRG.d.mts → openai-responses-contracts-CD75pQ0m.d.mts} +2 -2
- package/dist/{openai-responses-contracts-CyfIkQi5.mjs → openai-responses-contracts-DvILoqBk.mjs} +3 -9
- package/dist/{openai-responses-payload-policy-BDxV-W0c.mjs → openai-responses-payload-policy-BDo8CQsx.mjs} +4 -2
- package/dist/{openai-responses-payload-policy-BSs371VM.d.mts → openai-responses-payload-policy-CNGFT9zr.d.mts} +1 -0
- package/dist/{openai-responses-prompt-observer-internal-DgNTYnRY.mjs → openai-responses-prompt-observer-internal-BG-1AsBI.mjs} +2 -3
- package/dist/{openai-responses-shared-DXIt3iY5.mjs → openai-responses-shared-Cvt5MgEm.mjs} +81 -136
- package/dist/{openai-stop-reason-BkFkqqK0.mjs → openai-stop-reason-9OONKyAm.mjs} +47 -31
- package/dist/{openai-tool-projection-CY04OcvQ.mjs → openai-tool-projection-CHGLt03m.mjs} +94 -6
- package/dist/{provider-error-BUwEnjXq.mjs → provider-error-C8mBRJDl.mjs} +19 -24
- package/dist/provider-options-AvldWZt8.mjs +21 -0
- package/dist/{provider-options-B96RdNpH.d.mts → provider-options-Cc5ZQ6Aa.d.mts} +12 -2
- package/dist/provider-transcript-transform--gtf0ZbR.mjs +32 -0
- package/dist/provider-types.d.mts +5 -5
- package/dist/providers.d.mts +1 -1
- package/dist/providers.mjs +9 -9
- package/dist/{reasoning-tag-text-partitioner-rnPwX2pg.mjs → reasoning-tag-text-partitioner-5ygO2rZc.mjs} +3 -0
- package/dist/{sanitize-unicode-BYqrYtC_.mjs → sanitize-unicode-BP7HLLZn.mjs} +1 -1
- package/dist/simple-options-oqsXB6U3.mjs +450 -0
- package/dist/{tool-schema-json-projection-q5d7QX5c.mjs → tool-schema-json-projection-FEr-jOoZ.mjs} +16 -7
- package/dist/{transport-utils-DJqkxbhC.mjs → transport-utils-Bv0FHkd0.mjs} +1 -1
- package/dist/transports.d.mts +77 -44
- package/dist/transports.mjs +207 -167
- package/dist/{types-BHNrPS1l.d.mts → types-DTAP49HF.d.mts} +17 -2
- package/dist/types.d.mts +5 -5
- package/dist/types.mjs +1 -1
- package/dist/{validation-DT9SrFn3.d.mts → validation-DYNNrU9u.d.mts} +1 -1
- package/dist/validation.d.mts +1 -1
- package/package.json +1 -1
- package/dist/provider-transcript-transform-ePx-Bbfr.mjs +0 -155
- package/dist/simple-options-D58D5Kvw.mjs +0 -117
|
@@ -125,7 +125,6 @@ function estimateBase64DecodedBytes(base64) {
|
|
|
125
125
|
const estimated = Math.floor(effectiveLen * 3 / 4) - padding;
|
|
126
126
|
return Math.max(0, estimated);
|
|
127
127
|
}
|
|
128
|
-
const CANONICALIZE_BASE64_CHUNK_SIZE = 8192;
|
|
129
128
|
function isBase64DataChar(code) {
|
|
130
129
|
return code >= 65 && code <= 90 || code >= 97 && code <= 122 || code >= 48 && code <= 57 || code === 43 || code === 47;
|
|
131
130
|
}
|
|
@@ -140,45 +139,41 @@ function base64DataValue(code) {
|
|
|
140
139
|
* base64 only when the input has valid alphabet, padding, and length.
|
|
141
140
|
*/
|
|
142
141
|
function canonicalizeBase64(base64) {
|
|
143
|
-
|
|
144
|
-
let
|
|
145
|
-
let cleanedLength = 0;
|
|
142
|
+
let out;
|
|
143
|
+
let outLen = 0;
|
|
146
144
|
let padding = 0;
|
|
147
145
|
let sawPadding = false;
|
|
148
146
|
let lastDataCode = 0;
|
|
149
|
-
const append = (char) => {
|
|
150
|
-
current += char;
|
|
151
|
-
cleanedLength += 1;
|
|
152
|
-
if (current.length >= CANONICALIZE_BASE64_CHUNK_SIZE) {
|
|
153
|
-
chunks.push(current);
|
|
154
|
-
current = "";
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
147
|
for (let i = 0; i < base64.length; i += 1) {
|
|
158
148
|
const code = base64.charCodeAt(i);
|
|
159
|
-
if (code <= 32)
|
|
149
|
+
if (code <= 32) {
|
|
150
|
+
if (out === void 0) {
|
|
151
|
+
out = Buffer.allocUnsafe(base64.length - 1);
|
|
152
|
+
for (let j = 0; j < i; j += 1) out[j] = base64.charCodeAt(j);
|
|
153
|
+
outLen = i;
|
|
154
|
+
}
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
160
157
|
if (code === 61) {
|
|
161
158
|
padding += 1;
|
|
162
159
|
if (padding > 2) return;
|
|
163
160
|
sawPadding = true;
|
|
164
|
-
|
|
165
|
-
|
|
161
|
+
} else if (sawPadding || !isBase64DataChar(code)) return;
|
|
162
|
+
else lastDataCode = code;
|
|
163
|
+
if (out !== void 0) {
|
|
164
|
+
out[outLen] = code;
|
|
165
|
+
outLen += 1;
|
|
166
166
|
}
|
|
167
|
-
if (sawPadding || !isBase64DataChar(code)) return;
|
|
168
|
-
lastDataCode = code;
|
|
169
|
-
append(base64[i] ?? "");
|
|
170
167
|
}
|
|
168
|
+
const cleanedLength = out === void 0 ? base64.length : outLen;
|
|
171
169
|
if (cleanedLength === 0) return;
|
|
172
170
|
const remainder = cleanedLength % 4;
|
|
173
|
-
if (remainder !== 0)
|
|
174
|
-
if (sawPadding || remainder === 1) return;
|
|
175
|
-
current += "=".repeat(4 - remainder);
|
|
176
|
-
}
|
|
171
|
+
if (remainder !== 0 && (sawPadding || remainder === 1)) return;
|
|
177
172
|
const effectivePadding = remainder === 0 ? padding : 4 - remainder;
|
|
178
173
|
const padBitMask = effectivePadding === 2 ? 15 : effectivePadding === 1 ? 3 : 0;
|
|
179
174
|
if (padBitMask !== 0 && (base64DataValue(lastDataCode) & padBitMask) !== 0) return;
|
|
180
|
-
|
|
181
|
-
return
|
|
175
|
+
const cleaned = out === void 0 ? base64 : out.subarray(0, outLen).toString("latin1");
|
|
176
|
+
return remainder === 0 ? cleaned : cleaned + "=".repeat(4 - remainder);
|
|
182
177
|
}
|
|
183
178
|
//#endregion
|
|
184
179
|
//#region packages/ai/src/utils/credential-redaction.ts
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region packages/ai/src/provider-options.ts
|
|
2
|
+
const CODE_MODE_TOOL_SURFACE_OBSERVER = Symbol("openaiCodeModeToolSurfaceObserver");
|
|
3
|
+
const CODE_MODE_TOOL_SURFACE_COLLECTOR = Symbol("openaiCodeModeToolSurfaceCollector");
|
|
4
|
+
const codeModeToolSurfaceObserver = {
|
|
5
|
+
set(options, observer, collector) {
|
|
6
|
+
Reflect.set(options, CODE_MODE_TOOL_SURFACE_OBSERVER, observer);
|
|
7
|
+
if (collector) Reflect.set(options, CODE_MODE_TOOL_SURFACE_COLLECTOR, collector);
|
|
8
|
+
},
|
|
9
|
+
get(options) {
|
|
10
|
+
if (!options) return;
|
|
11
|
+
const observer = Reflect.get(options, CODE_MODE_TOOL_SURFACE_OBSERVER);
|
|
12
|
+
return typeof observer === "function" ? (observation) => observer(observation) : void 0;
|
|
13
|
+
},
|
|
14
|
+
getCollector(options) {
|
|
15
|
+
if (!options) return;
|
|
16
|
+
const collector = Reflect.get(options, CODE_MODE_TOOL_SURFACE_COLLECTOR);
|
|
17
|
+
return typeof collector === "function" ? (observation) => collector(observation) : void 0;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { codeModeToolSurfaceObserver as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { U as StreamOptions } from "./types-DTAP49HF.mjs";
|
|
2
2
|
import OpenAI from "openai";
|
|
3
3
|
import Anthropic from "@anthropic-ai/sdk";
|
|
4
4
|
import { ResponseCreateParamsStreaming } from "openai/resources/responses/responses.js";
|
|
@@ -77,6 +77,16 @@ type OpenAIResponsesCompactionRejection = {
|
|
|
77
77
|
data: string;
|
|
78
78
|
id?: string;
|
|
79
79
|
};
|
|
80
|
+
type CodeModeToolSurfaceObservation = {
|
|
81
|
+
beforeToolIdentities: readonly string[];
|
|
82
|
+
afterToolIdentities: readonly string[];
|
|
83
|
+
};
|
|
84
|
+
type CodeModeToolSurfaceObserver = (observation: CodeModeToolSurfaceObservation) => void;
|
|
85
|
+
declare const codeModeToolSurfaceObserver: {
|
|
86
|
+
set(options: object, observer: CodeModeToolSurfaceObserver, collector?: CodeModeToolSurfaceObserver): void;
|
|
87
|
+
get(options: object | undefined): CodeModeToolSurfaceObserver | undefined;
|
|
88
|
+
getCollector(options: object | undefined): CodeModeToolSurfaceObserver | undefined;
|
|
89
|
+
};
|
|
80
90
|
type AnthropicEffort = "low" | "medium" | "high" | "xhigh" | "max";
|
|
81
91
|
type AnthropicThinkingDisplay = "summarized" | "omitted";
|
|
82
92
|
/** Provider options shared by the Anthropic provider and canonical transport. */
|
|
@@ -147,4 +157,4 @@ type OpenAICompletionsOptions = BaseOpenAIStreamOptions & {
|
|
|
147
157
|
reasoningEffort?: OpenAIReasoningEffort;
|
|
148
158
|
};
|
|
149
159
|
//#endregion
|
|
150
|
-
export {
|
|
160
|
+
export { supportsOpenAITemperature as C, supportsOpenAIReasoningEffort as S, isOpenAIGpt55Model as _, CodeModeToolSurfaceObservation as a, resolveOpenAIReasoningEffortForModel as b, codeModeToolSurfaceObserver as c, projectOpenAITools as d, reconcileOpenAICompletionsToolChoice as f, isOpenAIGpt54MiniModel as g, OpenAIReasoningEffort as h, BaseOpenAIStreamOptions as i, OpenAICompletionsToolChoice as l, OpenAIApiReasoningEffort as m, AnthropicOptions as n, OpenAICompletionsOptions as o, reconcileOpenAIResponsesToolChoice as p, AnthropicThinkingDisplay as r, OpenAIResponsesCompactionRejection as s, AnthropicEffort as t, OpenAIToolProjection as u, isOpenAIGpt56Model as v, resolveOpenAISupportedReasoningEfforts as x, normalizeOpenAIReasoningEffort as y };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { i as transformMessages } from "./host-DF_yxOsA.mjs";
|
|
2
|
+
//#region packages/ai/src/provider-transcript-transform.ts
|
|
3
|
+
const IMAGE_OMISSION = "(image omitted: model does not support images)";
|
|
4
|
+
const VIDEO_OMISSION = "(video omitted: provider does not support video input)";
|
|
5
|
+
function projectUserMediaForTransport(content, supportsImages, supportsVideo) {
|
|
6
|
+
const result = [];
|
|
7
|
+
for (const block of content) {
|
|
8
|
+
if (block.type === "text" || block.type === "image" && supportsImages || block.type === "video" && supportsVideo) {
|
|
9
|
+
result.push(block);
|
|
10
|
+
continue;
|
|
11
|
+
}
|
|
12
|
+
const text = block.type === "video" ? VIDEO_OMISSION : IMAGE_OMISSION;
|
|
13
|
+
const previous = result.at(-1);
|
|
14
|
+
if (block.data.trim() && !(previous?.type === "text" && previous.text === text)) result.push({
|
|
15
|
+
type: "text",
|
|
16
|
+
text
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return result;
|
|
20
|
+
}
|
|
21
|
+
function transformProviderMessages(messages, model, normalizeToolCallId) {
|
|
22
|
+
const target = {
|
|
23
|
+
...model,
|
|
24
|
+
input: model.input.filter((type) => type !== "video")
|
|
25
|
+
};
|
|
26
|
+
return transformMessages(messages.map((message) => {
|
|
27
|
+
if (message.role !== "user" || !Array.isArray(message.content)) return message;
|
|
28
|
+
return Object.assign({}, message, { content: projectUserMediaForTransport(message.content, model.input.includes("image"), model.api === "openai-completions" && model.input.includes("video")) });
|
|
29
|
+
}), target, normalizeToolCallId);
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { transformProviderMessages as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as requiresClaudeMandatoryAdaptiveThinking, c as resolveClaudeMythos5ModelIdentity, d as resolveClaudeSonnet5ModelIdentity, f as supportsClaude1MContext, g as supportsClaudeNativeXhighEffort, h as supportsClaudeNativeMaxEffort, i as requiresClaudeDefaultSampling, l as resolveClaudeNativeThinkingLevelMap, m as supportsClaudeFastMode, n as CLAUDE_OPUS_5_THINKING_PROFILE, o as resolveClaudeFable5ModelIdentity, p as supportsClaudeAdaptiveThinking, r as CLAUDE_SONNET_5_THINKING_PROFILE, s as resolveClaudeModelIdentity, t as CLAUDE_FABLE_5_THINKING_PROFILE, u as resolveClaudeOpus5ModelIdentity } from "./anthropic-
|
|
1
|
+
import { a as requiresClaudeMandatoryAdaptiveThinking, c as resolveClaudeMythos5ModelIdentity, d as resolveClaudeSonnet5ModelIdentity, f as supportsClaude1MContext, g as supportsClaudeNativeXhighEffort, h as supportsClaudeNativeMaxEffort, i as requiresClaudeDefaultSampling, l as resolveClaudeNativeThinkingLevelMap, m as supportsClaudeFastMode, n as CLAUDE_OPUS_5_THINKING_PROFILE, o as resolveClaudeFable5ModelIdentity, p as supportsClaudeAdaptiveThinking, r as CLAUDE_SONNET_5_THINKING_PROFILE, s as resolveClaudeModelIdentity, t as CLAUDE_FABLE_5_THINKING_PROFILE, u as resolveClaudeOpus5ModelIdentity } from "./anthropic-BECQCNdF.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
|
|
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 Transport, A as OpenAIResponsesCompat, B as StopReason, C as KnownImagesApi, D as Model, F as ProviderImagesOptions, G as TextSignatureV1, I as ProviderReplayState, J as ThinkingLevel, K as ThinkingBudgets, L as ProviderResponse, M as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, N as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, O as ModelThinkingLevel, P as Provider, Q as ToolResultMessage, S as KnownApi, T as MaybePromise, U as StreamOptions, V as StreamFn, W as TextContent, X as Tool, Y as ThinkingLevelMap, Z as ToolCall, _ as ImagesModel, a as AssistantMessage, b as ImagesProvider, c as AssistantMessageEventStreamLike, d as Context, et as Usage, f as ImageContent, g as ImagesInputContent, h as ImagesFunction, i as AssistantImages, j as OpenRouterRouting, k as OpenAICompletionsCompat, l as CacheRetention, m as ImagesContext, n as Api, nt as ValidateToolArgumentsFn, o as AssistantMessageEvent, p as ImagesApi, q as ThinkingContent, r as AssistantDeliveryTtsFacts, rt as VercelGatewayRouting, s as AssistantMessageEventStreamContract, t as AnthropicMessagesCompat, tt as UserMessage, u as CompleteSimpleFn, v as ImagesOptions, w as KnownImagesProvider, x as ImagesStopReason, y as ImagesOutputContent, z as SimpleStreamOptions } from "./types-DTAP49HF.mjs";
|
|
4
|
+
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-D91-ohD_.mjs";
|
|
5
|
+
import { n as validateToolCall, t as validateToolArguments } from "./validation-DYNNrU9u.mjs";
|
|
6
6
|
//#region packages/ai/src/provider-types.d.ts
|
|
7
7
|
declare const PROVIDER_CONTEXT_HANDOFF: unique symbol;
|
|
8
8
|
type VideoContent = Omit<ImageContent, "type"> & {
|
|
@@ -28,4 +28,4 @@ type ProviderStreamFunction<TApi extends Api = Api, TOptions extends StreamOptio
|
|
|
28
28
|
/** Resolves provider-only context without widening the canonical call contract. */
|
|
29
29
|
declare function resolveProviderContext(context: Context | ProviderContext, options?: ProviderStreamOptions): Promise<ProviderContext>;
|
|
30
30
|
//#endregion
|
|
31
|
-
export { type AnthropicMessagesCompat, type Api, type AssistantImages, type AssistantMessage, type AssistantMessageDiagnostic, type AssistantMessageEvent, type AssistantMessageEventStream, type AssistantMessageEventStreamContract, type AssistantMessageEventStreamLike, type CLAUDE_FABLE_5_THINKING_PROFILE, type CLAUDE_OPUS_5_THINKING_PROFILE, type CLAUDE_SONNET_5_THINKING_PROFILE, type CacheRetention, type CompleteSimpleFn, type ProviderContext as Context, ProviderContext, type DiagnosticErrorInfo, type EventStream, type ImageContent, type ImagesApi, type ImagesContext, type ImagesFunction, type ImagesInputContent, type ImagesModel, type ImagesOptions, type ImagesOutputContent, type ImagesProvider, type ImagesStopReason, type KnownApi, type KnownImagesApi, type KnownImagesProvider, type MaybePromise, MediaContent, type ProviderMessage as Message, ProviderMessage, type ProviderModel as Model, ProviderModel, ModelInputContent, type ModelThinkingLevel, type OpenAICompletionsCompat, type OpenAIResponsesCompat, type OpenRouterRouting, PROVIDER_CONTEXT_HANDOFF, type PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, type PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, type Provider, ProviderContextHandoff, type ProviderImagesOptions, type ProviderReplayState, type ProviderResponse, ProviderStreamFunction, type ProviderStreamFunction as StreamFunction, ProviderStreamOptions, ProviderUserMessage, type SimpleStreamOptions, type StopReason, type StreamFn, type StreamOptions, type TextContent, type TextSignatureV1, type ThinkingBudgets, type ThinkingContent, type ThinkingLevel, type ThinkingLevelMap, type Tool, type ToolCall, type ToolResultMessage, type Transport, type Usage, type UserMessage, type ValidateToolArgumentsFn, type VercelGatewayRouting, VideoContent, type appendAssistantMessageDiagnostic, type createAssistantMessageDiagnostic, type createAssistantMessageEventStream, type extractDiagnosticError, type formatThrownValue, type requiresClaudeDefaultSampling, type requiresClaudeMandatoryAdaptiveThinking, type resolveClaudeFable5ModelIdentity, type resolveClaudeModelIdentity, type resolveClaudeMythos5ModelIdentity, type resolveClaudeNativeThinkingLevelMap, type resolveClaudeOpus5ModelIdentity, type resolveClaudeSonnet5ModelIdentity, resolveProviderContext, type supportsClaude1MContext, type supportsClaudeAdaptiveThinking, type supportsClaudeFastMode, type supportsClaudeNativeMaxEffort, type supportsClaudeNativeXhighEffort, type validateToolArguments, type validateToolCall };
|
|
31
|
+
export { type AnthropicMessagesCompat, type Api, type AssistantDeliveryTtsFacts, type AssistantImages, type AssistantMessage, type AssistantMessageDiagnostic, type AssistantMessageEvent, type AssistantMessageEventStream, type AssistantMessageEventStreamContract, type AssistantMessageEventStreamLike, type CLAUDE_FABLE_5_THINKING_PROFILE, type CLAUDE_OPUS_5_THINKING_PROFILE, type CLAUDE_SONNET_5_THINKING_PROFILE, type CacheRetention, type CompleteSimpleFn, type ProviderContext as Context, ProviderContext, type DiagnosticErrorInfo, type EventStream, type ImageContent, type ImagesApi, type ImagesContext, type ImagesFunction, type ImagesInputContent, type ImagesModel, type ImagesOptions, type ImagesOutputContent, type ImagesProvider, type ImagesStopReason, type KnownApi, type KnownImagesApi, type KnownImagesProvider, type MaybePromise, MediaContent, type ProviderMessage as Message, ProviderMessage, type ProviderModel as Model, ProviderModel, ModelInputContent, type ModelThinkingLevel, type OpenAICompletionsCompat, type OpenAIResponsesCompat, type OpenRouterRouting, PROVIDER_CONTEXT_HANDOFF, type PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, type PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, type Provider, ProviderContextHandoff, type ProviderImagesOptions, type ProviderReplayState, type ProviderResponse, ProviderStreamFunction, type ProviderStreamFunction as StreamFunction, ProviderStreamOptions, ProviderUserMessage, type SimpleStreamOptions, type StopReason, type StreamFn, type StreamOptions, type TextContent, type TextSignatureV1, type ThinkingBudgets, type ThinkingContent, type ThinkingLevel, type ThinkingLevelMap, type Tool, type ToolCall, type ToolResultMessage, type Transport, type Usage, type UserMessage, type ValidateToolArgumentsFn, type VercelGatewayRouting, VideoContent, type appendAssistantMessageDiagnostic, type createAssistantMessageDiagnostic, type createAssistantMessageEventStream, type extractDiagnosticError, type formatThrownValue, type requiresClaudeDefaultSampling, type requiresClaudeMandatoryAdaptiveThinking, type resolveClaudeFable5ModelIdentity, type resolveClaudeModelIdentity, type resolveClaudeMythos5ModelIdentity, type resolveClaudeNativeThinkingLevelMap, type resolveClaudeOpus5ModelIdentity, type resolveClaudeSonnet5ModelIdentity, resolveProviderContext, type supportsClaude1MContext, type supportsClaudeAdaptiveThinking, type supportsClaudeFastMode, type supportsClaudeNativeMaxEffort, type supportsClaudeNativeXhighEffort, type validateToolArguments, type validateToolCall };
|
package/dist/providers.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ApiRegistry } from "./api-registry-
|
|
1
|
+
import { n as ApiRegistry } from "./api-registry-DFxSnFqG.mjs";
|
|
2
2
|
import { n as clampOpenAIPromptCacheKey, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "./openai-prompt-cache-2uo_1OR1.mjs";
|
|
3
3
|
|
|
4
4
|
//#region packages/ai/src/providers/register-builtins.d.ts
|
package/dist/providers.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as AssistantMessageEventStream } from "./event-stream-uSMZJ3FA.mjs";
|
|
2
|
-
import { n as projectProviderError } from "./provider-error-
|
|
2
|
+
import { n as projectProviderError } from "./provider-error-C8mBRJDl.mjs";
|
|
3
3
|
import { n as clampOpenAIPromptCacheKey, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "./openai-prompt-cache-mZTCdRPo.mjs";
|
|
4
4
|
//#region packages/ai/src/providers/register-builtins.ts
|
|
5
5
|
/** Source id used for built-in API provider registrations. */
|
|
@@ -62,35 +62,35 @@ function createLazyRegistration(api, importModule, select) {
|
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
const registerBuiltIns = [
|
|
65
|
-
createLazyRegistration("anthropic-messages", () => import("./anthropic-
|
|
65
|
+
createLazyRegistration("anthropic-messages", () => import("./anthropic-B8KwTtlb.mjs").then((n) => n.t), (module) => ({
|
|
66
66
|
stream: module.streamAnthropic,
|
|
67
67
|
streamSimple: module.streamSimpleAnthropic
|
|
68
68
|
})),
|
|
69
|
-
createLazyRegistration("openai-completions", () => import("./openai-completions-
|
|
69
|
+
createLazyRegistration("openai-completions", () => import("./openai-completions-D88orSJ9.mjs").then((n) => n.t), (module) => ({
|
|
70
70
|
stream: module.streamOpenAICompletions,
|
|
71
71
|
streamSimple: module.streamSimpleOpenAICompletions
|
|
72
72
|
})),
|
|
73
|
-
createLazyRegistration("mistral-conversations", () => import("./mistral-
|
|
73
|
+
createLazyRegistration("mistral-conversations", () => import("./mistral-D6hRXI7A.mjs"), (module) => ({
|
|
74
74
|
stream: module.streamMistral,
|
|
75
75
|
streamSimple: module.streamSimpleMistral
|
|
76
76
|
})),
|
|
77
|
-
createLazyRegistration("openai-responses", () => import("./openai-responses-
|
|
77
|
+
createLazyRegistration("openai-responses", () => import("./openai-responses-BXEcr-Tp.mjs").then((n) => n.t), (module) => ({
|
|
78
78
|
stream: module.streamOpenAIResponses,
|
|
79
79
|
streamSimple: module.streamSimpleOpenAIResponses
|
|
80
80
|
})),
|
|
81
|
-
createLazyRegistration("azure-openai-responses", () => import("./azure-openai-responses-
|
|
81
|
+
createLazyRegistration("azure-openai-responses", () => import("./azure-openai-responses-Aa4mVcYG.mjs"), (module) => ({
|
|
82
82
|
stream: module.streamAzureOpenAIResponses,
|
|
83
83
|
streamSimple: module.streamSimpleAzureOpenAIResponses
|
|
84
84
|
})),
|
|
85
|
-
createLazyRegistration("openai-chatgpt-responses", () => import("./openai-chatgpt-responses-
|
|
85
|
+
createLazyRegistration("openai-chatgpt-responses", () => import("./openai-chatgpt-responses-C339VIfT.mjs"), (module) => ({
|
|
86
86
|
stream: module.streamOpenAICodexResponses,
|
|
87
87
|
streamSimple: module.streamSimpleOpenAICodexResponses
|
|
88
88
|
})),
|
|
89
|
-
createLazyRegistration("google-generative-ai", () => import("./google-
|
|
89
|
+
createLazyRegistration("google-generative-ai", () => import("./google-yDRnipeq.mjs"), (module) => ({
|
|
90
90
|
stream: module.streamGoogle,
|
|
91
91
|
streamSimple: module.streamSimpleGoogle
|
|
92
92
|
})),
|
|
93
|
-
createLazyRegistration("google-vertex", () => import("./google-vertex-
|
|
93
|
+
createLazyRegistration("google-vertex", () => import("./google-vertex-DCJHM_a5.mjs"), (module) => ({
|
|
94
94
|
stream: module.streamGoogleVertex,
|
|
95
95
|
streamSimple: module.streamSimpleGoogleVertex
|
|
96
96
|
}))
|
|
@@ -12206,6 +12206,9 @@ function createReasoningTagTextPartitioner() {
|
|
|
12206
12206
|
hasPending() {
|
|
12207
12207
|
return holdStart !== void 0 && holdStart < source.length || reduction.depth > 0 || emitted < source.length;
|
|
12208
12208
|
},
|
|
12209
|
+
hasPendingSyntax() {
|
|
12210
|
+
return pendingTagProbe !== void 0 || heldBacktickStart !== void 0 || reduction.depth > 0;
|
|
12211
|
+
},
|
|
12209
12212
|
isInsideReasoning() {
|
|
12210
12213
|
return reduction.depth > 0;
|
|
12211
12214
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as requiresClaudeMandatoryAdaptiveThinking, l as resolveClaudeNativeThinkingLevelMap } from "./anthropic-
|
|
1
|
+
import { a as requiresClaudeMandatoryAdaptiveThinking, l as resolveClaudeNativeThinkingLevelMap } from "./anthropic-BQXQudmA.mjs";
|
|
2
2
|
import "./src-D2H6yKkH.mjs";
|
|
3
3
|
//#region packages/ai/src/model-utils.ts
|
|
4
4
|
/** Calculates and stores model cost fields from token usage and per-million pricing. */
|