@openclaw/ai 2026.11.5-beta.1 → 2026.11.5-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/.source-module-urls/fe058cc430242ce2ab0dfbcbe153e240a52cf9c3072c3dc0a73e5f956b6ba49b.json +1 -1
- package/dist/{anthropic-CTND83W3.mjs → anthropic-DEKgalVg.mjs} +1 -1
- package/dist/{anthropic-stream-lifecycle-rJe4OH5H.mjs → anthropic-stream-lifecycle-DF2qVvg1.mjs} +1 -1
- package/dist/{azure-openai-responses-BhoLtP4Z.mjs → azure-openai-responses-Bk50gJpw.mjs} +1 -1
- package/dist/{google-1uObh-eI.mjs → google-B1g82bn4.mjs} +1 -1
- package/dist/{google-interactions-CY8Xb87S.mjs → google-interactions-tNr_ybcX.mjs} +80 -20
- package/dist/{google-messages-CwBqSoa4.mjs → google-messages-A-9d3y5V.mjs} +41 -4
- package/dist/{google-provider-stream-D30s9EZp.mjs → google-provider-stream-CNVh4gpm.mjs} +12 -6
- package/dist/{google-shared-li0lmEZK.mjs → google-shared-WNM86ZcW.mjs} +5 -2
- package/dist/{google-vertex-B5CHglca.mjs → google-vertex-CXjleC6g.mjs} +1 -1
- package/dist/google-video-slots-Bxt-OXO8.mjs +29 -0
- package/dist/internal/anthropic.mjs +2 -2
- package/dist/internal/google.mjs +1 -1
- package/dist/internal/openai.mjs +5 -5
- package/dist/internal/tool-schema.mjs +1 -1
- package/dist/{mistral-F5_asrmU.mjs → mistral-CjHkvsqR.mjs} +3 -3
- package/dist/{openai-chatgpt-responses-BIK7HROH.mjs → openai-chatgpt-responses-3QCEMfkF.mjs} +2 -2
- package/dist/{openai-completions-ClJ7QHEB.mjs → openai-completions-D7IYrF6d.mjs} +1 -1
- package/dist/{openai-completions-transport-C6J4_oGf.mjs → openai-completions-transport-CRJKV7wI.mjs} +5 -5
- package/dist/{openai-responses-Beifmf1s.mjs → openai-responses-BooFYPKe.mjs} +2 -2
- package/dist/{openai-responses-request-lifecycle-o-ODC_rF.mjs → openai-responses-request-lifecycle-DH3gtX6N.mjs} +1 -1
- package/dist/{openai-responses-shared-CrFDkZ0N.mjs → openai-responses-shared-B7TJU5wu.mjs} +2 -2
- package/dist/{openai-tool-schema-CsoYgnWy.mjs → openai-tool-schema-Cx2QfbBC.mjs} +2 -1
- package/dist/{otel-D-BkX8bB.mjs → otel-Buswj0Mf.mjs} +1 -1
- package/dist/{provider-transcript-transform-BHq3Q4nc.mjs → provider-transcript-transform-DtaxNcC1.mjs} +1 -1
- package/dist/{provider-transport-turn-state-DQd9K4Pd.mjs → provider-transport-turn-state-C-eRLEjC.mjs} +1 -1
- package/dist/providers.mjs +9 -9
- package/dist/{telemetry-B9f7K_Xe.mjs → telemetry-CvK1yQg7.mjs} +2 -2
- package/dist/transports.d.mts +12 -1
- package/dist/transports.mjs +7 -6
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { w as supportsClaudeAdaptiveThinking } from "./src-CQ7nH2mL.mjs";
|
|
|
3
3
|
import { t as AssistantMessageEventStream } from "./event-stream-X2gmsUWv.mjs";
|
|
4
4
|
import { _ as buildAnthropicClaudeCodeIdentity, a as resolveAiTransportHeaderSentinels, b as prepareClaudeNoPrefillRequestContext, r as getAiTransportHost } from "./host-DX7ORpeH.mjs";
|
|
5
5
|
import { a as streamFragmentError } from "./transport-utils-Da_39MYi.mjs";
|
|
6
|
-
import { B as usesFoundryBearerAuth, R as isAnthropicOAuthApiKey, j as supportsAnthropicServerSideFallback, n as applyAnthropicThinkingOptions, t as runAnthropicStreamLifecycle, w as isDirectAnthropicModel, z as omitFoundryBearerCredentialHeaders } from "./anthropic-stream-lifecycle-
|
|
6
|
+
import { B as usesFoundryBearerAuth, R as isAnthropicOAuthApiKey, j as supportsAnthropicServerSideFallback, n as applyAnthropicThinkingOptions, t as runAnthropicStreamLifecycle, w as isDirectAnthropicModel, z as omitFoundryBearerCredentialHeaders } from "./anthropic-stream-lifecycle-DF2qVvg1.mjs";
|
|
7
7
|
import { i as resolveCacheRetention, n as resolveCloudflareBaseUrl, r as buildCopilotDynamicHeaders } from "./cloudflare-BJ2_Xabx.mjs";
|
|
8
8
|
import { n as buildBaseOptions, r as clampMaxTokensToModel } from "./simple-options-tLSeECry.mjs";
|
|
9
9
|
import { k as parseJsonWithRepair } from "./transport-stream-shared-D2uFMhMc.mjs";
|
package/dist/{anthropic-stream-lifecycle-rJe4OH5H.mjs → anthropic-stream-lifecycle-DF2qVvg1.mjs}
RENAMED
|
@@ -17,7 +17,7 @@ import { a as reconcileAnthropicToolChoice, i as projectAnthropicTools, n as nor
|
|
|
17
17
|
import { t as createDeferredEventBuffer } from "./deferred-event-buffer-tIGkTkTm.mjs";
|
|
18
18
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-DzaHoRAU.mjs";
|
|
19
19
|
import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-xyU7-CiT.mjs";
|
|
20
|
-
import { t as transformProviderMessages } from "./provider-transcript-transform-
|
|
20
|
+
import { t as transformProviderMessages } from "./provider-transcript-transform-DtaxNcC1.mjs";
|
|
21
21
|
import { markEncodedModelRequestBody } from "./internal/model-request-body.mjs";
|
|
22
22
|
import { t as createAssistantOutput } from "./assistant-output-CD4kY9gu.mjs";
|
|
23
23
|
import { isProxy } from "node:util/types";
|
|
@@ -3,7 +3,7 @@ import { r as getAiTransportHost } from "./host-DX7ORpeH.mjs";
|
|
|
3
3
|
import { n as buildBaseOptions } from "./simple-options-tLSeECry.mjs";
|
|
4
4
|
import { n as getEnvApiKey } from "./env-api-keys-BuHc86ya.mjs";
|
|
5
5
|
import { t as createAssistantOutput } from "./assistant-output-CD4kY9gu.mjs";
|
|
6
|
-
import { F as convertProviderResponsesMessages, It as resolvePromptCacheKey, Lt as withOpenAIErrorResponseHook, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams, vt as resolveOpenAISimpleReasoningEffort } from "./openai-responses-shared-
|
|
6
|
+
import { F as convertProviderResponsesMessages, It as resolvePromptCacheKey, Lt as withOpenAIErrorResponseHook, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams, vt as resolveOpenAISimpleReasoningEffort } from "./openai-responses-shared-B7TJU5wu.mjs";
|
|
7
7
|
import { i as resolveAzureDeploymentNameFromMap, n as isTraditionalAzureOpenAIHost, t as isOpenAICompatibleAzureResponsesBaseUrl } from "./azure-openai-responses-client-compat-D0dvJMbZ.mjs";
|
|
8
8
|
import { t as requireApiKey } from "./required-api-key-2zZTkmsi.mjs";
|
|
9
9
|
import OpenAI, { AzureOpenAI } from "openai";
|
|
@@ -2,7 +2,7 @@ import { r as getAiTransportHost } from "./host-DX7ORpeH.mjs";
|
|
|
2
2
|
import { n as getEnvApiKey } from "./env-api-keys-BuHc86ya.mjs";
|
|
3
3
|
import { n as resolveOpencodeSessionHeaders } from "./session-affinity-DA4WHv1h.mjs";
|
|
4
4
|
import { t as requireApiKey } from "./required-api-key-2zZTkmsi.mjs";
|
|
5
|
-
import { n as buildGoogleHttpOptions, t as createGoogleGenerateContentStreams } from "./google-provider-stream-
|
|
5
|
+
import { n as buildGoogleHttpOptions, t as createGoogleGenerateContentStreams } from "./google-provider-stream-CNVh4gpm.mjs";
|
|
6
6
|
import { GoogleGenAI } from "@google/genai";
|
|
7
7
|
//#region packages/ai/src/providers/google.ts
|
|
8
8
|
const { stream: streamGoogle, streamSimple: streamSimpleGoogle } = createGoogleGenerateContentStreams("google-generative-ai", (model, options) => {
|
|
@@ -9,11 +9,14 @@ import { t as sanitizeSurrogates } from "./sanitize-unicode-CRGuMONI.mjs";
|
|
|
9
9
|
import { C as stripSystemPromptCacheBoundary, n as buildBaseOptions } from "./simple-options-tLSeECry.mjs";
|
|
10
10
|
import { T as parseJsonPreservingUnsafeIntegers, _ as parseTerminalToolCallArguments, c as failTransportStream, f as iterateSseFrames, g as notifyProviderStreamOpened, h as notifyProviderHttpResponse, x as transportAbortError } from "./transport-stream-shared-D2uFMhMc.mjs";
|
|
11
11
|
import { n as getEnvApiKey } from "./env-api-keys-BuHc86ya.mjs";
|
|
12
|
-
import { t as transformProviderMessages } from "./provider-transcript-transform-
|
|
12
|
+
import { t as transformProviderMessages } from "./provider-transcript-transform-DtaxNcC1.mjs";
|
|
13
|
+
import { PROVIDER_MODEL_INPUT, resolveProviderContext } from "./provider-types.mjs";
|
|
13
14
|
import { t as createAssistantOutput } from "./assistant-output-CD4kY9gu.mjs";
|
|
14
|
-
import {
|
|
15
|
+
import { a as googleToolParameters, o as mapGoogleToolArguments } from "./google-messages-A-9d3y5V.mjs";
|
|
16
|
+
import { n as createGoogleVideoPlaceholder, r as materializeGoogleVideoSlots, t as GOOGLE_VIDEO_SLOT_OMISSION } from "./google-video-slots-Bxt-OXO8.mjs";
|
|
17
|
+
import { r as buildGoogleInteractionsSimpleThinking } from "./google-shared-WNM86ZcW.mjs";
|
|
15
18
|
//#region packages/ai/package.json
|
|
16
|
-
var version = "2026.11.5-beta.
|
|
19
|
+
var version = "2026.11.5-beta.3";
|
|
17
20
|
//#endregion
|
|
18
21
|
//#region packages/ai/src/providers/google-interactions-request.ts
|
|
19
22
|
let packageVersionMemo;
|
|
@@ -30,7 +33,7 @@ function resolveGoogleApiClientHeaders(params) {
|
|
|
30
33
|
"x-goog-api-client": `openclaw/${packageVersionMemo ||= typeof process !== "undefined" && process.env?.OPENCLAW_VERSION || version}`
|
|
31
34
|
};
|
|
32
35
|
}
|
|
33
|
-
function convertMessages(model, context) {
|
|
36
|
+
function convertMessages(model, context, videoSlots) {
|
|
34
37
|
const steps = [];
|
|
35
38
|
const messages = transformProviderMessages(context.messages, model);
|
|
36
39
|
for (const message of messages) {
|
|
@@ -39,13 +42,20 @@ function convertMessages(model, context) {
|
|
|
39
42
|
const content = (typeof sourceContent === "string" ? [{
|
|
40
43
|
type: "text",
|
|
41
44
|
text: sourceContent
|
|
42
|
-
}] : sourceContent).map((item) =>
|
|
43
|
-
type
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
}] : sourceContent).map((item) => {
|
|
46
|
+
if (item.type === "text") return {
|
|
47
|
+
type: "text",
|
|
48
|
+
text: sanitizeSurrogates(item.text) || " "
|
|
49
|
+
};
|
|
50
|
+
if (item.type === "video") return createGoogleVideoPlaceholder(item, videoSlots, {
|
|
51
|
+
type: "text",
|
|
52
|
+
text: GOOGLE_VIDEO_SLOT_OMISSION
|
|
53
|
+
});
|
|
54
|
+
return {
|
|
55
|
+
type: "image",
|
|
56
|
+
mime_type: item.mimeType,
|
|
57
|
+
data: item.data
|
|
58
|
+
};
|
|
49
59
|
});
|
|
50
60
|
steps.push({
|
|
51
61
|
type: "user_input",
|
|
@@ -113,19 +123,27 @@ function convertMessages(model, context) {
|
|
|
113
123
|
type: "function_call",
|
|
114
124
|
id: block.id,
|
|
115
125
|
name: block.name,
|
|
116
|
-
arguments: block.arguments
|
|
126
|
+
arguments: mapGoogleToolArguments(context.tools, block.name, block.arguments, "encode")
|
|
117
127
|
});
|
|
118
128
|
}
|
|
119
129
|
flushText();
|
|
120
130
|
}
|
|
121
131
|
return steps;
|
|
122
132
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
if (
|
|
126
|
-
if (
|
|
133
|
+
/** Maps the shared tool-choice vocabulary (as GenerateContent does) to Interactions. */
|
|
134
|
+
function normalizeGoogleInteractionsToolChoice(choice) {
|
|
135
|
+
if (choice === "auto" || choice === "none" || choice === "any") return choice;
|
|
136
|
+
if (choice === "required") return "any";
|
|
137
|
+
const name = asRecord(asRecord(choice).function).name;
|
|
138
|
+
return asRecord(choice).type === "function" && typeof name === "string" && name ? { allowed_tools: {
|
|
139
|
+
mode: "any",
|
|
140
|
+
tools: [name]
|
|
141
|
+
} } : void 0;
|
|
142
|
+
}
|
|
143
|
+
function buildGoogleInteractionsParams(model, context, options = {}, videoSlots) {
|
|
127
144
|
const generationConfig = {};
|
|
128
145
|
if (options.temperature !== void 0) generationConfig.temperature = options.temperature;
|
|
146
|
+
if (options.topP !== void 0) generationConfig.top_p = options.topP;
|
|
129
147
|
if (options.maxTokens !== void 0) generationConfig.max_output_tokens = options.maxTokens;
|
|
130
148
|
if (options.stop && options.stop.length > 0) generationConfig.stop_sequences = options.stop;
|
|
131
149
|
if (options.thinking) {
|
|
@@ -138,11 +156,14 @@ function buildGoogleInteractionsParams(model, context, options = {}) {
|
|
|
138
156
|
type: "function",
|
|
139
157
|
name: tool.name,
|
|
140
158
|
description: tool.description || "",
|
|
141
|
-
parameters:
|
|
159
|
+
parameters: googleToolParameters(tool.parameters)
|
|
142
160
|
}));
|
|
143
161
|
return {
|
|
144
162
|
model: model.id,
|
|
145
|
-
input: convertMessages(
|
|
163
|
+
input: convertMessages({
|
|
164
|
+
...model,
|
|
165
|
+
input: options[PROVIDER_MODEL_INPUT] ?? model.input
|
|
166
|
+
}, context, videoSlots),
|
|
146
167
|
...context.systemPrompt ? { system_instruction: sanitizeSurrogates(stripSystemPromptCacheBoundary(context.systemPrompt)) } : {},
|
|
147
168
|
...tools && tools.length > 0 ? { tools } : {},
|
|
148
169
|
...Object.keys(generationConfig).length > 0 ? { generation_config: generationConfig } : {},
|
|
@@ -184,12 +205,44 @@ const streamGoogleInteractions = (model, context, options) => {
|
|
|
184
205
|
const unresolvedApiKey = resolveGoogleInteractionsApiKey(model, options);
|
|
185
206
|
const apiKey = host.resolveSecretSentinel(unresolvedApiKey);
|
|
186
207
|
if (!apiKey.trim()) throw new Error(`No API key for provider: ${model.provider}`);
|
|
187
|
-
|
|
208
|
+
const providerContext = (options?.[PROVIDER_MODEL_INPUT] ?? model.input).includes("video") ? await resolveProviderContext(context, options) : context;
|
|
209
|
+
const videoSlots = /* @__PURE__ */ new Map();
|
|
210
|
+
let body = buildGoogleInteractionsParams(model, providerContext, options, videoSlots);
|
|
188
211
|
const nextBody = await options?.onPayload?.(body, model);
|
|
189
212
|
if (nextBody !== void 0) {
|
|
190
213
|
if (!isGoogleInteractionsRequestBody(nextBody)) throw new Error("Google Interactions onPayload returned an invalid request body");
|
|
191
214
|
body = nextBody;
|
|
192
215
|
}
|
|
216
|
+
const optionRecord = asRecord(options);
|
|
217
|
+
const metadata = asRecord(optionRecord.videoMetadata ?? optionRecord.video_metadata);
|
|
218
|
+
const processing = {};
|
|
219
|
+
for (const [camel, snake] of [
|
|
220
|
+
["startOffset", "start_offset"],
|
|
221
|
+
["endOffset", "end_offset"],
|
|
222
|
+
["fps", "fps"]
|
|
223
|
+
]) {
|
|
224
|
+
const value = metadata[camel] ?? metadata[snake];
|
|
225
|
+
if (value !== void 0) processing[snake] = value;
|
|
226
|
+
}
|
|
227
|
+
materializeGoogleVideoSlots(body, videoSlots, (slot, video) => {
|
|
228
|
+
Object.assign(slot, {
|
|
229
|
+
type: "video",
|
|
230
|
+
mime_type: video.mimeType,
|
|
231
|
+
data: video.data,
|
|
232
|
+
...Object.keys(processing).length > 0 ? { processing: {
|
|
233
|
+
type: "static",
|
|
234
|
+
...processing
|
|
235
|
+
} } : {}
|
|
236
|
+
});
|
|
237
|
+
}, (part) => {
|
|
238
|
+
if (part.type === "video") {
|
|
239
|
+
Object.keys(part).forEach((key) => Reflect.deleteProperty(part, key));
|
|
240
|
+
Object.assign(part, {
|
|
241
|
+
type: "text",
|
|
242
|
+
text: GOOGLE_VIDEO_SLOT_OMISSION
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
});
|
|
193
246
|
let baseUrl = (model.baseUrl || "https://generativelanguage.googleapis.com/v1beta").trim().replace(/\/+$/, "");
|
|
194
247
|
if (/^https:\/\/generativelanguage\.googleapis\.com$/i.test(baseUrl)) baseUrl = "https://generativelanguage.googleapis.com/v1beta";
|
|
195
248
|
const url = `${baseUrl}/interactions?alt=sse`;
|
|
@@ -256,6 +309,7 @@ const streamGoogleInteractions = (model, context, options) => {
|
|
|
256
309
|
if (!currentBlock) return;
|
|
257
310
|
if (currentBlock.type === "toolCall") {
|
|
258
311
|
if (currentBlock.partialJson?.trim()) currentBlock.arguments = parseTerminalToolCallArguments(currentBlock.partialJson);
|
|
312
|
+
currentBlock.arguments = mapGoogleToolArguments(providerContext.tools, currentBlock.name, currentBlock.arguments, "decode");
|
|
259
313
|
delete currentBlock.partialJson;
|
|
260
314
|
stream.push({
|
|
261
315
|
type: "toolcall_end",
|
|
@@ -483,9 +537,15 @@ const streamSimpleGoogleInteractions = (model, context, options) => {
|
|
|
483
537
|
const apiKey = resolveGoogleInteractionsApiKey(model, options);
|
|
484
538
|
if (!apiKey) throw new Error(`No API key for provider: ${model.provider}`);
|
|
485
539
|
const base = buildBaseOptions(model, options, apiKey);
|
|
540
|
+
const record = asRecord(options);
|
|
541
|
+
const toolChoice = normalizeGoogleInteractionsToolChoice(record.toolChoice);
|
|
542
|
+
const videoMetadata = record.videoMetadata ?? record.video_metadata;
|
|
486
543
|
return streamGoogleInteractions(model, context, {
|
|
487
544
|
...base,
|
|
488
|
-
|
|
545
|
+
...typeof record.topP === "number" ? { topP: record.topP } : {},
|
|
546
|
+
thinking: buildGoogleInteractionsSimpleThinking(model, options),
|
|
547
|
+
...toolChoice ? { toolChoice } : {},
|
|
548
|
+
...videoMetadata !== void 0 ? { videoMetadata } : {}
|
|
489
549
|
});
|
|
490
550
|
};
|
|
491
551
|
//#endregion
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { p as hasRuntimeContextMarker } from "./types-OVEWUaDh.mjs";
|
|
2
2
|
import { r as appendAssistantThinking } from "./event-stream-X2gmsUWv.mjs";
|
|
3
|
+
import { a as asRecord, s as isStringArray } from "./record-coerce-BQaoiN3r.mjs";
|
|
3
4
|
import { N as isImageWithMediaPayload, O as calculateCost } from "./host-DX7ORpeH.mjs";
|
|
4
5
|
import { t as sanitizeSurrogates } from "./sanitize-unicode-CRGuMONI.mjs";
|
|
5
6
|
import { r as sortPromptCacheToolsByName } from "./prompt-cache-stability-w-ICeyOI.mjs";
|
|
@@ -17,6 +18,42 @@ function googleFlashSupportsMinimalThinking(modelId) {
|
|
|
17
18
|
return Number.parseInt(match[1] ?? "0", 10) < 7;
|
|
18
19
|
}
|
|
19
20
|
//#endregion
|
|
21
|
+
//#region packages/ai/src/providers/google-tool-parameters.ts
|
|
22
|
+
const PYTHON_KEYWORDS = new Set("False None True and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal not or pass raise return try while with yield".split(" "));
|
|
23
|
+
function parameterNames(parameters) {
|
|
24
|
+
const properties = asRecord(parameters.properties);
|
|
25
|
+
const names = /* @__PURE__ */ new Map();
|
|
26
|
+
for (const name of Object.keys(properties)) {
|
|
27
|
+
if (!PYTHON_KEYWORDS.has(name)) continue;
|
|
28
|
+
let alias = `${name}_`;
|
|
29
|
+
while (Object.hasOwn(properties, alias)) alias += "_";
|
|
30
|
+
names.set(name, alias);
|
|
31
|
+
}
|
|
32
|
+
return names;
|
|
33
|
+
}
|
|
34
|
+
function googleToolParameters(parameters) {
|
|
35
|
+
const schema = asRecord(parameters);
|
|
36
|
+
const names = parameterNames(schema);
|
|
37
|
+
if (names.size === 0) return schema;
|
|
38
|
+
const projected = {
|
|
39
|
+
...schema,
|
|
40
|
+
properties: Object.fromEntries(Object.entries(asRecord(schema.properties)).map(([name, propertySchema]) => [names.get(name) ?? name, propertySchema]))
|
|
41
|
+
};
|
|
42
|
+
for (const key of ["required", "propertyOrdering"]) {
|
|
43
|
+
const value = schema[key];
|
|
44
|
+
if (isStringArray(value)) projected[key] = value.map((name) => names.get(name) ?? name);
|
|
45
|
+
}
|
|
46
|
+
return projected;
|
|
47
|
+
}
|
|
48
|
+
function mapGoogleToolArguments(tools, toolName, args, direction) {
|
|
49
|
+
const tool = tools?.find((candidate) => candidate.name === toolName);
|
|
50
|
+
if (!tool) return args;
|
|
51
|
+
const names = parameterNames(asRecord(tool.parameters));
|
|
52
|
+
if (names.size === 0) return args;
|
|
53
|
+
const mapping = direction === "encode" ? names : new Map([...names].map(([name, alias]) => [alias, name]));
|
|
54
|
+
return Object.fromEntries(Object.entries(args).map(([name, value]) => [mapping.get(name) ?? name, value]));
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
20
57
|
//#region packages/ai/src/providers/google-stream.ts
|
|
21
58
|
const GOOGLE_MODEL_RESOURCE_PREFIX = /^(?:(?:projects\/[^/]+\/locations\/[^/]+\/)?publishers\/google\/models\/|google\/|models\/)/u;
|
|
22
59
|
function retainThoughtSignature(existing, incoming) {
|
|
@@ -186,7 +223,7 @@ async function consumeGoogleGenerateContentStream(params) {
|
|
|
186
223
|
type: "toolCall",
|
|
187
224
|
id: !providedId || toolCallIds.has(providedId) ? params.nextToolCallId(part.functionCall.name) : providedId,
|
|
188
225
|
name: part.functionCall.name || "",
|
|
189
|
-
arguments: part.functionCall.args ?? {},
|
|
226
|
+
arguments: mapGoogleToolArguments(params.tools, part.functionCall.name || "", part.functionCall.args ?? {}, "decode"),
|
|
190
227
|
...part.thoughtSignature && { thoughtSignature: part.thoughtSignature }
|
|
191
228
|
};
|
|
192
229
|
params.output.content.push(toolCall);
|
|
@@ -330,7 +367,7 @@ function projectGoogleMessages(params) {
|
|
|
330
367
|
});
|
|
331
368
|
} else if (block.type === "toolCall") {
|
|
332
369
|
if (isSameProviderAndModel && (managed || model.provider !== "google-gemini-cli")) sameRouteToolCallIds.add(block.id);
|
|
333
|
-
const args = coerceTransportToolCallArguments(block.arguments);
|
|
370
|
+
const args = mapGoogleToolArguments(params.tools, block.name, coerceTransportToolCallArguments(block.arguments), "encode");
|
|
334
371
|
const ownSignature = isSameProviderAndModel ? signature(block.thoughtSignature) : void 0;
|
|
335
372
|
const replayKey = managed && (ownSignature || params.requiresToolCallSignature && isSameProviderAndModel && replaySignatures.size > 0) ? [
|
|
336
373
|
block.id,
|
|
@@ -405,8 +442,8 @@ function convertGoogleTools(tools) {
|
|
|
405
442
|
return [{ functionDeclarations: sortPromptCacheToolsByName(tools).map((tool) => ({
|
|
406
443
|
name: tool.name,
|
|
407
444
|
description: tool.description,
|
|
408
|
-
parametersJsonSchema: tool.parameters
|
|
445
|
+
parametersJsonSchema: googleToolParameters(tool.parameters)
|
|
409
446
|
})) }];
|
|
410
447
|
}
|
|
411
448
|
//#endregion
|
|
412
|
-
export {
|
|
449
|
+
export { googleToolParameters as a, consumeGoogleGenerateContentStream as i, projectGoogleMessages as n, mapGoogleToolArguments as o, requiresGoogleToolCallId as r, googleFlashSupportsMinimalThinking as s, convertGoogleTools as t };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import "./src-CQ7nH2mL.mjs";
|
|
2
2
|
import { t as omitNullRequestHeaders } from "./request-headers-DO4Mqhw1.mjs";
|
|
3
3
|
import { t as AssistantMessageEventStream } from "./event-stream-X2gmsUWv.mjs";
|
|
4
|
+
import { a as asRecord } from "./record-coerce-BQaoiN3r.mjs";
|
|
4
5
|
import { a as resolveAiTransportHeaderSentinels, r as getAiTransportHost } from "./host-DX7ORpeH.mjs";
|
|
5
6
|
import { n as buildManagedModelFetch } from "./host-policy-jCZebuXx.mjs";
|
|
6
7
|
import { n as buildBaseOptions } from "./simple-options-tLSeECry.mjs";
|
|
7
8
|
import { p as mergeTransportHeaders } from "./transport-stream-shared-D2uFMhMc.mjs";
|
|
8
9
|
import { t as createAssistantOutput } from "./assistant-output-CD4kY9gu.mjs";
|
|
9
|
-
import { a as runGoogleGenerateContentLifecycle, i as buildGoogleSimpleThinking, t as buildGoogleGenerateContentParams } from "./google-shared-
|
|
10
|
+
import { a as runGoogleGenerateContentLifecycle, i as buildGoogleSimpleThinking, t as buildGoogleGenerateContentParams } from "./google-shared-WNM86ZcW.mjs";
|
|
10
11
|
import { ResourceScope } from "@google/genai";
|
|
11
12
|
//#region packages/ai/src/providers/google-http-options.ts
|
|
12
13
|
function buildGoogleHttpOptions(model, optionsHeaders, profile) {
|
|
@@ -24,7 +25,7 @@ function buildGoogleHttpOptions(model, optionsHeaders, profile) {
|
|
|
24
25
|
} else if (model.baseUrl) {
|
|
25
26
|
httpOptions.baseUrl = model.baseUrl;
|
|
26
27
|
httpOptions.apiVersion = "";
|
|
27
|
-
}
|
|
28
|
+
} else httpOptions.apiVersion = "v1beta";
|
|
28
29
|
const headers = profile === "vertex" ? mergeTransportHeaders(model.headers, optionsHeaders) : getAiTransportHost().resolveProviderRequestHeaders({
|
|
29
30
|
provider: model.provider,
|
|
30
31
|
api: model.api,
|
|
@@ -45,6 +46,7 @@ function createGoogleGenerateContentStreams(api, createClient, resolveSimpleApiK
|
|
|
45
46
|
runGoogleGenerateContentLifecycle({
|
|
46
47
|
stream: events,
|
|
47
48
|
model,
|
|
49
|
+
tools: context.tools,
|
|
48
50
|
output: createAssistantOutput(model, api),
|
|
49
51
|
options,
|
|
50
52
|
createClient: () => createClient(model, options),
|
|
@@ -55,10 +57,14 @@ function createGoogleGenerateContentStreams(api, createClient, resolveSimpleApiK
|
|
|
55
57
|
};
|
|
56
58
|
return {
|
|
57
59
|
stream,
|
|
58
|
-
streamSimple: (model, context, options) =>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
streamSimple: (model, context, options) => {
|
|
61
|
+
const topP = asRecord(options).topP;
|
|
62
|
+
return stream(model, context, {
|
|
63
|
+
...buildBaseOptions(model, options, resolveSimpleApiKey?.(model, options)),
|
|
64
|
+
...typeof topP === "number" ? { topP } : {},
|
|
65
|
+
thinking: buildGoogleSimpleThinking(model, options)
|
|
66
|
+
});
|
|
67
|
+
}
|
|
62
68
|
};
|
|
63
69
|
}
|
|
64
70
|
//#endregion
|
|
@@ -2,9 +2,9 @@ import { k as clampThinkingLevel } from "./host-DX7ORpeH.mjs";
|
|
|
2
2
|
import { t as sanitizeSurrogates } from "./sanitize-unicode-CRGuMONI.mjs";
|
|
3
3
|
import { C as stripSystemPromptCacheBoundary, t as adjustMaxTokensForThinking } from "./simple-options-tLSeECry.mjs";
|
|
4
4
|
import { c as failTransportStream, g as notifyProviderStreamOpened, x as transportAbortError } from "./transport-stream-shared-D2uFMhMc.mjs";
|
|
5
|
-
import { t as transformProviderMessages } from "./provider-transcript-transform-
|
|
5
|
+
import { t as transformProviderMessages } from "./provider-transcript-transform-DtaxNcC1.mjs";
|
|
6
6
|
import { isGoogleGemini3ProModel, isGoogleGemini3ThinkingLevelModel } from "./internal/google-model-family.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { i as consumeGoogleGenerateContentStream, n as projectGoogleMessages, r as requiresGoogleToolCallId, s as googleFlashSupportsMinimalThinking, t as convertGoogleTools } from "./google-messages-A-9d3y5V.mjs";
|
|
8
8
|
import { FunctionCallingConfigMode, ThinkingLevel } from "@google/genai";
|
|
9
9
|
//#region packages/ai/src/providers/google-shared.ts
|
|
10
10
|
async function runGoogleGenerateContentLifecycle(params) {
|
|
@@ -25,6 +25,7 @@ async function runGoogleGenerateContentLifecycle(params) {
|
|
|
25
25
|
chunks: { [Symbol.asyncIterator]: () => googleIterator },
|
|
26
26
|
model,
|
|
27
27
|
output,
|
|
28
|
+
tools: params.tools,
|
|
28
29
|
stream,
|
|
29
30
|
signal: options?.signal,
|
|
30
31
|
nextToolCallId: params.nextToolCallId
|
|
@@ -43,11 +44,13 @@ function buildGoogleGenerateContentParams(model, context, options = {}) {
|
|
|
43
44
|
const contents = projectGoogleMessages({
|
|
44
45
|
model,
|
|
45
46
|
messages: transformProviderMessages(context.messages, model, (id) => requiresGoogleToolCallId(model.id) ? id.replace(/[^a-zA-Z0-9_-]/g, "_").slice(0, 64) : id),
|
|
47
|
+
tools: context.tools,
|
|
46
48
|
replay: "signed-parts",
|
|
47
49
|
requiresToolCallSignature: model.provider !== "google-gemini-cli" && isGoogleGemini3ThinkingLevelModel(model.id)
|
|
48
50
|
});
|
|
49
51
|
const config = {
|
|
50
52
|
...options.temperature !== void 0 && { temperature: options.temperature },
|
|
53
|
+
...options.topP !== void 0 && { topP: options.topP },
|
|
51
54
|
...buildGoogleGenerationConfig(model, options.thinking, options.maxTokens),
|
|
52
55
|
...options.stop !== void 0 && options.stop.length > 0 && { stopSequences: options.stop },
|
|
53
56
|
...context.systemPrompt && { systemInstruction: sanitizeSurrogates(stripSystemPromptCacheBoundary(context.systemPrompt)) },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as normalizeOptionalString } from "./string-coerce-BCuWMIrk.mjs";
|
|
2
2
|
import { r as getAiTransportHost } from "./host-DX7ORpeH.mjs";
|
|
3
|
-
import { n as buildGoogleHttpOptions, t as createGoogleGenerateContentStreams } from "./google-provider-stream-
|
|
3
|
+
import { n as buildGoogleHttpOptions, t as createGoogleGenerateContentStreams } from "./google-provider-stream-CNVh4gpm.mjs";
|
|
4
4
|
import { GoogleGenAI } from "@google/genai";
|
|
5
5
|
//#region packages/ai/src/providers/google-vertex.ts
|
|
6
6
|
const API_VERSION = "v1";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { i as asOptionalRecord } from "./record-coerce-BQaoiN3r.mjs";
|
|
2
|
+
//#region packages/ai/src/providers/google-video-slots.ts
|
|
3
|
+
const GOOGLE_VIDEO_SLOT_OMISSION = "(video omitted: native video slot unavailable)";
|
|
4
|
+
function createGoogleVideoPlaceholder(video, slots, placeholder) {
|
|
5
|
+
slots?.set(placeholder, video);
|
|
6
|
+
return placeholder;
|
|
7
|
+
}
|
|
8
|
+
/** Only original slot identities may recover private bytes after mutable payload hooks. */
|
|
9
|
+
function materializeGoogleVideoSlots(payload, slots, materialize, omitInjected) {
|
|
10
|
+
const visit = (value) => {
|
|
11
|
+
if (Array.isArray(value)) {
|
|
12
|
+
value.forEach(visit);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const part = asOptionalRecord(value);
|
|
16
|
+
if (!part) return;
|
|
17
|
+
const video = slots.get(part);
|
|
18
|
+
if (video) {
|
|
19
|
+
Object.keys(part).forEach((key) => Reflect.deleteProperty(part, key));
|
|
20
|
+
materialize(part, video);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
omitInjected(part);
|
|
24
|
+
Object.values(part).forEach(visit);
|
|
25
|
+
};
|
|
26
|
+
visit(payload);
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { createGoogleVideoPlaceholder as n, materializeGoogleVideoSlots as r, GOOGLE_VIDEO_SLOT_OMISSION as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { D as supportsClaudeNativeMaxEffort, O as supportsClaudeNativeXhighEffort, S as resolveClaudeSonnet5ModelIdentity, _ as resolveClaudeMythos5ModelIdentity, b as resolveClaudeOpus5ModelIdentity, d as requiresClaudeBetweenToolsThinking, f as requiresClaudeDefaultSampling, g as resolveClaudeModelIdentity, h as resolveClaudeHaiku55ModelIdentity, m as resolveClaudeFable5ModelIdentity, p as requiresClaudeMandatoryAdaptiveThinking, u as bindsClaudeThinkingPrefix, v as resolveClaudeNativeThinkingLevelMap, w as supportsClaudeAdaptiveThinking, x as resolveClaudeSonnet55ModelIdentity, y as resolveClaudeOpus55ModelIdentity } from "../src-CQ7nH2mL.mjs";
|
|
2
2
|
import { C as resolveAnthropicThinkingEffort, S as requiresClaudeAdaptiveThinking, T as usesClaudeStreamingRefusalContract, _ as buildAnthropicClaudeCodeIdentity, b as prepareClaudeNoPrefillRequestContext, g as applyClaudeRequestContract, h as ANTHROPIC_CLAUDE_CODE_VERSION, v as defaultsClaudeAdaptiveThinking, w as usesClaudeFable5MessagesContract, x as prepareModelBoundThinkingReplay, y as mapAnthropicStopReason } from "../host-DX7ORpeH.mjs";
|
|
3
|
-
import { A as resolveAnthropicServerCompactionPlan, B as usesFoundryBearerAuth, F as applyAnthropicFallbackBoundary, I as readAnthropicFallbackBoundary, L as resolveAnthropicFallbackServingModelCost, M as ANTHROPIC_SERVER_SIDE_FALLBACKS, N as ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, P as CLAUDE_OPUS_FALLBACK_MODEL_COST, R as isAnthropicOAuthApiKey, S as buildAnthropicSystemBlocks, _ as applyAnthropicRefusal, c as readAnthropicCacheWriteUsage, d as readLastAnthropicIterationUsage, f as ANTHROPIC_OMITTED_REASONING_TEXT, g as readAnthropicInputTransformations, h as logAnthropicThinkingDrops, l as readAnthropicPromptUsageSnapshot, m as findActiveAnthropicToolTurnAssistantIndex, n as applyAnthropicThinkingOptions, o as applyAnthropicMessageDeltaUsage, p as applyAnthropicThinkingBindingControls, s as applyAnthropicMessageStartUsage, u as readAnthropicUsageTokenCount, w as isDirectAnthropicModel, z as omitFoundryBearerCredentialHeaders } from "../anthropic-stream-lifecycle-
|
|
3
|
+
import { A as resolveAnthropicServerCompactionPlan, B as usesFoundryBearerAuth, F as applyAnthropicFallbackBoundary, I as readAnthropicFallbackBoundary, L as resolveAnthropicFallbackServingModelCost, M as ANTHROPIC_SERVER_SIDE_FALLBACKS, N as ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, P as CLAUDE_OPUS_FALLBACK_MODEL_COST, R as isAnthropicOAuthApiKey, S as buildAnthropicSystemBlocks, _ as applyAnthropicRefusal, c as readAnthropicCacheWriteUsage, d as readLastAnthropicIterationUsage, f as ANTHROPIC_OMITTED_REASONING_TEXT, g as readAnthropicInputTransformations, h as logAnthropicThinkingDrops, l as readAnthropicPromptUsageSnapshot, m as findActiveAnthropicToolTurnAssistantIndex, n as applyAnthropicThinkingOptions, o as applyAnthropicMessageDeltaUsage, p as applyAnthropicThinkingBindingControls, s as applyAnthropicMessageStartUsage, u as readAnthropicUsageTokenCount, w as isDirectAnthropicModel, z as omitFoundryBearerCredentialHeaders } from "../anthropic-stream-lifecycle-DF2qVvg1.mjs";
|
|
4
4
|
import { a as reconcileAnthropicToolChoice, i as projectAnthropicTools, n as normalizeAnthropicToolChoice, o as resolveOriginalAnthropicToolName, r as prepareAnthropicInputSchema, s as toClaudeCodeToolName, t as normalizeAnthropicToolCallId } from "../anthropic-tool-projection-dGRfr4iT.mjs";
|
|
5
|
-
import { n as streamAnthropic, r as streamSimpleAnthropic } from "../anthropic-
|
|
5
|
+
import { n as streamAnthropic, r as streamSimpleAnthropic } from "../anthropic-DEKgalVg.mjs";
|
|
6
6
|
export { ANTHROPIC_CLAUDE_CODE_VERSION, ANTHROPIC_OMITTED_REASONING_TEXT, ANTHROPIC_SERVER_SIDE_FALLBACKS, ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, CLAUDE_OPUS_FALLBACK_MODEL_COST, applyAnthropicFallbackBoundary, applyAnthropicMessageDeltaUsage, applyAnthropicMessageStartUsage, applyAnthropicRefusal, applyAnthropicThinkingBindingControls, applyAnthropicThinkingOptions, applyClaudeRequestContract, bindsClaudeThinkingPrefix, buildAnthropicClaudeCodeIdentity, buildAnthropicSystemBlocks, defaultsClaudeAdaptiveThinking, findActiveAnthropicToolTurnAssistantIndex, isAnthropicOAuthApiKey, isDirectAnthropicModel, logAnthropicThinkingDrops, mapAnthropicStopReason, normalizeAnthropicToolCallId, normalizeAnthropicToolChoice, omitFoundryBearerCredentialHeaders, prepareAnthropicInputSchema, prepareClaudeNoPrefillRequestContext, prepareModelBoundThinkingReplay, projectAnthropicTools, readAnthropicCacheWriteUsage, readAnthropicFallbackBoundary, readAnthropicInputTransformations, readAnthropicPromptUsageSnapshot, readAnthropicUsageTokenCount, readLastAnthropicIterationUsage, reconcileAnthropicToolChoice, requiresClaudeAdaptiveThinking, requiresClaudeBetweenToolsThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAnthropicFallbackServingModelCost, resolveAnthropicServerCompactionPlan, resolveAnthropicThinkingEffort, resolveClaudeFable5ModelIdentity, resolveClaudeHaiku55ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus55ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet55ModelIdentity, resolveClaudeSonnet5ModelIdentity, resolveOriginalAnthropicToolName, streamAnthropic, streamSimpleAnthropic, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, toClaudeCodeToolName, usesClaudeFable5MessagesContract, usesClaudeStreamingRefusalContract, usesFoundryBearerAuth };
|
package/dist/internal/google.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as buildGoogleGenerationConfig, i as buildGoogleSimpleThinking } from "../google-shared-
|
|
1
|
+
export { n as buildGoogleGenerationConfig, i as buildGoogleSimpleThinking } from "../google-shared-WNM86ZcW.mjs";
|
package/dist/internal/openai.mjs
CHANGED
|
@@ -3,11 +3,11 @@ import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams, t
|
|
|
3
3
|
import { _ as isResponsesOutputLimitToolCallError, b as resolveResponsesTerminalStopReason, g as applyResponsesCacheWritePricing, v as mapResponsesTerminalUsage, y as readResponsesReasoningTokens } from "../diagnostics-CloVGQiK.mjs";
|
|
4
4
|
import { d as measuredRequestPressure, p as reasoningTagTextPolicy, u as codeModeToolSurfaceObserver } from "../simple-options-tLSeECry.mjs";
|
|
5
5
|
import { encodedModelRequestBodyStream, modelRequestBodyState } from "./model-request-body.mjs";
|
|
6
|
-
import { a as hasResponsesWebSearchTool, s as convertMessages } from "../openai-completions-transport-
|
|
7
|
-
import { N as bindResponsesInputMessage, St as reconcileOpenAIResponsesToolChoice, _ as isAzureResponsesTextDeltaEventType, b as resolveResponsesMessageSnapshotCollapse, bt as projectOpenAITools, f as AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, g as isAzureResponsesTextDeltaEvent, h as OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, l as createResponsesToolCallTracker, m as OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, p as AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, u as readResponsesToolCallItemIdentity, v as isResponsesTextContentPartType, xt as reconcileOpenAICompletionsToolChoice, y as isResponsesTextDeltaEventType } from "../openai-responses-shared-
|
|
6
|
+
import { a as hasResponsesWebSearchTool, s as convertMessages } from "../openai-completions-transport-CRJKV7wI.mjs";
|
|
7
|
+
import { N as bindResponsesInputMessage, St as reconcileOpenAIResponsesToolChoice, _ as isAzureResponsesTextDeltaEventType, b as resolveResponsesMessageSnapshotCollapse, bt as projectOpenAITools, f as AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, g as isAzureResponsesTextDeltaEvent, h as OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, l as createResponsesToolCallTracker, m as OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, p as AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, u as readResponsesToolCallItemIdentity, v as isResponsesTextContentPartType, xt as reconcileOpenAICompletionsToolChoice, y as isResponsesTextDeltaEventType } from "../openai-responses-shared-B7TJU5wu.mjs";
|
|
8
8
|
import { t as mapOpenAIStopReason } from "../openai-stop-reason-8s70vDXj.mjs";
|
|
9
9
|
import { i as resolveAzureDeploymentNameFromMap, n as isTraditionalAzureOpenAIHost, r as parseAzureDeploymentNameMap, t as isOpenAICompatibleAzureResponsesBaseUrl } from "../azure-openai-responses-client-compat-D0dvJMbZ.mjs";
|
|
10
|
-
import { n as responsesRequestLifecycle, t as independentResponsesRequest } from "../openai-responses-request-lifecycle-
|
|
11
|
-
import { n as streamOpenAICompletions, r as streamSimpleOpenAICompletions } from "../openai-completions-
|
|
12
|
-
import { n as streamOpenAIResponses, r as streamSimpleOpenAIResponses } from "../openai-responses-
|
|
10
|
+
import { n as responsesRequestLifecycle, t as independentResponsesRequest } from "../openai-responses-request-lifecycle-DH3gtX6N.mjs";
|
|
11
|
+
import { n as streamOpenAICompletions, r as streamSimpleOpenAICompletions } from "../openai-completions-D7IYrF6d.mjs";
|
|
12
|
+
import { n as streamOpenAIResponses, r as streamSimpleOpenAIResponses } from "../openai-responses-BooFYPKe.mjs";
|
|
13
13
|
export { AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH, OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, applyOpenAICompletionsToolReasoning, applyResponsesCacheWritePricing, bindResponsesInputMessage, clampOpenAIPromptCacheKey, codeModeToolSurfaceObserver, convertMessages, createResponsesToolCallTracker, encodedModelRequestBodyStream, hasResponsesWebSearchTool, independentResponsesRequest, isAzureResponsesTextDeltaEvent, isAzureResponsesTextDeltaEventType, isOpenAICompatibleAzureResponsesBaseUrl, isOpenAIGpt54MiniModel, isOpenAIGpt55Model, isOpenAIGpt56Model, isOpenAIGpt6Model, isResponsesOutputLimitToolCallError, isResponsesTextContentPartType, isResponsesTextDeltaEventType, isTraditionalAzureOpenAIHost, mapOpenAIStopReason, mapResponsesTerminalUsage, measuredRequestPressure, modelRequestBodyState, normalizeOpenAIReasoningEffort, parseAzureDeploymentNameMap, projectOpenAITools, readResponsesReasoningTokens, readResponsesToolCallItemIdentity, reasoningTagTextPolicy, reconcileOpenAICompletionsToolChoice, reconcileOpenAIResponsesToolChoice, resolveAzureDeploymentNameFromMap, resolveOpenAIModelReasoningEfforts, resolveOpenAIPromptCacheParams, resolveOpenAIReasoningEffortForModel, resolveOpenAIReasoningEffortMapping, resolveOpenAISupportedReasoningEfforts, resolveResponsesMessageSnapshotCollapse, resolveResponsesTerminalStopReason, responsesPromptObserver, responsesRequestLifecycle, responsesServiceTierObserver, streamOpenAICompletions, streamOpenAIResponses, streamSimpleOpenAICompletions, streamSimpleOpenAIResponses, supportsOpenAIReasoningEffort, supportsOpenAITemperature };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { d as MAX_TOOL_SCHEMA_DEPTH, f as inheritToolSchemaTruncation, g as wasToolSchemaTruncated, h as truncateToolSchemaDepth, i as publishRuntimeToolInputSchema, m as toolSchemaChildPosition, p as reportToolSchemaTruncation, r as projectRuntimeToolInputSchema, t as getPublishedRuntimeToolInputSchema, v as SCHEMA_MAP_KEYS, y as SCHEMA_NESTED_KEYS } from "../tool-schema-json-projection-BQpiJlXJ.mjs";
|
|
2
2
|
import { r as prepareAnthropicInputSchema } from "../anthropic-tool-projection-dGRfr4iT.mjs";
|
|
3
|
-
import { _ as cleanSchemaForLlamacppGbnf, a as resolveOpenAIProjectedToolsStrictToolFlag, b as cleanSchemaForGemini, c as normalizeOpenAIStrictCompatSchema, d as resolveUnsupportedToolSchemaKeywords, f as shouldOmitEmptyArrayItems, g as LLAMACPP_GBNF_MAX_REPETITION_THRESHOLD, h as stripUnsupportedSchemaKeywords, i as normalizeStrictOpenAIJsonSchema, l as extractToolSchemaModelCompat, n as isStrictOpenAIJsonSchemaCompatible, o as findCompatClosedObjectPaths, r as normalizeOpenAIStrictToolParameters, s as findOpenAIStrictSchemaViolations, t as findOpenAIStrictToolProjectionDiagnostics, u as normalizeToolParameterSchema, v as findLlamacppGbnfSchemaViolations, x as prepareOpenAIFunctionTool, y as GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS } from "../openai-tool-schema-
|
|
3
|
+
import { _ as cleanSchemaForLlamacppGbnf, a as resolveOpenAIProjectedToolsStrictToolFlag, b as cleanSchemaForGemini, c as normalizeOpenAIStrictCompatSchema, d as resolveUnsupportedToolSchemaKeywords, f as shouldOmitEmptyArrayItems, g as LLAMACPP_GBNF_MAX_REPETITION_THRESHOLD, h as stripUnsupportedSchemaKeywords, i as normalizeStrictOpenAIJsonSchema, l as extractToolSchemaModelCompat, n as isStrictOpenAIJsonSchemaCompatible, o as findCompatClosedObjectPaths, r as normalizeOpenAIStrictToolParameters, s as findOpenAIStrictSchemaViolations, t as findOpenAIStrictToolProjectionDiagnostics, u as normalizeToolParameterSchema, v as findLlamacppGbnfSchemaViolations, x as prepareOpenAIFunctionTool, y as GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS } from "../openai-tool-schema-Cx2QfbBC.mjs";
|
|
4
4
|
export { GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, LLAMACPP_GBNF_MAX_REPETITION_THRESHOLD, MAX_TOOL_SCHEMA_DEPTH, SCHEMA_MAP_KEYS, SCHEMA_NESTED_KEYS, cleanSchemaForGemini, cleanSchemaForLlamacppGbnf, extractToolSchemaModelCompat, findCompatClosedObjectPaths, findLlamacppGbnfSchemaViolations, findOpenAIStrictSchemaViolations, findOpenAIStrictToolProjectionDiagnostics, getPublishedRuntimeToolInputSchema, inheritToolSchemaTruncation, isStrictOpenAIJsonSchemaCompatible, normalizeOpenAIStrictCompatSchema, normalizeOpenAIStrictToolParameters, normalizeStrictOpenAIJsonSchema, normalizeToolParameterSchema, prepareAnthropicInputSchema, prepareOpenAIFunctionTool, projectRuntimeToolInputSchema, publishRuntimeToolInputSchema, reportToolSchemaTruncation, resolveOpenAIProjectedToolsStrictToolFlag, resolveUnsupportedToolSchemaKeywords, shouldOmitEmptyArrayItems, stripUnsupportedSchemaKeywords, toolSchemaChildPosition, truncateToolSchemaDepth, wasToolSchemaTruncated };
|
|
@@ -9,7 +9,7 @@ import { C as stripSystemPromptCacheBoundary, a as describeToolResultMediaPlaceh
|
|
|
9
9
|
import { A as parseStreamingJson, D as shortHash, O as createToolArgumentPreviewSchedule, h as notifyProviderHttpResponse, l as finalizeTerminalToolCallArguments, n as assignTransportErrorDetails, p as mergeTransportHeaders, u as finalizeTransportStream } from "./transport-stream-shared-D2uFMhMc.mjs";
|
|
10
10
|
import { t as getPublishedRuntimeToolInputSchema } from "./tool-schema-json-projection-BQpiJlXJ.mjs";
|
|
11
11
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-DzaHoRAU.mjs";
|
|
12
|
-
import { t as transformProviderMessages } from "./provider-transcript-transform-
|
|
12
|
+
import { t as transformProviderMessages } from "./provider-transcript-transform-DtaxNcC1.mjs";
|
|
13
13
|
import { t as createAssistantOutput } from "./assistant-output-CD4kY9gu.mjs";
|
|
14
14
|
import { t as boundResponseBody } from "./streaming-byte-guard-DBXr1XYn.mjs";
|
|
15
15
|
import { t as mapOpenAIStopReason } from "./openai-stop-reason-8s70vDXj.mjs";
|
|
@@ -2433,7 +2433,7 @@ let telemetryModule;
|
|
|
2433
2433
|
async function getObservabilityModule() {
|
|
2434
2434
|
if (observabilityModule !== void 0) return observabilityModule;
|
|
2435
2435
|
try {
|
|
2436
|
-
observabilityModule = await import("./otel-
|
|
2436
|
+
observabilityModule = await import("./otel-Buswj0Mf.mjs");
|
|
2437
2437
|
} catch {
|
|
2438
2438
|
observabilityModule = null;
|
|
2439
2439
|
}
|
|
@@ -2442,7 +2442,7 @@ async function getObservabilityModule() {
|
|
|
2442
2442
|
async function getTelemetryModule() {
|
|
2443
2443
|
if (telemetryModule !== void 0) return telemetryModule;
|
|
2444
2444
|
try {
|
|
2445
|
-
telemetryModule = await import("./telemetry-
|
|
2445
|
+
telemetryModule = await import("./telemetry-CvK1yQg7.mjs");
|
|
2446
2446
|
} catch {
|
|
2447
2447
|
telemetryModule = null;
|
|
2448
2448
|
}
|
package/dist/{openai-chatgpt-responses-BIK7HROH.mjs → openai-chatgpt-responses-3QCEMfkF.mjs}
RENAMED
|
@@ -17,9 +17,9 @@ import { n as buildManagedModelFetch } from "./host-policy-jCZebuXx.mjs";
|
|
|
17
17
|
import { n as buildBaseOptions, y as prepareSystemPrompt } from "./simple-options-tLSeECry.mjs";
|
|
18
18
|
import { C as withProviderResponseHook, g as notifyProviderStreamOpened, n as assignTransportErrorDetails, p as mergeTransportHeaders, x as transportAbortError } from "./transport-stream-shared-D2uFMhMc.mjs";
|
|
19
19
|
import { t as createAssistantOutput } from "./assistant-output-CD4kY9gu.mjs";
|
|
20
|
-
import { C as isInvalidEncryptedContentError, D as ResponsesStreamFailure, Dt as createResponseModelTracker, E as resolveNextResponsesEncryptedContentAttempt, Et as createOpenAIResponseHook, F as convertProviderResponsesMessages, Tt as createOpenAIProviderAcceptanceHook, _t as resolveOpenAIRequestReasoning, i as convertResponsesToolPayload, j as recordResponsesContextUsage, n as applyResponsesServiceTierPricing, o as readOpenAIMisalignmentReview, ot as suppressOpenAIResponsesCompaction, rt as buildOpenAIResponsesReasoningReplayMetadata, s as processResponsesStream, vt as resolveOpenAISimpleReasoningEffort, x as commitResponsesEncryptedContentAttempt } from "./openai-responses-shared-
|
|
20
|
+
import { C as isInvalidEncryptedContentError, D as ResponsesStreamFailure, Dt as createResponseModelTracker, E as resolveNextResponsesEncryptedContentAttempt, Et as createOpenAIResponseHook, F as convertProviderResponsesMessages, Tt as createOpenAIProviderAcceptanceHook, _t as resolveOpenAIRequestReasoning, i as convertResponsesToolPayload, j as recordResponsesContextUsage, n as applyResponsesServiceTierPricing, o as readOpenAIMisalignmentReview, ot as suppressOpenAIResponsesCompaction, rt as buildOpenAIResponsesReasoningReplayMetadata, s as processResponsesStream, vt as resolveOpenAISimpleReasoningEffort, x as commitResponsesEncryptedContentAttempt } from "./openai-responses-shared-B7TJU5wu.mjs";
|
|
21
21
|
import { a as withFirstStreamEventTimeout, i as getFirstStreamEventTimeoutMs, r as getFirstStreamEventTimeoutHandler, t as createFirstStreamEventAbortController } from "./stream-first-event-timeout-B7RcufAV.mjs";
|
|
22
|
-
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-
|
|
22
|
+
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-DH3gtX6N.mjs";
|
|
23
23
|
import { t as requireApiKey } from "./required-api-key-2zZTkmsi.mjs";
|
|
24
24
|
import { n as resolveOpenAICodexAccountId } from "./openai-chatgpt-jwt-KWcgd0d_.mjs";
|
|
25
25
|
//#region packages/ai/src/providers/openai-chatgpt-request-headers.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
2
|
import { k as clampThinkingLevel } from "./host-DX7ORpeH.mjs";
|
|
3
3
|
import { n as buildBaseOptions } from "./simple-options-tLSeECry.mjs";
|
|
4
|
-
import { n as streamOpenAICompletionsRequest, s as convertMessages } from "./openai-completions-transport-
|
|
4
|
+
import { n as streamOpenAICompletionsRequest, s as convertMessages } from "./openai-completions-transport-CRJKV7wI.mjs";
|
|
5
5
|
import { t as requireApiKey } from "./required-api-key-2zZTkmsi.mjs";
|
|
6
6
|
//#region packages/ai/src/providers/openai-completions.ts
|
|
7
7
|
var openai_completions_exports = /* @__PURE__ */ __exportAll({
|
package/dist/{openai-completions-transport-C6J4_oGf.mjs → openai-completions-transport-CRJKV7wI.mjs}
RENAMED
|
@@ -27,23 +27,23 @@ import { C as sha256Hex, S as redactIdentifier } from "./tool-schema-json-projec
|
|
|
27
27
|
import { n as getEnvApiKey } from "./env-api-keys-BuHc86ya.mjs";
|
|
28
28
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-DzaHoRAU.mjs";
|
|
29
29
|
import { n as isProviderReplayContext, r as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-xyU7-CiT.mjs";
|
|
30
|
-
import { t as transformProviderMessages } from "./provider-transcript-transform-
|
|
30
|
+
import { t as transformProviderMessages } from "./provider-transcript-transform-DtaxNcC1.mjs";
|
|
31
31
|
import { prepareModelRequestBody } from "./internal/model-request-body.mjs";
|
|
32
32
|
import { PROVIDER_MODEL_INPUT, resolveProviderContext } from "./provider-types.mjs";
|
|
33
33
|
import { t as createAssistantOutput } from "./assistant-output-CD4kY9gu.mjs";
|
|
34
34
|
import { n as resolveOpencodeSessionHeaders } from "./session-affinity-DA4WHv1h.mjs";
|
|
35
35
|
import { isGoogleGemini3ThinkingLevelModel } from "./internal/google-model-family.mjs";
|
|
36
36
|
import "./types.mjs";
|
|
37
|
-
import { $ as isConfigurationUpdate, A as summarizeResponsesPayload, At as log, B as recordResponsesInputReplay, C as isInvalidEncryptedContentError, Ct as toOpenAIResponsesToolChoice, Dt as createResponseModelTracker, E as resolveNextResponsesEncryptedContentAttempt, Ft as resolveOpenAIClientBaseUrl, G as responsesContinuationPrefixFingerprint, H as claimOpenAIResponsesHttpContinuation, I as convertResponsesMessages, It as resolvePromptCacheKey, K as responsesContinuationRequestFingerprint, Lt as withOpenAIErrorResponseHook, Mt as parseOpenAICompletionsUsage, Nt as readOpenAICompletionsContentDeltas, O as observeResponsesTransportFailure, Ot as detachPartialSnapshot, P as buildResponsesInputMessage, Pt as readOpenAICompletionsReasoningBatch, S as createResponsesStreamWithRecovery, St as reconcileOpenAIResponsesToolChoice, T as resolveAzureOpenAIApiVersion, Tt as createOpenAIProviderAcceptanceHook, U as recordResponsesContinuationState, V as responsesInputFingerprint, W as resolveResponsesContinuationRequest, _t as resolveOpenAIRequestReasoning, a as prepareResponsesTools, bt as projectOpenAITools, c as observeResponsesStream, ct as buildOpenAIClientHeaders, dt as enforceCodeModeResponsesToolSurface, et as replayResponsesReasoningUpdates, gt as resolveOpenAIStrictToolFlagWithDiagnostics, ht as resolveCodeModeResponsesVisibleToolNames, j as recordResponsesContextUsage, jt as measureUtf8AppendBytes, k as safeDebugValue, kt as isOpenAICompletionsThinkingEnabled, lt as buildOpenAISdkClientOptions, n as applyResponsesServiceTierPricing, ot as suppressOpenAIResponsesCompaction, pt as getCompat, rt as buildOpenAIResponsesReasoningReplayMetadata, s as processResponsesStream, st as assertCodeModeResponsesToolSurface, tt as supportsResponsesReasoningUpdate, ut as buildOpenAISdkRequestOptions, vt as resolveOpenAISimpleReasoningEffort, w as readResponsesRecoveryEvent, wt as GEMINI_THOUGHT_SIGNATURE_VALIDATOR_SKIP, xt as reconcileOpenAICompletionsToolChoice, yt as prepareOpenAITools, z as readResponsesInputReplayState } from "./openai-responses-shared-
|
|
38
|
-
import { i as createOpenAIProviderClient, n as resolveProviderSimpleCompletionHeaders, r as resolveProviderTransportTurnState, t as filterProviderTurnHeadersForExplicitOpencodeSession } from "./provider-transport-turn-state-
|
|
37
|
+
import { $ as isConfigurationUpdate, A as summarizeResponsesPayload, At as log, B as recordResponsesInputReplay, C as isInvalidEncryptedContentError, Ct as toOpenAIResponsesToolChoice, Dt as createResponseModelTracker, E as resolveNextResponsesEncryptedContentAttempt, Ft as resolveOpenAIClientBaseUrl, G as responsesContinuationPrefixFingerprint, H as claimOpenAIResponsesHttpContinuation, I as convertResponsesMessages, It as resolvePromptCacheKey, K as responsesContinuationRequestFingerprint, Lt as withOpenAIErrorResponseHook, Mt as parseOpenAICompletionsUsage, Nt as readOpenAICompletionsContentDeltas, O as observeResponsesTransportFailure, Ot as detachPartialSnapshot, P as buildResponsesInputMessage, Pt as readOpenAICompletionsReasoningBatch, S as createResponsesStreamWithRecovery, St as reconcileOpenAIResponsesToolChoice, T as resolveAzureOpenAIApiVersion, Tt as createOpenAIProviderAcceptanceHook, U as recordResponsesContinuationState, V as responsesInputFingerprint, W as resolveResponsesContinuationRequest, _t as resolveOpenAIRequestReasoning, a as prepareResponsesTools, bt as projectOpenAITools, c as observeResponsesStream, ct as buildOpenAIClientHeaders, dt as enforceCodeModeResponsesToolSurface, et as replayResponsesReasoningUpdates, gt as resolveOpenAIStrictToolFlagWithDiagnostics, ht as resolveCodeModeResponsesVisibleToolNames, j as recordResponsesContextUsage, jt as measureUtf8AppendBytes, k as safeDebugValue, kt as isOpenAICompletionsThinkingEnabled, lt as buildOpenAISdkClientOptions, n as applyResponsesServiceTierPricing, ot as suppressOpenAIResponsesCompaction, pt as getCompat, rt as buildOpenAIResponsesReasoningReplayMetadata, s as processResponsesStream, st as assertCodeModeResponsesToolSurface, tt as supportsResponsesReasoningUpdate, ut as buildOpenAISdkRequestOptions, vt as resolveOpenAISimpleReasoningEffort, w as readResponsesRecoveryEvent, wt as GEMINI_THOUGHT_SIGNATURE_VALIDATOR_SKIP, xt as reconcileOpenAICompletionsToolChoice, yt as prepareOpenAITools, z as readResponsesInputReplayState } from "./openai-responses-shared-B7TJU5wu.mjs";
|
|
38
|
+
import { i as createOpenAIProviderClient, n as resolveProviderSimpleCompletionHeaders, r as resolveProviderTransportTurnState, t as filterProviderTurnHeadersForExplicitOpencodeSession } from "./provider-transport-turn-state-C-eRLEjC.mjs";
|
|
39
39
|
import { a as withFirstStreamEventTimeout, i as getFirstStreamEventTimeoutMs, r as getFirstStreamEventTimeoutHandler, t as createFirstStreamEventAbortController } from "./stream-first-event-timeout-B7RcufAV.mjs";
|
|
40
40
|
import { t as boundResponseBody } from "./streaming-byte-guard-DBXr1XYn.mjs";
|
|
41
|
-
import { m as withPreparedToolSchemaNormalization, p as normalizeToolSchema, r as normalizeOpenAIStrictToolParameters, x as prepareOpenAIFunctionTool } from "./openai-tool-schema-
|
|
41
|
+
import { m as withPreparedToolSchemaNormalization, p as normalizeToolSchema, r as normalizeOpenAIStrictToolParameters, x as prepareOpenAIFunctionTool } from "./openai-tool-schema-Cx2QfbBC.mjs";
|
|
42
42
|
import { t as requiresReasoningContentReplay } from "./openai-completions-reasoning-replay-BwT1xwRI.mjs";
|
|
43
43
|
import { t as mapOpenAIStopReason } from "./openai-stop-reason-8s70vDXj.mjs";
|
|
44
44
|
import { i as resolveAzureDeploymentNameFromMap, t as isOpenAICompatibleAzureResponsesBaseUrl } from "./azure-openai-responses-client-compat-D0dvJMbZ.mjs";
|
|
45
45
|
import { a as isOpenAIResponsesCompactionOutput, c as sanitizeResponsesImagePayload, f as resolveOpenAIResponsesPayloadPolicy, i as getOpenAIResponsesCompactionOutputError, l as applyOpenAIResponsesPayloadPolicy, n as supportsNativeOpenAIResponsesEndpoint, r as createBoundedOpenAIResponsesCompactionFetch, t as isOfficialOpenAIResponsesBaseUrl } from "./openai-responses-endpoint-DCkURKS0.mjs";
|
|
46
|
-
import { a as createResponsesV2CompactionCollector, i as createResponsesPromptEgressObserver, n as responsesRequestLifecycle, o as claimResponsesCompactRequest, r as withResponsesRequestAcceptance, t as independentResponsesRequest } from "./openai-responses-request-lifecycle-
|
|
46
|
+
import { a as createResponsesV2CompactionCollector, i as createResponsesPromptEgressObserver, n as responsesRequestLifecycle, o as claimResponsesCompactRequest, r as withResponsesRequestAcceptance, t as independentResponsesRequest } from "./openai-responses-request-lifecycle-DH3gtX6N.mjs";
|
|
47
47
|
import { randomUUID } from "node:crypto";
|
|
48
48
|
import { isDeepStrictEqual } from "node:util";
|
|
49
49
|
import OpenAI, { AzureOpenAI } from "openai";
|
|
@@ -6,8 +6,8 @@ import { i as resolveCacheRetention, r as buildCopilotDynamicHeaders } from "./c
|
|
|
6
6
|
import { n as buildBaseOptions } from "./simple-options-tLSeECry.mjs";
|
|
7
7
|
import { n as getEnvApiKey } from "./env-api-keys-BuHc86ya.mjs";
|
|
8
8
|
import { t as createAssistantOutput } from "./assistant-output-CD4kY9gu.mjs";
|
|
9
|
-
import { F as convertProviderResponsesMessages, n as applyResponsesServiceTierPricing, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams, vt as resolveOpenAISimpleReasoningEffort } from "./openai-responses-shared-
|
|
10
|
-
import { i as createOpenAIProviderClient, n as resolveProviderSimpleCompletionHeaders } from "./provider-transport-turn-state-
|
|
9
|
+
import { F as convertProviderResponsesMessages, n as applyResponsesServiceTierPricing, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams, vt as resolveOpenAISimpleReasoningEffort } from "./openai-responses-shared-B7TJU5wu.mjs";
|
|
10
|
+
import { i as createOpenAIProviderClient, n as resolveProviderSimpleCompletionHeaders } from "./provider-transport-turn-state-C-eRLEjC.mjs";
|
|
11
11
|
import { t as requireApiKey } from "./required-api-key-2zZTkmsi.mjs";
|
|
12
12
|
//#region packages/ai/src/providers/openai-responses.ts
|
|
13
13
|
var openai_responses_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -5,7 +5,7 @@ import "./transport-utils-Da_39MYi.mjs";
|
|
|
5
5
|
import { t as stableStringify } from "./stable-stringify-CchQEmeA.mjs";
|
|
6
6
|
import { y as prepareSystemPrompt } from "./simple-options-tLSeECry.mjs";
|
|
7
7
|
import { C as sha256Hex } from "./tool-schema-json-projection-BQpiJlXJ.mjs";
|
|
8
|
-
import { rt as buildOpenAIResponsesReasoningReplayMetadata } from "./openai-responses-shared-
|
|
8
|
+
import { rt as buildOpenAIResponsesReasoningReplayMetadata } from "./openai-responses-shared-B7TJU5wu.mjs";
|
|
9
9
|
import { a as isOpenAIResponsesCompactionOutput, c as sanitizeResponsesImagePayload } from "./openai-responses-endpoint-DCkURKS0.mjs";
|
|
10
10
|
//#region packages/ai/src/transports/openai-responses-compact-request.ts
|
|
11
11
|
const COMPACT_REQUEST = Symbol("openaiResponsesCompactRequest");
|