@openclaw/ai 2026.7.2-beta.2 → 2026.7.2-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/dist/{anthropic-BIRSg5x9.mjs → anthropic-CrUDIBpM.mjs} +173 -47
- package/dist/{api-registry-Byvoz8Ha.d.mts → api-registry-BMphkFf1.d.mts} +1 -2
- package/dist/{azure-openai-responses-CHi7Wo4A.mjs → azure-openai-responses-CbrpVeEv.mjs} +9 -11
- package/dist/{env-api-keys-DnhYpc27.mjs → env-api-keys-DrgeBuva.mjs} +1 -1
- package/dist/{event-stream-uQspnL8S.d.mts → event-stream-Douf9dob.d.mts} +1 -1
- package/dist/event-stream.d.mts +1 -1
- package/dist/{google-BmsqsNwR.mjs → google-Cs62KA7t.mjs} +4 -4
- package/dist/{google-shared-Dx2aba47.mjs → google-shared-CMLI-tCZ.mjs} +4 -3
- package/dist/{google-vertex-HZ_0rTwS.mjs → google-vertex-B4SD3U0f.mjs} +3 -3
- package/dist/host-WvWBo4h8.d.mts +173 -0
- package/dist/host-XYGZcgO8.mjs +98 -0
- package/dist/index-BVVgDSdq.d.mts +1 -0
- package/dist/index.d.mts +7 -50
- package/dist/index.mjs +1 -1
- package/dist/internal/anthropic.d.mts +9 -3
- package/dist/internal/anthropic.mjs +3 -3
- package/dist/internal/openai.d.mts +2 -279
- package/dist/internal/openai.mjs +5 -5
- package/dist/internal/runtime.d.mts +8 -5
- package/dist/internal/runtime.mjs +22 -12
- package/dist/internal/shared.d.mts +4 -2
- package/dist/internal/shared.mjs +2 -2
- package/dist/{mistral-DxMPt9q9.mjs → mistral-D5Ps7Led.mjs} +26 -10
- package/dist/{model-utils-Q1LSRIdo.mjs → model-utils-1GiZ2_rr.mjs} +3 -1
- package/dist/openai-CoGicoDt.d.mts +332 -0
- package/dist/{openai-chatgpt-responses-BuH2NvsR.mjs → openai-chatgpt-responses-h0o5yV8Y.mjs} +47 -48
- package/dist/{openai-completions-DPR_O2RW.mjs → openai-completions-exO8NFQf.mjs} +342 -102
- package/dist/{openai-responses-Cov-Vdc2.mjs → openai-responses-BHpmtUKo.mjs} +5 -5
- package/dist/{openai-responses-shared-Befb4D6R.mjs → openai-responses-shared-CzCurmY1.mjs} +527 -268
- package/dist/{openai-tool-projection-CFqm42J2.mjs → openai-tool-projection-ITOU9bG1.mjs} +1 -1
- package/dist/provider-error-C4VvV_3t.mjs +41 -0
- package/dist/providers.d.mts +1 -1
- package/dist/providers.mjs +8 -8
- package/dist/{stream-first-event-timeout-RjWszj8c.mjs → stream-first-event-timeout-DP4xEyBY.mjs} +45 -1
- package/dist/{transform-messages-BmS70CP5.mjs → system-prompt-cache-boundary-CbHeV4_l.mjs} +171 -161
- package/dist/transports.d.mts +590 -0
- package/dist/transports.mjs +5701 -0
- package/dist/{types-Cx2zJtyz.d.mts → types-AFwwWium.d.mts} +7 -0
- package/dist/types.d.mts +4 -4
- package/dist/{validation-Cej7htKc.d.mts → validation-sxvxC8J-.d.mts} +1 -1
- package/dist/validation.d.mts +1 -1
- package/npm-shrinkwrap.json +43 -50
- package/package.json +36 -10
- package/dist/host-4t713IeR.mjs +0 -37
- /package/dist/{index-BoTnz8cv.d.mts → anthropic-BoTnz8cv.d.mts} +0 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { E as Model, L as StreamFn, n as Api, u as Context } from "./types-AFwwWium.mjs";
|
|
2
|
+
import { n as ApiRegistry } from "./api-registry-BMphkFf1.mjs";
|
|
3
|
+
|
|
4
|
+
//#region packages/ai/src/host.d.ts
|
|
5
|
+
/** Provider capability facts needed by the package-owned transports. */
|
|
6
|
+
interface AiProviderRequestCapabilities {
|
|
7
|
+
endpointClass: string;
|
|
8
|
+
knownProviderFamily: string;
|
|
9
|
+
supportsNativeStreamingUsageCompat: boolean;
|
|
10
|
+
supportsOpenAICompletionsStreamingUsageCompat: boolean;
|
|
11
|
+
usesExplicitProxyLikeEndpoint: boolean;
|
|
12
|
+
allowsAnthropicServiceTier: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** Transport-safe provider policy input kept independent of OpenClaw config types. */
|
|
15
|
+
interface AiProviderRequestPolicyInput {
|
|
16
|
+
provider?: string;
|
|
17
|
+
api?: string;
|
|
18
|
+
baseUrl?: string;
|
|
19
|
+
capability?: "llm" | "audio" | "image" | "video" | "other";
|
|
20
|
+
transport?: "stream" | "websocket" | "http" | "media-understanding";
|
|
21
|
+
modelId?: string | null;
|
|
22
|
+
compat?: unknown;
|
|
23
|
+
}
|
|
24
|
+
/** Context shared by plugin-owned provider stream hooks. */
|
|
25
|
+
interface AiProviderStreamHookContext {
|
|
26
|
+
config?: unknown;
|
|
27
|
+
agentDir?: string;
|
|
28
|
+
workspaceDir?: string;
|
|
29
|
+
provider: string;
|
|
30
|
+
modelId: string;
|
|
31
|
+
model: Model;
|
|
32
|
+
}
|
|
33
|
+
/** Narrow plugin-runtime port used by package-owned transports. */
|
|
34
|
+
interface AiTransportPluginHost {
|
|
35
|
+
resolveProviderStream(this: void, params: {
|
|
36
|
+
provider: string;
|
|
37
|
+
config?: unknown;
|
|
38
|
+
workspaceDir?: string;
|
|
39
|
+
env?: NodeJS.ProcessEnv;
|
|
40
|
+
allowRuntimePluginLoad?: boolean;
|
|
41
|
+
context: AiProviderStreamHookContext;
|
|
42
|
+
}): StreamFn | undefined;
|
|
43
|
+
resolveTransportTurnState(this: void, params: {
|
|
44
|
+
provider: string;
|
|
45
|
+
modelId?: string | null;
|
|
46
|
+
config?: unknown;
|
|
47
|
+
workspaceDir?: string;
|
|
48
|
+
env?: NodeJS.ProcessEnv;
|
|
49
|
+
allowRuntimePluginLoad?: boolean;
|
|
50
|
+
context: {
|
|
51
|
+
provider: string;
|
|
52
|
+
modelId: string;
|
|
53
|
+
model?: Model;
|
|
54
|
+
sessionId?: string;
|
|
55
|
+
turnId: string;
|
|
56
|
+
attempt: number;
|
|
57
|
+
transport: "stream" | "websocket";
|
|
58
|
+
};
|
|
59
|
+
}): {
|
|
60
|
+
headers?: Record<string, string>;
|
|
61
|
+
metadata?: Record<string, string>;
|
|
62
|
+
} | undefined;
|
|
63
|
+
wrapSimpleCompletionStream(this: void, params: {
|
|
64
|
+
provider: string;
|
|
65
|
+
config?: unknown;
|
|
66
|
+
context: AiProviderStreamHookContext & {
|
|
67
|
+
streamFn: StreamFn;
|
|
68
|
+
};
|
|
69
|
+
}): StreamFn | undefined;
|
|
70
|
+
createAnthropicVertexStream(this: void, model: Pick<Model, "baseUrl">, env?: NodeJS.ProcessEnv): StreamFn;
|
|
71
|
+
}
|
|
72
|
+
/** Host-owned transcript normalization contract used immediately before provider projection. */
|
|
73
|
+
type AiTransformTransportMessages = (messages: Context["messages"], model: Model, normalizeToolCallId?: (id: string, targetModel: Model, source: {
|
|
74
|
+
provider: string;
|
|
75
|
+
api: Api;
|
|
76
|
+
model: string;
|
|
77
|
+
}) => string, options?: {
|
|
78
|
+
normalizeSameModelToolCallIds?: boolean;
|
|
79
|
+
preserveCrossModelToolCallThoughtSignature?: boolean;
|
|
80
|
+
}) => Context["messages"];
|
|
81
|
+
/** Strict-tool policy inputs for OpenAI-compatible routes. */
|
|
82
|
+
interface OpenAIStrictToolSettingOptions {
|
|
83
|
+
transport?: "stream" | "websocket";
|
|
84
|
+
supportsStrictMode?: boolean;
|
|
85
|
+
}
|
|
86
|
+
type AiInlineTextBlock = {
|
|
87
|
+
type: "text";
|
|
88
|
+
text: string;
|
|
89
|
+
};
|
|
90
|
+
type AiInlineImageBlock = {
|
|
91
|
+
type: "image";
|
|
92
|
+
data: string;
|
|
93
|
+
mimeType: string;
|
|
94
|
+
};
|
|
95
|
+
type AiInlineContentBlock = AiInlineTextBlock | AiInlineImageBlock;
|
|
96
|
+
type AnthropicInlineContentNormalizer = (content: readonly AiInlineContentBlock[]) => Promise<AiInlineContentBlock[]>;
|
|
97
|
+
/** Narrow host ports consumed by the built-in provider adapters. */
|
|
98
|
+
interface AiTransportHost {
|
|
99
|
+
/**
|
|
100
|
+
* Builds a policy-guarded fetch for one model request.
|
|
101
|
+
* Returning undefined keeps the provider SDK's default fetch.
|
|
102
|
+
*/
|
|
103
|
+
buildModelFetch(model: Model, timeoutMs?: number, options?: {
|
|
104
|
+
sanitizeSse?: boolean;
|
|
105
|
+
}): typeof fetch | undefined;
|
|
106
|
+
/** Resolves host-owned process-local secret sentinel substrings immediately before egress. */
|
|
107
|
+
resolveSecretSentinel(value: string): string;
|
|
108
|
+
/** Redacts secrets inside structured tool-result payloads. */
|
|
109
|
+
redactSecrets<T>(value: T): T;
|
|
110
|
+
/** Redacts secret-bearing text in tool payload strings. */
|
|
111
|
+
redactToolPayloadText(text: string): string;
|
|
112
|
+
/** Normalizes Anthropic inline image blocks before provider payload construction. */
|
|
113
|
+
normalizeAnthropicInlineContentBlocks?: AnthropicInlineContentNormalizer;
|
|
114
|
+
/**
|
|
115
|
+
* Resolves the host strict-tool default for OpenAI-compatible routes.
|
|
116
|
+
* undefined lets the request omit the strict flag entirely.
|
|
117
|
+
*/
|
|
118
|
+
resolveOpenAIStrictToolSetting(model: Pick<Model, "provider" | "api" | "baseUrl" | "id"> & {
|
|
119
|
+
compat?: unknown;
|
|
120
|
+
}, options?: OpenAIStrictToolSettingOptions): boolean | undefined;
|
|
121
|
+
/** Provider-plugin operations required by the generic package transports. */
|
|
122
|
+
plugin: AiTransportPluginHost;
|
|
123
|
+
/** Builds provider-owned Copilot compatibility headers for one message turn. */
|
|
124
|
+
buildCopilotDynamicHeaders(messages: Context["messages"]): Record<string, string>;
|
|
125
|
+
/** Resolves endpoint classification without importing core provider registries. */
|
|
126
|
+
resolveProviderEndpointClass(baseUrl?: string): string;
|
|
127
|
+
/** Resolves provider capability flags used by payload compatibility policy. */
|
|
128
|
+
resolveProviderRequestCapabilities(input: AiProviderRequestPolicyInput): AiProviderRequestCapabilities;
|
|
129
|
+
/** Merges host-owned provider request headers and attribution policy. */
|
|
130
|
+
resolveProviderRequestHeaders(input: {
|
|
131
|
+
provider?: string;
|
|
132
|
+
api?: string;
|
|
133
|
+
baseUrl?: string;
|
|
134
|
+
providerHeaders?: Record<string, string>;
|
|
135
|
+
callerHeaders?: Record<string, string>;
|
|
136
|
+
precedence?: "caller-wins" | "defaults-win";
|
|
137
|
+
}): Record<string, string> | undefined;
|
|
138
|
+
/** Returns the host-configured request timeout attached to a model. */
|
|
139
|
+
resolveModelRequestTimeoutMs(model: Model): number | undefined;
|
|
140
|
+
/** Reports whether the model carries host-managed proxy, TLS, or local-service state. */
|
|
141
|
+
requiresManagedTransport(model: Model): boolean;
|
|
142
|
+
/** Copies host-owned managed-transport state onto a projected model. */
|
|
143
|
+
inheritManagedTransport(source: Model, target: Model): Model;
|
|
144
|
+
/** Applies host-owned transcript replay and pairing rules. */
|
|
145
|
+
transformTransportMessages: AiTransformTransportMessages;
|
|
146
|
+
/** Registers a custom transport API with the host's stream error bridge. */
|
|
147
|
+
registerCustomApi(registry: ApiRegistry, api: Api, streamFn: StreamFn): boolean;
|
|
148
|
+
/** Prepares the provider-owned Google simple-completion alias when needed. */
|
|
149
|
+
prepareGoogleSimpleCompletionModel(registry: ApiRegistry, model: Model): Model;
|
|
150
|
+
/**
|
|
151
|
+
* Emits one transport diagnostic; build runs only when the host logs it and
|
|
152
|
+
* may return null to suppress the entry (e.g. de-duplication).
|
|
153
|
+
*/
|
|
154
|
+
logDebug(subsystem: string, build: () => {
|
|
155
|
+
message: string;
|
|
156
|
+
data?: Record<string, unknown>;
|
|
157
|
+
} | null): void;
|
|
158
|
+
/** Emits an informational transport diagnostic through the host logger. */
|
|
159
|
+
logInfo(subsystem: string, message: string, data?: Record<string, unknown>): void;
|
|
160
|
+
/** Emits a warning through the host logger. */
|
|
161
|
+
logWarn(subsystem: string, message: string, data?: Record<string, unknown>): void;
|
|
162
|
+
}
|
|
163
|
+
type ActiveAiTransportHost = Omit<AiTransportHost, "normalizeAnthropicInlineContentBlocks"> & {
|
|
164
|
+
normalizeAnthropicInlineContentBlocks: AnthropicInlineContentNormalizer;
|
|
165
|
+
};
|
|
166
|
+
/** Installs host implementations for the transport policy ports. */
|
|
167
|
+
declare function configureAiTransportHost(host: Partial<AiTransportHost>): void;
|
|
168
|
+
/** Returns the active transport host (inert defaults unless configured). */
|
|
169
|
+
declare function getAiTransportHost(): ActiveAiTransportHost;
|
|
170
|
+
/** Resolves sentinel substrings in custom headers at a no-fetch adapter boundary. */
|
|
171
|
+
declare function resolveAiTransportHeaderSentinels(headers: Record<string, string> | undefined): Record<string, string> | undefined;
|
|
172
|
+
//#endregion
|
|
173
|
+
export { AiProviderRequestPolicyInput as a, AiTransportHost as c, configureAiTransportHost as d, getAiTransportHost as f, AiProviderRequestCapabilities as i, AiTransportPluginHost as l, AiInlineImageBlock as n, AiProviderStreamHookContext as o, resolveAiTransportHeaderSentinels as p, AiInlineTextBlock as r, AiTransformTransportMessages as s, AiInlineContentBlock as t, OpenAIStrictToolSettingOptions as u };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
//#region packages/ai/src/host.ts
|
|
2
|
+
const MAX_PENDING_CUSTOM_API_REGISTRATIONS = 32;
|
|
3
|
+
const pendingCustomApiRegistrations = [];
|
|
4
|
+
function queueCustomApiRegistration(registry, api, streamFn) {
|
|
5
|
+
const existing = pendingCustomApiRegistrations.find((registration) => registration.registry === registry && registration.api === api);
|
|
6
|
+
if (existing) {
|
|
7
|
+
existing.streamFn = streamFn;
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
if (pendingCustomApiRegistrations.length >= MAX_PENDING_CUSTOM_API_REGISTRATIONS) throw new Error("Too many custom transport APIs were registered before host configuration");
|
|
11
|
+
pendingCustomApiRegistrations.push({
|
|
12
|
+
registry,
|
|
13
|
+
api,
|
|
14
|
+
streamFn
|
|
15
|
+
});
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
const inertAiTransportHost = {
|
|
19
|
+
buildModelFetch: () => void 0,
|
|
20
|
+
resolveSecretSentinel: (value) => value,
|
|
21
|
+
redactSecrets: (value) => value,
|
|
22
|
+
redactToolPayloadText: (text) => text,
|
|
23
|
+
normalizeAnthropicInlineContentBlocks: async (content) => [...content],
|
|
24
|
+
resolveOpenAIStrictToolSetting: (_model, options) => options?.supportsStrictMode ? false : void 0,
|
|
25
|
+
plugin: {
|
|
26
|
+
resolveProviderStream: () => void 0,
|
|
27
|
+
resolveTransportTurnState: () => void 0,
|
|
28
|
+
wrapSimpleCompletionStream: () => void 0,
|
|
29
|
+
createAnthropicVertexStream: () => {
|
|
30
|
+
throw new Error("Anthropic Vertex transport is not configured by the embedding host");
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
buildCopilotDynamicHeaders: () => ({}),
|
|
34
|
+
resolveProviderEndpointClass: () => "default",
|
|
35
|
+
resolveProviderRequestCapabilities: () => ({
|
|
36
|
+
endpointClass: "default",
|
|
37
|
+
knownProviderFamily: "",
|
|
38
|
+
supportsNativeStreamingUsageCompat: false,
|
|
39
|
+
supportsOpenAICompletionsStreamingUsageCompat: false,
|
|
40
|
+
usesExplicitProxyLikeEndpoint: false,
|
|
41
|
+
allowsAnthropicServiceTier: false
|
|
42
|
+
}),
|
|
43
|
+
resolveProviderRequestHeaders: ({ providerHeaders, callerHeaders, precedence }) => ({
|
|
44
|
+
...precedence === "caller-wins" ? providerHeaders : callerHeaders,
|
|
45
|
+
...precedence === "caller-wins" ? callerHeaders : providerHeaders
|
|
46
|
+
}),
|
|
47
|
+
resolveModelRequestTimeoutMs: () => void 0,
|
|
48
|
+
requiresManagedTransport: () => false,
|
|
49
|
+
inheritManagedTransport: (_source, target) => target,
|
|
50
|
+
transformTransportMessages: (messages) => messages,
|
|
51
|
+
registerCustomApi: queueCustomApiRegistration,
|
|
52
|
+
prepareGoogleSimpleCompletionModel: (_registry, model) => model,
|
|
53
|
+
logDebug: () => {},
|
|
54
|
+
logInfo: () => {},
|
|
55
|
+
logWarn: () => {}
|
|
56
|
+
};
|
|
57
|
+
let activeAiTransportHost = inertAiTransportHost;
|
|
58
|
+
/** Installs host implementations for the transport policy ports. */
|
|
59
|
+
function configureAiTransportHost(host) {
|
|
60
|
+
activeAiTransportHost = {
|
|
61
|
+
...inertAiTransportHost,
|
|
62
|
+
...host,
|
|
63
|
+
normalizeAnthropicInlineContentBlocks: host.normalizeAnthropicInlineContentBlocks ?? inertAiTransportHost.normalizeAnthropicInlineContentBlocks,
|
|
64
|
+
plugin: {
|
|
65
|
+
...inertAiTransportHost.plugin,
|
|
66
|
+
...host.plugin
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const transportHost = activeAiTransportHost;
|
|
70
|
+
if (transportHost.registerCustomApi === inertAiTransportHost.registerCustomApi || pendingCustomApiRegistrations.length === 0) return;
|
|
71
|
+
const pending = pendingCustomApiRegistrations.splice(0);
|
|
72
|
+
for (const [index, registration] of pending.entries()) try {
|
|
73
|
+
transportHost.registerCustomApi(registration.registry, registration.api, registration.streamFn);
|
|
74
|
+
} catch (error) {
|
|
75
|
+
pendingCustomApiRegistrations.unshift(...pending.slice(index));
|
|
76
|
+
throw error;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/** Returns the active transport host (inert defaults unless configured). */
|
|
80
|
+
function getAiTransportHost() {
|
|
81
|
+
return activeAiTransportHost;
|
|
82
|
+
}
|
|
83
|
+
/** Resolves sentinel substrings in custom headers at a no-fetch adapter boundary. */
|
|
84
|
+
function resolveAiTransportHeaderSentinels(headers) {
|
|
85
|
+
if (!headers) return;
|
|
86
|
+
const host = getAiTransportHost();
|
|
87
|
+
let resolvedHeaders;
|
|
88
|
+
for (const [name, value] of Object.entries(headers)) {
|
|
89
|
+
const resolved = host.resolveSecretSentinel(value);
|
|
90
|
+
if (resolved !== value) {
|
|
91
|
+
resolvedHeaders ??= { ...headers };
|
|
92
|
+
resolvedHeaders[name] = resolved;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return resolvedHeaders ?? headers;
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
export { getAiTransportHost as n, resolveAiTransportHeaderSentinels as r, configureAiTransportHost as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,54 +1,11 @@
|
|
|
1
|
-
import { a as resolveClaudeFable5ModelIdentity, c as resolveClaudeNativeThinkingLevelMap, d as supportsClaudeNativeMaxEffort, f as supportsClaudeNativeXhighEffort, i as requiresClaudeMandatoryAdaptiveThinking, l as resolveClaudeSonnet5ModelIdentity, n as CLAUDE_SONNET_5_THINKING_PROFILE, o as resolveClaudeModelIdentity, r as requiresClaudeDefaultSampling, s as resolveClaudeMythos5ModelIdentity, t as CLAUDE_FABLE_5_THINKING_PROFILE, u as supportsClaudeAdaptiveThinking } from "./
|
|
1
|
+
import { a as resolveClaudeFable5ModelIdentity, c as resolveClaudeNativeThinkingLevelMap, d as supportsClaudeNativeMaxEffort, f as supportsClaudeNativeXhighEffort, i as requiresClaudeMandatoryAdaptiveThinking, l as resolveClaudeSonnet5ModelIdentity, n as CLAUDE_SONNET_5_THINKING_PROFILE, o as resolveClaudeModelIdentity, r as requiresClaudeDefaultSampling, s as resolveClaudeMythos5ModelIdentity, t as CLAUDE_FABLE_5_THINKING_PROFILE, u as supportsClaudeAdaptiveThinking } from "./anthropic-BoTnz8cv.mjs";
|
|
2
2
|
import { a as extractDiagnosticError, i as createAssistantMessageDiagnostic, n as DiagnosticErrorInfo, o as formatThrownValue, r as appendAssistantMessageDiagnostic, t as AssistantMessageDiagnostic } from "./diagnostics-BaTA9eVl.mjs";
|
|
3
|
-
import { $ as VercelGatewayRouting, A as OpenRouterRouting, B as TextContent, C as KnownImagesProvider, D as ModelThinkingLevel, E as Model, F as SimpleStreamOptions, G as ThinkingLevelMap, H as ThinkingBudgets, I as StopReason, J as ToolResultMessage, K as Tool, L as StreamFn, M as ProviderImagesOptions, N as ProviderResponse, O as OpenAICompletionsCompat, P as ProviderStreamOptions, Q as ValidateToolArgumentsFn, R as StreamFunction, S as KnownImagesApi, T as Message, U as ThinkingContent, V as TextSignatureV1, W as ThinkingLevel, X as Usage, Y as Transport, Z as UserMessage, _ as ImagesOptions, a as AssistantMessageEvent, b as ImagesStopReason, c as CacheRetention, d as ImageContent, f as ImagesApi, g as ImagesModel, h as ImagesInputContent, i as AssistantMessage, j as Provider, k as OpenAIResponsesCompat, l as CompleteSimpleFn, m as ImagesFunction, n as Api, o as AssistantMessageEventStreamContract, p as ImagesContext, q as ToolCall, r as AssistantImages, s as AssistantMessageEventStreamLike, t as AnthropicMessagesCompat, u as Context, v as ImagesOutputContent, w as MaybePromise, x as KnownApi, y as ImagesProvider, z as StreamOptions } from "./types-
|
|
4
|
-
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-
|
|
5
|
-
import { n as validateToolCall, t as validateToolArguments } from "./validation-
|
|
6
|
-
import { a as RegisteredApiProvider, i as ApiStreamSimpleFunction, n as ApiRegistry, o as createApiRegistry, r as ApiStreamFunction, t as ApiProvider } from "./api-registry-
|
|
3
|
+
import { $ as VercelGatewayRouting, A as OpenRouterRouting, B as TextContent, C as KnownImagesProvider, D as ModelThinkingLevel, E as Model, F as SimpleStreamOptions, G as ThinkingLevelMap, H as ThinkingBudgets, I as StopReason, J as ToolResultMessage, K as Tool, L as StreamFn, M as ProviderImagesOptions, N as ProviderResponse, O as OpenAICompletionsCompat, P as ProviderStreamOptions, Q as ValidateToolArgumentsFn, R as StreamFunction, S as KnownImagesApi, T as Message, U as ThinkingContent, V as TextSignatureV1, W as ThinkingLevel, X as Usage, Y as Transport, Z as UserMessage, _ as ImagesOptions, a as AssistantMessageEvent, b as ImagesStopReason, c as CacheRetention, d as ImageContent, f as ImagesApi, g as ImagesModel, h as ImagesInputContent, i as AssistantMessage, j as Provider, k as OpenAIResponsesCompat, l as CompleteSimpleFn, m as ImagesFunction, n as Api, o as AssistantMessageEventStreamContract, p as ImagesContext, q as ToolCall, r as AssistantImages, s as AssistantMessageEventStreamLike, t as AnthropicMessagesCompat, u as Context, v as ImagesOutputContent, w as MaybePromise, x as KnownApi, y as ImagesProvider, z as StreamOptions } from "./types-AFwwWium.mjs";
|
|
4
|
+
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-Douf9dob.mjs";
|
|
5
|
+
import { n as validateToolCall, t as validateToolArguments } from "./validation-sxvxC8J-.mjs";
|
|
6
|
+
import { a as RegisteredApiProvider, i as ApiStreamSimpleFunction, n as ApiRegistry, o as createApiRegistry, r as ApiStreamFunction, t as ApiProvider } from "./api-registry-BMphkFf1.mjs";
|
|
7
|
+
import { a as AiProviderRequestPolicyInput, c as AiTransportHost, d as configureAiTransportHost, f as getAiTransportHost, i as AiProviderRequestCapabilities, l as AiTransportPluginHost, n as AiInlineImageBlock, o as AiProviderStreamHookContext, p as resolveAiTransportHeaderSentinels, r as AiInlineTextBlock, s as AiTransformTransportMessages, t as AiInlineContentBlock, u as OpenAIStrictToolSettingOptions } from "./host-WvWBo4h8.mjs";
|
|
7
8
|
|
|
8
|
-
//#region packages/ai/src/host.d.ts
|
|
9
|
-
/** Strict-tool policy inputs for OpenAI-compatible routes. */
|
|
10
|
-
interface OpenAIStrictToolSettingOptions {
|
|
11
|
-
transport?: "stream" | "websocket";
|
|
12
|
-
supportsStrictMode?: boolean;
|
|
13
|
-
}
|
|
14
|
-
/** Narrow host ports consumed by the built-in provider adapters. */
|
|
15
|
-
interface AiTransportHost {
|
|
16
|
-
/**
|
|
17
|
-
* Builds a policy-guarded fetch for one model request.
|
|
18
|
-
* Returning undefined keeps the provider SDK's default fetch.
|
|
19
|
-
*/
|
|
20
|
-
buildModelFetch(model: Model, timeoutMs?: number, options?: {
|
|
21
|
-
sanitizeSse?: boolean;
|
|
22
|
-
}): typeof fetch | undefined;
|
|
23
|
-
/** Resolves host-owned process-local secret sentinel substrings immediately before egress. */
|
|
24
|
-
resolveSecretSentinel(value: string): string;
|
|
25
|
-
/** Redacts secrets inside structured tool-result payloads. */
|
|
26
|
-
redactSecrets<T>(value: T): T;
|
|
27
|
-
/** Redacts secret-bearing text in tool payload strings. */
|
|
28
|
-
redactToolPayloadText(text: string): string;
|
|
29
|
-
/**
|
|
30
|
-
* Resolves the host strict-tool default for OpenAI-compatible routes.
|
|
31
|
-
* undefined lets the request omit the strict flag entirely.
|
|
32
|
-
*/
|
|
33
|
-
resolveOpenAIStrictToolSetting(model: Pick<Model, "provider" | "api" | "baseUrl" | "id"> & {
|
|
34
|
-
compat?: unknown;
|
|
35
|
-
}, options?: OpenAIStrictToolSettingOptions): boolean | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* Emits one transport diagnostic; build runs only when the host logs it and
|
|
38
|
-
* may return null to suppress the entry (e.g. de-duplication).
|
|
39
|
-
*/
|
|
40
|
-
logDebug(subsystem: string, build: () => {
|
|
41
|
-
message: string;
|
|
42
|
-
data?: Record<string, unknown>;
|
|
43
|
-
} | null): void;
|
|
44
|
-
}
|
|
45
|
-
/** Installs host implementations for the transport policy ports. */
|
|
46
|
-
declare function configureAiTransportHost(host: Partial<AiTransportHost>): void;
|
|
47
|
-
/** Returns the active transport host (inert defaults unless configured). */
|
|
48
|
-
declare function getAiTransportHost(): AiTransportHost;
|
|
49
|
-
/** Resolves sentinel substrings in custom headers at a no-fetch adapter boundary. */
|
|
50
|
-
declare function resolveAiTransportHeaderSentinels(headers: Record<string, string> | undefined): Record<string, string> | undefined;
|
|
51
|
-
//#endregion
|
|
52
9
|
//#region packages/ai/src/stream.d.ts
|
|
53
10
|
/** Creates an isolated LLM runtime backed by the supplied provider registry. */
|
|
54
11
|
declare function createLlmRuntime(registry?: ApiRegistry): {
|
|
@@ -66,4 +23,4 @@ declare function createLlmRuntime(registry?: ApiRegistry): {
|
|
|
66
23
|
};
|
|
67
24
|
type LlmRuntime = ReturnType<typeof createLlmRuntime>;
|
|
68
25
|
//#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 };
|
|
26
|
+
export { AiInlineContentBlock, AiInlineImageBlock, AiInlineTextBlock, AiProviderRequestCapabilities, AiProviderRequestPolicyInput, AiProviderStreamHookContext, AiTransformTransportMessages, AiTransportHost, AiTransportPluginHost, 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 };
|
package/dist/index.mjs
CHANGED
|
@@ -3,5 +3,5 @@ import { i as formatThrownValue, n as createAssistantMessageDiagnostic, r as ext
|
|
|
3
3
|
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-D8n2uFee.mjs";
|
|
4
4
|
import { n as validateToolCall, t as validateToolArguments } from "./validation-DAa_yFOM.mjs";
|
|
5
5
|
import { n as createApiRegistry, t as createLlmRuntime } from "./stream-CREqxHgU.mjs";
|
|
6
|
-
import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels, t as configureAiTransportHost } from "./host-
|
|
6
|
+
import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels, t as configureAiTransportHost } from "./host-XYGZcgO8.mjs";
|
|
7
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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as resolveClaudeFable5ModelIdentity, c as resolveClaudeNativeThinkingLevelMap, d as supportsClaudeNativeMaxEffort, f as supportsClaudeNativeXhighEffort, i as requiresClaudeMandatoryAdaptiveThinking, l as resolveClaudeSonnet5ModelIdentity, o as resolveClaudeModelIdentity, r as requiresClaudeDefaultSampling, s as resolveClaudeMythos5ModelIdentity, u as supportsClaudeAdaptiveThinking } from "../
|
|
1
|
+
import { a as resolveClaudeFable5ModelIdentity, c as resolveClaudeNativeThinkingLevelMap, d as supportsClaudeNativeMaxEffort, f as supportsClaudeNativeXhighEffort, i as requiresClaudeMandatoryAdaptiveThinking, l as resolveClaudeSonnet5ModelIdentity, o as resolveClaudeModelIdentity, r as requiresClaudeDefaultSampling, s as resolveClaudeMythos5ModelIdentity, u as supportsClaudeAdaptiveThinking } from "../anthropic-BoTnz8cv.mjs";
|
|
2
2
|
import { t as AssistantMessageDiagnostic } from "../diagnostics-BaTA9eVl.mjs";
|
|
3
|
-
import { E as Model, F as SimpleStreamOptions, R as StreamFunction, u as Context, z as StreamOptions } from "../types-
|
|
3
|
+
import { E as Model, F as SimpleStreamOptions, R as StreamFunction, u as Context, z as StreamOptions } from "../types-AFwwWium.mjs";
|
|
4
4
|
import Anthropic from "@anthropic-ai/sdk";
|
|
5
5
|
|
|
6
6
|
//#region packages/ai/src/providers/anthropic.d.ts
|
|
@@ -208,8 +208,13 @@ type AnthropicUsagePayload = {
|
|
|
208
208
|
output_tokens?: unknown;
|
|
209
209
|
cache_read_input_tokens?: unknown;
|
|
210
210
|
cache_creation_input_tokens?: unknown;
|
|
211
|
+
cache_creation?: unknown;
|
|
211
212
|
iterations?: unknown;
|
|
212
213
|
};
|
|
214
|
+
type AnthropicCacheWriteUsage = {
|
|
215
|
+
cacheWrite5m?: number;
|
|
216
|
+
cacheWrite1h?: number;
|
|
217
|
+
};
|
|
213
218
|
type AnthropicPromptUsageSnapshot = {
|
|
214
219
|
input: number;
|
|
215
220
|
cacheRead: number;
|
|
@@ -228,7 +233,8 @@ type AnthropicIterationUsageResult = {
|
|
|
228
233
|
usage: AnthropicIterationUsageSnapshot;
|
|
229
234
|
};
|
|
230
235
|
declare function readAnthropicUsageTokenCount(value: unknown): number | undefined;
|
|
236
|
+
declare function readAnthropicCacheWriteUsage(usage: AnthropicUsagePayload): AnthropicCacheWriteUsage;
|
|
231
237
|
declare function readAnthropicPromptUsageSnapshot(usage: AnthropicUsagePayload): AnthropicPromptUsageSnapshot | undefined;
|
|
232
238
|
declare function readLastAnthropicIterationUsage(usage: AnthropicUsagePayload): AnthropicIterationUsageResult;
|
|
233
239
|
//#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, prepareClaudeSonnet5RequestContext, projectAnthropicTools, readAnthropicFallbackBoundary, readAnthropicPromptUsageSnapshot, readAnthropicUsageTokenCount, readLastAnthropicIterationUsage, reconcileAnthropicToolChoice, requiresClaudeAdaptiveThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeSonnet5ModelIdentity, resolveModelBoundThinkingReplayMode, resolveOriginalAnthropicToolName, streamAnthropic, streamSimpleAnthropic, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, usesClaudeFable5MessagesContract, usesClaudeStreamingRefusalContract, usesFoundryBearerAuth };
|
|
240
|
+
export { ANTHROPIC_OMITTED_REASONING_TEXT, ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, AnthropicCacheWriteUsage, 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, prepareClaudeSonnet5RequestContext, projectAnthropicTools, readAnthropicCacheWriteUsage, readAnthropicFallbackBoundary, readAnthropicPromptUsageSnapshot, readAnthropicUsageTokenCount, readLastAnthropicIterationUsage, reconcileAnthropicToolChoice, requiresClaudeAdaptiveThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeSonnet5ModelIdentity, resolveModelBoundThinkingReplayMode, resolveOriginalAnthropicToolName, streamAnthropic, streamSimpleAnthropic, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, usesClaudeFable5MessagesContract, usesClaudeStreamingRefusalContract, usesFoundryBearerAuth };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as resolveClaudeFable5ModelIdentity, c as resolveClaudeNativeThinkingLevelMap, d as supportsClaudeNativeMaxEffort, f as supportsClaudeNativeXhighEffort, i as requiresClaudeMandatoryAdaptiveThinking, l as resolveClaudeSonnet5ModelIdentity, o as resolveClaudeModelIdentity, r as requiresClaudeDefaultSampling, s as resolveClaudeMythos5ModelIdentity, u as supportsClaudeAdaptiveThinking } from "../src-CXno1H5g.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { _ as
|
|
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, prepareClaudeSonnet5RequestContext, projectAnthropicTools, readAnthropicFallbackBoundary, readAnthropicPromptUsageSnapshot, readAnthropicUsageTokenCount, readLastAnthropicIterationUsage, reconcileAnthropicToolChoice, requiresClaudeAdaptiveThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeSonnet5ModelIdentity, resolveModelBoundThinkingReplayMode, resolveOriginalAnthropicToolName, streamAnthropic, streamSimpleAnthropic, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, usesClaudeFable5MessagesContract, usesClaudeStreamingRefusalContract, usesFoundryBearerAuth };
|
|
2
|
+
import { d as prepareClaudeSonnet5RequestContext, f as requiresClaudeAdaptiveThinking, h as usesClaudeStreamingRefusalContract, l as applyClaudeRequestContract, m as usesClaudeFable5MessagesContract, p as resolveModelBoundThinkingReplayMode, u as defaultsClaudeAdaptiveThinking } from "../system-prompt-cache-boundary-CbHeV4_l.mjs";
|
|
3
|
+
import { _ as buildAnthropicServerSideFallbacks, a as readAnthropicPromptUsageSnapshot, b as omitFoundryBearerCredentialHeaders, c as projectAnthropicTools, d as ANTHROPIC_OMITTED_REASONING_TEXT, f as findActiveAnthropicToolTurnAssistantIndex, g as applyAnthropicFallbackBoundary, h as CLAUDE_FABLE_5_FALLBACK_MODEL_COST, i as readAnthropicCacheWriteUsage, l as reconcileAnthropicToolChoice, m as CLAUDE_FABLE_5_FALLBACK_MODEL, n as streamAnthropic, o as readAnthropicUsageTokenCount, p as ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, r as streamSimpleAnthropic, s as readLastAnthropicIterationUsage, u as resolveOriginalAnthropicToolName, v as readAnthropicFallbackBoundary, x as usesFoundryBearerAuth, y as applyAnthropicRefusal } from "../anthropic-CrUDIBpM.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, prepareClaudeSonnet5RequestContext, projectAnthropicTools, readAnthropicCacheWriteUsage, readAnthropicFallbackBoundary, readAnthropicPromptUsageSnapshot, readAnthropicUsageTokenCount, readLastAnthropicIterationUsage, reconcileAnthropicToolChoice, requiresClaudeAdaptiveThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeSonnet5ModelIdentity, resolveModelBoundThinkingReplayMode, resolveOriginalAnthropicToolName, streamAnthropic, streamSimpleAnthropic, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, usesClaudeFable5MessagesContract, usesClaudeStreamingRefusalContract, usesFoundryBearerAuth };
|