@openclaw/ai 2026.7.33 → 2026.7.34
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-BML72tLz.mjs → anthropic-Bcdbq-l5.mjs} +5 -5
- package/dist/{azure-openai-responses-kEN8II8I.mjs → azure-openai-responses-2xhpNPWg.mjs} +3 -3
- package/dist/{google-DTM4O3e9.mjs → google-C6P31moq.mjs} +2 -2
- package/dist/{google-shared-BAP0BQVi.mjs → google-shared-BeyXFAcf.mjs} +8 -4
- package/dist/{google-vertex-D58MZHCQ.mjs → google-vertex--9_gT74B.mjs} +2 -2
- package/dist/{index-BoTnz8cv.d.mts → index-CGDEoorl.d.mts} +23 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/internal/anthropic.d.mts +4 -4
- package/dist/internal/anthropic.mjs +4 -4
- package/dist/internal/openai.d.mts +9 -2
- package/dist/internal/openai.mjs +5 -5
- package/dist/internal/runtime.mjs +1 -1
- package/dist/internal/shared.mjs +1 -1
- package/dist/{mistral-CePVNdws.mjs → mistral-CBm3OQWD.mjs} +2 -2
- package/dist/{model-utils-DgmOla96.mjs → model-utils-Cn9KAz3z.mjs} +1 -1
- package/dist/{openai-chatgpt-responses-BHqbcipc.mjs → openai-chatgpt-responses-M2RVpycr.mjs} +3 -3
- package/dist/{openai-completions-9qYFVS7H.mjs → openai-completions-BUlMEeBc.mjs} +3 -3
- package/dist/{openai-responses-D6l9URyV.mjs → openai-responses-DW61C22l.mjs} +4 -7
- package/dist/{openai-responses-shared-L3PWZvkm.mjs → openai-responses-shared-BhYsVkwW.mjs} +3 -3
- package/dist/{openai-tool-projection-BPlyXt8H.mjs → openai-tool-projection-g4HuxD26.mjs} +11 -2
- package/dist/providers.mjs +8 -8
- package/dist/{src-CZ503MYJ.mjs → src-CjOfhrH3.mjs} +12 -4
- package/dist/{transform-messages-BhGF_fF4.mjs → transform-messages-DoWx35pj.mjs} +10 -8
- package/dist/types.d.mts +2 -2
- package/dist/types.mjs +2 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { n as getEnvApiKey, r as __exportAll } from "./env-api-keys-CtMlqaQ4.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { d as resolveClaudeSonnet5ModelIdentity, f as supportsClaudeAdaptiveThinking, l as resolveClaudeNativeThinkingLevelMap, m as supportsClaudeNativeXhighEffort, p as supportsClaudeNativeMaxEffort, u as resolveClaudeOpus5ModelIdentity } from "./src-CjOfhrH3.mjs";
|
|
3
3
|
import { t as AssistantMessageEventStream } from "./event-stream-ReMmOTzX.mjs";
|
|
4
4
|
import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels } from "./host-4t713IeR.mjs";
|
|
5
|
-
import { n as calculateCost, r as clampThinkingLevel } from "./model-utils-
|
|
5
|
+
import { n as calculateCost, r as clampThinkingLevel } from "./model-utils-Cn9KAz3z.mjs";
|
|
6
6
|
import { r as createDeferredEventBuffer, t as notifyLlmRequestActivity } from "./llm-request-activity-CehVkZP-.mjs";
|
|
7
7
|
import { t as headersToRecord } from "./headers-B_e4-1J0.mjs";
|
|
8
8
|
import { n as parseStreamingJson, t as parseJsonWithRepair } from "./json-parse-DzNSIQBq.mjs";
|
|
9
9
|
import { t as sanitizeSurrogates } from "./sanitize-unicode-DT5o51ur.mjs";
|
|
10
|
-
import { a as adjustMaxTokensForThinking, b as stripSystemPromptCacheBoundary, c as isRecord, d as
|
|
10
|
+
import { a as adjustMaxTokensForThinking, b as stripSystemPromptCacheBoundary, c as isRecord, d as prepareClaudeNoPrefillRequestContext, f as requiresClaudeAdaptiveThinking, h as usesClaudeStreamingRefusalContract, i as extractToolResultText, l as applyClaudeRequestContract, m as usesClaudeFable5MessagesContract, n as describeToolResultMediaPlaceholder, o as buildBaseOptions, r as extractToolResultBlockText, t as transformMessages, y as splitSystemPromptCacheBoundary } from "./transform-messages-DoWx35pj.mjs";
|
|
11
11
|
import { t as projectRuntimeToolInputSchema } from "./tool-schema-json-projection-BwNu3nDi.mjs";
|
|
12
12
|
import { a as resolveCacheRetention, i as resolveCloudflareBaseUrl, n as hasCopilotVisionInput, t as buildCopilotDynamicHeaders } from "./github-copilot-headers-BsH5cqGj.mjs";
|
|
13
13
|
import Anthropic from "@anthropic-ai/sdk";
|
|
@@ -535,7 +535,7 @@ async function* iterateAnthropicEvents(response, signal, requireMessageStop = fa
|
|
|
535
535
|
}
|
|
536
536
|
const streamAnthropic = (model, context, options) => {
|
|
537
537
|
const stream = new AssistantMessageEventStream();
|
|
538
|
-
const requestContext =
|
|
538
|
+
const requestContext = prepareClaudeNoPrefillRequestContext(model, context);
|
|
539
539
|
const requestOptions = normalizeAnthropicThinkingOptions(model, options);
|
|
540
540
|
(async () => {
|
|
541
541
|
const output = {
|
|
@@ -932,7 +932,7 @@ const streamSimpleAnthropic = (model, context, options) => {
|
|
|
932
932
|
thinkingEnabled: false
|
|
933
933
|
});
|
|
934
934
|
const reasoning = options?.reasoning === "off" ? mandatoryAdaptiveThinking ? "low" : "high" : options?.reasoning;
|
|
935
|
-
if (resolveClaudeSonnet5ModelIdentity(model)) return streamAnthropic(model, context, {
|
|
935
|
+
if (resolveClaudeSonnet5ModelIdentity(model) || resolveClaudeOpus5ModelIdentity(model)) return streamAnthropic(model, context, {
|
|
936
936
|
...base,
|
|
937
937
|
thinkingEnabled: true,
|
|
938
938
|
effort: mapThinkingLevelToEffort(model, reasoning ?? "high")
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as getEnvApiKey } from "./env-api-keys-CtMlqaQ4.mjs";
|
|
2
2
|
import { t as AssistantMessageEventStream } from "./event-stream-ReMmOTzX.mjs";
|
|
3
3
|
import { n as getAiTransportHost } from "./host-4t713IeR.mjs";
|
|
4
|
-
import { o as buildBaseOptions } from "./transform-messages-
|
|
5
|
-
import { a as resolveResponsesReasoningEffort, n as convertResponsesMessages, o as runResponsesStreamLifecycle, r as createResponsesAssistantOutput, t as applyCommonResponsesParams } from "./openai-responses-shared-
|
|
4
|
+
import { o as buildBaseOptions } from "./transform-messages-DoWx35pj.mjs";
|
|
5
|
+
import { a as resolveResponsesReasoningEffort, n as convertResponsesMessages, o as runResponsesStreamLifecycle, r as createResponsesAssistantOutput, t as applyCommonResponsesParams } from "./openai-responses-shared-BhYsVkwW.mjs";
|
|
6
6
|
import { i as resolveAzureDeploymentNameFromMap, t as isOpenAICompatibleAzureResponsesBaseUrl } from "./azure-openai-responses-client-compat-a_O_GVQV.mjs";
|
|
7
|
-
import { a as clampOpenAIPromptCacheKey } from "./openai-tool-projection-
|
|
7
|
+
import { a as clampOpenAIPromptCacheKey } from "./openai-tool-projection-g4HuxD26.mjs";
|
|
8
8
|
import OpenAI, { AzureOpenAI } from "openai";
|
|
9
9
|
//#region packages/ai/src/providers/azure-openai-responses.ts
|
|
10
10
|
const DEFAULT_AZURE_API_VERSION = "v1";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as getEnvApiKey } from "./env-api-keys-CtMlqaQ4.mjs";
|
|
2
2
|
import { t as AssistantMessageEventStream } from "./event-stream-ReMmOTzX.mjs";
|
|
3
3
|
import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels } from "./host-4t713IeR.mjs";
|
|
4
|
-
import { o as buildBaseOptions } from "./transform-messages-
|
|
5
|
-
import { a as runGoogleGenerateContentLifecycle, i as getDisabledGoogleThinkingConfig, n as buildGoogleSimpleThinking, r as createGoogleAssistantOutput, t as buildGoogleGenerateContentParams } from "./google-shared-
|
|
4
|
+
import { o as buildBaseOptions } from "./transform-messages-DoWx35pj.mjs";
|
|
5
|
+
import { a as runGoogleGenerateContentLifecycle, i as getDisabledGoogleThinkingConfig, n as buildGoogleSimpleThinking, r as createGoogleAssistantOutput, t as buildGoogleGenerateContentParams } from "./google-shared-BeyXFAcf.mjs";
|
|
6
6
|
import { GoogleGenAI } from "@google/genai";
|
|
7
7
|
//#region packages/ai/src/providers/google.ts
|
|
8
8
|
let toolCallCounter = 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as calculateCost, r as clampThinkingLevel } from "./model-utils-
|
|
1
|
+
import { n as calculateCost, r as clampThinkingLevel } from "./model-utils-Cn9KAz3z.mjs";
|
|
2
2
|
import { t as sanitizeSurrogates } from "./sanitize-unicode-DT5o51ur.mjs";
|
|
3
|
-
import { b as stripSystemPromptCacheBoundary, i as extractToolResultText, n as describeToolResultMediaPlaceholder, t as transformMessages } from "./transform-messages-
|
|
3
|
+
import { b as stripSystemPromptCacheBoundary, i as extractToolResultText, n as describeToolResultMediaPlaceholder, t as transformMessages } from "./transform-messages-DoWx35pj.mjs";
|
|
4
4
|
import { FinishReason, FunctionCallingConfigMode } from "@google/genai";
|
|
5
5
|
//#region packages/ai/src/providers/google-shared.ts
|
|
6
6
|
/**
|
|
@@ -322,7 +322,7 @@ function buildGoogleSimpleThinking(model, options, config) {
|
|
|
322
322
|
function getDisabledGoogleThinkingConfig(model, config) {
|
|
323
323
|
const mapThinkingLevel = (level) => config?.mapThinkingLevel ? config.mapThinkingLevel(level) : level;
|
|
324
324
|
if (isGemini3ProModel(model)) return { thinkingLevel: mapThinkingLevel("LOW") };
|
|
325
|
-
if (isGemini3FlashModel(model)) return { thinkingLevel: mapThinkingLevel("MINIMAL") };
|
|
325
|
+
if (isGemini3FlashModel(model)) return { thinkingLevel: mapThinkingLevel(googleFlashSupportsMinimalThinking(model.id) ? "MINIMAL" : "LOW") };
|
|
326
326
|
if (config?.includeGemma4 && isGemma4Model(model)) return { thinkingLevel: mapThinkingLevel("MINIMAL") };
|
|
327
327
|
return { thinkingBudget: 0 };
|
|
328
328
|
}
|
|
@@ -335,6 +335,10 @@ function isGemini3ProModel(model) {
|
|
|
335
335
|
function isGemini3FlashModel(model) {
|
|
336
336
|
return /gemini-3(?:\.\d+)?-flash/.test(model.id.toLowerCase());
|
|
337
337
|
}
|
|
338
|
+
function googleFlashSupportsMinimalThinking(modelId) {
|
|
339
|
+
const match = modelId.toLowerCase().match(/(?:^|\/)gemini-3\.(\d+)-flash(?:-|$)/);
|
|
340
|
+
return !match || Number.parseInt(match[1] ?? "0", 10) < 7;
|
|
341
|
+
}
|
|
338
342
|
function getGoogleThinkingLevel(effort, model, config) {
|
|
339
343
|
if (isGemini3ProModel(model)) switch (effort) {
|
|
340
344
|
case "minimal":
|
|
@@ -349,7 +353,7 @@ function getGoogleThinkingLevel(effort, model, config) {
|
|
|
349
353
|
case "high": return "HIGH";
|
|
350
354
|
}
|
|
351
355
|
switch (effort) {
|
|
352
|
-
case "minimal": return "MINIMAL";
|
|
356
|
+
case "minimal": return isGemini3FlashModel(model) && !googleFlashSupportsMinimalThinking(model.id) ? "LOW" : "MINIMAL";
|
|
353
357
|
case "low": return "LOW";
|
|
354
358
|
case "medium": return "MEDIUM";
|
|
355
359
|
case "high": return "HIGH";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as AssistantMessageEventStream } from "./event-stream-ReMmOTzX.mjs";
|
|
2
2
|
import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels } from "./host-4t713IeR.mjs";
|
|
3
|
-
import { o as buildBaseOptions } from "./transform-messages-
|
|
4
|
-
import { a as runGoogleGenerateContentLifecycle, i as getDisabledGoogleThinkingConfig, n as buildGoogleSimpleThinking, r as createGoogleAssistantOutput, t as buildGoogleGenerateContentParams } from "./google-shared-
|
|
3
|
+
import { o as buildBaseOptions } from "./transform-messages-DoWx35pj.mjs";
|
|
4
|
+
import { a as runGoogleGenerateContentLifecycle, i as getDisabledGoogleThinkingConfig, n as buildGoogleSimpleThinking, r as createGoogleAssistantOutput, t as buildGoogleGenerateContentParams } from "./google-shared-BeyXFAcf.mjs";
|
|
5
5
|
import { GoogleGenAI, ResourceScope, ThinkingLevel } from "@google/genai";
|
|
6
6
|
//#region packages/ai/src/providers/google-vertex.ts
|
|
7
7
|
const API_VERSION = "v1";
|
|
@@ -47,6 +47,26 @@ declare const CLAUDE_SONNET_5_THINKING_PROFILE: {
|
|
|
47
47
|
}];
|
|
48
48
|
readonly defaultLevel: "high";
|
|
49
49
|
};
|
|
50
|
+
declare const CLAUDE_OPUS_5_THINKING_PROFILE: {
|
|
51
|
+
readonly levels: readonly [{
|
|
52
|
+
readonly id: "off";
|
|
53
|
+
}, {
|
|
54
|
+
readonly id: "minimal";
|
|
55
|
+
}, {
|
|
56
|
+
readonly id: "low";
|
|
57
|
+
}, {
|
|
58
|
+
readonly id: "medium";
|
|
59
|
+
}, {
|
|
60
|
+
readonly id: "high";
|
|
61
|
+
}, {
|
|
62
|
+
readonly id: "xhigh";
|
|
63
|
+
}, {
|
|
64
|
+
readonly id: "adaptive";
|
|
65
|
+
}, {
|
|
66
|
+
readonly id: "max";
|
|
67
|
+
}];
|
|
68
|
+
readonly defaultLevel: "high";
|
|
69
|
+
};
|
|
50
70
|
/** Resolve the canonical normalized Claude model id for one runtime model ref. */
|
|
51
71
|
declare function resolveClaudeModelIdentity(ref: ClaudeModelRef): string;
|
|
52
72
|
/** Resolve Claude Fable 5 through direct ids, cloud ids, or deployment metadata. */
|
|
@@ -57,6 +77,8 @@ declare function resolveClaudeMythos5ModelIdentity(ref: ClaudeModelRef): string
|
|
|
57
77
|
declare function requiresClaudeMandatoryAdaptiveThinking(ref: ClaudeModelRef): boolean;
|
|
58
78
|
/** Resolve Claude Sonnet 5 through direct ids, cloud ids, or deployment metadata. */
|
|
59
79
|
declare function resolveClaudeSonnet5ModelIdentity(ref: ClaudeModelRef): string | undefined;
|
|
80
|
+
/** Resolve Claude Opus 5 through direct ids, cloud ids, or deployment metadata. */
|
|
81
|
+
declare function resolveClaudeOpus5ModelIdentity(ref: ClaudeModelRef): string | undefined;
|
|
60
82
|
/** Return whether a Claude model supports adaptive thinking. */
|
|
61
83
|
declare function supportsClaudeAdaptiveThinking(ref: ClaudeModelRef): boolean;
|
|
62
84
|
/** Return whether a Claude model supports native max effort. */
|
|
@@ -71,4 +93,4 @@ declare function requiresClaudeDefaultSampling(ref: ClaudeModelRef): boolean;
|
|
|
71
93
|
*/
|
|
72
94
|
declare function resolveClaudeNativeThinkingLevelMap(ref: ClaudeEffortModelRef): Record<string, string | null | undefined> | undefined;
|
|
73
95
|
//#endregion
|
|
74
|
-
export {
|
|
96
|
+
export { requiresClaudeMandatoryAdaptiveThinking as a, resolveClaudeMythos5ModelIdentity as c, resolveClaudeSonnet5ModelIdentity as d, supportsClaudeAdaptiveThinking as f, requiresClaudeDefaultSampling as i, resolveClaudeNativeThinkingLevelMap as l, supportsClaudeNativeXhighEffort as m, CLAUDE_OPUS_5_THINKING_PROFILE as n, resolveClaudeFable5ModelIdentity as o, supportsClaudeNativeMaxEffort as p, CLAUDE_SONNET_5_THINKING_PROFILE as r, resolveClaudeModelIdentity as s, CLAUDE_FABLE_5_THINKING_PROFILE as t, resolveClaudeOpus5ModelIdentity as u };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as requiresClaudeMandatoryAdaptiveThinking, c as resolveClaudeMythos5ModelIdentity, d as resolveClaudeSonnet5ModelIdentity, f as supportsClaudeAdaptiveThinking, i as requiresClaudeDefaultSampling, l as resolveClaudeNativeThinkingLevelMap, m as supportsClaudeNativeXhighEffort, n as CLAUDE_OPUS_5_THINKING_PROFILE, o as resolveClaudeFable5ModelIdentity, p as supportsClaudeNativeMaxEffort, r as CLAUDE_SONNET_5_THINKING_PROFILE, s as resolveClaudeModelIdentity, t as CLAUDE_FABLE_5_THINKING_PROFILE, u as resolveClaudeOpus5ModelIdentity } from "./index-CGDEoorl.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
3
|
import { $ as VercelGatewayRouting, A as OpenRouterRouting, B as TextContent, C as KnownImagesProvider, D as ModelThinkingLevel, E as Model, F as SimpleStreamOptions, G as ThinkingLevelMap, H as ThinkingBudgets, I as StopReason, J as ToolResultMessage, K as Tool, L as StreamFn, M as ProviderImagesOptions, N as ProviderResponse, O as OpenAICompletionsCompat, P as ProviderStreamOptions, Q as ValidateToolArgumentsFn, R as StreamFunction, S as KnownImagesApi, T as Message, U as ThinkingContent, V as TextSignatureV1, W as ThinkingLevel, X as Usage, Y as Transport, Z as UserMessage, _ as ImagesOptions, a as AssistantMessageEvent, b as ImagesStopReason, c as CacheRetention, d as ImageContent, f as ImagesApi, g as ImagesModel, h as ImagesInputContent, i as AssistantMessage, j as Provider, k as OpenAIResponsesCompat, l as CompleteSimpleFn, m as ImagesFunction, n as Api, o as AssistantMessageEventStreamContract, p as ImagesContext, q as ToolCall, r as AssistantImages, s as AssistantMessageEventStreamLike, t as AnthropicMessagesCompat, u as Context, v as ImagesOutputContent, w as MaybePromise, x as KnownApi, y as ImagesProvider, z as StreamOptions } from "./types-DRgdPqaZ.mjs";
|
|
4
4
|
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-0nZeBKl2.mjs";
|
|
@@ -66,4 +66,4 @@ declare function createLlmRuntime(registry?: ApiRegistry): {
|
|
|
66
66
|
};
|
|
67
67
|
type LlmRuntime = ReturnType<typeof createLlmRuntime>;
|
|
68
68
|
//#endregion
|
|
69
|
-
export { AiTransportHost, AnthropicMessagesCompat, Api, ApiProvider, ApiRegistry, ApiStreamFunction, ApiStreamSimpleFunction, AssistantImages, AssistantMessage, AssistantMessageDiagnostic, AssistantMessageEvent, AssistantMessageEventStream, AssistantMessageEventStreamContract, AssistantMessageEventStreamLike, CLAUDE_FABLE_5_THINKING_PROFILE, CLAUDE_SONNET_5_THINKING_PROFILE, CacheRetention, CompleteSimpleFn, Context, DiagnosticErrorInfo, EventStream, ImageContent, ImagesApi, ImagesContext, ImagesFunction, ImagesInputContent, ImagesModel, ImagesOptions, ImagesOutputContent, ImagesProvider, ImagesStopReason, KnownApi, KnownImagesApi, KnownImagesProvider, LlmRuntime, MaybePromise, Message, Model, ModelThinkingLevel, OpenAICompletionsCompat, OpenAIResponsesCompat, OpenAIStrictToolSettingOptions, OpenRouterRouting, Provider, ProviderImagesOptions, ProviderResponse, ProviderStreamOptions, RegisteredApiProvider, SimpleStreamOptions, StopReason, StreamFn, StreamFunction, StreamOptions, TextContent, TextSignatureV1, ThinkingBudgets, ThinkingContent, ThinkingLevel, ThinkingLevelMap, Tool, ToolCall, ToolResultMessage, Transport, Usage, UserMessage, ValidateToolArgumentsFn, VercelGatewayRouting, appendAssistantMessageDiagnostic, configureAiTransportHost, createApiRegistry, createAssistantMessageDiagnostic, createAssistantMessageEventStream, createLlmRuntime, extractDiagnosticError, formatThrownValue, getAiTransportHost, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAiTransportHeaderSentinels, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeSonnet5ModelIdentity, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
|
|
69
|
+
export { AiTransportHost, AnthropicMessagesCompat, Api, ApiProvider, ApiRegistry, ApiStreamFunction, ApiStreamSimpleFunction, AssistantImages, AssistantMessage, AssistantMessageDiagnostic, AssistantMessageEvent, AssistantMessageEventStream, AssistantMessageEventStreamContract, AssistantMessageEventStreamLike, CLAUDE_FABLE_5_THINKING_PROFILE, CLAUDE_OPUS_5_THINKING_PROFILE, CLAUDE_SONNET_5_THINKING_PROFILE, CacheRetention, CompleteSimpleFn, Context, DiagnosticErrorInfo, EventStream, ImageContent, ImagesApi, ImagesContext, ImagesFunction, ImagesInputContent, ImagesModel, ImagesOptions, ImagesOutputContent, ImagesProvider, ImagesStopReason, KnownApi, KnownImagesApi, KnownImagesProvider, LlmRuntime, MaybePromise, Message, Model, ModelThinkingLevel, OpenAICompletionsCompat, OpenAIResponsesCompat, OpenAIStrictToolSettingOptions, OpenRouterRouting, Provider, ProviderImagesOptions, ProviderResponse, ProviderStreamOptions, RegisteredApiProvider, SimpleStreamOptions, StopReason, StreamFn, StreamFunction, StreamOptions, TextContent, TextSignatureV1, ThinkingBudgets, ThinkingContent, ThinkingLevel, ThinkingLevelMap, Tool, ToolCall, ToolResultMessage, Transport, Usage, UserMessage, ValidateToolArgumentsFn, VercelGatewayRouting, appendAssistantMessageDiagnostic, configureAiTransportHost, createApiRegistry, createAssistantMessageDiagnostic, createAssistantMessageEventStream, createLlmRuntime, extractDiagnosticError, formatThrownValue, getAiTransportHost, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAiTransportHeaderSentinels, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as requiresClaudeMandatoryAdaptiveThinking, c as resolveClaudeMythos5ModelIdentity, d as resolveClaudeSonnet5ModelIdentity, f as supportsClaudeAdaptiveThinking, i as requiresClaudeDefaultSampling, l as resolveClaudeNativeThinkingLevelMap, m as supportsClaudeNativeXhighEffort, n as CLAUDE_OPUS_5_THINKING_PROFILE, o as resolveClaudeFable5ModelIdentity, p as supportsClaudeNativeMaxEffort, r as CLAUDE_SONNET_5_THINKING_PROFILE, s as resolveClaudeModelIdentity, t as CLAUDE_FABLE_5_THINKING_PROFILE, u as resolveClaudeOpus5ModelIdentity } from "./src-CjOfhrH3.mjs";
|
|
2
2
|
import { i as formatThrownValue, n as createAssistantMessageDiagnostic, r as extractDiagnosticError, t as appendAssistantMessageDiagnostic } from "./diagnostics-COpOtRwq.mjs";
|
|
3
3
|
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-ReMmOTzX.mjs";
|
|
4
4
|
import { n as validateToolCall, t as validateToolArguments } from "./validation-FrchoOlv.mjs";
|
|
5
5
|
import { n as createApiRegistry, t as createLlmRuntime } from "./stream-CREqxHgU.mjs";
|
|
6
6
|
import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels, t as configureAiTransportHost } from "./host-4t713IeR.mjs";
|
|
7
|
-
export { AssistantMessageEventStream, CLAUDE_FABLE_5_THINKING_PROFILE, CLAUDE_SONNET_5_THINKING_PROFILE, EventStream, appendAssistantMessageDiagnostic, configureAiTransportHost, createApiRegistry, createAssistantMessageDiagnostic, createAssistantMessageEventStream, createLlmRuntime, extractDiagnosticError, formatThrownValue, getAiTransportHost, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAiTransportHeaderSentinels, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeSonnet5ModelIdentity, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
|
|
7
|
+
export { AssistantMessageEventStream, CLAUDE_FABLE_5_THINKING_PROFILE, CLAUDE_OPUS_5_THINKING_PROFILE, CLAUDE_SONNET_5_THINKING_PROFILE, EventStream, appendAssistantMessageDiagnostic, configureAiTransportHost, createApiRegistry, createAssistantMessageDiagnostic, createAssistantMessageEventStream, createLlmRuntime, extractDiagnosticError, formatThrownValue, getAiTransportHost, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAiTransportHeaderSentinels, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as requiresClaudeMandatoryAdaptiveThinking, c as resolveClaudeMythos5ModelIdentity, d as resolveClaudeSonnet5ModelIdentity, f as supportsClaudeAdaptiveThinking, i as requiresClaudeDefaultSampling, l as resolveClaudeNativeThinkingLevelMap, m as supportsClaudeNativeXhighEffort, o as resolveClaudeFable5ModelIdentity, p as supportsClaudeNativeMaxEffort, s as resolveClaudeModelIdentity, u as resolveClaudeOpus5ModelIdentity } from "../index-CGDEoorl.mjs";
|
|
2
2
|
import { t as AssistantMessageDiagnostic } from "../diagnostics-BaTA9eVl.mjs";
|
|
3
3
|
import { E as Model, F as SimpleStreamOptions, R as StreamFunction, u as Context, z as StreamOptions } from "../types-DRgdPqaZ.mjs";
|
|
4
4
|
import Anthropic from "@anthropic-ai/sdk";
|
|
@@ -98,8 +98,8 @@ declare function defaultsClaudeAdaptiveThinking(model: {
|
|
|
98
98
|
params?: Record<string, unknown>;
|
|
99
99
|
api?: string;
|
|
100
100
|
}): boolean;
|
|
101
|
-
/** Remove
|
|
102
|
-
declare function
|
|
101
|
+
/** Remove Claude 5 assistant prefills while preserving completed tool-use turns. */
|
|
102
|
+
declare function prepareClaudeNoPrefillRequestContext(model: Model, context: Context): Context;
|
|
103
103
|
declare function applyClaudeRequestContract(params: Record<string, unknown>, model: {
|
|
104
104
|
id?: string;
|
|
105
105
|
params?: Record<string, unknown>;
|
|
@@ -231,4 +231,4 @@ declare function readAnthropicUsageTokenCount(value: unknown): number | undefine
|
|
|
231
231
|
declare function readAnthropicPromptUsageSnapshot(usage: AnthropicUsagePayload): AnthropicPromptUsageSnapshot | undefined;
|
|
232
232
|
declare function readLastAnthropicIterationUsage(usage: AnthropicUsagePayload): AnthropicIterationUsageResult;
|
|
233
233
|
//#endregion
|
|
234
|
-
export { ANTHROPIC_OMITTED_REASONING_TEXT, ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, AnthropicEffort, AnthropicFallbackBoundary, AnthropicIterationUsageResult, AnthropicIterationUsageSnapshot, AnthropicOptions, AnthropicProjectedToolChoice, AnthropicPromptUsageSnapshot, AnthropicThinkingDisplay, AnthropicToolProjection, CLAUDE_FABLE_5_FALLBACK_MODEL, CLAUDE_FABLE_5_FALLBACK_MODEL_COST, applyAnthropicFallbackBoundary, applyAnthropicRefusal, applyClaudeRequestContract, buildAnthropicServerSideFallbacks, defaultsClaudeAdaptiveThinking, findActiveAnthropicToolTurnAssistantIndex, omitFoundryBearerCredentialHeaders,
|
|
234
|
+
export { ANTHROPIC_OMITTED_REASONING_TEXT, ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, AnthropicEffort, AnthropicFallbackBoundary, AnthropicIterationUsageResult, AnthropicIterationUsageSnapshot, AnthropicOptions, AnthropicProjectedToolChoice, AnthropicPromptUsageSnapshot, AnthropicThinkingDisplay, AnthropicToolProjection, CLAUDE_FABLE_5_FALLBACK_MODEL, CLAUDE_FABLE_5_FALLBACK_MODEL_COST, applyAnthropicFallbackBoundary, applyAnthropicRefusal, applyClaudeRequestContract, buildAnthropicServerSideFallbacks, defaultsClaudeAdaptiveThinking, findActiveAnthropicToolTurnAssistantIndex, omitFoundryBearerCredentialHeaders, prepareClaudeNoPrefillRequestContext, projectAnthropicTools, readAnthropicFallbackBoundary, readAnthropicPromptUsageSnapshot, readAnthropicUsageTokenCount, readLastAnthropicIterationUsage, reconcileAnthropicToolChoice, requiresClaudeAdaptiveThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity, resolveModelBoundThinkingReplayMode, resolveOriginalAnthropicToolName, streamAnthropic, streamSimpleAnthropic, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, usesClaudeFable5MessagesContract, usesClaudeStreamingRefusalContract, usesFoundryBearerAuth };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { d as
|
|
3
|
-
import { _ as readAnthropicFallbackBoundary, a as readAnthropicUsageTokenCount, b as usesFoundryBearerAuth, c as reconcileAnthropicToolChoice, d as findActiveAnthropicToolTurnAssistantIndex, f as ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, g as buildAnthropicServerSideFallbacks, h as applyAnthropicFallbackBoundary, i as readAnthropicPromptUsageSnapshot, l as resolveOriginalAnthropicToolName, m as CLAUDE_FABLE_5_FALLBACK_MODEL_COST, n as streamAnthropic, o as readLastAnthropicIterationUsage, p as CLAUDE_FABLE_5_FALLBACK_MODEL, r as streamSimpleAnthropic, s as projectAnthropicTools, u as ANTHROPIC_OMITTED_REASONING_TEXT, v as applyAnthropicRefusal, y as omitFoundryBearerCredentialHeaders } from "../anthropic-
|
|
4
|
-
export { ANTHROPIC_OMITTED_REASONING_TEXT, ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, CLAUDE_FABLE_5_FALLBACK_MODEL, CLAUDE_FABLE_5_FALLBACK_MODEL_COST, applyAnthropicFallbackBoundary, applyAnthropicRefusal, applyClaudeRequestContract, buildAnthropicServerSideFallbacks, defaultsClaudeAdaptiveThinking, findActiveAnthropicToolTurnAssistantIndex, omitFoundryBearerCredentialHeaders,
|
|
1
|
+
import { a as requiresClaudeMandatoryAdaptiveThinking, c as resolveClaudeMythos5ModelIdentity, d as resolveClaudeSonnet5ModelIdentity, f as supportsClaudeAdaptiveThinking, i as requiresClaudeDefaultSampling, l as resolveClaudeNativeThinkingLevelMap, m as supportsClaudeNativeXhighEffort, o as resolveClaudeFable5ModelIdentity, p as supportsClaudeNativeMaxEffort, s as resolveClaudeModelIdentity, u as resolveClaudeOpus5ModelIdentity } from "../src-CjOfhrH3.mjs";
|
|
2
|
+
import { d as prepareClaudeNoPrefillRequestContext, f as requiresClaudeAdaptiveThinking, h as usesClaudeStreamingRefusalContract, l as applyClaudeRequestContract, m as usesClaudeFable5MessagesContract, p as resolveModelBoundThinkingReplayMode, u as defaultsClaudeAdaptiveThinking } from "../transform-messages-DoWx35pj.mjs";
|
|
3
|
+
import { _ as readAnthropicFallbackBoundary, a as readAnthropicUsageTokenCount, b as usesFoundryBearerAuth, c as reconcileAnthropicToolChoice, d as findActiveAnthropicToolTurnAssistantIndex, f as ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, g as buildAnthropicServerSideFallbacks, h as applyAnthropicFallbackBoundary, i as readAnthropicPromptUsageSnapshot, l as resolveOriginalAnthropicToolName, m as CLAUDE_FABLE_5_FALLBACK_MODEL_COST, n as streamAnthropic, o as readLastAnthropicIterationUsage, p as CLAUDE_FABLE_5_FALLBACK_MODEL, r as streamSimpleAnthropic, s as projectAnthropicTools, u as ANTHROPIC_OMITTED_REASONING_TEXT, v as applyAnthropicRefusal, y as omitFoundryBearerCredentialHeaders } from "../anthropic-Bcdbq-l5.mjs";
|
|
4
|
+
export { ANTHROPIC_OMITTED_REASONING_TEXT, ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, CLAUDE_FABLE_5_FALLBACK_MODEL, CLAUDE_FABLE_5_FALLBACK_MODEL_COST, applyAnthropicFallbackBoundary, applyAnthropicRefusal, applyClaudeRequestContract, buildAnthropicServerSideFallbacks, defaultsClaudeAdaptiveThinking, findActiveAnthropicToolTurnAssistantIndex, omitFoundryBearerCredentialHeaders, prepareClaudeNoPrefillRequestContext, projectAnthropicTools, readAnthropicFallbackBoundary, readAnthropicPromptUsageSnapshot, readAnthropicUsageTokenCount, readLastAnthropicIterationUsage, reconcileAnthropicToolChoice, requiresClaudeAdaptiveThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity, resolveModelBoundThinkingReplayMode, resolveOriginalAnthropicToolName, streamAnthropic, streamSimpleAnthropic, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, usesClaudeFable5MessagesContract, usesClaudeStreamingRefusalContract, usesFoundryBearerAuth };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Model, F as SimpleStreamOptions, I as StopReason, O as OpenAICompletionsCompat, R as StreamFunction, u as Context, z as StreamOptions } from "../types-DRgdPqaZ.mjs";
|
|
1
|
+
import { E as Model, F as SimpleStreamOptions, I as StopReason, O as OpenAICompletionsCompat, R as StreamFunction, c as CacheRetention, u as Context, z as StreamOptions } from "../types-DRgdPqaZ.mjs";
|
|
2
2
|
import OpenAI from "openai";
|
|
3
3
|
import { TSchema } from "typebox";
|
|
4
4
|
import { ChatCompletionMessageParam } from "openai/resources/chat/completions.js";
|
|
@@ -102,6 +102,13 @@ declare function convertMessages(model: Model<"openai-completions">, context: Co
|
|
|
102
102
|
}): ChatCompletionMessageParam[];
|
|
103
103
|
//#endregion
|
|
104
104
|
//#region packages/ai/src/providers/openai-prompt-cache.d.ts
|
|
105
|
+
/** Selects the documented cache lifetime fields for a Responses request. */
|
|
106
|
+
declare function resolveOpenAIResponsesCacheParams(model: Pick<Model, "id" | "api" | "baseUrl">, cacheRetention: CacheRetention, supportsLongCacheRetention: boolean): {
|
|
107
|
+
prompt_cache_retention?: "24h";
|
|
108
|
+
prompt_cache_options?: {
|
|
109
|
+
ttl: "30m";
|
|
110
|
+
};
|
|
111
|
+
};
|
|
105
112
|
/** Maximum prompt cache key length accepted by OpenAI-compatible request metadata. */
|
|
106
113
|
declare const OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH = 64;
|
|
107
114
|
/** Truncates a prompt cache key by Unicode code point count. */
|
|
@@ -241,4 +248,4 @@ type RuntimeToolInputSchemaProjection = {
|
|
|
241
248
|
/** Projects one runtime tool input schema to JSON and reports runtime incompatibilities. */
|
|
242
249
|
declare function projectRuntimeToolInputSchema(schema: unknown, path?: string): RuntimeToolInputSchemaProjection;
|
|
243
250
|
//#endregion
|
|
244
|
-
export { AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, AzureResponsesTextContentPart, AzureResponsesTextDeltaEvent, GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH, OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, OpenAIApiReasoningEffort, OpenAICompletionsOptions, OpenAICompletionsToolChoice, OpenAIReasoningEffort, OpenAIResponsesOptions, OpenAIStopReasonResult, OpenAIToolProjection, ResponsesMessageSnapshotCollapse, ResponsesTextContentPartType, ResponsesTextDeltaEventType, RuntimeToolInputSchemaJson, RuntimeToolInputSchemaProjection, ToolParameterSchemaOptions, ToolSchemaModelCompat, clampOpenAIPromptCacheKey, cleanSchemaForGemini, clearOpenAIToolSchemaCacheForTest, convertMessages, extractToolSchemaModelCompat, findOpenAIStrictToolProjectionDiagnostics, isAzureResponsesTextDeltaEvent, isAzureResponsesTextDeltaEventType, isOpenAICompatibleAzureResponsesBaseUrl, isOpenAIGpt54MiniModel, isOpenAIGpt55Model, isOpenAIGpt56Model, isResponsesTextContentPartType, isResponsesTextDeltaEventType, isStrictOpenAIJsonSchemaCompatible, isTraditionalAzureOpenAIHost, mapOpenAIStopReason, normalizeOpenAIReasoningEffort, normalizeOpenAIStrictToolParameters, normalizeStrictOpenAIJsonSchema, normalizeToolParameterSchema, parseAzureDeploymentNameMap, projectOpenAITools, projectRuntimeToolInputSchema, reconcileOpenAICompletionsToolChoice, reconcileOpenAIResponsesToolChoice, resolveAzureDeploymentNameFromMap, resolveOpenAIProjectedToolsStrictToolFlag, resolveOpenAIReasoningEffortForModel, resolveOpenAISupportedReasoningEfforts, resolveResponsesMessageSnapshotCollapse, resolveUnsupportedToolSchemaKeywords, shouldOmitEmptyArrayItems, streamOpenAICompletions, streamOpenAIResponses, streamSimpleOpenAICompletions, streamSimpleOpenAIResponses, stripUnsupportedSchemaKeywords, supportsOpenAIReasoningEffort };
|
|
251
|
+
export { AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, AzureResponsesTextContentPart, AzureResponsesTextDeltaEvent, GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH, OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, OpenAIApiReasoningEffort, OpenAICompletionsOptions, OpenAICompletionsToolChoice, OpenAIReasoningEffort, OpenAIResponsesOptions, OpenAIStopReasonResult, OpenAIToolProjection, ResponsesMessageSnapshotCollapse, ResponsesTextContentPartType, ResponsesTextDeltaEventType, RuntimeToolInputSchemaJson, RuntimeToolInputSchemaProjection, ToolParameterSchemaOptions, ToolSchemaModelCompat, clampOpenAIPromptCacheKey, cleanSchemaForGemini, clearOpenAIToolSchemaCacheForTest, convertMessages, extractToolSchemaModelCompat, findOpenAIStrictToolProjectionDiagnostics, isAzureResponsesTextDeltaEvent, isAzureResponsesTextDeltaEventType, isOpenAICompatibleAzureResponsesBaseUrl, isOpenAIGpt54MiniModel, isOpenAIGpt55Model, isOpenAIGpt56Model, isResponsesTextContentPartType, isResponsesTextDeltaEventType, isStrictOpenAIJsonSchemaCompatible, isTraditionalAzureOpenAIHost, mapOpenAIStopReason, normalizeOpenAIReasoningEffort, normalizeOpenAIStrictToolParameters, normalizeStrictOpenAIJsonSchema, normalizeToolParameterSchema, parseAzureDeploymentNameMap, projectOpenAITools, projectRuntimeToolInputSchema, reconcileOpenAICompletionsToolChoice, reconcileOpenAIResponsesToolChoice, resolveAzureDeploymentNameFromMap, resolveOpenAIProjectedToolsStrictToolFlag, resolveOpenAIReasoningEffortForModel, resolveOpenAIResponsesCacheParams, resolveOpenAISupportedReasoningEfforts, resolveResponsesMessageSnapshotCollapse, resolveUnsupportedToolSchemaKeywords, shouldOmitEmptyArrayItems, streamOpenAICompletions, streamOpenAIResponses, streamSimpleOpenAICompletions, streamSimpleOpenAIResponses, stripUnsupportedSchemaKeywords, supportsOpenAIReasoningEffort };
|
package/dist/internal/openai.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as projectRuntimeToolInputSchema } from "../tool-schema-json-projection-BwNu3nDi.mjs";
|
|
2
|
-
import { A as extractToolSchemaModelCompat, C as isOpenAIGpt54MiniModel, D as resolveOpenAIReasoningEffortForModel, E as normalizeOpenAIReasoningEffort, F as GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, I as cleanSchemaForGemini, M as resolveUnsupportedToolSchemaKeywords, N as shouldOmitEmptyArrayItems, O as resolveOpenAISupportedReasoningEfforts, P as stripUnsupportedSchemaKeywords, S as resolveResponsesMessageSnapshotCollapse, T as isOpenAIGpt56Model, _ as OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, b as isResponsesTextContentPartType, c as clearOpenAIToolSchemaCacheForTest, d as normalizeOpenAIStrictToolParameters, f as normalizeStrictOpenAIJsonSchema, g as OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, h as AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, j as normalizeToolParameterSchema, k as supportsOpenAIReasoningEffort, l as findOpenAIStrictToolProjectionDiagnostics, m as AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, p as resolveOpenAIProjectedToolsStrictToolFlag, u as isStrictOpenAIJsonSchemaCompatible, v as isAzureResponsesTextDeltaEvent, w as isOpenAIGpt55Model, x as isResponsesTextDeltaEventType, y as isAzureResponsesTextDeltaEventType } from "../openai-responses-shared-
|
|
2
|
+
import { A as extractToolSchemaModelCompat, C as isOpenAIGpt54MiniModel, D as resolveOpenAIReasoningEffortForModel, E as normalizeOpenAIReasoningEffort, F as GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, I as cleanSchemaForGemini, M as resolveUnsupportedToolSchemaKeywords, N as shouldOmitEmptyArrayItems, O as resolveOpenAISupportedReasoningEfforts, P as stripUnsupportedSchemaKeywords, S as resolveResponsesMessageSnapshotCollapse, T as isOpenAIGpt56Model, _ as OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, b as isResponsesTextContentPartType, c as clearOpenAIToolSchemaCacheForTest, d as normalizeOpenAIStrictToolParameters, f as normalizeStrictOpenAIJsonSchema, g as OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, h as AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, j as normalizeToolParameterSchema, k as supportsOpenAIReasoningEffort, l as findOpenAIStrictToolProjectionDiagnostics, m as AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, p as resolveOpenAIProjectedToolsStrictToolFlag, u as isStrictOpenAIJsonSchemaCompatible, v as isAzureResponsesTextDeltaEvent, w as isOpenAIGpt55Model, x as isResponsesTextDeltaEventType, y as isAzureResponsesTextDeltaEventType } from "../openai-responses-shared-BhYsVkwW.mjs";
|
|
3
3
|
import { i as resolveAzureDeploymentNameFromMap, n as isTraditionalAzureOpenAIHost, r as parseAzureDeploymentNameMap, t as isOpenAICompatibleAzureResponsesBaseUrl } from "../azure-openai-responses-client-compat-a_O_GVQV.mjs";
|
|
4
|
-
import { a as clampOpenAIPromptCacheKey, i as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH, n as reconcileOpenAICompletionsToolChoice, r as reconcileOpenAIResponsesToolChoice, t as projectOpenAITools } from "../openai-tool-projection-
|
|
5
|
-
import { a as mapOpenAIStopReason, i as streamSimpleOpenAICompletions, r as streamOpenAICompletions, t as convertMessages } from "../openai-completions-
|
|
6
|
-
import { n as streamOpenAIResponses, r as streamSimpleOpenAIResponses } from "../openai-responses-
|
|
7
|
-
export { AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH, OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, clampOpenAIPromptCacheKey, cleanSchemaForGemini, clearOpenAIToolSchemaCacheForTest, convertMessages, extractToolSchemaModelCompat, findOpenAIStrictToolProjectionDiagnostics, isAzureResponsesTextDeltaEvent, isAzureResponsesTextDeltaEventType, isOpenAICompatibleAzureResponsesBaseUrl, isOpenAIGpt54MiniModel, isOpenAIGpt55Model, isOpenAIGpt56Model, isResponsesTextContentPartType, isResponsesTextDeltaEventType, isStrictOpenAIJsonSchemaCompatible, isTraditionalAzureOpenAIHost, mapOpenAIStopReason, normalizeOpenAIReasoningEffort, normalizeOpenAIStrictToolParameters, normalizeStrictOpenAIJsonSchema, normalizeToolParameterSchema, parseAzureDeploymentNameMap, projectOpenAITools, projectRuntimeToolInputSchema, reconcileOpenAICompletionsToolChoice, reconcileOpenAIResponsesToolChoice, resolveAzureDeploymentNameFromMap, resolveOpenAIProjectedToolsStrictToolFlag, resolveOpenAIReasoningEffortForModel, resolveOpenAISupportedReasoningEfforts, resolveResponsesMessageSnapshotCollapse, resolveUnsupportedToolSchemaKeywords, shouldOmitEmptyArrayItems, streamOpenAICompletions, streamOpenAIResponses, streamSimpleOpenAICompletions, streamSimpleOpenAIResponses, stripUnsupportedSchemaKeywords, supportsOpenAIReasoningEffort };
|
|
4
|
+
import { a as clampOpenAIPromptCacheKey, i as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH, n as reconcileOpenAICompletionsToolChoice, o as resolveOpenAIResponsesCacheParams, r as reconcileOpenAIResponsesToolChoice, t as projectOpenAITools } from "../openai-tool-projection-g4HuxD26.mjs";
|
|
5
|
+
import { a as mapOpenAIStopReason, i as streamSimpleOpenAICompletions, r as streamOpenAICompletions, t as convertMessages } from "../openai-completions-BUlMEeBc.mjs";
|
|
6
|
+
import { n as streamOpenAIResponses, r as streamSimpleOpenAIResponses } from "../openai-responses-DW61C22l.mjs";
|
|
7
|
+
export { AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH, OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, clampOpenAIPromptCacheKey, cleanSchemaForGemini, clearOpenAIToolSchemaCacheForTest, convertMessages, extractToolSchemaModelCompat, findOpenAIStrictToolProjectionDiagnostics, isAzureResponsesTextDeltaEvent, isAzureResponsesTextDeltaEventType, isOpenAICompatibleAzureResponsesBaseUrl, isOpenAIGpt54MiniModel, isOpenAIGpt55Model, isOpenAIGpt56Model, isResponsesTextContentPartType, isResponsesTextDeltaEventType, isStrictOpenAIJsonSchemaCompatible, isTraditionalAzureOpenAIHost, mapOpenAIStopReason, normalizeOpenAIReasoningEffort, normalizeOpenAIStrictToolParameters, normalizeStrictOpenAIJsonSchema, normalizeToolParameterSchema, parseAzureDeploymentNameMap, projectOpenAITools, projectRuntimeToolInputSchema, reconcileOpenAICompletionsToolChoice, reconcileOpenAIResponsesToolChoice, resolveAzureDeploymentNameFromMap, resolveOpenAIProjectedToolsStrictToolFlag, resolveOpenAIReasoningEffortForModel, resolveOpenAIResponsesCacheParams, resolveOpenAISupportedReasoningEfforts, resolveResponsesMessageSnapshotCollapse, resolveUnsupportedToolSchemaKeywords, shouldOmitEmptyArrayItems, streamOpenAICompletions, streamOpenAIResponses, streamSimpleOpenAICompletions, streamSimpleOpenAIResponses, stripUnsupportedSchemaKeywords, supportsOpenAIReasoningEffort };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as getEnvApiKey, t as findEnvKeys } from "../env-api-keys-CtMlqaQ4.mjs";
|
|
2
2
|
import { n as createApiRegistry, t as createLlmRuntime } from "../stream-CREqxHgU.mjs";
|
|
3
|
-
import { a as modelsAreEqual, i as getSupportedThinkingLevels, n as calculateCost, r as clampThinkingLevel, t as applyProviderReportedUsageCost } from "../model-utils-
|
|
3
|
+
import { a as modelsAreEqual, i as getSupportedThinkingLevels, n as calculateCost, r as clampThinkingLevel, t as applyProviderReportedUsageCost } from "../model-utils-Cn9KAz3z.mjs";
|
|
4
4
|
import { n as onLlmRequestActivity, r as createDeferredEventBuffer, t as notifyLlmRequestActivity } from "../llm-request-activity-CehVkZP-.mjs";
|
|
5
5
|
import { t as headersToRecord } from "../headers-B_e4-1J0.mjs";
|
|
6
6
|
import { n as parseStreamingJson, r as repairJson, t as parseJsonWithRepair } from "../json-parse-DzNSIQBq.mjs";
|
package/dist/internal/shared.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as sanitizeSurrogates } from "../sanitize-unicode-DT5o51ur.mjs";
|
|
2
|
-
import { S as normalizeStructuredPromptSection, _ as ensureSystemPromptCacheBoundary, a as adjustMaxTokensForThinking, b as stripSystemPromptCacheBoundary, g as SYSTEM_PROMPT_CACHE_BOUNDARY, i as extractToolResultText, n as describeToolResultMediaPlaceholder, o as buildBaseOptions, r as extractToolResultBlockText, s as clampReasoning, t as transformMessages, v as prependSystemPromptAdditionAfterCacheBoundary, x as normalizePromptCapabilityIds, y as splitSystemPromptCacheBoundary } from "../transform-messages-
|
|
2
|
+
import { S as normalizeStructuredPromptSection, _ as ensureSystemPromptCacheBoundary, a as adjustMaxTokensForThinking, b as stripSystemPromptCacheBoundary, g as SYSTEM_PROMPT_CACHE_BOUNDARY, i as extractToolResultText, n as describeToolResultMediaPlaceholder, o as buildBaseOptions, r as extractToolResultBlockText, s as clampReasoning, t as transformMessages, v as prependSystemPromptAdditionAfterCacheBoundary, x as normalizePromptCapabilityIds, y as splitSystemPromptCacheBoundary } from "../transform-messages-DoWx35pj.mjs";
|
|
3
3
|
export { SYSTEM_PROMPT_CACHE_BOUNDARY, adjustMaxTokensForThinking, buildBaseOptions, clampReasoning, describeToolResultMediaPlaceholder, ensureSystemPromptCacheBoundary, extractToolResultBlockText, extractToolResultText, normalizePromptCapabilityIds, normalizeStructuredPromptSection, prependSystemPromptAdditionAfterCacheBoundary, sanitizeSurrogates, splitSystemPromptCacheBoundary, stripSystemPromptCacheBoundary, transformMessages };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as getEnvApiKey } from "./env-api-keys-CtMlqaQ4.mjs";
|
|
2
2
|
import { t as AssistantMessageEventStream } from "./event-stream-ReMmOTzX.mjs";
|
|
3
3
|
import { n as getAiTransportHost } from "./host-4t713IeR.mjs";
|
|
4
|
-
import { n as calculateCost, r as clampThinkingLevel } from "./model-utils-
|
|
4
|
+
import { n as calculateCost, r as clampThinkingLevel } from "./model-utils-Cn9KAz3z.mjs";
|
|
5
5
|
import { n as parseStreamingJson } from "./json-parse-DzNSIQBq.mjs";
|
|
6
6
|
import { t as sanitizeSurrogates } from "./sanitize-unicode-DT5o51ur.mjs";
|
|
7
|
-
import { b as stripSystemPromptCacheBoundary, i as extractToolResultText, n as describeToolResultMediaPlaceholder, o as buildBaseOptions, t as transformMessages } from "./transform-messages-
|
|
7
|
+
import { b as stripSystemPromptCacheBoundary, i as extractToolResultText, n as describeToolResultMediaPlaceholder, o as buildBaseOptions, t as transformMessages } from "./transform-messages-DoWx35pj.mjs";
|
|
8
8
|
import { t as shortHash } from "./hash-CHgqbJmD.mjs";
|
|
9
9
|
import { t as createSseByteGuard } from "./streaming-byte-guard-BrbkbwUu.mjs";
|
|
10
10
|
import { HTTPClient, Mistral } from "@mistralai/mistralai";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as requiresClaudeMandatoryAdaptiveThinking, l as resolveClaudeNativeThinkingLevelMap } from "./src-CjOfhrH3.mjs";
|
|
2
2
|
//#region packages/ai/src/model-utils.ts
|
|
3
3
|
/** Calculates and stores model cost fields from token usage and per-million pricing. */
|
|
4
4
|
function calculateCost(model, usage) {
|
package/dist/{openai-chatgpt-responses-BHqbcipc.mjs → openai-chatgpt-responses-M2RVpycr.mjs}
RENAMED
|
@@ -3,10 +3,10 @@ import { i as formatThrownValue, n as createAssistantMessageDiagnostic, t as app
|
|
|
3
3
|
import { t as AssistantMessageEventStream } from "./event-stream-ReMmOTzX.mjs";
|
|
4
4
|
import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels } from "./host-4t713IeR.mjs";
|
|
5
5
|
import { t as headersToRecord } from "./headers-B_e4-1J0.mjs";
|
|
6
|
-
import { b as stripSystemPromptCacheBoundary, o as buildBaseOptions } from "./transform-messages-
|
|
7
|
-
import { a as resolveResponsesReasoningEffort, i as processResponsesStream, n as convertResponsesMessages, s as convertResponsesToolPayload } from "./openai-responses-shared-
|
|
6
|
+
import { b as stripSystemPromptCacheBoundary, o as buildBaseOptions } from "./transform-messages-DoWx35pj.mjs";
|
|
7
|
+
import { a as resolveResponsesReasoningEffort, i as processResponsesStream, n as convertResponsesMessages, s as convertResponsesToolPayload } from "./openai-responses-shared-BhYsVkwW.mjs";
|
|
8
8
|
import { i as getFirstStreamEventTimeoutMs, o as clampTimerTimeoutMs, r as getFirstStreamEventTimeoutHandler, s as resolveTimerTimeoutMs, t as createFirstStreamEventAbortController } from "./stream-first-event-timeout-RjWszj8c.mjs";
|
|
9
|
-
import { a as clampOpenAIPromptCacheKey } from "./openai-tool-projection-
|
|
9
|
+
import { a as clampOpenAIPromptCacheKey } from "./openai-tool-projection-g4HuxD26.mjs";
|
|
10
10
|
import { i as registerSessionResourceCleanup, n as resolveOpenAICodexAccountId } from "./openai-chatgpt-jwt-DhAAzLkj.mjs";
|
|
11
11
|
import { t as createSseByteGuard } from "./streaming-byte-guard-BrbkbwUu.mjs";
|
|
12
12
|
//#region packages/ai/src/providers/openai-chatgpt-responses.ts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { n as getEnvApiKey, r as __exportAll } from "./env-api-keys-CtMlqaQ4.mjs";
|
|
2
2
|
import { t as AssistantMessageEventStream } from "./event-stream-ReMmOTzX.mjs";
|
|
3
3
|
import { n as getAiTransportHost } from "./host-4t713IeR.mjs";
|
|
4
|
-
import { n as calculateCost, r as clampThinkingLevel, t as applyProviderReportedUsageCost } from "./model-utils-
|
|
4
|
+
import { n as calculateCost, r as clampThinkingLevel, t as applyProviderReportedUsageCost } from "./model-utils-Cn9KAz3z.mjs";
|
|
5
5
|
import { t as headersToRecord } from "./headers-B_e4-1J0.mjs";
|
|
6
6
|
import { n as parseStreamingJson } from "./json-parse-DzNSIQBq.mjs";
|
|
7
7
|
import { t as sanitizeSurrogates } from "./sanitize-unicode-DT5o51ur.mjs";
|
|
8
|
-
import { b as stripSystemPromptCacheBoundary, i as extractToolResultText, n as describeToolResultMediaPlaceholder, o as buildBaseOptions, t as transformMessages, y as splitSystemPromptCacheBoundary } from "./transform-messages-
|
|
8
|
+
import { b as stripSystemPromptCacheBoundary, i as extractToolResultText, n as describeToolResultMediaPlaceholder, o as buildBaseOptions, t as transformMessages, y as splitSystemPromptCacheBoundary } from "./transform-messages-DoWx35pj.mjs";
|
|
9
9
|
import { a as resolveCacheRetention, i as resolveCloudflareBaseUrl, n as hasCopilotVisionInput, r as isCloudflareProvider, t as buildCopilotDynamicHeaders } from "./github-copilot-headers-BsH5cqGj.mjs";
|
|
10
10
|
import { t as createReasoningTagTextPartitioner } from "./reasoning-tag-text-partitioner-axhAdUwg.mjs";
|
|
11
11
|
import { a as withFirstStreamEventTimeout, i as getFirstStreamEventTimeoutMs, r as getFirstStreamEventTimeoutHandler, t as createFirstStreamEventAbortController } from "./stream-first-event-timeout-RjWszj8c.mjs";
|
|
12
|
-
import { a as clampOpenAIPromptCacheKey, n as reconcileOpenAICompletionsToolChoice, t as projectOpenAITools } from "./openai-tool-projection-
|
|
12
|
+
import { a as clampOpenAIPromptCacheKey, n as reconcileOpenAICompletionsToolChoice, t as projectOpenAITools } from "./openai-tool-projection-g4HuxD26.mjs";
|
|
13
13
|
import OpenAI from "openai";
|
|
14
14
|
//#region packages/ai/src/providers/openai-stop-reason.ts
|
|
15
15
|
function mapOpenAIStopReason(reason, options) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as getEnvApiKey, r as __exportAll } from "./env-api-keys-CtMlqaQ4.mjs";
|
|
2
2
|
import { t as AssistantMessageEventStream } from "./event-stream-ReMmOTzX.mjs";
|
|
3
3
|
import { n as getAiTransportHost } from "./host-4t713IeR.mjs";
|
|
4
|
-
import { o as buildBaseOptions } from "./transform-messages-
|
|
4
|
+
import { o as buildBaseOptions } from "./transform-messages-DoWx35pj.mjs";
|
|
5
5
|
import { a as resolveCacheRetention, i as resolveCloudflareBaseUrl, n as hasCopilotVisionInput, r as isCloudflareProvider, t as buildCopilotDynamicHeaders } from "./github-copilot-headers-BsH5cqGj.mjs";
|
|
6
|
-
import { a as resolveResponsesReasoningEffort, n as convertResponsesMessages, o as runResponsesStreamLifecycle, r as createResponsesAssistantOutput, t as applyCommonResponsesParams } from "./openai-responses-shared-
|
|
7
|
-
import { a as clampOpenAIPromptCacheKey } from "./openai-tool-projection-
|
|
6
|
+
import { a as resolveResponsesReasoningEffort, n as convertResponsesMessages, o as runResponsesStreamLifecycle, r as createResponsesAssistantOutput, t as applyCommonResponsesParams } from "./openai-responses-shared-BhYsVkwW.mjs";
|
|
7
|
+
import { a as clampOpenAIPromptCacheKey, o as resolveOpenAIResponsesCacheParams } from "./openai-tool-projection-g4HuxD26.mjs";
|
|
8
8
|
import OpenAI from "openai";
|
|
9
9
|
//#region packages/ai/src/providers/openai-responses.ts
|
|
10
10
|
var openai_responses_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -18,9 +18,6 @@ function getCompat(model) {
|
|
|
18
18
|
supportsLongCacheRetention: model.compat?.supportsLongCacheRetention ?? true
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
function getPromptCacheRetention(compat, cacheRetention) {
|
|
22
|
-
return cacheRetention === "long" && compat.supportsLongCacheRetention ? "24h" : void 0;
|
|
23
|
-
}
|
|
24
21
|
function formatOpenAIResponsesError(error) {
|
|
25
22
|
if (error instanceof Error) {
|
|
26
23
|
const status = error.status;
|
|
@@ -107,7 +104,7 @@ function buildParams(model, context, options) {
|
|
|
107
104
|
input: messages,
|
|
108
105
|
stream: true,
|
|
109
106
|
prompt_cache_key: cacheRetention === "none" ? void 0 : clampOpenAIPromptCacheKey(options?.promptCacheKey ?? options?.sessionId),
|
|
110
|
-
|
|
107
|
+
...resolveOpenAIResponsesCacheParams(model, cacheRetention, compat.supportsLongCacheRetention),
|
|
111
108
|
store: false
|
|
112
109
|
};
|
|
113
110
|
if (options?.maxTokens) params.max_output_tokens = options?.maxTokens;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { n as getAiTransportHost } from "./host-4t713IeR.mjs";
|
|
2
|
-
import { n as calculateCost, r as clampThinkingLevel } from "./model-utils-
|
|
2
|
+
import { n as calculateCost, r as clampThinkingLevel } from "./model-utils-Cn9KAz3z.mjs";
|
|
3
3
|
import { t as headersToRecord } from "./headers-B_e4-1J0.mjs";
|
|
4
4
|
import { n as parseStreamingJson } from "./json-parse-DzNSIQBq.mjs";
|
|
5
5
|
import { t as sanitizeSurrogates } from "./sanitize-unicode-DT5o51ur.mjs";
|
|
6
|
-
import { C as normalizeLowercaseStringOrEmpty, b as stripSystemPromptCacheBoundary, c as isRecord, i as extractToolResultText, n as describeToolResultMediaPlaceholder, t as transformMessages, w as normalizeOptionalString } from "./transform-messages-
|
|
6
|
+
import { C as normalizeLowercaseStringOrEmpty, b as stripSystemPromptCacheBoundary, c as isRecord, i as extractToolResultText, n as describeToolResultMediaPlaceholder, t as transformMessages, w as normalizeOptionalString } from "./transform-messages-DoWx35pj.mjs";
|
|
7
7
|
import { a as withFirstStreamEventTimeout, i as getFirstStreamEventTimeoutMs, r as getFirstStreamEventTimeoutHandler, t as createFirstStreamEventAbortController } from "./stream-first-event-timeout-RjWszj8c.mjs";
|
|
8
|
-
import { t as projectOpenAITools } from "./openai-tool-projection-
|
|
8
|
+
import { t as projectOpenAITools } from "./openai-tool-projection-g4HuxD26.mjs";
|
|
9
9
|
import { t as shortHash } from "./hash-CHgqbJmD.mjs";
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
11
11
|
//#region packages/normalization-core/src/string-normalization.ts
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import { c as isRecord } from "./transform-messages-
|
|
1
|
+
import { c as isRecord } from "./transform-messages-DoWx35pj.mjs";
|
|
2
2
|
import { t as projectRuntimeToolInputSchema } from "./tool-schema-json-projection-BwNu3nDi.mjs";
|
|
3
3
|
//#region packages/ai/src/providers/openai-prompt-cache.ts
|
|
4
|
+
/** Selects the documented cache lifetime fields for a Responses request. */
|
|
5
|
+
function resolveOpenAIResponsesCacheParams(model, cacheRetention, supportsLongCacheRetention) {
|
|
6
|
+
if (cacheRetention === "none") return {};
|
|
7
|
+
if (model.id === "gpt-6-astra" && model.api === "openai-responses") {
|
|
8
|
+
const endpoint = URL.parse(model.baseUrl ?? "https://api.openai.com/v1");
|
|
9
|
+
if (endpoint?.protocol === "https:" && (endpoint.hostname === "api.openai.com" || endpoint.hostname.endsWith(".api.openai.com"))) return { prompt_cache_options: { ttl: "30m" } };
|
|
10
|
+
}
|
|
11
|
+
return cacheRetention === "long" && supportsLongCacheRetention ? { prompt_cache_retention: "24h" } : {};
|
|
12
|
+
}
|
|
4
13
|
/** Maximum prompt cache key length accepted by OpenAI-compatible request metadata. */
|
|
5
14
|
const OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH = 64;
|
|
6
15
|
/** Truncates a prompt cache key by Unicode code point count. */
|
|
@@ -192,4 +201,4 @@ function reconcileOpenAICompletionsToolChoice(choice, projection) {
|
|
|
192
201
|
};
|
|
193
202
|
}
|
|
194
203
|
//#endregion
|
|
195
|
-
export { clampOpenAIPromptCacheKey as a, OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH as i, reconcileOpenAICompletionsToolChoice as n, reconcileOpenAIResponsesToolChoice as r, projectOpenAITools as t };
|
|
204
|
+
export { clampOpenAIPromptCacheKey as a, OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH as i, reconcileOpenAICompletionsToolChoice as n, resolveOpenAIResponsesCacheParams as o, reconcileOpenAIResponsesToolChoice as r, projectOpenAITools as t };
|
package/dist/providers.mjs
CHANGED
|
@@ -63,35 +63,35 @@ function createLazyRegistration(api, importModule, select) {
|
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
const registerBuiltIns = [
|
|
66
|
-
createLazyRegistration("anthropic-messages", () => import("./anthropic-
|
|
66
|
+
createLazyRegistration("anthropic-messages", () => import("./anthropic-Bcdbq-l5.mjs").then((n) => n.t), (module) => ({
|
|
67
67
|
stream: module.streamAnthropic,
|
|
68
68
|
streamSimple: module.streamSimpleAnthropic
|
|
69
69
|
})),
|
|
70
|
-
createLazyRegistration("openai-completions", () => import("./openai-completions-
|
|
70
|
+
createLazyRegistration("openai-completions", () => import("./openai-completions-BUlMEeBc.mjs").then((n) => n.n), (module) => ({
|
|
71
71
|
stream: module.streamOpenAICompletions,
|
|
72
72
|
streamSimple: module.streamSimpleOpenAICompletions
|
|
73
73
|
})),
|
|
74
|
-
createLazyRegistration("mistral-conversations", () => import("./mistral-
|
|
74
|
+
createLazyRegistration("mistral-conversations", () => import("./mistral-CBm3OQWD.mjs"), (module) => ({
|
|
75
75
|
stream: module.streamMistral,
|
|
76
76
|
streamSimple: module.streamSimpleMistral
|
|
77
77
|
})),
|
|
78
|
-
createLazyRegistration("openai-responses", () => import("./openai-responses-
|
|
78
|
+
createLazyRegistration("openai-responses", () => import("./openai-responses-DW61C22l.mjs").then((n) => n.t), (module) => ({
|
|
79
79
|
stream: module.streamOpenAIResponses,
|
|
80
80
|
streamSimple: module.streamSimpleOpenAIResponses
|
|
81
81
|
})),
|
|
82
|
-
createLazyRegistration("azure-openai-responses", () => import("./azure-openai-responses-
|
|
82
|
+
createLazyRegistration("azure-openai-responses", () => import("./azure-openai-responses-2xhpNPWg.mjs"), (module) => ({
|
|
83
83
|
stream: module.streamAzureOpenAIResponses,
|
|
84
84
|
streamSimple: module.streamSimpleAzureOpenAIResponses
|
|
85
85
|
})),
|
|
86
|
-
createLazyRegistration("openai-chatgpt-responses", () => import("./openai-chatgpt-responses-
|
|
86
|
+
createLazyRegistration("openai-chatgpt-responses", () => import("./openai-chatgpt-responses-M2RVpycr.mjs"), (module) => ({
|
|
87
87
|
stream: module.streamOpenAICodexResponses,
|
|
88
88
|
streamSimple: module.streamSimpleOpenAICodexResponses
|
|
89
89
|
})),
|
|
90
|
-
createLazyRegistration("google-generative-ai", () => import("./google-
|
|
90
|
+
createLazyRegistration("google-generative-ai", () => import("./google-C6P31moq.mjs"), (module) => ({
|
|
91
91
|
stream: module.streamGoogle,
|
|
92
92
|
streamSimple: module.streamSimpleGoogle
|
|
93
93
|
})),
|
|
94
|
-
createLazyRegistration("google-vertex", () => import("./google-vertex
|
|
94
|
+
createLazyRegistration("google-vertex", () => import("./google-vertex--9_gT74B.mjs"), (module) => ({
|
|
95
95
|
stream: module.streamGoogleVertex,
|
|
96
96
|
streamSimple: module.streamSimpleGoogleVertex
|
|
97
97
|
}))
|
|
@@ -31,6 +31,7 @@ const CLAUDE_SONNET_5_THINKING_PROFILE = {
|
|
|
31
31
|
],
|
|
32
32
|
defaultLevel: "high"
|
|
33
33
|
};
|
|
34
|
+
const CLAUDE_OPUS_5_THINKING_PROFILE = CLAUDE_SONNET_5_THINKING_PROFILE;
|
|
34
35
|
/** Resolve the canonical normalized Claude model id for one runtime model ref. */
|
|
35
36
|
function resolveClaudeModelIdentity(ref) {
|
|
36
37
|
const normalized = normalizeClaudeModelId((typeof ref.params?.canonicalModelId === "string" ? ref.params.canonicalModelId : void 0) ?? ref.id);
|
|
@@ -63,20 +64,27 @@ function resolveClaudeSonnet5ModelIdentity(ref) {
|
|
|
63
64
|
if (!match) return;
|
|
64
65
|
return normalized.slice((match.index ?? 0) + (match[0].startsWith("-") ? 1 : 0));
|
|
65
66
|
}
|
|
67
|
+
/** Resolve Claude Opus 5 through direct ids, cloud ids, or deployment metadata. */
|
|
68
|
+
function resolveClaudeOpus5ModelIdentity(ref) {
|
|
69
|
+
const normalized = resolveClaudeModelIdentity(ref);
|
|
70
|
+
const match = /(?:^|-)claude-opus-5(?=$|[^a-z0-9])/.exec(normalized);
|
|
71
|
+
if (!match) return;
|
|
72
|
+
return normalized.slice((match.index ?? 0) + (match[0].startsWith("-") ? 1 : 0));
|
|
73
|
+
}
|
|
66
74
|
/** Return whether a Claude model supports adaptive thinking. */
|
|
67
75
|
function supportsClaudeAdaptiveThinking(ref) {
|
|
68
76
|
const modelId = resolveClaudeModelIdentity(ref);
|
|
69
|
-
return /(?:^|-)claude-(?:fable-5|mythos-(?:5|preview)|opus-4-(?:6|7|8)|sonnet-(?:5|4-6))(?=$|[^a-z0-9])/.test(modelId);
|
|
77
|
+
return /(?:^|-)claude-(?:fable-5|mythos-(?:5|preview)|opus-(?:4-(?:6|7|8)|5)|sonnet-(?:5|4-6))(?=$|[^a-z0-9])/.test(modelId);
|
|
70
78
|
}
|
|
71
79
|
/** Return whether a Claude model supports native max effort. */
|
|
72
80
|
function supportsClaudeNativeMaxEffort(ref) {
|
|
73
81
|
const modelId = resolveClaudeModelIdentity(ref);
|
|
74
|
-
return /(?:^|-)claude-(?:fable-5|mythos-5|opus-4-(?:6|7|8)|sonnet-(?:5|4-6))(?=$|[^a-z0-9])/.test(modelId);
|
|
82
|
+
return /(?:^|-)claude-(?:fable-5|mythos-5|opus-(?:4-(?:6|7|8)|5)|sonnet-(?:5|4-6))(?=$|[^a-z0-9])/.test(modelId);
|
|
75
83
|
}
|
|
76
84
|
/** Return whether a Claude model supports native xhigh effort. */
|
|
77
85
|
function supportsClaudeNativeXhighEffort(ref) {
|
|
78
86
|
const modelId = resolveClaudeModelIdentity(ref);
|
|
79
|
-
return /(?:^|-)claude-(?:fable-5|mythos-5|opus-4-(?:7|8)|sonnet-5)(?=$|[^a-z0-9])/.test(modelId);
|
|
87
|
+
return /(?:^|-)claude-(?:fable-5|mythos-5|opus-(?:4-(?:7|8)|5)|sonnet-5)(?=$|[^a-z0-9])/.test(modelId);
|
|
80
88
|
}
|
|
81
89
|
/** Return whether a Claude model rejects caller-selected sampling parameters. */
|
|
82
90
|
function requiresClaudeDefaultSampling(ref) {
|
|
@@ -96,4 +104,4 @@ function resolveClaudeNativeThinkingLevelMap(ref) {
|
|
|
96
104
|
};
|
|
97
105
|
}
|
|
98
106
|
//#endregion
|
|
99
|
-
export {
|
|
107
|
+
export { requiresClaudeMandatoryAdaptiveThinking as a, resolveClaudeMythos5ModelIdentity as c, resolveClaudeSonnet5ModelIdentity as d, supportsClaudeAdaptiveThinking as f, requiresClaudeDefaultSampling as i, resolveClaudeNativeThinkingLevelMap as l, supportsClaudeNativeXhighEffort as m, CLAUDE_OPUS_5_THINKING_PROFILE as n, resolveClaudeFable5ModelIdentity as o, supportsClaudeNativeMaxEffort as p, CLAUDE_SONNET_5_THINKING_PROFILE as r, resolveClaudeModelIdentity as s, CLAUDE_FABLE_5_THINKING_PROFILE as t, resolveClaudeOpus5ModelIdentity as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as requiresClaudeMandatoryAdaptiveThinking, c as resolveClaudeMythos5ModelIdentity, d as resolveClaudeSonnet5ModelIdentity, i as requiresClaudeDefaultSampling, o as resolveClaudeFable5ModelIdentity, u as resolveClaudeOpus5ModelIdentity } from "./src-CjOfhrH3.mjs";
|
|
2
2
|
import { n as getAiTransportHost } from "./host-4t713IeR.mjs";
|
|
3
3
|
import { t as sanitizeSurrogates } from "./sanitize-unicode-DT5o51ur.mjs";
|
|
4
4
|
//#region packages/normalization-core/src/string-coerce.ts
|
|
@@ -96,7 +96,7 @@ function usesClaudeFable5MessagesContract(model) {
|
|
|
96
96
|
/** Return whether streamed output must wait for the terminal refusal decision. */
|
|
97
97
|
function usesClaudeStreamingRefusalContract(model) {
|
|
98
98
|
if (normalizeApi(model.api) !== "anthropic-messages") return false;
|
|
99
|
-
return resolveClaudeFable5ModelIdentity(model) !== void 0 || resolveClaudeMythos5ModelIdentity(model) !== void 0 || resolveClaudeSonnet5ModelIdentity(model) !== void 0;
|
|
99
|
+
return resolveClaudeFable5ModelIdentity(model) !== void 0 || resolveClaudeMythos5ModelIdentity(model) !== void 0 || resolveClaudeSonnet5ModelIdentity(model) !== void 0 || resolveClaudeOpus5ModelIdentity(model) !== void 0;
|
|
100
100
|
}
|
|
101
101
|
function requiresClaudeAdaptiveThinking(model) {
|
|
102
102
|
if (normalizeApi(model.api) !== "anthropic-messages") return false;
|
|
@@ -104,11 +104,11 @@ function requiresClaudeAdaptiveThinking(model) {
|
|
|
104
104
|
}
|
|
105
105
|
/** Return whether omitted thinking should default to adaptive/high. */
|
|
106
106
|
function defaultsClaudeAdaptiveThinking(model) {
|
|
107
|
-
return requiresClaudeAdaptiveThinking(model) || normalizeApi(model.api) === "anthropic-messages" && resolveClaudeSonnet5ModelIdentity(model) !== void 0;
|
|
107
|
+
return requiresClaudeAdaptiveThinking(model) || normalizeApi(model.api) === "anthropic-messages" && (resolveClaudeSonnet5ModelIdentity(model) !== void 0 || resolveClaudeOpus5ModelIdentity(model) !== void 0);
|
|
108
108
|
}
|
|
109
|
-
/** Remove
|
|
110
|
-
function
|
|
111
|
-
if (!resolveClaudeSonnet5ModelIdentity(model)) return context;
|
|
109
|
+
/** Remove Claude 5 assistant prefills while preserving completed tool-use turns. */
|
|
110
|
+
function prepareClaudeNoPrefillRequestContext(model, context) {
|
|
111
|
+
if (!resolveClaudeSonnet5ModelIdentity(model) && !resolveClaudeOpus5ModelIdentity(model)) return context;
|
|
112
112
|
let end = context.messages.length;
|
|
113
113
|
while (end > 0) {
|
|
114
114
|
const message = context.messages[end - 1];
|
|
@@ -140,7 +140,9 @@ function resolveReplayModelBoundIdentity(ref) {
|
|
|
140
140
|
const mythosIdentity = resolveClaudeMythos5ModelIdentity(modelRef);
|
|
141
141
|
if (mythosIdentity) return `mythos:${mythosIdentity}`;
|
|
142
142
|
const sonnetIdentity = resolveClaudeSonnet5ModelIdentity(modelRef);
|
|
143
|
-
|
|
143
|
+
if (sonnetIdentity) return `sonnet:${sonnetIdentity}`;
|
|
144
|
+
const opusIdentity = resolveClaudeOpus5ModelIdentity(modelRef);
|
|
145
|
+
return opusIdentity ? `opus5:${opusIdentity}` : void 0;
|
|
144
146
|
}
|
|
145
147
|
function resolveModelBoundThinkingReplayMode(params) {
|
|
146
148
|
const sourceApi = normalizeApi(params.source.api);
|
|
@@ -504,4 +506,4 @@ function transformMessages(messages, model, normalizeToolCallId) {
|
|
|
504
506
|
return result;
|
|
505
507
|
}
|
|
506
508
|
//#endregion
|
|
507
|
-
export { normalizeLowercaseStringOrEmpty as C, normalizeStructuredPromptSection as S, ensureSystemPromptCacheBoundary as _, adjustMaxTokensForThinking as a, stripSystemPromptCacheBoundary as b, isRecord as c,
|
|
509
|
+
export { normalizeLowercaseStringOrEmpty as C, normalizeStructuredPromptSection as S, ensureSystemPromptCacheBoundary as _, adjustMaxTokensForThinking as a, stripSystemPromptCacheBoundary as b, isRecord as c, prepareClaudeNoPrefillRequestContext as d, requiresClaudeAdaptiveThinking as f, SYSTEM_PROMPT_CACHE_BOUNDARY as g, usesClaudeStreamingRefusalContract as h, extractToolResultText as i, applyClaudeRequestContract as l, usesClaudeFable5MessagesContract as m, describeToolResultMediaPlaceholder as n, buildBaseOptions as o, resolveModelBoundThinkingReplayMode as p, extractToolResultBlockText as r, clampReasoning as s, transformMessages as t, defaultsClaudeAdaptiveThinking as u, prependSystemPromptAdditionAfterCacheBoundary as v, normalizeOptionalString as w, normalizePromptCapabilityIds as x, splitSystemPromptCacheBoundary as y };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as requiresClaudeMandatoryAdaptiveThinking, c as resolveClaudeMythos5ModelIdentity, d as resolveClaudeSonnet5ModelIdentity, f as supportsClaudeAdaptiveThinking, i as requiresClaudeDefaultSampling, l as resolveClaudeNativeThinkingLevelMap, m as supportsClaudeNativeXhighEffort, n as CLAUDE_OPUS_5_THINKING_PROFILE, o as resolveClaudeFable5ModelIdentity, p as supportsClaudeNativeMaxEffort, r as CLAUDE_SONNET_5_THINKING_PROFILE, s as resolveClaudeModelIdentity, t as CLAUDE_FABLE_5_THINKING_PROFILE, u as resolveClaudeOpus5ModelIdentity } from "./index-CGDEoorl.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
3
|
import { $ as VercelGatewayRouting, A as OpenRouterRouting, B as TextContent, C as KnownImagesProvider, D as ModelThinkingLevel, E as Model, F as SimpleStreamOptions, G as ThinkingLevelMap, H as ThinkingBudgets, I as StopReason, J as ToolResultMessage, K as Tool, L as StreamFn, M as ProviderImagesOptions, N as ProviderResponse, O as OpenAICompletionsCompat, P as ProviderStreamOptions, Q as ValidateToolArgumentsFn, R as StreamFunction, S as KnownImagesApi, T as Message, U as ThinkingContent, V as TextSignatureV1, W as ThinkingLevel, X as Usage, Y as Transport, Z as UserMessage, _ as ImagesOptions, a as AssistantMessageEvent, b as ImagesStopReason, c as CacheRetention, d as ImageContent, f as ImagesApi, g as ImagesModel, h as ImagesInputContent, i as AssistantMessage, j as Provider, k as OpenAIResponsesCompat, l as CompleteSimpleFn, m as ImagesFunction, n as Api, o as AssistantMessageEventStreamContract, p as ImagesContext, q as ToolCall, r as AssistantImages, s as AssistantMessageEventStreamLike, t as AnthropicMessagesCompat, u as Context, v as ImagesOutputContent, w as MaybePromise, x as KnownApi, y as ImagesProvider, z as StreamOptions } from "./types-DRgdPqaZ.mjs";
|
|
4
4
|
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-0nZeBKl2.mjs";
|
|
5
5
|
import { n as validateToolCall, t as validateToolArguments } from "./validation-BDMWOr8d.mjs";
|
|
6
|
-
export { AnthropicMessagesCompat, Api, AssistantImages, AssistantMessage, AssistantMessageDiagnostic, AssistantMessageEvent, AssistantMessageEventStream, AssistantMessageEventStreamContract, AssistantMessageEventStreamLike, CLAUDE_FABLE_5_THINKING_PROFILE, CLAUDE_SONNET_5_THINKING_PROFILE, CacheRetention, CompleteSimpleFn, Context, DiagnosticErrorInfo, EventStream, ImageContent, ImagesApi, ImagesContext, ImagesFunction, ImagesInputContent, ImagesModel, ImagesOptions, ImagesOutputContent, ImagesProvider, ImagesStopReason, KnownApi, KnownImagesApi, KnownImagesProvider, MaybePromise, Message, Model, ModelThinkingLevel, OpenAICompletionsCompat, OpenAIResponsesCompat, OpenRouterRouting, Provider, ProviderImagesOptions, ProviderResponse, ProviderStreamOptions, SimpleStreamOptions, StopReason, StreamFn, StreamFunction, StreamOptions, TextContent, TextSignatureV1, ThinkingBudgets, ThinkingContent, ThinkingLevel, ThinkingLevelMap, Tool, ToolCall, ToolResultMessage, Transport, Usage, UserMessage, ValidateToolArgumentsFn, VercelGatewayRouting, appendAssistantMessageDiagnostic, createAssistantMessageDiagnostic, createAssistantMessageEventStream, extractDiagnosticError, formatThrownValue, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeSonnet5ModelIdentity, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
|
|
6
|
+
export { AnthropicMessagesCompat, Api, AssistantImages, AssistantMessage, AssistantMessageDiagnostic, AssistantMessageEvent, AssistantMessageEventStream, AssistantMessageEventStreamContract, AssistantMessageEventStreamLike, CLAUDE_FABLE_5_THINKING_PROFILE, CLAUDE_OPUS_5_THINKING_PROFILE, CLAUDE_SONNET_5_THINKING_PROFILE, CacheRetention, CompleteSimpleFn, Context, DiagnosticErrorInfo, EventStream, ImageContent, ImagesApi, ImagesContext, ImagesFunction, ImagesInputContent, ImagesModel, ImagesOptions, ImagesOutputContent, ImagesProvider, ImagesStopReason, KnownApi, KnownImagesApi, KnownImagesProvider, MaybePromise, Message, Model, ModelThinkingLevel, OpenAICompletionsCompat, OpenAIResponsesCompat, OpenRouterRouting, Provider, ProviderImagesOptions, ProviderResponse, ProviderStreamOptions, SimpleStreamOptions, StopReason, StreamFn, StreamFunction, StreamOptions, TextContent, TextSignatureV1, ThinkingBudgets, ThinkingContent, ThinkingLevel, ThinkingLevelMap, Tool, ToolCall, ToolResultMessage, Transport, Usage, UserMessage, ValidateToolArgumentsFn, VercelGatewayRouting, appendAssistantMessageDiagnostic, createAssistantMessageDiagnostic, createAssistantMessageEventStream, extractDiagnosticError, formatThrownValue, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
|
package/dist/types.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as requiresClaudeMandatoryAdaptiveThinking, c as resolveClaudeMythos5ModelIdentity, d as resolveClaudeSonnet5ModelIdentity, f as supportsClaudeAdaptiveThinking, i as requiresClaudeDefaultSampling, l as resolveClaudeNativeThinkingLevelMap, m as supportsClaudeNativeXhighEffort, n as CLAUDE_OPUS_5_THINKING_PROFILE, o as resolveClaudeFable5ModelIdentity, p as supportsClaudeNativeMaxEffort, r as CLAUDE_SONNET_5_THINKING_PROFILE, s as resolveClaudeModelIdentity, t as CLAUDE_FABLE_5_THINKING_PROFILE, u as resolveClaudeOpus5ModelIdentity } from "./src-CjOfhrH3.mjs";
|
|
2
2
|
import { i as formatThrownValue, n as createAssistantMessageDiagnostic, r as extractDiagnosticError, t as appendAssistantMessageDiagnostic } from "./diagnostics-COpOtRwq.mjs";
|
|
3
3
|
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-ReMmOTzX.mjs";
|
|
4
4
|
import { n as validateToolCall, t as validateToolArguments } from "./validation-FrchoOlv.mjs";
|
|
5
|
-
export { AssistantMessageEventStream, CLAUDE_FABLE_5_THINKING_PROFILE, CLAUDE_SONNET_5_THINKING_PROFILE, EventStream, appendAssistantMessageDiagnostic, createAssistantMessageDiagnostic, createAssistantMessageEventStream, extractDiagnosticError, formatThrownValue, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeSonnet5ModelIdentity, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
|
|
5
|
+
export { AssistantMessageEventStream, CLAUDE_FABLE_5_THINKING_PROFILE, CLAUDE_OPUS_5_THINKING_PROFILE, CLAUDE_SONNET_5_THINKING_PROFILE, EventStream, appendAssistantMessageDiagnostic, createAssistantMessageDiagnostic, createAssistantMessageEventStream, extractDiagnosticError, formatThrownValue, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, validateToolArguments, validateToolCall };
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/ai",
|
|
3
|
-
"version": "2026.7.
|
|
3
|
+
"version": "2026.7.34",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/ai",
|
|
9
|
-
"version": "2026.7.
|
|
9
|
+
"version": "2026.7.34",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "0.109.1",
|