@sayknow-cli/ai 0.3.12 → 0.3.15
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/types/auth-broker/wire-schemas.d.ts +8 -8
- package/dist/types/providers/anthropic.d.ts +1 -1
- package/dist/types/providers/aws-credential-config.d.ts +19 -0
- package/dist/types/providers/google-shared.d.ts +6 -0
- package/dist/types/providers/ollama.d.ts +6 -6
- package/dist/types/providers/openai-chat-server-schema.d.ts +54 -54
- package/dist/types/providers/openai-responses-server-schema.d.ts +18 -18
- package/dist/types/types.d.ts +2 -0
- package/dist/types/usage.d.ts +22 -22
- package/package.json +2 -2
- package/src/providers/amazon-bedrock.ts +37 -33
- package/src/providers/anthropic.ts +54 -49
- package/src/providers/aws-credential-config.ts +180 -0
- package/src/providers/aws-credentials.ts +20 -63
- package/src/providers/google-gemini-cli.ts +27 -3
- package/src/providers/google-shared.ts +55 -3
- package/src/types.ts +2 -0
|
@@ -327,20 +327,20 @@ export declare const usageResponseSchema: z.ZodObject<{
|
|
|
327
327
|
usedFraction: z.ZodOptional<z.ZodNumber>;
|
|
328
328
|
remainingFraction: z.ZodOptional<z.ZodNumber>;
|
|
329
329
|
unit: z.ZodEnum<{
|
|
330
|
-
bytes: "bytes";
|
|
331
|
-
minutes: "minutes";
|
|
332
330
|
percent: "percent";
|
|
333
|
-
requests: "requests";
|
|
334
331
|
tokens: "tokens";
|
|
335
|
-
|
|
332
|
+
requests: "requests";
|
|
336
333
|
usd: "usd";
|
|
334
|
+
minutes: "minutes";
|
|
335
|
+
bytes: "bytes";
|
|
336
|
+
unknown: "unknown";
|
|
337
337
|
}>;
|
|
338
338
|
}, z.core.$strip>;
|
|
339
339
|
status: z.ZodOptional<z.ZodEnum<{
|
|
340
|
-
exhausted: "exhausted";
|
|
341
|
-
ok: "ok";
|
|
342
340
|
unknown: "unknown";
|
|
341
|
+
ok: "ok";
|
|
343
342
|
warning: "warning";
|
|
343
|
+
exhausted: "exhausted";
|
|
344
344
|
}>>;
|
|
345
345
|
notes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
346
346
|
}, z.core.$strip>>;
|
|
@@ -414,13 +414,13 @@ export declare const credentialIfAbsentUploadResponseSchema: z.ZodObject<{
|
|
|
414
414
|
inserted: z.ZodBoolean;
|
|
415
415
|
reason: z.ZodEnum<{
|
|
416
416
|
inserted: "inserted";
|
|
417
|
+
"updated-existing": "updated-existing";
|
|
417
418
|
"skipped-existing": "skipped-existing";
|
|
419
|
+
"skipped-existing-runtime": "skipped-existing-runtime";
|
|
418
420
|
"skipped-existing-config": "skipped-existing-config";
|
|
419
421
|
"skipped-existing-env": "skipped-existing-env";
|
|
420
422
|
"skipped-existing-fallback": "skipped-existing-fallback";
|
|
421
|
-
"skipped-existing-runtime": "skipped-existing-runtime";
|
|
422
423
|
"skipped-invalid": "skipped-invalid";
|
|
423
|
-
"updated-existing": "updated-existing";
|
|
424
424
|
}>;
|
|
425
425
|
entries: z.ZodArray<z.ZodObject<{
|
|
426
426
|
id: z.ZodNumber;
|
|
@@ -54,7 +54,7 @@ export declare const claudeCodeHeaders: {
|
|
|
54
54
|
readonly "X-Stainless-Runtime": "node";
|
|
55
55
|
readonly "X-Stainless-Lang": "js";
|
|
56
56
|
readonly "X-Stainless-Arch": "arm64" | "x64" | "x86" | `other::${string}`;
|
|
57
|
-
readonly "X-Stainless-Os": "
|
|
57
|
+
readonly "X-Stainless-Os": "MacOS" | "Windows" | "Linux" | "FreeBSD" | `Other::${string}`;
|
|
58
58
|
readonly "X-Stainless-Timeout": "600";
|
|
59
59
|
};
|
|
60
60
|
export declare function isClaudeCloakingUserId(userId: string): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AwsCredentials } from "./aws-sigv4";
|
|
2
|
+
export type AwsIniFile = Record<string, Record<string, string>>;
|
|
3
|
+
export interface AwsCredentialSourceOptions {
|
|
4
|
+
profile?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface AwsCredentialSource {
|
|
7
|
+
profile: string;
|
|
8
|
+
credentialsPath: string;
|
|
9
|
+
configPath: string;
|
|
10
|
+
}
|
|
11
|
+
export type AwsProfileCapability = "static" | "process" | "sso" | undefined;
|
|
12
|
+
export declare function parseAwsIni(text: string): AwsIniFile;
|
|
13
|
+
export declare function resolveAwsCredentialSource(options?: AwsCredentialSourceOptions): AwsCredentialSource;
|
|
14
|
+
export declare function readAwsStaticEnvironmentCredentials(): AwsCredentials | undefined;
|
|
15
|
+
export declare function classifyAwsProfileCapability(profile: string, credentialsIni: AwsIniFile | undefined, configIni: AwsIniFile | undefined): AwsProfileCapability;
|
|
16
|
+
export declare function hasResolvableAwsProfileSource(options?: AwsCredentialSourceOptions & {
|
|
17
|
+
onScan?: () => void;
|
|
18
|
+
}, now?: number): boolean;
|
|
19
|
+
export declare function isValidBedrockBearerToken(token: string | undefined): token is string;
|
|
@@ -8,6 +8,12 @@ import type { Content, FinishReason, FunctionCallingConfigMode, GenerateContentP
|
|
|
8
8
|
export type { Content, FunctionCallingConfigMode, GenerateContentParameters, GenerateContentResponse, ThinkingConfig, } from "./google-types";
|
|
9
9
|
export { normalizeSchemaForGoogle };
|
|
10
10
|
type GoogleApiType = "google-generative-ai" | "google-gemini-cli" | "google-vertex";
|
|
11
|
+
export declare const PROVIDER_SAFETY_STOP = "provider_safety_stop";
|
|
12
|
+
export declare function isGoogleCandidateSafetyStopReason(reason: string): boolean;
|
|
13
|
+
export declare function isGooglePromptSafetyStopReason(reason: string): boolean;
|
|
14
|
+
export declare function getGooglePromptBlockReason(promptFeedback: {
|
|
15
|
+
blockReason?: unknown;
|
|
16
|
+
} | undefined): string | undefined;
|
|
11
17
|
/**
|
|
12
18
|
* Thinking level for Gemini 3 models. Mirrors Google's `ThinkingLevel` enum values.
|
|
13
19
|
* Defined here (not in any specific provider) so all Google providers can reference it
|
|
@@ -27,15 +27,15 @@ type OllamaMessage = {
|
|
|
27
27
|
tool_name?: string;
|
|
28
28
|
};
|
|
29
29
|
export declare function createChatBody(model: Model<"ollama-chat">, context: Context, options: OllamaChatOptions | undefined): {
|
|
30
|
-
|
|
31
|
-
messages: OllamaMessage[];
|
|
32
|
-
tools?: OllamaFunctionTool[] | undefined;
|
|
33
|
-
think?: "high" | "low" | "medium" | boolean | undefined;
|
|
34
|
-
tool_choice?: "auto" | "none" | "required" | undefined;
|
|
30
|
+
stream: boolean;
|
|
35
31
|
options?: {
|
|
36
32
|
num_predict: number;
|
|
37
33
|
} | undefined;
|
|
38
|
-
|
|
34
|
+
tool_choice?: "auto" | "none" | "required" | undefined;
|
|
35
|
+
think?: boolean | "low" | "medium" | "high" | undefined;
|
|
36
|
+
tools?: OllamaFunctionTool[] | undefined;
|
|
37
|
+
model: string;
|
|
38
|
+
messages: OllamaMessage[];
|
|
39
39
|
};
|
|
40
40
|
export declare const streamOllama: StreamFunction<"ollama-chat">;
|
|
41
41
|
export {};
|
|
@@ -24,9 +24,9 @@ export declare const imagePartSchema: z.ZodObject<{
|
|
|
24
24
|
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
25
25
|
url: z.ZodString;
|
|
26
26
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
27
|
-
auto: "auto";
|
|
28
|
-
high: "high";
|
|
29
27
|
low: "low";
|
|
28
|
+
high: "high";
|
|
29
|
+
auto: "auto";
|
|
30
30
|
}>>;
|
|
31
31
|
}, z.core.$strip>]>;
|
|
32
32
|
}, z.core.$strip>;
|
|
@@ -36,8 +36,8 @@ export declare const inputAudioPartSchema: z.ZodObject<{
|
|
|
36
36
|
input_audio: z.ZodObject<{
|
|
37
37
|
data: z.ZodString;
|
|
38
38
|
format: z.ZodEnum<{
|
|
39
|
-
mp3: "mp3";
|
|
40
39
|
wav: "wav";
|
|
40
|
+
mp3: "mp3";
|
|
41
41
|
}>;
|
|
42
42
|
}, z.core.$strip>;
|
|
43
43
|
}, z.core.$strip>;
|
|
@@ -71,9 +71,9 @@ export declare const userContentPartSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
71
71
|
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
72
72
|
url: z.ZodString;
|
|
73
73
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
74
|
-
auto: "auto";
|
|
75
|
-
high: "high";
|
|
76
74
|
low: "low";
|
|
75
|
+
high: "high";
|
|
76
|
+
auto: "auto";
|
|
77
77
|
}>>;
|
|
78
78
|
}, z.core.$strip>]>;
|
|
79
79
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -81,8 +81,8 @@ export declare const userContentPartSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
81
81
|
input_audio: z.ZodObject<{
|
|
82
82
|
data: z.ZodString;
|
|
83
83
|
format: z.ZodEnum<{
|
|
84
|
-
mp3: "mp3";
|
|
85
84
|
wav: "wav";
|
|
85
|
+
mp3: "mp3";
|
|
86
86
|
}>;
|
|
87
87
|
}, z.core.$strip>;
|
|
88
88
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -134,9 +134,9 @@ export declare const systemMessageSchema: z.ZodObject<{
|
|
|
134
134
|
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
135
135
|
url: z.ZodString;
|
|
136
136
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
137
|
-
auto: "auto";
|
|
138
|
-
high: "high";
|
|
139
137
|
low: "low";
|
|
138
|
+
high: "high";
|
|
139
|
+
auto: "auto";
|
|
140
140
|
}>>;
|
|
141
141
|
}, z.core.$strip>]>;
|
|
142
142
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -144,8 +144,8 @@ export declare const systemMessageSchema: z.ZodObject<{
|
|
|
144
144
|
input_audio: z.ZodObject<{
|
|
145
145
|
data: z.ZodString;
|
|
146
146
|
format: z.ZodEnum<{
|
|
147
|
-
mp3: "mp3";
|
|
148
147
|
wav: "wav";
|
|
148
|
+
mp3: "mp3";
|
|
149
149
|
}>;
|
|
150
150
|
}, z.core.$strip>;
|
|
151
151
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -172,9 +172,9 @@ export declare const developerMessageSchema: z.ZodObject<{
|
|
|
172
172
|
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
173
173
|
url: z.ZodString;
|
|
174
174
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
175
|
-
auto: "auto";
|
|
176
|
-
high: "high";
|
|
177
175
|
low: "low";
|
|
176
|
+
high: "high";
|
|
177
|
+
auto: "auto";
|
|
178
178
|
}>>;
|
|
179
179
|
}, z.core.$strip>]>;
|
|
180
180
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -182,8 +182,8 @@ export declare const developerMessageSchema: z.ZodObject<{
|
|
|
182
182
|
input_audio: z.ZodObject<{
|
|
183
183
|
data: z.ZodString;
|
|
184
184
|
format: z.ZodEnum<{
|
|
185
|
-
mp3: "mp3";
|
|
186
185
|
wav: "wav";
|
|
186
|
+
mp3: "mp3";
|
|
187
187
|
}>;
|
|
188
188
|
}, z.core.$strip>;
|
|
189
189
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -210,9 +210,9 @@ export declare const userMessageSchema: z.ZodObject<{
|
|
|
210
210
|
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
211
211
|
url: z.ZodString;
|
|
212
212
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
213
|
-
auto: "auto";
|
|
214
|
-
high: "high";
|
|
215
213
|
low: "low";
|
|
214
|
+
high: "high";
|
|
215
|
+
auto: "auto";
|
|
216
216
|
}>>;
|
|
217
217
|
}, z.core.$strip>]>;
|
|
218
218
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -220,8 +220,8 @@ export declare const userMessageSchema: z.ZodObject<{
|
|
|
220
220
|
input_audio: z.ZodObject<{
|
|
221
221
|
data: z.ZodString;
|
|
222
222
|
format: z.ZodEnum<{
|
|
223
|
-
mp3: "mp3";
|
|
224
223
|
wav: "wav";
|
|
224
|
+
mp3: "mp3";
|
|
225
225
|
}>;
|
|
226
226
|
}, z.core.$strip>;
|
|
227
227
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -248,9 +248,9 @@ export declare const assistantMessageSchema: z.ZodObject<{
|
|
|
248
248
|
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
249
249
|
url: z.ZodString;
|
|
250
250
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
251
|
-
auto: "auto";
|
|
252
|
-
high: "high";
|
|
253
251
|
low: "low";
|
|
252
|
+
high: "high";
|
|
253
|
+
auto: "auto";
|
|
254
254
|
}>>;
|
|
255
255
|
}, z.core.$strip>]>;
|
|
256
256
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -258,8 +258,8 @@ export declare const assistantMessageSchema: z.ZodObject<{
|
|
|
258
258
|
input_audio: z.ZodObject<{
|
|
259
259
|
data: z.ZodString;
|
|
260
260
|
format: z.ZodEnum<{
|
|
261
|
-
mp3: "mp3";
|
|
262
261
|
wav: "wav";
|
|
262
|
+
mp3: "mp3";
|
|
263
263
|
}>;
|
|
264
264
|
}, z.core.$strip>;
|
|
265
265
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -294,9 +294,9 @@ export declare const toolMessageSchema: z.ZodObject<{
|
|
|
294
294
|
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
295
295
|
url: z.ZodString;
|
|
296
296
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
297
|
-
auto: "auto";
|
|
298
|
-
high: "high";
|
|
299
297
|
low: "low";
|
|
298
|
+
high: "high";
|
|
299
|
+
auto: "auto";
|
|
300
300
|
}>>;
|
|
301
301
|
}, z.core.$strip>]>;
|
|
302
302
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -304,8 +304,8 @@ export declare const toolMessageSchema: z.ZodObject<{
|
|
|
304
304
|
input_audio: z.ZodObject<{
|
|
305
305
|
data: z.ZodString;
|
|
306
306
|
format: z.ZodEnum<{
|
|
307
|
-
mp3: "mp3";
|
|
308
307
|
wav: "wav";
|
|
308
|
+
mp3: "mp3";
|
|
309
309
|
}>;
|
|
310
310
|
}, z.core.$strip>;
|
|
311
311
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -342,9 +342,9 @@ export declare const messageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
342
342
|
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
343
343
|
url: z.ZodString;
|
|
344
344
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
345
|
-
auto: "auto";
|
|
346
|
-
high: "high";
|
|
347
345
|
low: "low";
|
|
346
|
+
high: "high";
|
|
347
|
+
auto: "auto";
|
|
348
348
|
}>>;
|
|
349
349
|
}, z.core.$strip>]>;
|
|
350
350
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -352,8 +352,8 @@ export declare const messageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
352
352
|
input_audio: z.ZodObject<{
|
|
353
353
|
data: z.ZodString;
|
|
354
354
|
format: z.ZodEnum<{
|
|
355
|
-
mp3: "mp3";
|
|
356
355
|
wav: "wav";
|
|
356
|
+
mp3: "mp3";
|
|
357
357
|
}>;
|
|
358
358
|
}, z.core.$strip>;
|
|
359
359
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -379,9 +379,9 @@ export declare const messageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
379
379
|
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
380
380
|
url: z.ZodString;
|
|
381
381
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
382
|
-
auto: "auto";
|
|
383
|
-
high: "high";
|
|
384
382
|
low: "low";
|
|
383
|
+
high: "high";
|
|
384
|
+
auto: "auto";
|
|
385
385
|
}>>;
|
|
386
386
|
}, z.core.$strip>]>;
|
|
387
387
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -389,8 +389,8 @@ export declare const messageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
389
389
|
input_audio: z.ZodObject<{
|
|
390
390
|
data: z.ZodString;
|
|
391
391
|
format: z.ZodEnum<{
|
|
392
|
-
mp3: "mp3";
|
|
393
392
|
wav: "wav";
|
|
393
|
+
mp3: "mp3";
|
|
394
394
|
}>;
|
|
395
395
|
}, z.core.$strip>;
|
|
396
396
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -416,9 +416,9 @@ export declare const messageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
416
416
|
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
417
417
|
url: z.ZodString;
|
|
418
418
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
419
|
-
auto: "auto";
|
|
420
|
-
high: "high";
|
|
421
419
|
low: "low";
|
|
420
|
+
high: "high";
|
|
421
|
+
auto: "auto";
|
|
422
422
|
}>>;
|
|
423
423
|
}, z.core.$strip>]>;
|
|
424
424
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -426,8 +426,8 @@ export declare const messageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
426
426
|
input_audio: z.ZodObject<{
|
|
427
427
|
data: z.ZodString;
|
|
428
428
|
format: z.ZodEnum<{
|
|
429
|
-
mp3: "mp3";
|
|
430
429
|
wav: "wav";
|
|
430
|
+
mp3: "mp3";
|
|
431
431
|
}>;
|
|
432
432
|
}, z.core.$strip>;
|
|
433
433
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -453,9 +453,9 @@ export declare const messageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
453
453
|
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
454
454
|
url: z.ZodString;
|
|
455
455
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
456
|
-
auto: "auto";
|
|
457
|
-
high: "high";
|
|
458
456
|
low: "low";
|
|
457
|
+
high: "high";
|
|
458
|
+
auto: "auto";
|
|
459
459
|
}>>;
|
|
460
460
|
}, z.core.$strip>]>;
|
|
461
461
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -463,8 +463,8 @@ export declare const messageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
463
463
|
input_audio: z.ZodObject<{
|
|
464
464
|
data: z.ZodString;
|
|
465
465
|
format: z.ZodEnum<{
|
|
466
|
-
mp3: "mp3";
|
|
467
466
|
wav: "wav";
|
|
467
|
+
mp3: "mp3";
|
|
468
468
|
}>;
|
|
469
469
|
}, z.core.$strip>;
|
|
470
470
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -498,9 +498,9 @@ export declare const messageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
498
498
|
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
499
499
|
url: z.ZodString;
|
|
500
500
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
501
|
-
auto: "auto";
|
|
502
|
-
high: "high";
|
|
503
501
|
low: "low";
|
|
502
|
+
high: "high";
|
|
503
|
+
auto: "auto";
|
|
504
504
|
}>>;
|
|
505
505
|
}, z.core.$strip>]>;
|
|
506
506
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -508,8 +508,8 @@ export declare const messageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
508
508
|
input_audio: z.ZodObject<{
|
|
509
509
|
data: z.ZodString;
|
|
510
510
|
format: z.ZodEnum<{
|
|
511
|
-
mp3: "mp3";
|
|
512
511
|
wav: "wav";
|
|
512
|
+
mp3: "mp3";
|
|
513
513
|
}>;
|
|
514
514
|
}, z.core.$strip>;
|
|
515
515
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -552,9 +552,9 @@ export declare const openaiChatRequestSchema: z.ZodObject<{
|
|
|
552
552
|
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
553
553
|
url: z.ZodString;
|
|
554
554
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
555
|
-
auto: "auto";
|
|
556
|
-
high: "high";
|
|
557
555
|
low: "low";
|
|
556
|
+
high: "high";
|
|
557
|
+
auto: "auto";
|
|
558
558
|
}>>;
|
|
559
559
|
}, z.core.$strip>]>;
|
|
560
560
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -562,8 +562,8 @@ export declare const openaiChatRequestSchema: z.ZodObject<{
|
|
|
562
562
|
input_audio: z.ZodObject<{
|
|
563
563
|
data: z.ZodString;
|
|
564
564
|
format: z.ZodEnum<{
|
|
565
|
-
mp3: "mp3";
|
|
566
565
|
wav: "wav";
|
|
566
|
+
mp3: "mp3";
|
|
567
567
|
}>;
|
|
568
568
|
}, z.core.$strip>;
|
|
569
569
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -589,9 +589,9 @@ export declare const openaiChatRequestSchema: z.ZodObject<{
|
|
|
589
589
|
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
590
590
|
url: z.ZodString;
|
|
591
591
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
592
|
-
auto: "auto";
|
|
593
|
-
high: "high";
|
|
594
592
|
low: "low";
|
|
593
|
+
high: "high";
|
|
594
|
+
auto: "auto";
|
|
595
595
|
}>>;
|
|
596
596
|
}, z.core.$strip>]>;
|
|
597
597
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -599,8 +599,8 @@ export declare const openaiChatRequestSchema: z.ZodObject<{
|
|
|
599
599
|
input_audio: z.ZodObject<{
|
|
600
600
|
data: z.ZodString;
|
|
601
601
|
format: z.ZodEnum<{
|
|
602
|
-
mp3: "mp3";
|
|
603
602
|
wav: "wav";
|
|
603
|
+
mp3: "mp3";
|
|
604
604
|
}>;
|
|
605
605
|
}, z.core.$strip>;
|
|
606
606
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -626,9 +626,9 @@ export declare const openaiChatRequestSchema: z.ZodObject<{
|
|
|
626
626
|
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
627
627
|
url: z.ZodString;
|
|
628
628
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
629
|
-
auto: "auto";
|
|
630
|
-
high: "high";
|
|
631
629
|
low: "low";
|
|
630
|
+
high: "high";
|
|
631
|
+
auto: "auto";
|
|
632
632
|
}>>;
|
|
633
633
|
}, z.core.$strip>]>;
|
|
634
634
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -636,8 +636,8 @@ export declare const openaiChatRequestSchema: z.ZodObject<{
|
|
|
636
636
|
input_audio: z.ZodObject<{
|
|
637
637
|
data: z.ZodString;
|
|
638
638
|
format: z.ZodEnum<{
|
|
639
|
-
mp3: "mp3";
|
|
640
639
|
wav: "wav";
|
|
640
|
+
mp3: "mp3";
|
|
641
641
|
}>;
|
|
642
642
|
}, z.core.$strip>;
|
|
643
643
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -663,9 +663,9 @@ export declare const openaiChatRequestSchema: z.ZodObject<{
|
|
|
663
663
|
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
664
664
|
url: z.ZodString;
|
|
665
665
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
666
|
-
auto: "auto";
|
|
667
|
-
high: "high";
|
|
668
666
|
low: "low";
|
|
667
|
+
high: "high";
|
|
668
|
+
auto: "auto";
|
|
669
669
|
}>>;
|
|
670
670
|
}, z.core.$strip>]>;
|
|
671
671
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -673,8 +673,8 @@ export declare const openaiChatRequestSchema: z.ZodObject<{
|
|
|
673
673
|
input_audio: z.ZodObject<{
|
|
674
674
|
data: z.ZodString;
|
|
675
675
|
format: z.ZodEnum<{
|
|
676
|
-
mp3: "mp3";
|
|
677
676
|
wav: "wav";
|
|
677
|
+
mp3: "mp3";
|
|
678
678
|
}>;
|
|
679
679
|
}, z.core.$strip>;
|
|
680
680
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -708,9 +708,9 @@ export declare const openaiChatRequestSchema: z.ZodObject<{
|
|
|
708
708
|
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
709
709
|
url: z.ZodString;
|
|
710
710
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
711
|
-
auto: "auto";
|
|
712
|
-
high: "high";
|
|
713
711
|
low: "low";
|
|
712
|
+
high: "high";
|
|
713
|
+
auto: "auto";
|
|
714
714
|
}>>;
|
|
715
715
|
}, z.core.$strip>]>;
|
|
716
716
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -718,8 +718,8 @@ export declare const openaiChatRequestSchema: z.ZodObject<{
|
|
|
718
718
|
input_audio: z.ZodObject<{
|
|
719
719
|
data: z.ZodString;
|
|
720
720
|
format: z.ZodEnum<{
|
|
721
|
-
mp3: "mp3";
|
|
722
721
|
wav: "wav";
|
|
722
|
+
mp3: "mp3";
|
|
723
723
|
}>;
|
|
724
724
|
}, z.core.$strip>;
|
|
725
725
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -775,20 +775,20 @@ export declare const openaiChatRequestSchema: z.ZodObject<{
|
|
|
775
775
|
logit_bias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
776
776
|
user: z.ZodOptional<z.ZodString>;
|
|
777
777
|
reasoning_effort: z.ZodOptional<z.ZodEnum<{
|
|
778
|
-
high: "high";
|
|
779
778
|
low: "low";
|
|
780
|
-
max: "max";
|
|
781
779
|
medium: "medium";
|
|
780
|
+
high: "high";
|
|
782
781
|
minimal: "minimal";
|
|
783
782
|
xhigh: "xhigh";
|
|
783
|
+
max: "max";
|
|
784
784
|
}>>;
|
|
785
785
|
parallel_tool_calls: z.ZodOptional<z.ZodBoolean>;
|
|
786
786
|
service_tier: z.ZodOptional<z.ZodEnum<{
|
|
787
787
|
auto: "auto";
|
|
788
788
|
default: "default";
|
|
789
789
|
flex: "flex";
|
|
790
|
-
priority: "priority";
|
|
791
790
|
scale: "scale";
|
|
791
|
+
priority: "priority";
|
|
792
792
|
}>>;
|
|
793
793
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
794
794
|
logprobs: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -12,9 +12,9 @@ import * as z from "zod/v4";
|
|
|
12
12
|
declare const inputImageBlockSchema: z.ZodObject<{
|
|
13
13
|
type: z.ZodLiteral<"input_image">;
|
|
14
14
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
15
|
-
auto: "auto";
|
|
16
|
-
high: "high";
|
|
17
15
|
low: "low";
|
|
16
|
+
high: "high";
|
|
17
|
+
auto: "auto";
|
|
18
18
|
}>>;
|
|
19
19
|
image_url: z.ZodOptional<z.ZodString>;
|
|
20
20
|
file_id: z.ZodOptional<z.ZodString>;
|
|
@@ -58,9 +58,9 @@ export declare const inputItemSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
58
58
|
}, z.core.$strip>, z.ZodObject<{
|
|
59
59
|
type: z.ZodLiteral<"input_image">;
|
|
60
60
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
61
|
-
auto: "auto";
|
|
62
|
-
high: "high";
|
|
63
61
|
low: "low";
|
|
62
|
+
high: "high";
|
|
63
|
+
auto: "auto";
|
|
64
64
|
}>>;
|
|
65
65
|
image_url: z.ZodOptional<z.ZodString>;
|
|
66
66
|
file_id: z.ZodOptional<z.ZodString>;
|
|
@@ -82,9 +82,9 @@ export declare const inputItemSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
82
82
|
}, z.core.$strip>, z.ZodObject<{
|
|
83
83
|
type: z.ZodLiteral<"input_image">;
|
|
84
84
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
85
|
-
auto: "auto";
|
|
86
|
-
high: "high";
|
|
87
85
|
low: "low";
|
|
86
|
+
high: "high";
|
|
87
|
+
auto: "auto";
|
|
88
88
|
}>>;
|
|
89
89
|
image_url: z.ZodOptional<z.ZodString>;
|
|
90
90
|
file_id: z.ZodOptional<z.ZodString>;
|
|
@@ -177,12 +177,12 @@ export declare const toolChoiceSchema: z.ZodUnion<readonly [z.ZodLiteral<"auto">
|
|
|
177
177
|
name: z.ZodString;
|
|
178
178
|
}, z.core.$strip>, z.ZodObject<{
|
|
179
179
|
type: z.ZodEnum<{
|
|
180
|
-
|
|
181
|
-
computer_use_preview: "computer_use_preview";
|
|
180
|
+
web_search_preview: "web_search_preview";
|
|
182
181
|
file_search: "file_search";
|
|
182
|
+
computer_use_preview: "computer_use_preview";
|
|
183
|
+
code_interpreter: "code_interpreter";
|
|
183
184
|
image_generation: "image_generation";
|
|
184
185
|
mcp: "mcp";
|
|
185
|
-
web_search_preview: "web_search_preview";
|
|
186
186
|
}>;
|
|
187
187
|
}, z.core.$strip>, z.ZodObject<{
|
|
188
188
|
type: z.ZodLiteral<"allowed_tools">;
|
|
@@ -199,9 +199,9 @@ export declare const reasoningConfigSchema: z.ZodObject<{
|
|
|
199
199
|
effort: z.ZodOptional<z.ZodString>;
|
|
200
200
|
summary: z.ZodOptional<z.ZodEnum<{
|
|
201
201
|
auto: "auto";
|
|
202
|
+
none: "none";
|
|
202
203
|
concise: "concise";
|
|
203
204
|
detailed: "detailed";
|
|
204
|
-
none: "none";
|
|
205
205
|
}>>;
|
|
206
206
|
}, z.core.$strip>;
|
|
207
207
|
export declare const stopSchema: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNull]>;
|
|
@@ -219,9 +219,9 @@ export declare const openaiResponsesRequestSchema: z.ZodObject<{
|
|
|
219
219
|
}, z.core.$strip>, z.ZodObject<{
|
|
220
220
|
type: z.ZodLiteral<"input_image">;
|
|
221
221
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
222
|
-
auto: "auto";
|
|
223
|
-
high: "high";
|
|
224
222
|
low: "low";
|
|
223
|
+
high: "high";
|
|
224
|
+
auto: "auto";
|
|
225
225
|
}>>;
|
|
226
226
|
image_url: z.ZodOptional<z.ZodString>;
|
|
227
227
|
file_id: z.ZodOptional<z.ZodString>;
|
|
@@ -243,9 +243,9 @@ export declare const openaiResponsesRequestSchema: z.ZodObject<{
|
|
|
243
243
|
}, z.core.$strip>, z.ZodObject<{
|
|
244
244
|
type: z.ZodLiteral<"input_image">;
|
|
245
245
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
246
|
-
auto: "auto";
|
|
247
|
-
high: "high";
|
|
248
246
|
low: "low";
|
|
247
|
+
high: "high";
|
|
248
|
+
auto: "auto";
|
|
249
249
|
}>>;
|
|
250
250
|
image_url: z.ZodOptional<z.ZodString>;
|
|
251
251
|
file_id: z.ZodOptional<z.ZodString>;
|
|
@@ -329,12 +329,12 @@ export declare const openaiResponsesRequestSchema: z.ZodObject<{
|
|
|
329
329
|
name: z.ZodString;
|
|
330
330
|
}, z.core.$strip>, z.ZodObject<{
|
|
331
331
|
type: z.ZodEnum<{
|
|
332
|
-
|
|
333
|
-
computer_use_preview: "computer_use_preview";
|
|
332
|
+
web_search_preview: "web_search_preview";
|
|
334
333
|
file_search: "file_search";
|
|
334
|
+
computer_use_preview: "computer_use_preview";
|
|
335
|
+
code_interpreter: "code_interpreter";
|
|
335
336
|
image_generation: "image_generation";
|
|
336
337
|
mcp: "mcp";
|
|
337
|
-
web_search_preview: "web_search_preview";
|
|
338
338
|
}>;
|
|
339
339
|
}, z.core.$strip>, z.ZodObject<{
|
|
340
340
|
type: z.ZodLiteral<"allowed_tools">;
|
|
@@ -356,9 +356,9 @@ export declare const openaiResponsesRequestSchema: z.ZodObject<{
|
|
|
356
356
|
effort: z.ZodOptional<z.ZodString>;
|
|
357
357
|
summary: z.ZodOptional<z.ZodEnum<{
|
|
358
358
|
auto: "auto";
|
|
359
|
+
none: "none";
|
|
359
360
|
concise: "concise";
|
|
360
361
|
detailed: "detailed";
|
|
361
|
-
none: "none";
|
|
362
362
|
}>>;
|
|
363
363
|
}, z.core.$strip>>;
|
|
364
364
|
store: z.ZodOptional<z.ZodBoolean>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -393,6 +393,7 @@ export interface Usage {
|
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
395
|
export type StopReason = "stop" | "length" | "toolUse" | "error" | "aborted";
|
|
396
|
+
export type AssistantErrorKind = "provider_safety_stop";
|
|
396
397
|
export interface OpenAIResponsesHistoryPayload {
|
|
397
398
|
type: "openaiResponsesHistory";
|
|
398
399
|
provider?: string;
|
|
@@ -430,6 +431,7 @@ export interface AssistantMessage {
|
|
|
430
431
|
usage: Usage;
|
|
431
432
|
stopReason: StopReason;
|
|
432
433
|
errorMessage?: string;
|
|
434
|
+
errorKind?: AssistantErrorKind;
|
|
433
435
|
/** HTTP status surfaced by the provider when the request failed. Populated by every provider's catch block alongside `errorMessage` so consumers (auth retry, telemetry, UI) can branch without regex-scraping the message. */
|
|
434
436
|
errorStatus?: number;
|
|
435
437
|
/**
|