@adaline/bedrock 0.21.0 → 0.22.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
@@ -2,7 +2,7 @@ import * as zod from 'zod';
2
2
  import { z } from 'zod';
3
3
  import { BaseChatModel } from '@adaline/anthropic';
4
4
  import { ChatModelSchemaType, UrlType, HeadersType, ParamsType, ProviderV1, ChatModelV1, EmbeddingModelSchemaType, EmbeddingModelV1 } from '@adaline/provider';
5
- import { ConfigType, MessageType, ToolType, PartialChatResponseType } from '@adaline/types';
5
+ import { ConfigType, MessageType, ToolType, PartialChatResponseType, ChatModelPriceType } from '@adaline/types';
6
6
 
7
7
  declare const BedrockAnthropicChatModelBaseConfigSchema: (maxOutputTokens: number, maxSequences: number) => zod.ZodObject<zod.objectUtil.extendShape<{
8
8
  temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
@@ -251,6 +251,7 @@ declare class BaseChatModelAnthropic extends BaseChatModel {
251
251
  getProxyCompleteChatUrl(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<UrlType>;
252
252
  getProxyCompleteChatHeaders(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<HeadersType>;
253
253
  getProxyStreamChatHeaders(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<HeadersType>;
254
+ getModelPricing(): ChatModelPriceType;
254
255
  }
255
256
 
256
257
  declare const BedrockClaude3_5Haiku20241022Literal = "anthropic.claude-3-5-haiku-20241022-v1:0";
@@ -299,6 +300,20 @@ declare const BedrockClaude3_5Haiku20241022Schema: {
299
300
  }>;
300
301
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
301
302
  };
303
+ price: {
304
+ modelName: string;
305
+ currency: string;
306
+ tokenRanges: {
307
+ minTokens: number;
308
+ prices: {
309
+ base: {
310
+ inputPricePerMillion: number;
311
+ outputPricePerMillion: number;
312
+ };
313
+ };
314
+ maxTokens?: number | null | undefined;
315
+ }[];
316
+ };
302
317
  maxReasoningTokens?: number | undefined;
303
318
  };
304
319
  declare const BedrockClaude3_5Haiku20241022Options: z.ZodObject<{
@@ -365,6 +380,20 @@ declare const BedrockClaude3_5Sonnet20240620Schema: {
365
380
  }>;
366
381
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
367
382
  };
383
+ price: {
384
+ modelName: string;
385
+ currency: string;
386
+ tokenRanges: {
387
+ minTokens: number;
388
+ prices: {
389
+ base: {
390
+ inputPricePerMillion: number;
391
+ outputPricePerMillion: number;
392
+ };
393
+ };
394
+ maxTokens?: number | null | undefined;
395
+ }[];
396
+ };
368
397
  maxReasoningTokens?: number | undefined;
369
398
  };
370
399
  declare const BedrockClaude3_5Sonnet20240620Options: z.ZodObject<{
@@ -431,6 +460,20 @@ declare const BedrockClaude3_5Sonnet20241022Schema: {
431
460
  }>;
432
461
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
433
462
  };
463
+ price: {
464
+ modelName: string;
465
+ currency: string;
466
+ tokenRanges: {
467
+ minTokens: number;
468
+ prices: {
469
+ base: {
470
+ inputPricePerMillion: number;
471
+ outputPricePerMillion: number;
472
+ };
473
+ };
474
+ maxTokens?: number | null | undefined;
475
+ }[];
476
+ };
434
477
  maxReasoningTokens?: number | undefined;
435
478
  };
436
479
  declare const BedrockClaude3_5Sonnet20241022Options: z.ZodObject<{
@@ -497,6 +540,20 @@ declare const BedrockClaude3Haiku20240307Schema: {
497
540
  }>;
498
541
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
499
542
  };
543
+ price: {
544
+ modelName: string;
545
+ currency: string;
546
+ tokenRanges: {
547
+ minTokens: number;
548
+ prices: {
549
+ base: {
550
+ inputPricePerMillion: number;
551
+ outputPricePerMillion: number;
552
+ };
553
+ };
554
+ maxTokens?: number | null | undefined;
555
+ }[];
556
+ };
500
557
  maxReasoningTokens?: number | undefined;
501
558
  };
502
559
  declare const BedrockClaude3Haiku20240307Options: z.ZodObject<{
@@ -563,6 +620,20 @@ declare const BedrockClaude3Opus20240229Schema: {
563
620
  }>;
564
621
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
565
622
  };
623
+ price: {
624
+ modelName: string;
625
+ currency: string;
626
+ tokenRanges: {
627
+ minTokens: number;
628
+ prices: {
629
+ base: {
630
+ inputPricePerMillion: number;
631
+ outputPricePerMillion: number;
632
+ };
633
+ };
634
+ maxTokens?: number | null | undefined;
635
+ }[];
636
+ };
566
637
  maxReasoningTokens?: number | undefined;
567
638
  };
568
639
  declare const BedrockClaude3Opus20240229Options: z.ZodObject<{
@@ -629,6 +700,20 @@ declare const BedrockClaude3Sonnet20240229Schema: {
629
700
  }>;
630
701
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
631
702
  };
703
+ price: {
704
+ modelName: string;
705
+ currency: string;
706
+ tokenRanges: {
707
+ minTokens: number;
708
+ prices: {
709
+ base: {
710
+ inputPricePerMillion: number;
711
+ outputPricePerMillion: number;
712
+ };
713
+ };
714
+ maxTokens?: number | null | undefined;
715
+ }[];
716
+ };
632
717
  maxReasoningTokens?: number | undefined;
633
718
  };
634
719
  declare const BedrockClaude3Sonnet20240229Options: z.ZodObject<{
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as zod from 'zod';
2
2
  import { z } from 'zod';
3
3
  import { BaseChatModel } from '@adaline/anthropic';
4
4
  import { ChatModelSchemaType, UrlType, HeadersType, ParamsType, ProviderV1, ChatModelV1, EmbeddingModelSchemaType, EmbeddingModelV1 } from '@adaline/provider';
5
- import { ConfigType, MessageType, ToolType, PartialChatResponseType } from '@adaline/types';
5
+ import { ConfigType, MessageType, ToolType, PartialChatResponseType, ChatModelPriceType } from '@adaline/types';
6
6
 
7
7
  declare const BedrockAnthropicChatModelBaseConfigSchema: (maxOutputTokens: number, maxSequences: number) => zod.ZodObject<zod.objectUtil.extendShape<{
8
8
  temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
@@ -251,6 +251,7 @@ declare class BaseChatModelAnthropic extends BaseChatModel {
251
251
  getProxyCompleteChatUrl(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<UrlType>;
252
252
  getProxyCompleteChatHeaders(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<HeadersType>;
253
253
  getProxyStreamChatHeaders(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<HeadersType>;
254
+ getModelPricing(): ChatModelPriceType;
254
255
  }
255
256
 
256
257
  declare const BedrockClaude3_5Haiku20241022Literal = "anthropic.claude-3-5-haiku-20241022-v1:0";
@@ -299,6 +300,20 @@ declare const BedrockClaude3_5Haiku20241022Schema: {
299
300
  }>;
300
301
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
301
302
  };
303
+ price: {
304
+ modelName: string;
305
+ currency: string;
306
+ tokenRanges: {
307
+ minTokens: number;
308
+ prices: {
309
+ base: {
310
+ inputPricePerMillion: number;
311
+ outputPricePerMillion: number;
312
+ };
313
+ };
314
+ maxTokens?: number | null | undefined;
315
+ }[];
316
+ };
302
317
  maxReasoningTokens?: number | undefined;
303
318
  };
304
319
  declare const BedrockClaude3_5Haiku20241022Options: z.ZodObject<{
@@ -365,6 +380,20 @@ declare const BedrockClaude3_5Sonnet20240620Schema: {
365
380
  }>;
366
381
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
367
382
  };
383
+ price: {
384
+ modelName: string;
385
+ currency: string;
386
+ tokenRanges: {
387
+ minTokens: number;
388
+ prices: {
389
+ base: {
390
+ inputPricePerMillion: number;
391
+ outputPricePerMillion: number;
392
+ };
393
+ };
394
+ maxTokens?: number | null | undefined;
395
+ }[];
396
+ };
368
397
  maxReasoningTokens?: number | undefined;
369
398
  };
370
399
  declare const BedrockClaude3_5Sonnet20240620Options: z.ZodObject<{
@@ -431,6 +460,20 @@ declare const BedrockClaude3_5Sonnet20241022Schema: {
431
460
  }>;
432
461
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
433
462
  };
463
+ price: {
464
+ modelName: string;
465
+ currency: string;
466
+ tokenRanges: {
467
+ minTokens: number;
468
+ prices: {
469
+ base: {
470
+ inputPricePerMillion: number;
471
+ outputPricePerMillion: number;
472
+ };
473
+ };
474
+ maxTokens?: number | null | undefined;
475
+ }[];
476
+ };
434
477
  maxReasoningTokens?: number | undefined;
435
478
  };
436
479
  declare const BedrockClaude3_5Sonnet20241022Options: z.ZodObject<{
@@ -497,6 +540,20 @@ declare const BedrockClaude3Haiku20240307Schema: {
497
540
  }>;
498
541
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
499
542
  };
543
+ price: {
544
+ modelName: string;
545
+ currency: string;
546
+ tokenRanges: {
547
+ minTokens: number;
548
+ prices: {
549
+ base: {
550
+ inputPricePerMillion: number;
551
+ outputPricePerMillion: number;
552
+ };
553
+ };
554
+ maxTokens?: number | null | undefined;
555
+ }[];
556
+ };
500
557
  maxReasoningTokens?: number | undefined;
501
558
  };
502
559
  declare const BedrockClaude3Haiku20240307Options: z.ZodObject<{
@@ -563,6 +620,20 @@ declare const BedrockClaude3Opus20240229Schema: {
563
620
  }>;
564
621
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
565
622
  };
623
+ price: {
624
+ modelName: string;
625
+ currency: string;
626
+ tokenRanges: {
627
+ minTokens: number;
628
+ prices: {
629
+ base: {
630
+ inputPricePerMillion: number;
631
+ outputPricePerMillion: number;
632
+ };
633
+ };
634
+ maxTokens?: number | null | undefined;
635
+ }[];
636
+ };
566
637
  maxReasoningTokens?: number | undefined;
567
638
  };
568
639
  declare const BedrockClaude3Opus20240229Options: z.ZodObject<{
@@ -629,6 +700,20 @@ declare const BedrockClaude3Sonnet20240229Schema: {
629
700
  }>;
630
701
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
631
702
  };
703
+ price: {
704
+ modelName: string;
705
+ currency: string;
706
+ tokenRanges: {
707
+ minTokens: number;
708
+ prices: {
709
+ base: {
710
+ inputPricePerMillion: number;
711
+ outputPricePerMillion: number;
712
+ };
713
+ };
714
+ maxTokens?: number | null | undefined;
715
+ }[];
716
+ };
632
717
  maxReasoningTokens?: number | undefined;
633
718
  };
634
719
  declare const BedrockClaude3Sonnet20240229Options: z.ZodObject<{