@broberg/ai-sdk 0.65.0 → 0.66.1

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/index.d.ts CHANGED
@@ -125,8 +125,13 @@ interface DesignResult {
125
125
  }
126
126
  interface ExtractInput<T> {
127
127
  text: string;
128
- /** Zod schema the extracted data must satisfy. */
129
- schema: z.ZodType<T>;
128
+ /** Schema the extracted data must satisfy — anything with `parse(data): T`. Typed
129
+ * structurally (F082) so a zod 3 OR zod 4 schema from the caller both fit; we only
130
+ * ever call `.parse`, and pinning our own zod major onto the caller's type was a
131
+ * compile break waiting for every consumer still on zod 3. */
132
+ schema: {
133
+ parse(data: unknown): T;
134
+ };
130
135
  instructions?: string;
131
136
  tier?: Tier;
132
137
  purpose?: string;
@@ -248,1693 +253,771 @@ interface Contracts {
248
253
  rerank(input: RerankInput): Promise<RerankResult>;
249
254
  }
250
255
 
256
+ /** Upper bounds on every array the SDK accepts (F082.2, GHSA-mrhx-c7xc-m3w5). zod
257
+ * 4.6.7 stops at the first issue only when an array has a `.max()`; without one,
258
+ * 200k bad elements still produce 200k issues (buddy + cms measured, 24 Oct 2026).
259
+ * Set far above real use on purpose — the owner asked for cautious limits, so a
260
+ * bound that rejects a legitimate call is the failure to avoid, not a loose one. */
261
+ declare const INPUT_LIMITS: {
262
+ readonly messages: 10000;
263
+ readonly contentParts: 1000;
264
+ readonly toolCalls: 1000;
265
+ readonly tools: 1000;
266
+ readonly fallback: 32;
267
+ readonly loras: 32;
268
+ readonly trainImages: 1000;
269
+ readonly texts: 10000;
270
+ readonly phrases: 10000;
271
+ readonly granularities: 10;
272
+ readonly judgeEntryItems: 1000;
273
+ readonly stateItems: 10000;
274
+ readonly scriptLines: 10000;
275
+ readonly pronunciations: 10000;
276
+ };
251
277
  declare const tierSpecSchema: z.ZodObject<{
252
278
  provider: z.ZodString;
253
279
  model: z.ZodString;
254
- transport: z.ZodEnum<["http", "subprocess"]>;
255
- }, "strip", z.ZodTypeAny, {
256
- provider: string;
257
- model: string;
258
- transport: "http" | "subprocess";
259
- }, {
260
- provider: string;
261
- model: string;
262
- transport: "http" | "subprocess";
263
- }>;
280
+ transport: z.ZodEnum<{
281
+ http: "http";
282
+ subprocess: "subprocess";
283
+ }>;
284
+ }, z.core.$strip>;
264
285
  declare const toolSchema: z.ZodObject<{
265
286
  name: z.ZodString;
266
287
  description: z.ZodString;
267
288
  parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
268
- }, "strip", z.ZodTypeAny, {
269
- name: string;
270
- parameters: Record<string, unknown>;
271
- description: string;
272
- }, {
273
- name: string;
274
- parameters: Record<string, unknown>;
275
- description: string;
276
- }>;
289
+ }, z.core.$strip>;
277
290
  declare const messageSchema: z.ZodObject<{
278
- role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
279
- content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
291
+ role: z.ZodEnum<{
292
+ system: "system";
293
+ user: "user";
294
+ assistant: "assistant";
295
+ tool: "tool";
296
+ }>;
297
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
280
298
  type: z.ZodLiteral<"text">;
281
299
  text: z.ZodString;
282
- }, "strip", z.ZodTypeAny, {
283
- text: string;
284
- type: "text";
285
- }, {
286
- text: string;
287
- type: "text";
288
- }>, z.ZodObject<{
300
+ }, z.core.$strip>, z.ZodObject<{
289
301
  type: z.ZodLiteral<"image">;
290
- image: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
302
+ image: z.ZodUnion<readonly [z.ZodString, z.ZodInstanceOf<Uint8Array<ArrayBuffer>>]>;
291
303
  mimeType: z.ZodOptional<z.ZodString>;
292
- }, "strip", z.ZodTypeAny, {
293
- image: string | Uint8Array<ArrayBuffer>;
294
- type: "image";
295
- mimeType?: string | undefined;
296
- }, {
297
- image: string | Uint8Array<ArrayBuffer>;
298
- type: "image";
299
- mimeType?: string | undefined;
300
- }>]>, "many">]>;
301
- toolCalls: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
304
+ }, z.core.$strip>]>>]>;
305
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
302
306
  id: z.ZodString;
303
307
  name: z.ZodString;
304
308
  arguments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
305
309
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
306
- }, "strip", z.ZodTypeAny, {
307
- id: string;
308
- name: string;
309
- args?: Record<string, unknown> | undefined;
310
- arguments?: Record<string, unknown> | undefined;
311
- }, {
312
- id: string;
313
- name: string;
314
- args?: Record<string, unknown> | undefined;
315
- arguments?: Record<string, unknown> | undefined;
316
- }>, {
317
- id: string;
318
- name: string;
319
- args?: Record<string, unknown> | undefined;
320
- arguments?: Record<string, unknown> | undefined;
321
- }, {
322
- id: string;
323
- name: string;
324
- args?: Record<string, unknown> | undefined;
325
- arguments?: Record<string, unknown> | undefined;
326
- }>, "many">>;
310
+ }, z.core.$strip>>>;
327
311
  toolCallId: z.ZodOptional<z.ZodString>;
328
- /** F049 — see Message.prefix. Position/role validity is enforced in the adapter,
329
- * not here: the rule is about a message's place in the ARRAY, which a per-message
330
- * schema cannot see. */
331
312
  prefix: z.ZodOptional<z.ZodBoolean>;
332
- }, "strip", z.ZodTypeAny, {
333
- content: string | ({
334
- text: string;
335
- type: "text";
336
- } | {
337
- image: string | Uint8Array<ArrayBuffer>;
338
- type: "image";
339
- mimeType?: string | undefined;
340
- })[];
341
- role: "system" | "user" | "assistant" | "tool";
342
- toolCalls?: {
343
- id: string;
344
- name: string;
345
- args?: Record<string, unknown> | undefined;
346
- arguments?: Record<string, unknown> | undefined;
347
- }[] | undefined;
348
- prefix?: boolean | undefined;
349
- toolCallId?: string | undefined;
350
- }, {
351
- content: string | ({
352
- text: string;
353
- type: "text";
354
- } | {
355
- image: string | Uint8Array<ArrayBuffer>;
356
- type: "image";
357
- mimeType?: string | undefined;
358
- })[];
359
- role: "system" | "user" | "assistant" | "tool";
360
- toolCalls?: {
361
- id: string;
362
- name: string;
363
- args?: Record<string, unknown> | undefined;
364
- arguments?: Record<string, unknown> | undefined;
365
- }[] | undefined;
366
- prefix?: boolean | undefined;
367
- toolCallId?: string | undefined;
368
- }>;
313
+ }, z.core.$strip>;
369
314
  declare const chatInputSchema: z.ZodObject<{
370
- tier: z.ZodOptional<z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>>;
315
+ tier: z.ZodOptional<z.ZodEnum<{
316
+ vision: "vision";
317
+ video: "video";
318
+ embedding: "embedding";
319
+ fast: "fast";
320
+ smart: "smart";
321
+ powerful: "powerful";
322
+ cheap: "cheap";
323
+ }>>;
371
324
  override: z.ZodOptional<z.ZodObject<{
372
325
  provider: z.ZodOptional<z.ZodString>;
373
326
  model: z.ZodOptional<z.ZodString>;
374
- transport: z.ZodOptional<z.ZodEnum<["http", "subprocess"]>>;
375
- }, "strip", z.ZodTypeAny, {
376
- provider?: string | undefined;
377
- model?: string | undefined;
378
- transport?: "http" | "subprocess" | undefined;
379
- }, {
380
- provider?: string | undefined;
381
- model?: string | undefined;
382
- transport?: "http" | "subprocess" | undefined;
383
- }>>;
384
- fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>, z.ZodObject<{
327
+ transport: z.ZodOptional<z.ZodEnum<{
328
+ http: "http";
329
+ subprocess: "subprocess";
330
+ }>>;
331
+ }, z.core.$strip>>;
332
+ fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
333
+ vision: "vision";
334
+ video: "video";
335
+ embedding: "embedding";
336
+ fast: "fast";
337
+ smart: "smart";
338
+ powerful: "powerful";
339
+ cheap: "cheap";
340
+ }>, z.ZodObject<{
385
341
  provider: z.ZodString;
386
342
  model: z.ZodString;
387
- transport: z.ZodEnum<["http", "subprocess"]>;
388
- }, "strip", z.ZodTypeAny, {
389
- provider: string;
390
- model: string;
391
- transport: "http" | "subprocess";
392
- }, {
393
- provider: string;
394
- model: string;
395
- transport: "http" | "subprocess";
396
- }>]>, "many">>;
343
+ transport: z.ZodEnum<{
344
+ http: "http";
345
+ subprocess: "subprocess";
346
+ }>;
347
+ }, z.core.$strip>]>>>;
397
348
  purpose: z.ZodOptional<z.ZodString>;
398
349
  allowFloating: z.ZodOptional<z.ZodBoolean>;
399
350
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
400
- /** F039 — reuse a cached prompt prefix on Mistral at 10% of the input rate.
401
- * A stable id for "the same conversation" (conversation id, session id).
402
- * Derive it from (tenant, conversation): the key is a shared-prefix identity,
403
- * so two tenants with identical transcripts must get different keys. */
404
351
  promptCacheKey: z.ZodOptional<z.ZodString>;
405
- /** F039.2 — prompt caching is ON by default on providers that support it.
406
- * false opts out; an explicit promptCacheKey always wins. */
407
352
  promptCache: z.ZodOptional<z.ZodBoolean>;
408
353
  prompt: z.ZodOptional<z.ZodString>;
409
354
  messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
410
- role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
411
- content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
355
+ role: z.ZodEnum<{
356
+ system: "system";
357
+ user: "user";
358
+ assistant: "assistant";
359
+ tool: "tool";
360
+ }>;
361
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
412
362
  type: z.ZodLiteral<"text">;
413
363
  text: z.ZodString;
414
- }, "strip", z.ZodTypeAny, {
415
- text: string;
416
- type: "text";
417
- }, {
418
- text: string;
419
- type: "text";
420
- }>, z.ZodObject<{
364
+ }, z.core.$strip>, z.ZodObject<{
421
365
  type: z.ZodLiteral<"image">;
422
- image: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
366
+ image: z.ZodUnion<readonly [z.ZodString, z.ZodInstanceOf<Uint8Array<ArrayBuffer>>]>;
423
367
  mimeType: z.ZodOptional<z.ZodString>;
424
- }, "strip", z.ZodTypeAny, {
425
- image: string | Uint8Array<ArrayBuffer>;
426
- type: "image";
427
- mimeType?: string | undefined;
428
- }, {
429
- image: string | Uint8Array<ArrayBuffer>;
430
- type: "image";
431
- mimeType?: string | undefined;
432
- }>]>, "many">]>;
433
- toolCalls: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
368
+ }, z.core.$strip>]>>]>;
369
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
434
370
  id: z.ZodString;
435
371
  name: z.ZodString;
436
372
  arguments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
437
373
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
438
- }, "strip", z.ZodTypeAny, {
439
- id: string;
440
- name: string;
441
- args?: Record<string, unknown> | undefined;
442
- arguments?: Record<string, unknown> | undefined;
443
- }, {
444
- id: string;
445
- name: string;
446
- args?: Record<string, unknown> | undefined;
447
- arguments?: Record<string, unknown> | undefined;
448
- }>, {
449
- id: string;
450
- name: string;
451
- args?: Record<string, unknown> | undefined;
452
- arguments?: Record<string, unknown> | undefined;
453
- }, {
454
- id: string;
455
- name: string;
456
- args?: Record<string, unknown> | undefined;
457
- arguments?: Record<string, unknown> | undefined;
458
- }>, "many">>;
374
+ }, z.core.$strip>>>;
459
375
  toolCallId: z.ZodOptional<z.ZodString>;
460
- /** F049 — see Message.prefix. Position/role validity is enforced in the adapter,
461
- * not here: the rule is about a message's place in the ARRAY, which a per-message
462
- * schema cannot see. */
463
376
  prefix: z.ZodOptional<z.ZodBoolean>;
464
- }, "strip", z.ZodTypeAny, {
465
- content: string | ({
466
- text: string;
467
- type: "text";
468
- } | {
469
- image: string | Uint8Array<ArrayBuffer>;
470
- type: "image";
471
- mimeType?: string | undefined;
472
- })[];
473
- role: "system" | "user" | "assistant" | "tool";
474
- toolCalls?: {
475
- id: string;
476
- name: string;
477
- args?: Record<string, unknown> | undefined;
478
- arguments?: Record<string, unknown> | undefined;
479
- }[] | undefined;
480
- prefix?: boolean | undefined;
481
- toolCallId?: string | undefined;
482
- }, {
483
- content: string | ({
484
- text: string;
485
- type: "text";
486
- } | {
487
- image: string | Uint8Array<ArrayBuffer>;
488
- type: "image";
489
- mimeType?: string | undefined;
490
- })[];
491
- role: "system" | "user" | "assistant" | "tool";
492
- toolCalls?: {
493
- id: string;
494
- name: string;
495
- args?: Record<string, unknown> | undefined;
496
- arguments?: Record<string, unknown> | undefined;
497
- }[] | undefined;
498
- prefix?: boolean | undefined;
499
- toolCallId?: string | undefined;
500
- }>, "many">>;
377
+ }, z.core.$strip>>>;
501
378
  system: z.ZodOptional<z.ZodString>;
502
379
  tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
503
380
  name: z.ZodString;
504
381
  description: z.ZodString;
505
382
  parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
506
- }, "strip", z.ZodTypeAny, {
507
- name: string;
508
- parameters: Record<string, unknown>;
509
- description: string;
510
- }, {
511
- name: string;
512
- parameters: Record<string, unknown>;
513
- description: string;
514
- }>, "many">>;
383
+ }, z.core.$strip>>>;
515
384
  maxTokens: z.ZodOptional<z.ZodNumber>;
516
385
  temperature: z.ZodOptional<z.ZodNumber>;
517
- /** F074.3 — Mistral reasoning ("thinking") before the answer. Large 4 thinks by
518
- * default; the SDK sends "none" for it unless you ask for "high". Mistral only. */
519
- reasoningEffort: z.ZodOptional<z.ZodEnum<["none", "high"]>>;
520
- /** "json" requests JSON-object output (OpenAI-compatible response_format). */
521
- responseFormat: z.ZodOptional<z.ZodEnum<["json", "text"]>>;
522
- }, "strip", z.ZodTypeAny, {
523
- system?: string | undefined;
524
- purpose?: string | undefined;
525
- labels?: Record<string, string> | undefined;
526
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
527
- prompt?: string | undefined;
528
- messages?: {
529
- content: string | ({
530
- text: string;
531
- type: "text";
532
- } | {
533
- image: string | Uint8Array<ArrayBuffer>;
534
- type: "image";
535
- mimeType?: string | undefined;
536
- })[];
537
- role: "system" | "user" | "assistant" | "tool";
538
- toolCalls?: {
539
- id: string;
540
- name: string;
541
- args?: Record<string, unknown> | undefined;
542
- arguments?: Record<string, unknown> | undefined;
543
- }[] | undefined;
544
- prefix?: boolean | undefined;
545
- toolCallId?: string | undefined;
546
- }[] | undefined;
547
- tools?: {
548
- name: string;
549
- parameters: Record<string, unknown>;
550
- description: string;
551
- }[] | undefined;
552
- temperature?: number | undefined;
553
- promptCacheKey?: string | undefined;
554
- promptCache?: boolean | undefined;
555
- maxTokens?: number | undefined;
556
- reasoningEffort?: "none" | "high" | undefined;
557
- responseFormat?: "text" | "json" | undefined;
558
- override?: {
559
- provider?: string | undefined;
560
- model?: string | undefined;
561
- transport?: "http" | "subprocess" | undefined;
562
- } | undefined;
563
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
564
- provider: string;
565
- model: string;
566
- transport: "http" | "subprocess";
567
- })[] | undefined;
568
- allowFloating?: boolean | undefined;
569
- }, {
570
- system?: string | undefined;
571
- purpose?: string | undefined;
572
- labels?: Record<string, string> | undefined;
573
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
574
- prompt?: string | undefined;
575
- messages?: {
576
- content: string | ({
577
- text: string;
578
- type: "text";
579
- } | {
580
- image: string | Uint8Array<ArrayBuffer>;
581
- type: "image";
582
- mimeType?: string | undefined;
583
- })[];
584
- role: "system" | "user" | "assistant" | "tool";
585
- toolCalls?: {
586
- id: string;
587
- name: string;
588
- args?: Record<string, unknown> | undefined;
589
- arguments?: Record<string, unknown> | undefined;
590
- }[] | undefined;
591
- prefix?: boolean | undefined;
592
- toolCallId?: string | undefined;
593
- }[] | undefined;
594
- tools?: {
595
- name: string;
596
- parameters: Record<string, unknown>;
597
- description: string;
598
- }[] | undefined;
599
- temperature?: number | undefined;
600
- promptCacheKey?: string | undefined;
601
- promptCache?: boolean | undefined;
602
- maxTokens?: number | undefined;
603
- reasoningEffort?: "none" | "high" | undefined;
604
- responseFormat?: "text" | "json" | undefined;
605
- override?: {
606
- provider?: string | undefined;
607
- model?: string | undefined;
608
- transport?: "http" | "subprocess" | undefined;
609
- } | undefined;
610
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
611
- provider: string;
612
- model: string;
613
- transport: "http" | "subprocess";
614
- })[] | undefined;
615
- allowFloating?: boolean | undefined;
616
- }>;
386
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
387
+ none: "none";
388
+ high: "high";
389
+ }>>;
390
+ responseFormat: z.ZodOptional<z.ZodEnum<{
391
+ text: "text";
392
+ json: "json";
393
+ }>>;
394
+ }, z.core.$strip>;
617
395
  declare const visionInputSchema: z.ZodObject<{
618
- tier: z.ZodOptional<z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>>;
396
+ tier: z.ZodOptional<z.ZodEnum<{
397
+ vision: "vision";
398
+ video: "video";
399
+ embedding: "embedding";
400
+ fast: "fast";
401
+ smart: "smart";
402
+ powerful: "powerful";
403
+ cheap: "cheap";
404
+ }>>;
619
405
  override: z.ZodOptional<z.ZodObject<{
620
406
  provider: z.ZodOptional<z.ZodString>;
621
407
  model: z.ZodOptional<z.ZodString>;
622
- transport: z.ZodOptional<z.ZodEnum<["http", "subprocess"]>>;
623
- }, "strip", z.ZodTypeAny, {
624
- provider?: string | undefined;
625
- model?: string | undefined;
626
- transport?: "http" | "subprocess" | undefined;
627
- }, {
628
- provider?: string | undefined;
629
- model?: string | undefined;
630
- transport?: "http" | "subprocess" | undefined;
631
- }>>;
632
- fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>, z.ZodObject<{
408
+ transport: z.ZodOptional<z.ZodEnum<{
409
+ http: "http";
410
+ subprocess: "subprocess";
411
+ }>>;
412
+ }, z.core.$strip>>;
413
+ fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
414
+ vision: "vision";
415
+ video: "video";
416
+ embedding: "embedding";
417
+ fast: "fast";
418
+ smart: "smart";
419
+ powerful: "powerful";
420
+ cheap: "cheap";
421
+ }>, z.ZodObject<{
633
422
  provider: z.ZodString;
634
423
  model: z.ZodString;
635
- transport: z.ZodEnum<["http", "subprocess"]>;
636
- }, "strip", z.ZodTypeAny, {
637
- provider: string;
638
- model: string;
639
- transport: "http" | "subprocess";
640
- }, {
641
- provider: string;
642
- model: string;
643
- transport: "http" | "subprocess";
644
- }>]>, "many">>;
424
+ transport: z.ZodEnum<{
425
+ http: "http";
426
+ subprocess: "subprocess";
427
+ }>;
428
+ }, z.core.$strip>]>>>;
645
429
  purpose: z.ZodOptional<z.ZodString>;
646
430
  allowFloating: z.ZodOptional<z.ZodBoolean>;
647
431
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
648
- image: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
432
+ image: z.ZodUnion<readonly [z.ZodString, z.ZodInstanceOf<Uint8Array<ArrayBuffer>>]>;
649
433
  prompt: z.ZodString;
650
434
  mimeType: z.ZodOptional<z.ZodString>;
651
- /** System instruction — drives instruction-following far better than stuffing
652
- * rules into `prompt` for instruction-heavy vision tasks (e.g. a JSON critic). */
653
435
  system: z.ZodOptional<z.ZodString>;
654
- }, "strip", z.ZodTypeAny, {
655
- image: string | Uint8Array<ArrayBuffer>;
656
- prompt: string;
657
- system?: string | undefined;
658
- purpose?: string | undefined;
659
- labels?: Record<string, string> | undefined;
660
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
661
- mimeType?: string | undefined;
662
- override?: {
663
- provider?: string | undefined;
664
- model?: string | undefined;
665
- transport?: "http" | "subprocess" | undefined;
666
- } | undefined;
667
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
668
- provider: string;
669
- model: string;
670
- transport: "http" | "subprocess";
671
- })[] | undefined;
672
- allowFloating?: boolean | undefined;
673
- }, {
674
- image: string | Uint8Array<ArrayBuffer>;
675
- prompt: string;
676
- system?: string | undefined;
677
- purpose?: string | undefined;
678
- labels?: Record<string, string> | undefined;
679
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
680
- mimeType?: string | undefined;
681
- override?: {
682
- provider?: string | undefined;
683
- model?: string | undefined;
684
- transport?: "http" | "subprocess" | undefined;
685
- } | undefined;
686
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
687
- provider: string;
688
- model: string;
689
- transport: "http" | "subprocess";
690
- })[] | undefined;
691
- allowFloating?: boolean | undefined;
692
- }>;
436
+ }, z.core.$strip>;
693
437
  declare const videoInputSchema: z.ZodObject<{
694
- tier: z.ZodOptional<z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>>;
438
+ tier: z.ZodOptional<z.ZodEnum<{
439
+ vision: "vision";
440
+ video: "video";
441
+ embedding: "embedding";
442
+ fast: "fast";
443
+ smart: "smart";
444
+ powerful: "powerful";
445
+ cheap: "cheap";
446
+ }>>;
695
447
  override: z.ZodOptional<z.ZodObject<{
696
448
  provider: z.ZodOptional<z.ZodString>;
697
449
  model: z.ZodOptional<z.ZodString>;
698
- transport: z.ZodOptional<z.ZodEnum<["http", "subprocess"]>>;
699
- }, "strip", z.ZodTypeAny, {
700
- provider?: string | undefined;
701
- model?: string | undefined;
702
- transport?: "http" | "subprocess" | undefined;
703
- }, {
704
- provider?: string | undefined;
705
- model?: string | undefined;
706
- transport?: "http" | "subprocess" | undefined;
707
- }>>;
708
- fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>, z.ZodObject<{
450
+ transport: z.ZodOptional<z.ZodEnum<{
451
+ http: "http";
452
+ subprocess: "subprocess";
453
+ }>>;
454
+ }, z.core.$strip>>;
455
+ fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
456
+ vision: "vision";
457
+ video: "video";
458
+ embedding: "embedding";
459
+ fast: "fast";
460
+ smart: "smart";
461
+ powerful: "powerful";
462
+ cheap: "cheap";
463
+ }>, z.ZodObject<{
709
464
  provider: z.ZodString;
710
465
  model: z.ZodString;
711
- transport: z.ZodEnum<["http", "subprocess"]>;
712
- }, "strip", z.ZodTypeAny, {
713
- provider: string;
714
- model: string;
715
- transport: "http" | "subprocess";
716
- }, {
717
- provider: string;
718
- model: string;
719
- transport: "http" | "subprocess";
720
- }>]>, "many">>;
466
+ transport: z.ZodEnum<{
467
+ http: "http";
468
+ subprocess: "subprocess";
469
+ }>;
470
+ }, z.core.$strip>]>>>;
721
471
  purpose: z.ZodOptional<z.ZodString>;
722
472
  allowFloating: z.ZodOptional<z.ZodBoolean>;
723
473
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
724
- video: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
474
+ video: z.ZodUnion<readonly [z.ZodString, z.ZodInstanceOf<Uint8Array<ArrayBuffer>>]>;
725
475
  prompt: z.ZodString;
726
476
  mimeType: z.ZodOptional<z.ZodString>;
727
- /** System instruction — same instruction-following benefit as on vision. */
728
477
  system: z.ZodOptional<z.ZodString>;
729
- }, "strip", z.ZodTypeAny, {
730
- video: string | Uint8Array<ArrayBuffer>;
731
- prompt: string;
732
- system?: string | undefined;
733
- purpose?: string | undefined;
734
- labels?: Record<string, string> | undefined;
735
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
736
- mimeType?: string | undefined;
737
- override?: {
738
- provider?: string | undefined;
739
- model?: string | undefined;
740
- transport?: "http" | "subprocess" | undefined;
741
- } | undefined;
742
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
743
- provider: string;
744
- model: string;
745
- transport: "http" | "subprocess";
746
- })[] | undefined;
747
- allowFloating?: boolean | undefined;
748
- }, {
749
- video: string | Uint8Array<ArrayBuffer>;
750
- prompt: string;
751
- system?: string | undefined;
752
- purpose?: string | undefined;
753
- labels?: Record<string, string> | undefined;
754
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
755
- mimeType?: string | undefined;
756
- override?: {
757
- provider?: string | undefined;
758
- model?: string | undefined;
759
- transport?: "http" | "subprocess" | undefined;
760
- } | undefined;
761
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
762
- provider: string;
763
- model: string;
764
- transport: "http" | "subprocess";
765
- })[] | undefined;
766
- allowFloating?: boolean | undefined;
767
- }>;
478
+ }, z.core.$strip>;
768
479
  declare const translateInputSchema: z.ZodObject<{
769
- tier: z.ZodOptional<z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>>;
480
+ tier: z.ZodOptional<z.ZodEnum<{
481
+ vision: "vision";
482
+ video: "video";
483
+ embedding: "embedding";
484
+ fast: "fast";
485
+ smart: "smart";
486
+ powerful: "powerful";
487
+ cheap: "cheap";
488
+ }>>;
770
489
  override: z.ZodOptional<z.ZodObject<{
771
490
  provider: z.ZodOptional<z.ZodString>;
772
491
  model: z.ZodOptional<z.ZodString>;
773
- transport: z.ZodOptional<z.ZodEnum<["http", "subprocess"]>>;
774
- }, "strip", z.ZodTypeAny, {
775
- provider?: string | undefined;
776
- model?: string | undefined;
777
- transport?: "http" | "subprocess" | undefined;
778
- }, {
779
- provider?: string | undefined;
780
- model?: string | undefined;
781
- transport?: "http" | "subprocess" | undefined;
782
- }>>;
783
- fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>, z.ZodObject<{
492
+ transport: z.ZodOptional<z.ZodEnum<{
493
+ http: "http";
494
+ subprocess: "subprocess";
495
+ }>>;
496
+ }, z.core.$strip>>;
497
+ fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
498
+ vision: "vision";
499
+ video: "video";
500
+ embedding: "embedding";
501
+ fast: "fast";
502
+ smart: "smart";
503
+ powerful: "powerful";
504
+ cheap: "cheap";
505
+ }>, z.ZodObject<{
784
506
  provider: z.ZodString;
785
507
  model: z.ZodString;
786
- transport: z.ZodEnum<["http", "subprocess"]>;
787
- }, "strip", z.ZodTypeAny, {
788
- provider: string;
789
- model: string;
790
- transport: "http" | "subprocess";
791
- }, {
792
- provider: string;
793
- model: string;
794
- transport: "http" | "subprocess";
795
- }>]>, "many">>;
508
+ transport: z.ZodEnum<{
509
+ http: "http";
510
+ subprocess: "subprocess";
511
+ }>;
512
+ }, z.core.$strip>]>>>;
796
513
  purpose: z.ZodOptional<z.ZodString>;
797
514
  allowFloating: z.ZodOptional<z.ZodBoolean>;
798
515
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
799
516
  text: z.ZodString;
800
517
  to: z.ZodString;
801
518
  from: z.ZodOptional<z.ZodString>;
802
- }, "strip", z.ZodTypeAny, {
803
- text: string;
804
- to: string;
805
- purpose?: string | undefined;
806
- labels?: Record<string, string> | undefined;
807
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
808
- override?: {
809
- provider?: string | undefined;
810
- model?: string | undefined;
811
- transport?: "http" | "subprocess" | undefined;
812
- } | undefined;
813
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
814
- provider: string;
815
- model: string;
816
- transport: "http" | "subprocess";
817
- })[] | undefined;
818
- allowFloating?: boolean | undefined;
819
- from?: string | undefined;
820
- }, {
821
- text: string;
822
- to: string;
823
- purpose?: string | undefined;
824
- labels?: Record<string, string> | undefined;
825
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
826
- override?: {
827
- provider?: string | undefined;
828
- model?: string | undefined;
829
- transport?: "http" | "subprocess" | undefined;
830
- } | undefined;
831
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
832
- provider: string;
833
- model: string;
834
- transport: "http" | "subprocess";
835
- })[] | undefined;
836
- allowFloating?: boolean | undefined;
837
- from?: string | undefined;
838
- }>;
519
+ }, z.core.$strip>;
839
520
  declare const imageInputSchema: z.ZodObject<{
840
- tier: z.ZodOptional<z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>>;
521
+ tier: z.ZodOptional<z.ZodEnum<{
522
+ vision: "vision";
523
+ video: "video";
524
+ embedding: "embedding";
525
+ fast: "fast";
526
+ smart: "smart";
527
+ powerful: "powerful";
528
+ cheap: "cheap";
529
+ }>>;
841
530
  override: z.ZodOptional<z.ZodObject<{
842
531
  provider: z.ZodOptional<z.ZodString>;
843
532
  model: z.ZodOptional<z.ZodString>;
844
- transport: z.ZodOptional<z.ZodEnum<["http", "subprocess"]>>;
845
- }, "strip", z.ZodTypeAny, {
846
- provider?: string | undefined;
847
- model?: string | undefined;
848
- transport?: "http" | "subprocess" | undefined;
849
- }, {
850
- provider?: string | undefined;
851
- model?: string | undefined;
852
- transport?: "http" | "subprocess" | undefined;
853
- }>>;
854
- fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>, z.ZodObject<{
533
+ transport: z.ZodOptional<z.ZodEnum<{
534
+ http: "http";
535
+ subprocess: "subprocess";
536
+ }>>;
537
+ }, z.core.$strip>>;
538
+ fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
539
+ vision: "vision";
540
+ video: "video";
541
+ embedding: "embedding";
542
+ fast: "fast";
543
+ smart: "smart";
544
+ powerful: "powerful";
545
+ cheap: "cheap";
546
+ }>, z.ZodObject<{
855
547
  provider: z.ZodString;
856
548
  model: z.ZodString;
857
- transport: z.ZodEnum<["http", "subprocess"]>;
858
- }, "strip", z.ZodTypeAny, {
859
- provider: string;
860
- model: string;
861
- transport: "http" | "subprocess";
862
- }, {
863
- provider: string;
864
- model: string;
865
- transport: "http" | "subprocess";
866
- }>]>, "many">>;
549
+ transport: z.ZodEnum<{
550
+ http: "http";
551
+ subprocess: "subprocess";
552
+ }>;
553
+ }, z.core.$strip>]>>>;
867
554
  purpose: z.ZodOptional<z.ZodString>;
868
555
  allowFloating: z.ZodOptional<z.ZodBoolean>;
869
556
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
870
557
  prompt: z.ZodString;
871
558
  width: z.ZodOptional<z.ZodNumber>;
872
559
  height: z.ZodOptional<z.ZodNumber>;
873
- /** LoRAs to merge at inference (F021). */
874
560
  loras: z.ZodOptional<z.ZodArray<z.ZodObject<{
875
561
  path: z.ZodString;
876
562
  scale: z.ZodOptional<z.ZodNumber>;
877
- }, "strip", z.ZodTypeAny, {
878
- path: string;
879
- scale?: number | undefined;
880
- }, {
881
- path: string;
882
- scale?: number | undefined;
883
- }>, "many">>;
884
- /** Shorthand for a single LoRA — normalized to loras:[{path, scale:1}]. */
563
+ }, z.core.$strip>>>;
885
564
  lora: z.ZodOptional<z.ZodString>;
886
- /** F023 — a BFL finetune id (subject trained in the BFL dashboard). Routes to the
887
- * EU-resident BFL finetuned-portrait endpoint. */
888
565
  finetune: z.ZodOptional<z.ZodString>;
889
- /** F023 — BFL finetune_strength (~0–2; higher = stronger likeness). */
890
566
  finetuneStrength: z.ZodOptional<z.ZodNumber>;
891
- /** F023.5 — 1–8 reference photos (URL or raw bytes) → EU-resident BFL FLUX 2
892
- * multi-reference generation (likeness, no training step). */
893
- referenceImages: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>, "many">>;
894
- /** F023.5 — fixed seed for reproducible output (BFL). */
567
+ referenceImages: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodInstanceOf<Uint8Array<ArrayBuffer>>]>>>;
895
568
  seed: z.ZodOptional<z.ZodNumber>;
896
- /** F023.5 — output container (BFL FLUX 2). Default jpeg. */
897
- outputFormat: z.ZodOptional<z.ZodEnum<["jpeg", "png", "webp"]>>;
898
- /** F023.5 — BFL content-moderation strictness, 0 (strict) … 6 (lax). Default 2. */
569
+ outputFormat: z.ZodOptional<z.ZodEnum<{
570
+ jpeg: "jpeg";
571
+ png: "png";
572
+ webp: "webp";
573
+ }>>;
899
574
  safetyTolerance: z.ZodOptional<z.ZodNumber>;
900
- /** F021.4 — re-roll once if fal returns a black image (NSFW false-positive). */
901
575
  retryOnBlack: z.ZodOptional<z.ZodBoolean>;
902
- }, "strip", z.ZodTypeAny, {
903
- prompt: string;
904
- purpose?: string | undefined;
905
- labels?: Record<string, string> | undefined;
906
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
907
- seed?: number | undefined;
908
- outputFormat?: "jpeg" | "png" | "webp" | undefined;
909
- loras?: {
910
- path: string;
911
- scale?: number | undefined;
912
- }[] | undefined;
913
- lora?: string | undefined;
914
- width?: number | undefined;
915
- height?: number | undefined;
916
- override?: {
917
- provider?: string | undefined;
918
- model?: string | undefined;
919
- transport?: "http" | "subprocess" | undefined;
920
- } | undefined;
921
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
922
- provider: string;
923
- model: string;
924
- transport: "http" | "subprocess";
925
- })[] | undefined;
926
- allowFloating?: boolean | undefined;
927
- finetune?: string | undefined;
928
- finetuneStrength?: number | undefined;
929
- referenceImages?: (string | Uint8Array<ArrayBuffer>)[] | undefined;
930
- safetyTolerance?: number | undefined;
931
- retryOnBlack?: boolean | undefined;
932
- }, {
933
- prompt: string;
934
- purpose?: string | undefined;
935
- labels?: Record<string, string> | undefined;
936
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
937
- seed?: number | undefined;
938
- outputFormat?: "jpeg" | "png" | "webp" | undefined;
939
- loras?: {
940
- path: string;
941
- scale?: number | undefined;
942
- }[] | undefined;
943
- lora?: string | undefined;
944
- width?: number | undefined;
945
- height?: number | undefined;
946
- override?: {
947
- provider?: string | undefined;
948
- model?: string | undefined;
949
- transport?: "http" | "subprocess" | undefined;
950
- } | undefined;
951
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
952
- provider: string;
953
- model: string;
954
- transport: "http" | "subprocess";
955
- })[] | undefined;
956
- allowFloating?: boolean | undefined;
957
- finetune?: string | undefined;
958
- finetuneStrength?: number | undefined;
959
- referenceImages?: (string | Uint8Array<ArrayBuffer>)[] | undefined;
960
- safetyTolerance?: number | undefined;
961
- retryOnBlack?: boolean | undefined;
962
- }>;
576
+ }, z.core.$strip>;
963
577
  declare const animateInputSchema: z.ZodObject<{
964
- tier: z.ZodOptional<z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>>;
578
+ tier: z.ZodOptional<z.ZodEnum<{
579
+ vision: "vision";
580
+ video: "video";
581
+ embedding: "embedding";
582
+ fast: "fast";
583
+ smart: "smart";
584
+ powerful: "powerful";
585
+ cheap: "cheap";
586
+ }>>;
965
587
  override: z.ZodOptional<z.ZodObject<{
966
588
  provider: z.ZodOptional<z.ZodString>;
967
589
  model: z.ZodOptional<z.ZodString>;
968
- transport: z.ZodOptional<z.ZodEnum<["http", "subprocess"]>>;
969
- }, "strip", z.ZodTypeAny, {
970
- provider?: string | undefined;
971
- model?: string | undefined;
972
- transport?: "http" | "subprocess" | undefined;
973
- }, {
974
- provider?: string | undefined;
975
- model?: string | undefined;
976
- transport?: "http" | "subprocess" | undefined;
977
- }>>;
978
- fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>, z.ZodObject<{
590
+ transport: z.ZodOptional<z.ZodEnum<{
591
+ http: "http";
592
+ subprocess: "subprocess";
593
+ }>>;
594
+ }, z.core.$strip>>;
595
+ fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
596
+ vision: "vision";
597
+ video: "video";
598
+ embedding: "embedding";
599
+ fast: "fast";
600
+ smart: "smart";
601
+ powerful: "powerful";
602
+ cheap: "cheap";
603
+ }>, z.ZodObject<{
979
604
  provider: z.ZodString;
980
605
  model: z.ZodString;
981
- transport: z.ZodEnum<["http", "subprocess"]>;
982
- }, "strip", z.ZodTypeAny, {
983
- provider: string;
984
- model: string;
985
- transport: "http" | "subprocess";
986
- }, {
987
- provider: string;
988
- model: string;
989
- transport: "http" | "subprocess";
990
- }>]>, "many">>;
606
+ transport: z.ZodEnum<{
607
+ http: "http";
608
+ subprocess: "subprocess";
609
+ }>;
610
+ }, z.core.$strip>]>>>;
991
611
  purpose: z.ZodOptional<z.ZodString>;
992
612
  allowFloating: z.ZodOptional<z.ZodBoolean>;
993
613
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
994
- /** Input image: a URL or raw bytes. Where bytes are uploaded is the ADAPTER's
995
- * business — fal uses fal storage, the Gemini/Veo default inlines them.
996
- * Omit for text→video (F079.2): only bfl/flux-3-video supports it. */
997
- image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>>;
998
- /** Motion/scene prompt. */
614
+ image: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodInstanceOf<Uint8Array<ArrayBuffer>>]>>;
999
615
  prompt: z.ZodOptional<z.ZodString>;
1000
- /** Clip length in seconds (provider-dependent; Veo ≤ 8s). */
1001
616
  durationSec: z.ZodOptional<z.ZodNumber>;
1002
- /** e.g. "720p" / "1080p" (provider-dependent). */
1003
617
  resolution: z.ZodOptional<z.ZodString>;
1004
- /** F079.6 — false = no audio track at all (bfl/flux-3-video only; other routes refuse). */
1005
618
  audio: z.ZodOptional<z.ZodBoolean>;
1006
- }, "strip", z.ZodTypeAny, {
1007
- image?: string | Uint8Array<ArrayBuffer> | undefined;
1008
- purpose?: string | undefined;
1009
- labels?: Record<string, string> | undefined;
1010
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1011
- prompt?: string | undefined;
1012
- audio?: boolean | undefined;
1013
- resolution?: string | undefined;
1014
- override?: {
1015
- provider?: string | undefined;
1016
- model?: string | undefined;
1017
- transport?: "http" | "subprocess" | undefined;
1018
- } | undefined;
1019
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1020
- provider: string;
1021
- model: string;
1022
- transport: "http" | "subprocess";
1023
- })[] | undefined;
1024
- allowFloating?: boolean | undefined;
1025
- durationSec?: number | undefined;
1026
- }, {
1027
- image?: string | Uint8Array<ArrayBuffer> | undefined;
1028
- purpose?: string | undefined;
1029
- labels?: Record<string, string> | undefined;
1030
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1031
- prompt?: string | undefined;
1032
- audio?: boolean | undefined;
1033
- resolution?: string | undefined;
1034
- override?: {
1035
- provider?: string | undefined;
1036
- model?: string | undefined;
1037
- transport?: "http" | "subprocess" | undefined;
1038
- } | undefined;
1039
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1040
- provider: string;
1041
- model: string;
1042
- transport: "http" | "subprocess";
1043
- })[] | undefined;
1044
- allowFloating?: boolean | undefined;
1045
- durationSec?: number | undefined;
1046
- }>;
619
+ }, z.core.$strip>;
1047
620
  declare const trainStyleInputSchema: z.ZodObject<{
1048
- tier: z.ZodOptional<z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>>;
621
+ tier: z.ZodOptional<z.ZodEnum<{
622
+ vision: "vision";
623
+ video: "video";
624
+ embedding: "embedding";
625
+ fast: "fast";
626
+ smart: "smart";
627
+ powerful: "powerful";
628
+ cheap: "cheap";
629
+ }>>;
1049
630
  override: z.ZodOptional<z.ZodObject<{
1050
631
  provider: z.ZodOptional<z.ZodString>;
1051
632
  model: z.ZodOptional<z.ZodString>;
1052
- transport: z.ZodOptional<z.ZodEnum<["http", "subprocess"]>>;
1053
- }, "strip", z.ZodTypeAny, {
1054
- provider?: string | undefined;
1055
- model?: string | undefined;
1056
- transport?: "http" | "subprocess" | undefined;
1057
- }, {
1058
- provider?: string | undefined;
1059
- model?: string | undefined;
1060
- transport?: "http" | "subprocess" | undefined;
1061
- }>>;
1062
- fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>, z.ZodObject<{
633
+ transport: z.ZodOptional<z.ZodEnum<{
634
+ http: "http";
635
+ subprocess: "subprocess";
636
+ }>>;
637
+ }, z.core.$strip>>;
638
+ fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
639
+ vision: "vision";
640
+ video: "video";
641
+ embedding: "embedding";
642
+ fast: "fast";
643
+ smart: "smart";
644
+ powerful: "powerful";
645
+ cheap: "cheap";
646
+ }>, z.ZodObject<{
1063
647
  provider: z.ZodString;
1064
648
  model: z.ZodString;
1065
- transport: z.ZodEnum<["http", "subprocess"]>;
1066
- }, "strip", z.ZodTypeAny, {
1067
- provider: string;
1068
- model: string;
1069
- transport: "http" | "subprocess";
1070
- }, {
1071
- provider: string;
1072
- model: string;
1073
- transport: "http" | "subprocess";
1074
- }>]>, "many">>;
649
+ transport: z.ZodEnum<{
650
+ http: "http";
651
+ subprocess: "subprocess";
652
+ }>;
653
+ }, z.core.$strip>]>>>;
1075
654
  purpose: z.ZodOptional<z.ZodString>;
1076
655
  allowFloating: z.ZodOptional<z.ZodBoolean>;
1077
656
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1078
- /** A hosted archive URL, or an array of image URLs the SDK zips in-memory. */
1079
- images: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1080
- /** Style LoRA (disables captioning/masks). Default true. */
657
+ images: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
1081
658
  isStyle: z.ZodOptional<z.ZodBoolean>;
1082
659
  triggerWord: z.ZodOptional<z.ZodString>;
1083
660
  steps: z.ZodOptional<z.ZodNumber>;
1084
661
  createMasks: z.ZodOptional<z.ZodBoolean>;
1085
- }, "strip", z.ZodTypeAny, {
1086
- images: string | string[];
1087
- purpose?: string | undefined;
1088
- labels?: Record<string, string> | undefined;
1089
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1090
- steps?: number | undefined;
1091
- override?: {
1092
- provider?: string | undefined;
1093
- model?: string | undefined;
1094
- transport?: "http" | "subprocess" | undefined;
1095
- } | undefined;
1096
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1097
- provider: string;
1098
- model: string;
1099
- transport: "http" | "subprocess";
1100
- })[] | undefined;
1101
- allowFloating?: boolean | undefined;
1102
- isStyle?: boolean | undefined;
1103
- triggerWord?: string | undefined;
1104
- createMasks?: boolean | undefined;
1105
- }, {
1106
- images: string | string[];
1107
- purpose?: string | undefined;
1108
- labels?: Record<string, string> | undefined;
1109
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1110
- steps?: number | undefined;
1111
- override?: {
1112
- provider?: string | undefined;
1113
- model?: string | undefined;
1114
- transport?: "http" | "subprocess" | undefined;
1115
- } | undefined;
1116
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1117
- provider: string;
1118
- model: string;
1119
- transport: "http" | "subprocess";
1120
- })[] | undefined;
1121
- allowFloating?: boolean | undefined;
1122
- isStyle?: boolean | undefined;
1123
- triggerWord?: string | undefined;
1124
- createMasks?: boolean | undefined;
1125
- }>;
662
+ }, z.core.$strip>;
1126
663
  declare const embeddingInputSchema: z.ZodObject<{
1127
- tier: z.ZodOptional<z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>>;
664
+ tier: z.ZodOptional<z.ZodEnum<{
665
+ vision: "vision";
666
+ video: "video";
667
+ embedding: "embedding";
668
+ fast: "fast";
669
+ smart: "smart";
670
+ powerful: "powerful";
671
+ cheap: "cheap";
672
+ }>>;
1128
673
  override: z.ZodOptional<z.ZodObject<{
1129
674
  provider: z.ZodOptional<z.ZodString>;
1130
675
  model: z.ZodOptional<z.ZodString>;
1131
- transport: z.ZodOptional<z.ZodEnum<["http", "subprocess"]>>;
1132
- }, "strip", z.ZodTypeAny, {
1133
- provider?: string | undefined;
1134
- model?: string | undefined;
1135
- transport?: "http" | "subprocess" | undefined;
1136
- }, {
1137
- provider?: string | undefined;
1138
- model?: string | undefined;
1139
- transport?: "http" | "subprocess" | undefined;
1140
- }>>;
1141
- fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>, z.ZodObject<{
676
+ transport: z.ZodOptional<z.ZodEnum<{
677
+ http: "http";
678
+ subprocess: "subprocess";
679
+ }>>;
680
+ }, z.core.$strip>>;
681
+ fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
682
+ vision: "vision";
683
+ video: "video";
684
+ embedding: "embedding";
685
+ fast: "fast";
686
+ smart: "smart";
687
+ powerful: "powerful";
688
+ cheap: "cheap";
689
+ }>, z.ZodObject<{
1142
690
  provider: z.ZodString;
1143
691
  model: z.ZodString;
1144
- transport: z.ZodEnum<["http", "subprocess"]>;
1145
- }, "strip", z.ZodTypeAny, {
1146
- provider: string;
1147
- model: string;
1148
- transport: "http" | "subprocess";
1149
- }, {
1150
- provider: string;
1151
- model: string;
1152
- transport: "http" | "subprocess";
1153
- }>]>, "many">>;
692
+ transport: z.ZodEnum<{
693
+ http: "http";
694
+ subprocess: "subprocess";
695
+ }>;
696
+ }, z.core.$strip>]>>>;
1154
697
  purpose: z.ZodOptional<z.ZodString>;
1155
698
  allowFloating: z.ZodOptional<z.ZodBoolean>;
1156
699
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1157
- text: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1158
- }, "strip", z.ZodTypeAny, {
1159
- text: string | string[];
1160
- purpose?: string | undefined;
1161
- labels?: Record<string, string> | undefined;
1162
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1163
- override?: {
1164
- provider?: string | undefined;
1165
- model?: string | undefined;
1166
- transport?: "http" | "subprocess" | undefined;
1167
- } | undefined;
1168
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1169
- provider: string;
1170
- model: string;
1171
- transport: "http" | "subprocess";
1172
- })[] | undefined;
1173
- allowFloating?: boolean | undefined;
1174
- }, {
1175
- text: string | string[];
1176
- purpose?: string | undefined;
1177
- labels?: Record<string, string> | undefined;
1178
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1179
- override?: {
1180
- provider?: string | undefined;
1181
- model?: string | undefined;
1182
- transport?: "http" | "subprocess" | undefined;
1183
- } | undefined;
1184
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1185
- provider: string;
1186
- model: string;
1187
- transport: "http" | "subprocess";
1188
- })[] | undefined;
1189
- allowFloating?: boolean | undefined;
1190
- }>;
700
+ text: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
701
+ }, z.core.$strip>;
1191
702
  declare const transcribeInputSchema: z.ZodObject<{
1192
- tier: z.ZodOptional<z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>>;
703
+ tier: z.ZodOptional<z.ZodEnum<{
704
+ vision: "vision";
705
+ video: "video";
706
+ embedding: "embedding";
707
+ fast: "fast";
708
+ smart: "smart";
709
+ powerful: "powerful";
710
+ cheap: "cheap";
711
+ }>>;
1193
712
  override: z.ZodOptional<z.ZodObject<{
1194
713
  provider: z.ZodOptional<z.ZodString>;
1195
714
  model: z.ZodOptional<z.ZodString>;
1196
- transport: z.ZodOptional<z.ZodEnum<["http", "subprocess"]>>;
1197
- }, "strip", z.ZodTypeAny, {
1198
- provider?: string | undefined;
1199
- model?: string | undefined;
1200
- transport?: "http" | "subprocess" | undefined;
1201
- }, {
1202
- provider?: string | undefined;
1203
- model?: string | undefined;
1204
- transport?: "http" | "subprocess" | undefined;
1205
- }>>;
1206
- fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>, z.ZodObject<{
715
+ transport: z.ZodOptional<z.ZodEnum<{
716
+ http: "http";
717
+ subprocess: "subprocess";
718
+ }>>;
719
+ }, z.core.$strip>>;
720
+ fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
721
+ vision: "vision";
722
+ video: "video";
723
+ embedding: "embedding";
724
+ fast: "fast";
725
+ smart: "smart";
726
+ powerful: "powerful";
727
+ cheap: "cheap";
728
+ }>, z.ZodObject<{
1207
729
  provider: z.ZodString;
1208
730
  model: z.ZodString;
1209
- transport: z.ZodEnum<["http", "subprocess"]>;
1210
- }, "strip", z.ZodTypeAny, {
1211
- provider: string;
1212
- model: string;
1213
- transport: "http" | "subprocess";
1214
- }, {
1215
- provider: string;
1216
- model: string;
1217
- transport: "http" | "subprocess";
1218
- }>]>, "many">>;
731
+ transport: z.ZodEnum<{
732
+ http: "http";
733
+ subprocess: "subprocess";
734
+ }>;
735
+ }, z.core.$strip>]>>>;
1219
736
  purpose: z.ZodOptional<z.ZodString>;
1220
737
  allowFloating: z.ZodOptional<z.ZodBoolean>;
1221
738
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1222
- /** Audio URL or raw bytes. */
1223
- audio: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
739
+ audio: z.ZodUnion<readonly [z.ZodString, z.ZodInstanceOf<Uint8Array<ArrayBuffer>>]>;
1224
740
  language: z.ZodOptional<z.ZodString>;
1225
- /** Audio length in seconds — enables Whisper per-minute cost. */
1226
741
  durationSec: z.ZodOptional<z.ZodNumber>;
1227
- /** Bias toward brand/jargon terms (Azure phraseList, F029.3); others ignore it. */
1228
- phrases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1229
- /** Opt-in timestamps (F036) — a single granularity or an array. Omit → the
1230
- * current { text, usage } shape, unchanged. Pass ["word","segment"] for both.
1231
- * Supported by Whisper (openai) + Azure fast-transcription (F036.1); other
1232
- * adapters (Voxtral/mistral) ignore it and return text only. */
1233
- timestamps: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["word", "segment"]>, z.ZodArray<z.ZodEnum<["word", "segment"]>, "many">]>>;
1234
- }, "strip", z.ZodTypeAny, {
1235
- audio: string | Uint8Array<ArrayBuffer>;
1236
- purpose?: string | undefined;
1237
- labels?: Record<string, string> | undefined;
1238
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1239
- language?: string | undefined;
1240
- override?: {
1241
- provider?: string | undefined;
1242
- model?: string | undefined;
1243
- transport?: "http" | "subprocess" | undefined;
1244
- } | undefined;
1245
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1246
- provider: string;
1247
- model: string;
1248
- transport: "http" | "subprocess";
1249
- })[] | undefined;
1250
- allowFloating?: boolean | undefined;
1251
- durationSec?: number | undefined;
1252
- phrases?: string[] | undefined;
1253
- timestamps?: "word" | "segment" | ("word" | "segment")[] | undefined;
1254
- }, {
1255
- audio: string | Uint8Array<ArrayBuffer>;
1256
- purpose?: string | undefined;
1257
- labels?: Record<string, string> | undefined;
1258
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1259
- language?: string | undefined;
1260
- override?: {
1261
- provider?: string | undefined;
1262
- model?: string | undefined;
1263
- transport?: "http" | "subprocess" | undefined;
1264
- } | undefined;
1265
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1266
- provider: string;
1267
- model: string;
1268
- transport: "http" | "subprocess";
1269
- })[] | undefined;
1270
- allowFloating?: boolean | undefined;
1271
- durationSec?: number | undefined;
1272
- phrases?: string[] | undefined;
1273
- timestamps?: "word" | "segment" | ("word" | "segment")[] | undefined;
1274
- }>;
742
+ phrases: z.ZodOptional<z.ZodArray<z.ZodString>>;
743
+ timestamps: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
744
+ word: "word";
745
+ segment: "segment";
746
+ }>, z.ZodArray<z.ZodEnum<{
747
+ word: "word";
748
+ segment: "segment";
749
+ }>>]>>;
750
+ }, z.core.$strip>;
1275
751
  declare const ocrInputSchema: z.ZodObject<{
1276
- tier: z.ZodOptional<z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>>;
752
+ tier: z.ZodOptional<z.ZodEnum<{
753
+ vision: "vision";
754
+ video: "video";
755
+ embedding: "embedding";
756
+ fast: "fast";
757
+ smart: "smart";
758
+ powerful: "powerful";
759
+ cheap: "cheap";
760
+ }>>;
1277
761
  override: z.ZodOptional<z.ZodObject<{
1278
762
  provider: z.ZodOptional<z.ZodString>;
1279
763
  model: z.ZodOptional<z.ZodString>;
1280
- transport: z.ZodOptional<z.ZodEnum<["http", "subprocess"]>>;
1281
- }, "strip", z.ZodTypeAny, {
1282
- provider?: string | undefined;
1283
- model?: string | undefined;
1284
- transport?: "http" | "subprocess" | undefined;
1285
- }, {
1286
- provider?: string | undefined;
1287
- model?: string | undefined;
1288
- transport?: "http" | "subprocess" | undefined;
1289
- }>>;
1290
- fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>, z.ZodObject<{
764
+ transport: z.ZodOptional<z.ZodEnum<{
765
+ http: "http";
766
+ subprocess: "subprocess";
767
+ }>>;
768
+ }, z.core.$strip>>;
769
+ fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
770
+ vision: "vision";
771
+ video: "video";
772
+ embedding: "embedding";
773
+ fast: "fast";
774
+ smart: "smart";
775
+ powerful: "powerful";
776
+ cheap: "cheap";
777
+ }>, z.ZodObject<{
1291
778
  provider: z.ZodString;
1292
779
  model: z.ZodString;
1293
- transport: z.ZodEnum<["http", "subprocess"]>;
1294
- }, "strip", z.ZodTypeAny, {
1295
- provider: string;
1296
- model: string;
1297
- transport: "http" | "subprocess";
1298
- }, {
1299
- provider: string;
1300
- model: string;
1301
- transport: "http" | "subprocess";
1302
- }>]>, "many">>;
780
+ transport: z.ZodEnum<{
781
+ http: "http";
782
+ subprocess: "subprocess";
783
+ }>;
784
+ }, z.core.$strip>]>>>;
1303
785
  purpose: z.ZodOptional<z.ZodString>;
1304
786
  allowFloating: z.ZodOptional<z.ZodBoolean>;
1305
787
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1306
- /** A URL, data-URL, or raw bytes of the document/image. */
1307
- document: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
1308
- /** image/* → routed as an image; anything else → a document (PDF etc.). */
788
+ document: z.ZodUnion<readonly [z.ZodString, z.ZodInstanceOf<Uint8Array<ArrayBuffer>>]>;
1309
789
  mimeType: z.ZodOptional<z.ZodString>;
1310
- }, "strip", z.ZodTypeAny, {
1311
- document: string | Uint8Array<ArrayBuffer>;
1312
- purpose?: string | undefined;
1313
- labels?: Record<string, string> | undefined;
1314
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1315
- mimeType?: string | undefined;
1316
- override?: {
1317
- provider?: string | undefined;
1318
- model?: string | undefined;
1319
- transport?: "http" | "subprocess" | undefined;
1320
- } | undefined;
1321
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1322
- provider: string;
1323
- model: string;
1324
- transport: "http" | "subprocess";
1325
- })[] | undefined;
1326
- allowFloating?: boolean | undefined;
1327
- }, {
1328
- document: string | Uint8Array<ArrayBuffer>;
1329
- purpose?: string | undefined;
1330
- labels?: Record<string, string> | undefined;
1331
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1332
- mimeType?: string | undefined;
1333
- override?: {
1334
- provider?: string | undefined;
1335
- model?: string | undefined;
1336
- transport?: "http" | "subprocess" | undefined;
1337
- } | undefined;
1338
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1339
- provider: string;
1340
- model: string;
1341
- transport: "http" | "subprocess";
1342
- })[] | undefined;
1343
- allowFloating?: boolean | undefined;
1344
- }>;
790
+ }, z.core.$strip>;
1345
791
  declare const moderationInputSchema: z.ZodObject<{
1346
- tier: z.ZodOptional<z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>>;
792
+ tier: z.ZodOptional<z.ZodEnum<{
793
+ vision: "vision";
794
+ video: "video";
795
+ embedding: "embedding";
796
+ fast: "fast";
797
+ smart: "smart";
798
+ powerful: "powerful";
799
+ cheap: "cheap";
800
+ }>>;
1347
801
  override: z.ZodOptional<z.ZodObject<{
1348
802
  provider: z.ZodOptional<z.ZodString>;
1349
803
  model: z.ZodOptional<z.ZodString>;
1350
- transport: z.ZodOptional<z.ZodEnum<["http", "subprocess"]>>;
1351
- }, "strip", z.ZodTypeAny, {
1352
- provider?: string | undefined;
1353
- model?: string | undefined;
1354
- transport?: "http" | "subprocess" | undefined;
1355
- }, {
1356
- provider?: string | undefined;
1357
- model?: string | undefined;
1358
- transport?: "http" | "subprocess" | undefined;
1359
- }>>;
1360
- fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>, z.ZodObject<{
804
+ transport: z.ZodOptional<z.ZodEnum<{
805
+ http: "http";
806
+ subprocess: "subprocess";
807
+ }>>;
808
+ }, z.core.$strip>>;
809
+ fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
810
+ vision: "vision";
811
+ video: "video";
812
+ embedding: "embedding";
813
+ fast: "fast";
814
+ smart: "smart";
815
+ powerful: "powerful";
816
+ cheap: "cheap";
817
+ }>, z.ZodObject<{
1361
818
  provider: z.ZodString;
1362
819
  model: z.ZodString;
1363
- transport: z.ZodEnum<["http", "subprocess"]>;
1364
- }, "strip", z.ZodTypeAny, {
1365
- provider: string;
1366
- model: string;
1367
- transport: "http" | "subprocess";
1368
- }, {
1369
- provider: string;
1370
- model: string;
1371
- transport: "http" | "subprocess";
1372
- }>]>, "many">>;
820
+ transport: z.ZodEnum<{
821
+ http: "http";
822
+ subprocess: "subprocess";
823
+ }>;
824
+ }, z.core.$strip>]>>>;
1373
825
  purpose: z.ZodOptional<z.ZodString>;
1374
826
  allowFloating: z.ZodOptional<z.ZodBoolean>;
1375
827
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1376
- input: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1377
- }, "strip", z.ZodTypeAny, {
1378
- input: string | string[];
1379
- purpose?: string | undefined;
1380
- labels?: Record<string, string> | undefined;
1381
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1382
- override?: {
1383
- provider?: string | undefined;
1384
- model?: string | undefined;
1385
- transport?: "http" | "subprocess" | undefined;
1386
- } | undefined;
1387
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1388
- provider: string;
1389
- model: string;
1390
- transport: "http" | "subprocess";
1391
- })[] | undefined;
1392
- allowFloating?: boolean | undefined;
1393
- }, {
1394
- input: string | string[];
1395
- purpose?: string | undefined;
1396
- labels?: Record<string, string> | undefined;
1397
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1398
- override?: {
1399
- provider?: string | undefined;
1400
- model?: string | undefined;
1401
- transport?: "http" | "subprocess" | undefined;
1402
- } | undefined;
1403
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1404
- provider: string;
1405
- model: string;
1406
- transport: "http" | "subprocess";
1407
- })[] | undefined;
1408
- allowFloating?: boolean | undefined;
1409
- }>;
828
+ input: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
829
+ }, z.core.$strip>;
1410
830
  declare const judgeInputSchema: z.ZodObject<{
1411
- tier: z.ZodOptional<z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>>;
831
+ tier: z.ZodOptional<z.ZodEnum<{
832
+ vision: "vision";
833
+ video: "video";
834
+ embedding: "embedding";
835
+ fast: "fast";
836
+ smart: "smart";
837
+ powerful: "powerful";
838
+ cheap: "cheap";
839
+ }>>;
1412
840
  override: z.ZodOptional<z.ZodObject<{
1413
841
  provider: z.ZodOptional<z.ZodString>;
1414
842
  model: z.ZodOptional<z.ZodString>;
1415
- transport: z.ZodOptional<z.ZodEnum<["http", "subprocess"]>>;
1416
- }, "strip", z.ZodTypeAny, {
1417
- provider?: string | undefined;
1418
- model?: string | undefined;
1419
- transport?: "http" | "subprocess" | undefined;
1420
- }, {
1421
- provider?: string | undefined;
1422
- model?: string | undefined;
1423
- transport?: "http" | "subprocess" | undefined;
1424
- }>>;
1425
- fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>, z.ZodObject<{
843
+ transport: z.ZodOptional<z.ZodEnum<{
844
+ http: "http";
845
+ subprocess: "subprocess";
846
+ }>>;
847
+ }, z.core.$strip>>;
848
+ fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
849
+ vision: "vision";
850
+ video: "video";
851
+ embedding: "embedding";
852
+ fast: "fast";
853
+ smart: "smart";
854
+ powerful: "powerful";
855
+ cheap: "cheap";
856
+ }>, z.ZodObject<{
1426
857
  provider: z.ZodString;
1427
858
  model: z.ZodString;
1428
- transport: z.ZodEnum<["http", "subprocess"]>;
1429
- }, "strip", z.ZodTypeAny, {
1430
- provider: string;
1431
- model: string;
1432
- transport: "http" | "subprocess";
1433
- }, {
1434
- provider: string;
1435
- model: string;
1436
- transport: "http" | "subprocess";
1437
- }>]>, "many">>;
859
+ transport: z.ZodEnum<{
860
+ http: "http";
861
+ subprocess: "subprocess";
862
+ }>;
863
+ }, z.core.$strip>]>>>;
1438
864
  purpose: z.ZodOptional<z.ZodString>;
1439
865
  allowFloating: z.ZodOptional<z.ZodBoolean>;
1440
866
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1441
- state: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
1442
- questions: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
867
+ state: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
868
+ questions: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1443
869
  type: z.ZodLiteral<"noul">;
1444
- instructions: z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodUnknown, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
870
+ instructions: z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
1445
871
  criteria: z.ZodOptional<z.ZodObject<{
1446
- true: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodUnknown, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
1447
- false: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodUnknown, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
1448
- }, "strict", z.ZodTypeAny, {
1449
- true?: string | unknown[] | Record<string, unknown> | null | undefined;
1450
- false?: string | unknown[] | Record<string, unknown> | null | undefined;
1451
- }, {
1452
- true?: string | unknown[] | Record<string, unknown> | null | undefined;
1453
- false?: string | unknown[] | Record<string, unknown> | null | undefined;
1454
- }>>;
1455
- }, "strip", z.ZodTypeAny, {
1456
- type: "noul";
1457
- instructions: string | unknown[] | Record<string, unknown> | null;
1458
- criteria?: {
1459
- true?: string | unknown[] | Record<string, unknown> | null | undefined;
1460
- false?: string | unknown[] | Record<string, unknown> | null | undefined;
1461
- } | undefined;
1462
- }, {
1463
- type: "noul";
1464
- instructions: string | unknown[] | Record<string, unknown> | null;
1465
- criteria?: {
1466
- true?: string | unknown[] | Record<string, unknown> | null | undefined;
1467
- false?: string | unknown[] | Record<string, unknown> | null | undefined;
1468
- } | undefined;
1469
- }>, z.ZodObject<{
872
+ true: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
873
+ false: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
874
+ }, z.core.$strict>>;
875
+ }, z.core.$strip>, z.ZodObject<{
1470
876
  type: z.ZodLiteral<"choice">;
1471
- instructions: z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodUnknown, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
1472
- criteria: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodUnknown, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>, Record<string, string | unknown[] | Record<string, unknown> | null>, Record<string, string | unknown[] | Record<string, unknown> | null>>;
1473
- }, "strip", z.ZodTypeAny, {
1474
- type: "choice";
1475
- instructions: string | unknown[] | Record<string, unknown> | null;
1476
- criteria: Record<string, string | unknown[] | Record<string, unknown> | null>;
1477
- }, {
1478
- type: "choice";
1479
- instructions: string | unknown[] | Record<string, unknown> | null;
1480
- criteria: Record<string, string | unknown[] | Record<string, unknown> | null>;
1481
- }>, z.ZodObject<{
877
+ instructions: z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
878
+ criteria: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
879
+ }, z.core.$strip>, z.ZodObject<{
1482
880
  type: z.ZodLiteral<"score">;
1483
- instructions: z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodUnknown, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
1484
- criteria: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodUnknown, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>]>, "many">;
1485
- }, "strip", z.ZodTypeAny, {
1486
- type: "score";
1487
- instructions: string | unknown[] | Record<string, unknown> | null;
1488
- criteria: (string | unknown[] | Record<string, unknown> | null)[];
1489
- }, {
1490
- type: "score";
1491
- instructions: string | unknown[] | Record<string, unknown> | null;
1492
- criteria: (string | unknown[] | Record<string, unknown> | null)[];
1493
- }>]>>, Record<string, {
1494
- type: "noul";
1495
- instructions: string | unknown[] | Record<string, unknown> | null;
1496
- criteria?: {
1497
- true?: string | unknown[] | Record<string, unknown> | null | undefined;
1498
- false?: string | unknown[] | Record<string, unknown> | null | undefined;
1499
- } | undefined;
1500
- } | {
1501
- type: "choice";
1502
- instructions: string | unknown[] | Record<string, unknown> | null;
1503
- criteria: Record<string, string | unknown[] | Record<string, unknown> | null>;
1504
- } | {
1505
- type: "score";
1506
- instructions: string | unknown[] | Record<string, unknown> | null;
1507
- criteria: (string | unknown[] | Record<string, unknown> | null)[];
1508
- }>, Record<string, {
1509
- type: "noul";
1510
- instructions: string | unknown[] | Record<string, unknown> | null;
1511
- criteria?: {
1512
- true?: string | unknown[] | Record<string, unknown> | null | undefined;
1513
- false?: string | unknown[] | Record<string, unknown> | null | undefined;
1514
- } | undefined;
1515
- } | {
1516
- type: "choice";
1517
- instructions: string | unknown[] | Record<string, unknown> | null;
1518
- criteria: Record<string, string | unknown[] | Record<string, unknown> | null>;
1519
- } | {
1520
- type: "score";
1521
- instructions: string | unknown[] | Record<string, unknown> | null;
1522
- criteria: (string | unknown[] | Record<string, unknown> | null)[];
1523
- }>>;
1524
- }, "strip", z.ZodTypeAny, {
1525
- state: string | string[] | Record<string, unknown>;
1526
- questions: Record<string, {
1527
- type: "noul";
1528
- instructions: string | unknown[] | Record<string, unknown> | null;
1529
- criteria?: {
1530
- true?: string | unknown[] | Record<string, unknown> | null | undefined;
1531
- false?: string | unknown[] | Record<string, unknown> | null | undefined;
1532
- } | undefined;
1533
- } | {
1534
- type: "choice";
1535
- instructions: string | unknown[] | Record<string, unknown> | null;
1536
- criteria: Record<string, string | unknown[] | Record<string, unknown> | null>;
1537
- } | {
1538
- type: "score";
1539
- instructions: string | unknown[] | Record<string, unknown> | null;
1540
- criteria: (string | unknown[] | Record<string, unknown> | null)[];
1541
- }>;
1542
- purpose?: string | undefined;
1543
- labels?: Record<string, string> | undefined;
1544
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1545
- override?: {
1546
- provider?: string | undefined;
1547
- model?: string | undefined;
1548
- transport?: "http" | "subprocess" | undefined;
1549
- } | undefined;
1550
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1551
- provider: string;
1552
- model: string;
1553
- transport: "http" | "subprocess";
1554
- })[] | undefined;
1555
- allowFloating?: boolean | undefined;
1556
- }, {
1557
- state: string | string[] | Record<string, unknown>;
1558
- questions: Record<string, {
1559
- type: "noul";
1560
- instructions: string | unknown[] | Record<string, unknown> | null;
1561
- criteria?: {
1562
- true?: string | unknown[] | Record<string, unknown> | null | undefined;
1563
- false?: string | unknown[] | Record<string, unknown> | null | undefined;
1564
- } | undefined;
1565
- } | {
1566
- type: "choice";
1567
- instructions: string | unknown[] | Record<string, unknown> | null;
1568
- criteria: Record<string, string | unknown[] | Record<string, unknown> | null>;
1569
- } | {
1570
- type: "score";
1571
- instructions: string | unknown[] | Record<string, unknown> | null;
1572
- criteria: (string | unknown[] | Record<string, unknown> | null)[];
1573
- }>;
1574
- purpose?: string | undefined;
1575
- labels?: Record<string, string> | undefined;
1576
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1577
- override?: {
1578
- provider?: string | undefined;
1579
- model?: string | undefined;
1580
- transport?: "http" | "subprocess" | undefined;
1581
- } | undefined;
1582
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1583
- provider: string;
1584
- model: string;
1585
- transport: "http" | "subprocess";
1586
- })[] | undefined;
1587
- allowFloating?: boolean | undefined;
1588
- }>;
881
+ instructions: z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
882
+ criteria: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
883
+ }, z.core.$strip>], "type">>;
884
+ }, z.core.$strip>;
1589
885
  declare const podcastInputSchema: z.ZodObject<{
1590
- tier: z.ZodOptional<z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>>;
886
+ tier: z.ZodOptional<z.ZodEnum<{
887
+ vision: "vision";
888
+ video: "video";
889
+ embedding: "embedding";
890
+ fast: "fast";
891
+ smart: "smart";
892
+ powerful: "powerful";
893
+ cheap: "cheap";
894
+ }>>;
1591
895
  override: z.ZodOptional<z.ZodObject<{
1592
896
  provider: z.ZodOptional<z.ZodString>;
1593
897
  model: z.ZodOptional<z.ZodString>;
1594
- transport: z.ZodOptional<z.ZodEnum<["http", "subprocess"]>>;
1595
- }, "strip", z.ZodTypeAny, {
1596
- provider?: string | undefined;
1597
- model?: string | undefined;
1598
- transport?: "http" | "subprocess" | undefined;
1599
- }, {
1600
- provider?: string | undefined;
1601
- model?: string | undefined;
1602
- transport?: "http" | "subprocess" | undefined;
1603
- }>>;
1604
- fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>, z.ZodObject<{
898
+ transport: z.ZodOptional<z.ZodEnum<{
899
+ http: "http";
900
+ subprocess: "subprocess";
901
+ }>>;
902
+ }, z.core.$strip>>;
903
+ fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
904
+ vision: "vision";
905
+ video: "video";
906
+ embedding: "embedding";
907
+ fast: "fast";
908
+ smart: "smart";
909
+ powerful: "powerful";
910
+ cheap: "cheap";
911
+ }>, z.ZodObject<{
1605
912
  provider: z.ZodString;
1606
913
  model: z.ZodString;
1607
- transport: z.ZodEnum<["http", "subprocess"]>;
1608
- }, "strip", z.ZodTypeAny, {
1609
- provider: string;
1610
- model: string;
1611
- transport: "http" | "subprocess";
1612
- }, {
1613
- provider: string;
1614
- model: string;
1615
- transport: "http" | "subprocess";
1616
- }>]>, "many">>;
914
+ transport: z.ZodEnum<{
915
+ http: "http";
916
+ subprocess: "subprocess";
917
+ }>;
918
+ }, z.core.$strip>]>>>;
1617
919
  purpose: z.ZodOptional<z.ZodString>;
1618
920
  allowFloating: z.ZodOptional<z.ZodBoolean>;
1619
921
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1620
922
  script: z.ZodArray<z.ZodObject<{
1621
923
  speaker: z.ZodString;
1622
924
  text: z.ZodString;
1623
- }, "strip", z.ZodTypeAny, {
1624
- text: string;
1625
- speaker: string;
1626
- }, {
1627
- text: string;
1628
- speaker: string;
1629
- }>, "many">;
925
+ }, z.core.$strip>>;
1630
926
  voices: z.ZodRecord<z.ZodString, z.ZodString>;
1631
927
  format: z.ZodOptional<z.ZodString>;
1632
- /** F051.4 — same field, same semantics as tts. Applied PER LINE: ElevenLabs'
1633
- * /text-to-dialogue takes inputs[].text separately, so there is no composed string
1634
- * a replacement could run across a speaker boundary in. */
1635
928
  pronunciations: z.ZodOptional<z.ZodArray<z.ZodObject<{
1636
929
  word: z.ZodString;
1637
930
  alias: z.ZodOptional<z.ZodString>;
1638
931
  ipa: z.ZodOptional<z.ZodString>;
1639
932
  lang: z.ZodOptional<z.ZodString>;
1640
- /** F051.3 — also match inside a hyphenated compound ("AI" in "AI-agenter"). */
1641
933
  matchInCompounds: z.ZodOptional<z.ZodBoolean>;
1642
- }, "strip", z.ZodTypeAny, {
1643
- word: string;
1644
- matchInCompounds?: boolean | undefined;
1645
- lang?: string | undefined;
1646
- alias?: string | undefined;
1647
- ipa?: string | undefined;
1648
- }, {
1649
- word: string;
1650
- matchInCompounds?: boolean | undefined;
1651
- lang?: string | undefined;
1652
- alias?: string | undefined;
1653
- ipa?: string | undefined;
1654
- }>, "many">>;
1655
- }, "strip", z.ZodTypeAny, {
1656
- script: {
1657
- text: string;
1658
- speaker: string;
1659
- }[];
1660
- voices: Record<string, string>;
1661
- purpose?: string | undefined;
1662
- labels?: Record<string, string> | undefined;
1663
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1664
- pronunciations?: {
1665
- word: string;
1666
- matchInCompounds?: boolean | undefined;
1667
- lang?: string | undefined;
1668
- alias?: string | undefined;
1669
- ipa?: string | undefined;
1670
- }[] | undefined;
1671
- override?: {
1672
- provider?: string | undefined;
1673
- model?: string | undefined;
1674
- transport?: "http" | "subprocess" | undefined;
1675
- } | undefined;
1676
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1677
- provider: string;
1678
- model: string;
1679
- transport: "http" | "subprocess";
1680
- })[] | undefined;
1681
- allowFloating?: boolean | undefined;
1682
- format?: string | undefined;
1683
- }, {
1684
- script: {
1685
- text: string;
1686
- speaker: string;
1687
- }[];
1688
- voices: Record<string, string>;
1689
- purpose?: string | undefined;
1690
- labels?: Record<string, string> | undefined;
1691
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1692
- pronunciations?: {
1693
- word: string;
1694
- matchInCompounds?: boolean | undefined;
1695
- lang?: string | undefined;
1696
- alias?: string | undefined;
1697
- ipa?: string | undefined;
1698
- }[] | undefined;
1699
- override?: {
1700
- provider?: string | undefined;
1701
- model?: string | undefined;
1702
- transport?: "http" | "subprocess" | undefined;
1703
- } | undefined;
1704
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1705
- provider: string;
1706
- model: string;
1707
- transport: "http" | "subprocess";
1708
- })[] | undefined;
1709
- allowFloating?: boolean | undefined;
1710
- format?: string | undefined;
1711
- }>;
934
+ }, z.core.$strip>>>;
935
+ }, z.core.$strip>;
1712
936
  declare const ttsInputSchema: z.ZodObject<{
1713
- tier: z.ZodOptional<z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>>;
937
+ tier: z.ZodOptional<z.ZodEnum<{
938
+ vision: "vision";
939
+ video: "video";
940
+ embedding: "embedding";
941
+ fast: "fast";
942
+ smart: "smart";
943
+ powerful: "powerful";
944
+ cheap: "cheap";
945
+ }>>;
1714
946
  override: z.ZodOptional<z.ZodObject<{
1715
947
  provider: z.ZodOptional<z.ZodString>;
1716
948
  model: z.ZodOptional<z.ZodString>;
1717
- transport: z.ZodOptional<z.ZodEnum<["http", "subprocess"]>>;
1718
- }, "strip", z.ZodTypeAny, {
1719
- provider?: string | undefined;
1720
- model?: string | undefined;
1721
- transport?: "http" | "subprocess" | undefined;
1722
- }, {
1723
- provider?: string | undefined;
1724
- model?: string | undefined;
1725
- transport?: "http" | "subprocess" | undefined;
1726
- }>>;
1727
- fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>, z.ZodObject<{
949
+ transport: z.ZodOptional<z.ZodEnum<{
950
+ http: "http";
951
+ subprocess: "subprocess";
952
+ }>>;
953
+ }, z.core.$strip>>;
954
+ fallback: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
955
+ vision: "vision";
956
+ video: "video";
957
+ embedding: "embedding";
958
+ fast: "fast";
959
+ smart: "smart";
960
+ powerful: "powerful";
961
+ cheap: "cheap";
962
+ }>, z.ZodObject<{
1728
963
  provider: z.ZodString;
1729
964
  model: z.ZodString;
1730
- transport: z.ZodEnum<["http", "subprocess"]>;
1731
- }, "strip", z.ZodTypeAny, {
1732
- provider: string;
1733
- model: string;
1734
- transport: "http" | "subprocess";
1735
- }, {
1736
- provider: string;
1737
- model: string;
1738
- transport: "http" | "subprocess";
1739
- }>]>, "many">>;
965
+ transport: z.ZodEnum<{
966
+ http: "http";
967
+ subprocess: "subprocess";
968
+ }>;
969
+ }, z.core.$strip>]>>>;
1740
970
  purpose: z.ZodOptional<z.ZodString>;
1741
971
  allowFloating: z.ZodOptional<z.ZodBoolean>;
1742
972
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1743
973
  text: z.ZodString;
1744
974
  voice: z.ZodString;
1745
- /** F051 — see TtsRequest.pronunciations. The alias/ipa exclusivity is enforced in
1746
- * the adapter, not here: the message must name the provider that cannot do it. */
1747
975
  pronunciations: z.ZodOptional<z.ZodArray<z.ZodObject<{
1748
976
  word: z.ZodString;
1749
977
  alias: z.ZodOptional<z.ZodString>;
1750
978
  ipa: z.ZodOptional<z.ZodString>;
1751
979
  lang: z.ZodOptional<z.ZodString>;
1752
- /** F051.3 — also match inside a hyphenated compound ("AI" in "AI-agenter"). */
1753
980
  matchInCompounds: z.ZodOptional<z.ZodBoolean>;
1754
- }, "strip", z.ZodTypeAny, {
1755
- word: string;
1756
- matchInCompounds?: boolean | undefined;
1757
- lang?: string | undefined;
1758
- alias?: string | undefined;
1759
- ipa?: string | undefined;
1760
- }, {
1761
- word: string;
1762
- matchInCompounds?: boolean | undefined;
1763
- lang?: string | undefined;
1764
- alias?: string | undefined;
1765
- ipa?: string | undefined;
1766
- }>, "many">>;
1767
- /** F055 — per-word timings (Azure only). Changes the route to batch synthesis. */
981
+ }, z.core.$strip>>>;
1768
982
  wordTimings: z.ZodOptional<z.ZodBoolean>;
1769
- /** F037: voice to use if `voice` is one we know the provider has retired. Without
1770
- * it a retired voice throws VoiceUnavailableError rather than reaching the API.
1771
- *
1772
- * THINK BEFORE SETTING THIS. It is right for batch work where any acceptable voice
1773
- * will do (a generated podcast, a bulk render). It is WRONG where the voice is an
1774
- * identity a human recognises — a brand voice, a house narrator: falling back means
1775
- * your product suddenly speaks with a stranger's voice and says nothing about why.
1776
- * There, leave it unset and let the throw alarm you. Silence WITH a message beats
1777
- * the wrong audio WITHOUT one. (torrent-search-api's call on their own house voice,
1778
- * 2026-08-11 — they took the alarm over the fallback, deliberately.) */
1779
983
  voiceFallback: z.ZodOptional<z.ZodString>;
1780
984
  lang: z.ZodOptional<z.ZodString>;
1781
985
  format: z.ZodOptional<z.ZodString>;
1782
986
  rate: z.ZodOptional<z.ZodNumber>;
1783
- }, "strip", z.ZodTypeAny, {
1784
- text: string;
1785
- voice: string;
1786
- lang?: string | undefined;
1787
- purpose?: string | undefined;
1788
- labels?: Record<string, string> | undefined;
1789
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1790
- wordTimings?: boolean | undefined;
1791
- pronunciations?: {
1792
- word: string;
1793
- matchInCompounds?: boolean | undefined;
1794
- lang?: string | undefined;
1795
- alias?: string | undefined;
1796
- ipa?: string | undefined;
1797
- }[] | undefined;
1798
- override?: {
1799
- provider?: string | undefined;
1800
- model?: string | undefined;
1801
- transport?: "http" | "subprocess" | undefined;
1802
- } | undefined;
1803
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1804
- provider: string;
1805
- model: string;
1806
- transport: "http" | "subprocess";
1807
- })[] | undefined;
1808
- allowFloating?: boolean | undefined;
1809
- format?: string | undefined;
1810
- voiceFallback?: string | undefined;
1811
- rate?: number | undefined;
1812
- }, {
1813
- text: string;
1814
- voice: string;
1815
- lang?: string | undefined;
1816
- purpose?: string | undefined;
1817
- labels?: Record<string, string> | undefined;
1818
- tier?: "vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | undefined;
1819
- wordTimings?: boolean | undefined;
1820
- pronunciations?: {
1821
- word: string;
1822
- matchInCompounds?: boolean | undefined;
1823
- lang?: string | undefined;
1824
- alias?: string | undefined;
1825
- ipa?: string | undefined;
1826
- }[] | undefined;
1827
- override?: {
1828
- provider?: string | undefined;
1829
- model?: string | undefined;
1830
- transport?: "http" | "subprocess" | undefined;
1831
- } | undefined;
1832
- fallback?: ("vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap" | {
1833
- provider: string;
1834
- model: string;
1835
- transport: "http" | "subprocess";
1836
- })[] | undefined;
1837
- allowFloating?: boolean | undefined;
1838
- format?: string | undefined;
1839
- voiceFallback?: string | undefined;
1840
- rate?: number | undefined;
1841
- }>;
987
+ }, z.core.$strip>;
1842
988
  declare const aiConfigSchema: z.ZodObject<{
1843
- /** F069.1 — customer-key mode. Every provider must be built with byokAdapter(), so no
1844
- * call can fall back to the fleet's env keys; createAI throws at setup otherwise. */
1845
989
  byok: z.ZodOptional<z.ZodBoolean>;
1846
- /** F069.2 — attribution labels stamped on EVERY call's usage (and so on every cost-sink
1847
- * row), e.g. { byok: "true", tenantId }. A call's own `labels` win on the same key. */
1848
990
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1849
- /** F039.2 — client-wide opt-out from prompt caching (default: on where the
1850
- * provider supports it). A per-call `promptCache` wins over this. */
1851
991
  promptCache: z.ZodOptional<z.ZodBoolean>;
1852
- /** F077.3 — refuse any "-latest" model id unless the call passes allowFloating: true. */
1853
992
  strictPinning: z.ZodOptional<z.ZodBoolean>;
1854
- defaults: z.ZodOptional<z.ZodRecord<z.ZodEnum<["fast", "smart", "powerful", "cheap", "vision", "video", "embedding"]>, z.ZodObject<{
993
+ defaults: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
994
+ vision: "vision";
995
+ video: "video";
996
+ embedding: "embedding";
997
+ fast: "fast";
998
+ smart: "smart";
999
+ powerful: "powerful";
1000
+ cheap: "cheap";
1001
+ }> & z.core.$partial, z.ZodObject<{
1855
1002
  provider: z.ZodString;
1856
1003
  model: z.ZodString;
1857
- transport: z.ZodEnum<["http", "subprocess"]>;
1858
- }, "strip", z.ZodTypeAny, {
1859
- provider: string;
1860
- model: string;
1861
- transport: "http" | "subprocess";
1862
- }, {
1863
- provider: string;
1864
- model: string;
1865
- transport: "http" | "subprocess";
1866
- }>>>;
1867
- providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<ProviderAdapter, z.ZodTypeDef, ProviderAdapter>>>;
1868
- /** Omit → cost-tracking auto-wires from the upmetrics env (F034). Pass `null`
1869
- * to opt OUT explicitly — for a consumer that already reports its own costs
1870
- * and would otherwise be counted twice (F034.3). An object is used as-is. */
1871
- costSink: z.ZodOptional<z.ZodNullable<z.ZodType<CostSink, z.ZodTypeDef, CostSink>>>;
1872
- /** F034.4 — who is calling, as Upmetrics groups it (e.g. "cms"). Required when
1873
- * `costSink` is omitted, unless UPMETRICS_AGENT_NAME is set. */
1004
+ transport: z.ZodEnum<{
1005
+ http: "http";
1006
+ subprocess: "subprocess";
1007
+ }>;
1008
+ }, z.core.$strip>>>;
1009
+ providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCustom<ProviderAdapter, ProviderAdapter>>>;
1010
+ costSink: z.ZodOptional<z.ZodNullable<z.ZodCustom<CostSink, CostSink>>>;
1874
1011
  agentName: z.ZodOptional<z.ZodString>;
1875
1012
  budget: z.ZodOptional<z.ZodObject<{
1876
1013
  perCallUsd: z.ZodOptional<z.ZodNumber>;
1877
1014
  rollingUsd: z.ZodOptional<z.ZodNumber>;
1878
- }, "strip", z.ZodTypeAny, {
1879
- perCallUsd?: number | undefined;
1880
- rollingUsd?: number | undefined;
1881
- }, {
1882
- perCallUsd?: number | undefined;
1883
- rollingUsd?: number | undefined;
1884
- }>>;
1015
+ }, z.core.$strip>>;
1885
1016
  availability: z.ZodOptional<z.ZodObject<{
1886
1017
  autoResolve: z.ZodOptional<z.ZodBoolean>;
1887
- fallback: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1888
- }, "strip", z.ZodTypeAny, {
1889
- fallback?: string | string[] | undefined;
1890
- autoResolve?: boolean | undefined;
1891
- }, {
1892
- fallback?: string | string[] | undefined;
1893
- autoResolve?: boolean | undefined;
1894
- }>>;
1895
- }, "strip", z.ZodTypeAny, {
1896
- labels?: Record<string, string> | undefined;
1897
- costSink?: CostSink | null | undefined;
1898
- byok?: boolean | undefined;
1899
- promptCache?: boolean | undefined;
1900
- strictPinning?: boolean | undefined;
1901
- defaults?: Partial<Record<"vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap", {
1902
- provider: string;
1903
- model: string;
1904
- transport: "http" | "subprocess";
1905
- }>> | undefined;
1906
- providers?: Record<string, ProviderAdapter> | undefined;
1907
- agentName?: string | undefined;
1908
- budget?: {
1909
- perCallUsd?: number | undefined;
1910
- rollingUsd?: number | undefined;
1911
- } | undefined;
1912
- availability?: {
1913
- fallback?: string | string[] | undefined;
1914
- autoResolve?: boolean | undefined;
1915
- } | undefined;
1916
- }, {
1917
- labels?: Record<string, string> | undefined;
1918
- costSink?: CostSink | null | undefined;
1919
- byok?: boolean | undefined;
1920
- promptCache?: boolean | undefined;
1921
- strictPinning?: boolean | undefined;
1922
- defaults?: Partial<Record<"vision" | "video" | "embedding" | "fast" | "smart" | "powerful" | "cheap", {
1923
- provider: string;
1924
- model: string;
1925
- transport: "http" | "subprocess";
1926
- }>> | undefined;
1927
- providers?: Record<string, ProviderAdapter> | undefined;
1928
- agentName?: string | undefined;
1929
- budget?: {
1930
- perCallUsd?: number | undefined;
1931
- rollingUsd?: number | undefined;
1932
- } | undefined;
1933
- availability?: {
1934
- fallback?: string | string[] | undefined;
1935
- autoResolve?: boolean | undefined;
1936
- } | undefined;
1937
- }>;
1018
+ fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
1019
+ }, z.core.$strip>>;
1020
+ }, z.core.$strip>;
1938
1021
  type ChatInput = z.infer<typeof chatInputSchema>;
1939
1022
  type VisionInput = z.infer<typeof visionInputSchema>;
1940
1023
  type VideoInput = z.infer<typeof videoInputSchema>;
@@ -2346,8 +1429,8 @@ declare const falStubAdapter: ProviderAdapter;
2346
1429
  * wires the live adapters. */
2347
1430
  declare const stubProviders: Record<string, ProviderAdapter>;
2348
1431
 
2349
- declare const VERSION: "0.65.0";
2350
- declare const SDK_TAG: "@broberg/ai-sdk@0.65.0";
1432
+ declare const VERSION: "0.66.1";
1433
+ declare const SDK_TAG: "@broberg/ai-sdk@0.66.1";
2351
1434
 
2352
1435
  /** Built-in defaults. Every entry is overridable via AiConfig.defaults or a
2353
1436
  * per-call override.
@@ -2913,4 +1996,4 @@ declare function memorySearchCache(max?: number): SearchCache;
2913
1996
 
2914
1997
  declare function search(req: SearchRequest, opts?: SearchOptions): Promise<SearchResult>;
2915
1998
 
2916
- export { AZURE_DANISH_VOICES, AZURE_DANISH_VOICE_LIST, type AiClient, type AiConfig, type AzureVoiceInfo, BatchJob, BatchRequestItem, BatchResultItem, type BflAdapterConfig, type BflCredits, BudgetConfig, BudgetExceededError, BudgetGuard, BudgetStore, CONFIG_DERIVED_HOSTS, Capability, type ChatInput, ChatResult, ChatStreamEvent, type CheckVoiceOptions, type ClassifyInput, type ClassifyResult, type Contracts, type CostQuery, CostSink, type CostSummary, type CostSummaryQuery, type CostTimeseriesQuery, DEFAULT_BASE_URLS, DEFAULT_SEARCH_ROUTES, DEFAULT_TIER_MAP, type DesignInput, type DesignResult, type DiscordSinkConfig, ELEVENLABS_DANISH_VOICES, type EmbeddingInput, EmbeddingResult, type ExtractInput, type ExtractResult, type FalAdapterConfig, type FixedHostProvider, type HttpResponse, type ImageInput, ImageResult, type JudgeInput, JudgeResult, LOCALLY_PINNED_HOSTS, type MockupInput, type MockupResult, type ModerationInput, ModerationResult, type OcrInput, OcrResult, type OpenAICompatibleConfig, type PodcastInput, PodcastResult, type PriceDriftResult, type PriceDriftRow, type PricingEntry, ProviderAdapter, type RefreshOptions, type RefreshResult, Region, type RerankInput, type RerankResult, type RouteForecast, SDK_TAG, SEARCH_CACHE_TTL_MS, SEARCH_PRICE_USD, SearchBudgetExceededError, type SearchCache, type SearchCapStore, type SearchCredentials, type SearchItem, SearchKeyMissingError, type SearchOptions, type SearchProviderId, type SearchPurpose, type SearchRequest, type SearchResult, type SearchRoute, type SqliteBudgetStoreConfig, type SqliteSinkConfig, StreamHttpError, type SubprocessResponse, Tier, TierSpec, Tool, ToolCall, type TrainStyleInput, TrainStyleResult, type TranscribeInput, TranscribeResult, type TranslateInput, TranslateResult, Transport, type TransportRequest, type TransportResponse, type TtsInput, type UpmetricsCostClientConfig, UpmetricsCostError, type UpmetricsCostRow, type UpmetricsCostSummary, type UpmetricsCostTimeseries, type UpmetricsSink, type UpmetricsSinkConfig, type UpmetricsSinkStats, Usage, VERSION, type VideoInput, type VisionInput, type VoiceInfo, type VoiceProvider, type VoiceResolveResult, type VoiceStatus, VoiceUnavailableError, type WebSearchContext, type WebSearchToolResult, ZDR_PROVIDERS, aiConfigSchema, anthropicAdapter, anthropicApiAdapter, anthropicSubprocessAdapter, azureAdapter, bflAdapter, bflCredits, byokAdapter, chatInputSchema, checkPriceDrift, checkVoice, computeCost, createAI, deepinfraAdapter, deeplAdapter, deepseekAdapter, defaultBaseUrl, defaultProviders, discordSink, elevenlabsAdapter, embeddingInputSchema, falAdapter, falStubAdapter, freshUsage, fromProviderToolCall, geminiAdapter, getCostSummary, getPrice, httpTransport, imageInputSchema, isByokKeyed, listAzureDanishVoices, listVoices, makeContracts, makeOpenAICompatibleAdapter, matchLabel, memorySearchCache, messageSchema, mistralAdapter, mistralStubAdapter, multiSink, noopSink, openaiAdapter, openaiStubAdapter, openrouterAdapter, parseClaudeCliJson, parseJsonLoose, refreshAvailability, requestyAdapter, resetRefreshState, resetRegistry, resolveAzureVoice, resolveTier, resolveVoice, routeSearch, runWebSearch, search, sqliteBudgetStore, sqliteSink, streamTransport, stubProviders, subprocessTransport, tierSpecSchema, toProviderTools, toolSchema, translateInputSchema, typesafeAdapter, upmetricsCostClient, upmetricsSink, usdFromMicro, vertexAdapter, visionInputSchema, webSearchTool, wouldProviderRouteTo, wouldRouteTo };
1999
+ export { AZURE_DANISH_VOICES, AZURE_DANISH_VOICE_LIST, type AiClient, type AiConfig, type AzureVoiceInfo, BatchJob, BatchRequestItem, BatchResultItem, type BflAdapterConfig, type BflCredits, BudgetConfig, BudgetExceededError, BudgetGuard, BudgetStore, CONFIG_DERIVED_HOSTS, Capability, type ChatInput, ChatResult, ChatStreamEvent, type CheckVoiceOptions, type ClassifyInput, type ClassifyResult, type Contracts, type CostQuery, CostSink, type CostSummary, type CostSummaryQuery, type CostTimeseriesQuery, DEFAULT_BASE_URLS, DEFAULT_SEARCH_ROUTES, DEFAULT_TIER_MAP, type DesignInput, type DesignResult, type DiscordSinkConfig, ELEVENLABS_DANISH_VOICES, type EmbeddingInput, EmbeddingResult, type ExtractInput, type ExtractResult, type FalAdapterConfig, type FixedHostProvider, type HttpResponse, INPUT_LIMITS, type ImageInput, ImageResult, type JudgeInput, JudgeResult, LOCALLY_PINNED_HOSTS, type MockupInput, type MockupResult, type ModerationInput, ModerationResult, type OcrInput, OcrResult, type OpenAICompatibleConfig, type PodcastInput, PodcastResult, type PriceDriftResult, type PriceDriftRow, type PricingEntry, ProviderAdapter, type RefreshOptions, type RefreshResult, Region, type RerankInput, type RerankResult, type RouteForecast, SDK_TAG, SEARCH_CACHE_TTL_MS, SEARCH_PRICE_USD, SearchBudgetExceededError, type SearchCache, type SearchCapStore, type SearchCredentials, type SearchItem, SearchKeyMissingError, type SearchOptions, type SearchProviderId, type SearchPurpose, type SearchRequest, type SearchResult, type SearchRoute, type SqliteBudgetStoreConfig, type SqliteSinkConfig, StreamHttpError, type SubprocessResponse, Tier, TierSpec, Tool, ToolCall, type TrainStyleInput, TrainStyleResult, type TranscribeInput, TranscribeResult, type TranslateInput, TranslateResult, Transport, type TransportRequest, type TransportResponse, type TtsInput, type UpmetricsCostClientConfig, UpmetricsCostError, type UpmetricsCostRow, type UpmetricsCostSummary, type UpmetricsCostTimeseries, type UpmetricsSink, type UpmetricsSinkConfig, type UpmetricsSinkStats, Usage, VERSION, type VideoInput, type VisionInput, type VoiceInfo, type VoiceProvider, type VoiceResolveResult, type VoiceStatus, VoiceUnavailableError, type WebSearchContext, type WebSearchToolResult, ZDR_PROVIDERS, aiConfigSchema, anthropicAdapter, anthropicApiAdapter, anthropicSubprocessAdapter, azureAdapter, bflAdapter, bflCredits, byokAdapter, chatInputSchema, checkPriceDrift, checkVoice, computeCost, createAI, deepinfraAdapter, deeplAdapter, deepseekAdapter, defaultBaseUrl, defaultProviders, discordSink, elevenlabsAdapter, embeddingInputSchema, falAdapter, falStubAdapter, freshUsage, fromProviderToolCall, geminiAdapter, getCostSummary, getPrice, httpTransport, imageInputSchema, isByokKeyed, listAzureDanishVoices, listVoices, makeContracts, makeOpenAICompatibleAdapter, matchLabel, memorySearchCache, messageSchema, mistralAdapter, mistralStubAdapter, multiSink, noopSink, openaiAdapter, openaiStubAdapter, openrouterAdapter, parseClaudeCliJson, parseJsonLoose, refreshAvailability, requestyAdapter, resetRefreshState, resetRegistry, resolveAzureVoice, resolveTier, resolveVoice, routeSearch, runWebSearch, search, sqliteBudgetStore, sqliteSink, streamTransport, stubProviders, subprocessTransport, tierSpecSchema, toProviderTools, toolSchema, translateInputSchema, typesafeAdapter, upmetricsCostClient, upmetricsSink, usdFromMicro, vertexAdapter, visionInputSchema, webSearchTool, wouldProviderRouteTo, wouldRouteTo };