@adaline/vertex 0.15.0 → 0.17.0

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.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { BaseChatModel } from '@adaline/google';
3
3
  import { ChatModelSchemaType, HeadersType, EmbeddingModelV1, EmbeddingModelSchemaType, UrlType, ParamsType, ProviderV1, ChatModelV1 } from '@adaline/provider';
4
- import { EmbeddingRequestsType, ConfigType, EmbeddingResponseType } from '@adaline/types';
4
+ import { ChatModelPriceType, EmbeddingRequestsType, ConfigType, EmbeddingResponseType } from '@adaline/types';
5
5
 
6
6
  declare const BaseChatModelOptions: z.ZodObject<{
7
7
  accessToken: z.ZodString;
@@ -36,17 +36,32 @@ declare class BaseChatModelVertex extends BaseChatModel {
36
36
  private readonly publisher;
37
37
  constructor(modelSchema: ChatModelSchemaType, options: BaseChatModelOptionsType);
38
38
  getDefaultHeaders(): HeadersType;
39
+ getModelPricing(): ChatModelPriceType;
39
40
  }
40
41
 
41
42
  declare const Gemini1_0Pro001Literal: "gemini-1.0-pro-001";
42
43
  declare const Gemini1_0Pro001Schema: {
43
- description: string;
44
- maxOutputTokens: number;
45
- name: string;
46
- roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
47
- modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
48
- maxInputTokens: number;
49
- config: {
44
+ readonly price: {
45
+ modelName: string;
46
+ currency: string;
47
+ tokenRanges: {
48
+ minTokens: number;
49
+ maxTokens: null;
50
+ prices: {
51
+ base: {
52
+ inputPricePerMillion: number;
53
+ outputPricePerMillion: number;
54
+ };
55
+ };
56
+ }[];
57
+ };
58
+ readonly description: string;
59
+ readonly maxOutputTokens: number;
60
+ readonly name: string;
61
+ readonly roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
62
+ readonly modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
63
+ readonly maxInputTokens: number;
64
+ readonly config: {
50
65
  def: Record<string, {
51
66
  type: "multi-string";
52
67
  param: string;
@@ -84,6 +99,7 @@ declare const Gemini1_0Pro001Schema: {
84
99
  }>;
85
100
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
86
101
  };
102
+ readonly maxReasoningTokens?: number | undefined;
87
103
  };
88
104
  declare const Gemini1_0Pro001Options: z.ZodObject<{
89
105
  accessToken: z.ZodString;
@@ -114,6 +130,20 @@ declare class Gemini1_0Pro001 extends BaseChatModelVertex {
114
130
 
115
131
  declare const Gemini1_0ProVisionLiteral: "gemini-1.0-pro-vision";
116
132
  declare const Gemini1_0ProVisionSchema: {
133
+ price: {
134
+ modelName: string;
135
+ currency: string;
136
+ tokenRanges: {
137
+ minTokens: number;
138
+ maxTokens: null;
139
+ prices: {
140
+ base: {
141
+ inputPricePerMillion: number;
142
+ outputPricePerMillion: number;
143
+ };
144
+ };
145
+ }[];
146
+ };
117
147
  description: string;
118
148
  maxOutputTokens: number;
119
149
  name: string;
@@ -158,6 +188,7 @@ declare const Gemini1_0ProVisionSchema: {
158
188
  }>;
159
189
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
160
190
  };
191
+ maxReasoningTokens?: number | undefined;
161
192
  };
162
193
  declare const Gemini1_0ProVisionOptions: z.ZodObject<{
163
194
  accessToken: z.ZodString;
@@ -188,13 +219,27 @@ declare class Gemini1_0ProVision extends BaseChatModelVertex {
188
219
 
189
220
  declare const Gemini1_0ProLiteral: "gemini-1.0-pro";
190
221
  declare const Gemini1_0ProSchema: {
191
- description: string;
192
- maxOutputTokens: number;
193
- name: string;
194
- roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
195
- modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
196
- maxInputTokens: number;
197
- config: {
222
+ readonly price: {
223
+ modelName: string;
224
+ currency: string;
225
+ tokenRanges: {
226
+ minTokens: number;
227
+ maxTokens: null;
228
+ prices: {
229
+ base: {
230
+ inputPricePerMillion: number;
231
+ outputPricePerMillion: number;
232
+ };
233
+ };
234
+ }[];
235
+ };
236
+ readonly description: string;
237
+ readonly maxOutputTokens: number;
238
+ readonly name: string;
239
+ readonly roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
240
+ readonly modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
241
+ readonly maxInputTokens: number;
242
+ readonly config: {
198
243
  def: Record<string, {
199
244
  type: "multi-string";
200
245
  param: string;
@@ -232,6 +277,7 @@ declare const Gemini1_0ProSchema: {
232
277
  }>;
233
278
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
234
279
  };
280
+ readonly maxReasoningTokens?: number | undefined;
235
281
  };
236
282
  declare const Gemini1_0ProOptions: z.ZodObject<{
237
283
  accessToken: z.ZodString;
@@ -262,13 +308,36 @@ declare class Gemini1_0Pro extends BaseChatModelVertex {
262
308
 
263
309
  declare const Gemini1_5Flash001Literal: "gemini-1.5-flash-001";
264
310
  declare const Gemini1_5Flash001Schema: {
265
- description: string;
266
- maxOutputTokens: number;
267
- name: string;
268
- roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
269
- modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
270
- maxInputTokens: number;
271
- config: {
311
+ readonly price: {
312
+ modelName: string;
313
+ currency: string;
314
+ tokenRanges: ({
315
+ minTokens: number;
316
+ maxTokens: number;
317
+ prices: {
318
+ base: {
319
+ inputPricePerMillion: number;
320
+ outputPricePerMillion: number;
321
+ };
322
+ };
323
+ } | {
324
+ minTokens: number;
325
+ maxTokens: null;
326
+ prices: {
327
+ base: {
328
+ inputPricePerMillion: number;
329
+ outputPricePerMillion: number;
330
+ };
331
+ };
332
+ })[];
333
+ };
334
+ readonly description: string;
335
+ readonly maxOutputTokens: number;
336
+ readonly name: string;
337
+ readonly roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
338
+ readonly modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
339
+ readonly maxInputTokens: number;
340
+ readonly config: {
272
341
  def: Record<string, {
273
342
  type: "multi-string";
274
343
  param: string;
@@ -306,6 +375,7 @@ declare const Gemini1_5Flash001Schema: {
306
375
  }>;
307
376
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
308
377
  };
378
+ readonly maxReasoningTokens?: number | undefined;
309
379
  };
310
380
  declare const Gemini1_5Flash001Options: z.ZodObject<{
311
381
  accessToken: z.ZodString;
@@ -336,6 +406,29 @@ declare class Gemini1_5Flash001 extends BaseChatModelVertex {
336
406
 
337
407
  declare const Gemini1_5Flash002Literal: "gemini-1.5-flash-002";
338
408
  declare const Gemini1_5Flash002Schema: {
409
+ price: {
410
+ modelName: string;
411
+ currency: string;
412
+ tokenRanges: ({
413
+ minTokens: number;
414
+ maxTokens: number;
415
+ prices: {
416
+ base: {
417
+ inputPricePerMillion: number;
418
+ outputPricePerMillion: number;
419
+ };
420
+ };
421
+ } | {
422
+ minTokens: number;
423
+ maxTokens: null;
424
+ prices: {
425
+ base: {
426
+ inputPricePerMillion: number;
427
+ outputPricePerMillion: number;
428
+ };
429
+ };
430
+ })[];
431
+ };
339
432
  description: string;
340
433
  maxOutputTokens: number;
341
434
  name: string;
@@ -380,6 +473,7 @@ declare const Gemini1_5Flash002Schema: {
380
473
  }>;
381
474
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
382
475
  };
476
+ maxReasoningTokens?: number | undefined;
383
477
  };
384
478
  declare const Gemini1_5Flash002Options: z.ZodObject<{
385
479
  accessToken: z.ZodString;
@@ -409,52 +503,7 @@ declare class Gemini1_5Flash002 extends BaseChatModelVertex {
409
503
  }
410
504
 
411
505
  declare const Gemini1_5FlashLiteral: "gemini-1.5-flash";
412
- declare const Gemini1_5FlashSchema: {
413
- description: string;
414
- maxOutputTokens: number;
415
- name: string;
416
- roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
417
- modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
418
- maxInputTokens: number;
419
- config: {
420
- def: Record<string, {
421
- type: "multi-string";
422
- param: string;
423
- title: string;
424
- description: string;
425
- max: number;
426
- } | {
427
- type: "object-schema";
428
- param: string;
429
- title: string;
430
- description: string;
431
- objectSchema?: any;
432
- } | {
433
- type: "range";
434
- param: string;
435
- title: string;
436
- description: string;
437
- max: number;
438
- default: number;
439
- min: number;
440
- step: number;
441
- } | {
442
- type: "select-boolean";
443
- param: string;
444
- title: string;
445
- description: string;
446
- default: boolean | null;
447
- } | {
448
- type: "select-string";
449
- param: string;
450
- title: string;
451
- description: string;
452
- default: string;
453
- choices: string[];
454
- }>;
455
- schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
456
- };
457
- };
506
+ declare const Gemini1_5FlashSchema: ChatModelSchemaType;
458
507
  declare const Gemini1_5FlashOptions: z.ZodObject<{
459
508
  accessToken: z.ZodString;
460
509
  modelName: z.ZodString;
@@ -484,13 +533,36 @@ declare class Gemini1_5Flash extends BaseChatModelVertex {
484
533
 
485
534
  declare const Gemini1_5Pro001Literal: "gemini-1.5-pro-001";
486
535
  declare const Gemini1_5Pro001Schema: {
487
- description: string;
488
- maxOutputTokens: number;
489
- name: string;
490
- roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
491
- modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
492
- maxInputTokens: number;
493
- config: {
536
+ readonly price: {
537
+ modelName: string;
538
+ currency: string;
539
+ tokenRanges: ({
540
+ minTokens: number;
541
+ maxTokens: number;
542
+ prices: {
543
+ base: {
544
+ inputPricePerMillion: number;
545
+ outputPricePerMillion: number;
546
+ };
547
+ };
548
+ } | {
549
+ minTokens: number;
550
+ maxTokens: null;
551
+ prices: {
552
+ base: {
553
+ inputPricePerMillion: number;
554
+ outputPricePerMillion: number;
555
+ };
556
+ };
557
+ })[];
558
+ };
559
+ readonly description: string;
560
+ readonly maxOutputTokens: number;
561
+ readonly name: string;
562
+ readonly roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
563
+ readonly modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
564
+ readonly maxInputTokens: number;
565
+ readonly config: {
494
566
  def: Record<string, {
495
567
  type: "multi-string";
496
568
  param: string;
@@ -528,6 +600,7 @@ declare const Gemini1_5Pro001Schema: {
528
600
  }>;
529
601
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
530
602
  };
603
+ readonly maxReasoningTokens?: number | undefined;
531
604
  };
532
605
  declare const Gemini1_5Pro001Options: z.ZodObject<{
533
606
  accessToken: z.ZodString;
@@ -558,13 +631,36 @@ declare class Gemini1_5Pro001 extends BaseChatModelVertex {
558
631
 
559
632
  declare const Gemini1_5Pro002Literal: "gemini-1.5-pro-002";
560
633
  declare const Gemini1_5Pro002Schema: {
561
- description: string;
562
- maxOutputTokens: number;
563
- name: string;
564
- roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
565
- modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
566
- maxInputTokens: number;
567
- config: {
634
+ readonly price: {
635
+ modelName: string;
636
+ currency: string;
637
+ tokenRanges: ({
638
+ minTokens: number;
639
+ maxTokens: number;
640
+ prices: {
641
+ base: {
642
+ inputPricePerMillion: number;
643
+ outputPricePerMillion: number;
644
+ };
645
+ };
646
+ } | {
647
+ minTokens: number;
648
+ maxTokens: null;
649
+ prices: {
650
+ base: {
651
+ inputPricePerMillion: number;
652
+ outputPricePerMillion: number;
653
+ };
654
+ };
655
+ })[];
656
+ };
657
+ readonly description: string;
658
+ readonly maxOutputTokens: number;
659
+ readonly name: string;
660
+ readonly roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
661
+ readonly modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
662
+ readonly maxInputTokens: number;
663
+ readonly config: {
568
664
  def: Record<string, {
569
665
  type: "multi-string";
570
666
  param: string;
@@ -602,6 +698,7 @@ declare const Gemini1_5Pro002Schema: {
602
698
  }>;
603
699
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
604
700
  };
701
+ readonly maxReasoningTokens?: number | undefined;
605
702
  };
606
703
  declare const Gemini1_5Pro002Options: z.ZodObject<{
607
704
  accessToken: z.ZodString;
@@ -632,13 +729,36 @@ declare class Gemini1_5Pro002 extends BaseChatModelVertex {
632
729
 
633
730
  declare const Gemini1_5ProLiteral: "gemini-1.5-pro";
634
731
  declare const Gemini1_5ProSchema: {
635
- description: string;
636
- maxOutputTokens: number;
637
- name: string;
638
- roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
639
- modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
640
- maxInputTokens: number;
641
- config: {
732
+ readonly price: {
733
+ modelName: string;
734
+ currency: string;
735
+ tokenRanges: ({
736
+ minTokens: number;
737
+ maxTokens: number;
738
+ prices: {
739
+ base: {
740
+ inputPricePerMillion: number;
741
+ outputPricePerMillion: number;
742
+ };
743
+ };
744
+ } | {
745
+ minTokens: number;
746
+ maxTokens: null;
747
+ prices: {
748
+ base: {
749
+ inputPricePerMillion: number;
750
+ outputPricePerMillion: number;
751
+ };
752
+ };
753
+ })[];
754
+ };
755
+ readonly description: string;
756
+ readonly maxOutputTokens: number;
757
+ readonly name: string;
758
+ readonly roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
759
+ readonly modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
760
+ readonly maxInputTokens: number;
761
+ readonly config: {
642
762
  def: Record<string, {
643
763
  type: "multi-string";
644
764
  param: string;
@@ -676,6 +796,7 @@ declare const Gemini1_5ProSchema: {
676
796
  }>;
677
797
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
678
798
  };
799
+ readonly maxReasoningTokens?: number | undefined;
679
800
  };
680
801
  declare const Gemini1_5ProOptions: z.ZodObject<{
681
802
  accessToken: z.ZodString;
@@ -706,13 +827,27 @@ declare class Gemini1_5Pro extends BaseChatModelVertex {
706
827
 
707
828
  declare const Gemini2_0FlashExpLiteral: "gemini-2.0-flash-exp";
708
829
  declare const Gemini2_0FlashExpSchema: {
709
- description: string;
710
- maxOutputTokens: number;
711
- name: string;
712
- roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
713
- modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
714
- maxInputTokens: number;
715
- config: {
830
+ readonly price: {
831
+ modelName: string;
832
+ currency: string;
833
+ tokenRanges: {
834
+ minTokens: number;
835
+ maxTokens: null;
836
+ prices: {
837
+ base: {
838
+ inputPricePerMillion: number;
839
+ outputPricePerMillion: number;
840
+ };
841
+ };
842
+ }[];
843
+ };
844
+ readonly description: string;
845
+ readonly maxOutputTokens: number;
846
+ readonly name: string;
847
+ readonly roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
848
+ readonly modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
849
+ readonly maxInputTokens: number;
850
+ readonly config: {
716
851
  def: Record<string, {
717
852
  type: "multi-string";
718
853
  param: string;
@@ -750,6 +885,7 @@ declare const Gemini2_0FlashExpSchema: {
750
885
  }>;
751
886
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
752
887
  };
888
+ readonly maxReasoningTokens?: number | undefined;
753
889
  };
754
890
  declare const Gemini2_0FlashExpOptions: z.ZodObject<{
755
891
  accessToken: z.ZodString;