@stll/ai-catalog 0.1.9 → 0.1.11
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 +69 -105
- package/dist/index.js +15 -66
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import * as v from "valibot";
|
|
|
5
5
|
* same rates as integer ledger units so usage arithmetic never depends on
|
|
6
6
|
* floating point values.
|
|
7
7
|
*/
|
|
8
|
-
declare const MODEL_RATE_UNITS_PER_USD = 100000;
|
|
8
|
+
export declare const MODEL_RATE_UNITS_PER_USD = 100000;
|
|
9
9
|
type ModelRateAmounts = {
|
|
10
10
|
/** Normalized ledger units per 1M input tokens. */
|
|
11
11
|
inputPerMTok: number;
|
|
@@ -37,11 +37,11 @@ type ModelRate = ({
|
|
|
37
37
|
/** Applies to the entire request once input exceeds the threshold. */
|
|
38
38
|
aboveThreshold: ModelRateAmounts;
|
|
39
39
|
};
|
|
40
|
-
declare const getStandardModelRate: (rate: ModelRate) => ModelRateAmounts;
|
|
41
|
-
declare const resolveModelRate: (rate: ModelRate, inputTokens: number) => ModelRateAmounts;
|
|
40
|
+
export declare const getStandardModelRate: (rate: ModelRate) => ModelRateAmounts;
|
|
41
|
+
export declare const resolveModelRate: (rate: ModelRate, inputTokens: number) => ModelRateAmounts;
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/model-rates.gen.d.ts
|
|
44
|
-
declare const MODEL_RATES: {
|
|
44
|
+
export declare const MODEL_RATES: {
|
|
45
45
|
readonly "gemini-3.8-flash": {
|
|
46
46
|
readonly kind: "flat";
|
|
47
47
|
readonly inputPerMTok: 75000;
|
|
@@ -284,18 +284,21 @@ declare const MODEL_RATES: {
|
|
|
284
284
|
readonly inputPerMTok: 80000;
|
|
285
285
|
readonly outputPerMTok: 320000;
|
|
286
286
|
readonly cachedInputPerMTok: 20000;
|
|
287
|
+
readonly cachedWriteInputPerMTok: 80000;
|
|
287
288
|
};
|
|
288
289
|
readonly "us.amazon.nova-lite-v1:0": {
|
|
289
290
|
readonly kind: "flat";
|
|
290
291
|
readonly inputPerMTok: 6000;
|
|
291
292
|
readonly outputPerMTok: 24000;
|
|
292
293
|
readonly cachedInputPerMTok: 1500;
|
|
294
|
+
readonly cachedWriteInputPerMTok: 6000;
|
|
293
295
|
};
|
|
294
296
|
readonly "us.amazon.nova-micro-v1:0": {
|
|
295
297
|
readonly kind: "flat";
|
|
296
298
|
readonly inputPerMTok: 3500;
|
|
297
299
|
readonly outputPerMTok: 14000;
|
|
298
300
|
readonly cachedInputPerMTok: 875;
|
|
301
|
+
readonly cachedWriteInputPerMTok: 3500;
|
|
299
302
|
};
|
|
300
303
|
readonly "openai.gpt-oss-120b-1:0": {
|
|
301
304
|
readonly kind: "flat";
|
|
@@ -327,21 +330,6 @@ declare const MODEL_RATES: {
|
|
|
327
330
|
readonly inputPerMTok: 15000;
|
|
328
331
|
readonly outputPerMTok: 60000;
|
|
329
332
|
};
|
|
330
|
-
readonly "magistral-medium-latest": {
|
|
331
|
-
readonly kind: "flat";
|
|
332
|
-
readonly inputPerMTok: 200000;
|
|
333
|
-
readonly outputPerMTok: 500000;
|
|
334
|
-
};
|
|
335
|
-
readonly "magistral-small": {
|
|
336
|
-
readonly kind: "flat";
|
|
337
|
-
readonly inputPerMTok: 50000;
|
|
338
|
-
readonly outputPerMTok: 150000;
|
|
339
|
-
};
|
|
340
|
-
readonly "pixtral-large-latest": {
|
|
341
|
-
readonly kind: "flat";
|
|
342
|
-
readonly inputPerMTok: 200000;
|
|
343
|
-
readonly outputPerMTok: 600000;
|
|
344
|
-
};
|
|
345
333
|
readonly "gemini-2.5-flash": {
|
|
346
334
|
readonly kind: "flat";
|
|
347
335
|
readonly inputPerMTok: 30000;
|
|
@@ -377,7 +365,7 @@ declare const MODEL_RATES: {
|
|
|
377
365
|
};
|
|
378
366
|
//#endregion
|
|
379
367
|
//#region src/model-rate-policy.d.ts
|
|
380
|
-
declare const MODELS_DEV_RATE_PROVIDER_BY_CATALOG_PROVIDER: {
|
|
368
|
+
export declare const MODELS_DEV_RATE_PROVIDER_BY_CATALOG_PROVIDER: {
|
|
381
369
|
readonly google: "google";
|
|
382
370
|
readonly openai: "openai";
|
|
383
371
|
readonly anthropic: "anthropic";
|
|
@@ -390,7 +378,7 @@ type ModelsDevRateProvider = (typeof MODELS_DEV_RATE_PROVIDER_BY_CATALOG_PROVIDE
|
|
|
390
378
|
* deployment overrides and usage attribution. Their numeric rates still come
|
|
391
379
|
* exclusively from models.dev.
|
|
392
380
|
*/
|
|
393
|
-
declare const RETAINED_MODELS_DEV_RATE_ENTRIES: {
|
|
381
|
+
export declare const RETAINED_MODELS_DEV_RATE_ENTRIES: {
|
|
394
382
|
readonly "gemini-2.5-flash": {
|
|
395
383
|
readonly modelId: "gemini-2.5-flash";
|
|
396
384
|
readonly provider: "google";
|
|
@@ -414,7 +402,7 @@ declare const RETAINED_MODELS_DEV_RATE_ENTRIES: {
|
|
|
414
402
|
* a mapping once models.dev begins publishing the Stella ID directly, so the
|
|
415
403
|
* map is empty whenever upstream covers every offered ID.
|
|
416
404
|
*/
|
|
417
|
-
declare const MODELS_DEV_RATE_SOURCE_ALIASES: {};
|
|
405
|
+
export declare const MODELS_DEV_RATE_SOURCE_ALIASES: {};
|
|
418
406
|
//#endregion
|
|
419
407
|
//#region src/capabilities-overrides.d.ts
|
|
420
408
|
/**
|
|
@@ -433,7 +421,7 @@ type CapabilityOverride = {
|
|
|
433
421
|
/** Why the upstream source cannot answer for this model. Dated. */
|
|
434
422
|
reason: string;
|
|
435
423
|
};
|
|
436
|
-
declare const CAPABILITY_OVERRIDES: Partial<Record<OfferedBYOKModelId, CapabilityOverride>>;
|
|
424
|
+
export declare const CAPABILITY_OVERRIDES: Partial<Record<OfferedBYOKModelId, CapabilityOverride>>;
|
|
437
425
|
//#endregion
|
|
438
426
|
//#region src/document-input-overrides.d.ts
|
|
439
427
|
type DocumentInputOverride = {
|
|
@@ -447,7 +435,7 @@ type DocumentInputOverride = {
|
|
|
447
435
|
* under-report the provider API's file-input support. The generator rejects an
|
|
448
436
|
* override once upstream agrees, so sourced data takes ownership automatically.
|
|
449
437
|
*/
|
|
450
|
-
declare const DOCUMENT_INPUT_OVERRIDES: Partial<Record<OfferedBYOKModelId, DocumentInputOverride>>;
|
|
438
|
+
export declare const DOCUMENT_INPUT_OVERRIDES: Partial<Record<OfferedBYOKModelId, DocumentInputOverride>>;
|
|
451
439
|
//#endregion
|
|
452
440
|
//#region src/capabilities.gen.d.ts
|
|
453
441
|
/**
|
|
@@ -456,7 +444,7 @@ declare const DOCUMENT_INPUT_OVERRIDES: Partial<Record<OfferedBYOKModelId, Docum
|
|
|
456
444
|
* means the model's reasoning cannot be disabled; consumers must go
|
|
457
445
|
* through `resolveReasoningEffort`.
|
|
458
446
|
*/
|
|
459
|
-
declare const MODEL_REASONING_EFFORTS: {
|
|
447
|
+
export declare const MODEL_REASONING_EFFORTS: {
|
|
460
448
|
readonly "gemini-3.8-flash": readonly ["low", "medium", "high"];
|
|
461
449
|
readonly "gemini-3.7-flash": readonly ["low", "medium", "high"];
|
|
462
450
|
readonly "gemini-3.6-flash": readonly ["minimal", "low", "medium", "high"];
|
|
@@ -509,16 +497,13 @@ declare const MODEL_REASONING_EFFORTS: {
|
|
|
509
497
|
readonly "mistral-large-latest": null;
|
|
510
498
|
readonly "mistral-medium-latest": readonly ["none", "high"];
|
|
511
499
|
readonly "mistral-small-latest": readonly ["none", "high"];
|
|
512
|
-
readonly "magistral-medium-latest": null;
|
|
513
|
-
readonly "magistral-small": null;
|
|
514
|
-
readonly "pixtral-large-latest": null;
|
|
515
500
|
};
|
|
516
501
|
/**
|
|
517
502
|
* Concrete provider-default effort where the upstream catalogue publishes
|
|
518
503
|
* one. OpenRouter is the source today; null means the provider does not expose
|
|
519
504
|
* a truthful named default, so clients must retain a separate Default choice.
|
|
520
505
|
*/
|
|
521
|
-
declare const MODEL_DEFAULT_REASONING_EFFORTS: {
|
|
506
|
+
export declare const MODEL_DEFAULT_REASONING_EFFORTS: {
|
|
522
507
|
readonly "gemini-3.8-flash": null;
|
|
523
508
|
readonly "gemini-3.7-flash": null;
|
|
524
509
|
readonly "gemini-3.6-flash": null;
|
|
@@ -571,16 +556,13 @@ declare const MODEL_DEFAULT_REASONING_EFFORTS: {
|
|
|
571
556
|
readonly "mistral-large-latest": null;
|
|
572
557
|
readonly "mistral-medium-latest": null;
|
|
573
558
|
readonly "mistral-small-latest": null;
|
|
574
|
-
readonly "magistral-medium-latest": null;
|
|
575
|
-
readonly "magistral-small": null;
|
|
576
|
-
readonly "pixtral-large-latest": null;
|
|
577
559
|
};
|
|
578
560
|
/**
|
|
579
561
|
* Whether stella should emit a `temperature` sampling override.
|
|
580
562
|
* `"omit"` covers rejected, deprecated, and accepted-but-ignored
|
|
581
563
|
* parameters. Consumers must go through `shouldEmitTemperature`.
|
|
582
564
|
*/
|
|
583
|
-
declare const MODEL_TEMPERATURE_POLICIES: {
|
|
565
|
+
export declare const MODEL_TEMPERATURE_POLICIES: {
|
|
584
566
|
readonly "gemini-3.8-flash": "omit";
|
|
585
567
|
readonly "gemini-3.7-flash": "omit";
|
|
586
568
|
readonly "gemini-3.6-flash": "omit";
|
|
@@ -633,9 +615,6 @@ declare const MODEL_TEMPERATURE_POLICIES: {
|
|
|
633
615
|
readonly "mistral-large-latest": "emit";
|
|
634
616
|
readonly "mistral-medium-latest": "emit";
|
|
635
617
|
readonly "mistral-small-latest": "emit";
|
|
636
|
-
readonly "magistral-medium-latest": "emit";
|
|
637
|
-
readonly "magistral-small": "emit";
|
|
638
|
-
readonly "pixtral-large-latest": "emit";
|
|
639
618
|
};
|
|
640
619
|
//#endregion
|
|
641
620
|
//#region src/index.d.ts
|
|
@@ -648,12 +627,12 @@ declare const MODEL_TEMPERATURE_POLICIES: {
|
|
|
648
627
|
* - reasoning: complex multi-step legal analysis
|
|
649
628
|
* - pdf: native PDF/image understanding
|
|
650
629
|
*/
|
|
651
|
-
declare const MODEL_ROLES: readonly ["fast", "chat", "reasoning", "pdf"];
|
|
652
|
-
type ModelRole = (typeof MODEL_ROLES)[number];
|
|
653
|
-
declare const TEMPERATURE_POLICIES: readonly ["emit", "omit"];
|
|
654
|
-
type TemperaturePolicy = (typeof TEMPERATURE_POLICIES)[number];
|
|
655
|
-
declare const AI_PROVIDERS: readonly ["google", "openrouter", "openai", "azure_foundry", "anthropic", "bedrock", "mistral", "openai_compatible", "huggingface"];
|
|
656
|
-
type AIProvider = (typeof AI_PROVIDERS)[number];
|
|
630
|
+
export declare const MODEL_ROLES: readonly ["fast", "chat", "reasoning", "pdf"];
|
|
631
|
+
export type ModelRole = (typeof MODEL_ROLES)[number];
|
|
632
|
+
export declare const TEMPERATURE_POLICIES: readonly ["emit", "omit"];
|
|
633
|
+
export type TemperaturePolicy = (typeof TEMPERATURE_POLICIES)[number];
|
|
634
|
+
export declare const AI_PROVIDERS: readonly ["google", "openrouter", "openai", "azure_foundry", "anthropic", "bedrock", "mistral", "openai_compatible", "huggingface"];
|
|
635
|
+
export type AIProvider = (typeof AI_PROVIDERS)[number];
|
|
657
636
|
declare const AI_PROVIDER_ADAPTER_KIND: {
|
|
658
637
|
readonly google: "tanstack";
|
|
659
638
|
readonly openrouter: "tanstack";
|
|
@@ -665,9 +644,9 @@ declare const AI_PROVIDER_ADAPTER_KIND: {
|
|
|
665
644
|
readonly openai_compatible: "custom";
|
|
666
645
|
readonly huggingface: "custom";
|
|
667
646
|
};
|
|
668
|
-
type TanStackAIProvider = { [TProvider in AIProvider]: (typeof AI_PROVIDER_ADAPTER_KIND)[TProvider] extends "tanstack" ? TProvider : never; }[AIProvider];
|
|
669
|
-
declare const TANSTACK_AI_PROVIDERS: readonly ["google", "openrouter", "openai", "anthropic", "bedrock", "mistral"];
|
|
670
|
-
declare const MODEL_CATALOG_PROVIDER_KIND: {
|
|
647
|
+
export type TanStackAIProvider = { [TProvider in AIProvider]: (typeof AI_PROVIDER_ADAPTER_KIND)[TProvider] extends "tanstack" ? TProvider : never; }[AIProvider];
|
|
648
|
+
export declare const TANSTACK_AI_PROVIDERS: readonly ["google", "openrouter", "openai", "anthropic", "bedrock", "mistral"];
|
|
649
|
+
export declare const MODEL_CATALOG_PROVIDER_KIND: {
|
|
671
650
|
readonly google: "first-party";
|
|
672
651
|
readonly openrouter: "aggregator";
|
|
673
652
|
readonly openai: "first-party";
|
|
@@ -676,20 +655,20 @@ declare const MODEL_CATALOG_PROVIDER_KIND: {
|
|
|
676
655
|
readonly mistral: "first-party";
|
|
677
656
|
};
|
|
678
657
|
/** Providers whose picker IDs map directly to public first-party catalogs. */
|
|
679
|
-
type FirstPartyModelProvider = { [TProvider in TanStackAIProvider]: (typeof MODEL_CATALOG_PROVIDER_KIND)[TProvider] extends "first-party" ? TProvider : never; }[TanStackAIProvider];
|
|
658
|
+
export type FirstPartyModelProvider = { [TProvider in TanStackAIProvider]: (typeof MODEL_CATALOG_PROVIDER_KIND)[TProvider] extends "first-party" ? TProvider : never; }[TanStackAIProvider];
|
|
680
659
|
declare const FIRST_PARTY_MODEL_PROVIDER_VALUES: readonly ["google", "openai", "anthropic", "mistral"];
|
|
681
660
|
/**
|
|
682
661
|
* Runtime form of the first-party provider union. The conditional annotation
|
|
683
662
|
* makes adding a first-party policy without adding its discovery implementation
|
|
684
663
|
* a compile error.
|
|
685
664
|
*/
|
|
686
|
-
declare const FIRST_PARTY_MODEL_PROVIDERS: Exclude<FirstPartyModelProvider, (typeof FIRST_PARTY_MODEL_PROVIDER_VALUES)[number]> extends never ? typeof FIRST_PARTY_MODEL_PROVIDER_VALUES : never;
|
|
665
|
+
export declare const FIRST_PARTY_MODEL_PROVIDERS: Exclude<FirstPartyModelProvider, (typeof FIRST_PARTY_MODEL_PROVIDER_VALUES)[number]> extends never ? typeof FIRST_PARTY_MODEL_PROVIDER_VALUES : never;
|
|
687
666
|
/**
|
|
688
667
|
* Per-role default model IDs for the BYOK-capable cloud providers.
|
|
689
668
|
* Shared between the instance default table (`DEFAULT_MODELS`) and the
|
|
690
669
|
* settings-UI default selection, so a default is defined exactly once.
|
|
691
670
|
*/
|
|
692
|
-
declare const BYOK_DEFAULT_MODELS: {
|
|
671
|
+
export declare const BYOK_DEFAULT_MODELS: {
|
|
693
672
|
readonly google: {
|
|
694
673
|
readonly fast: "gemini-3.7-flash";
|
|
695
674
|
readonly chat: "gemini-3.7-flash";
|
|
@@ -710,12 +689,12 @@ declare const BYOK_DEFAULT_MODELS: {
|
|
|
710
689
|
};
|
|
711
690
|
readonly anthropic: {
|
|
712
691
|
readonly fast: "claude-opus-5";
|
|
713
|
-
readonly chat: "claude-opus-
|
|
692
|
+
readonly chat: "claude-opus-4-8";
|
|
714
693
|
readonly reasoning: "claude-opus-5";
|
|
715
|
-
readonly pdf: "claude-opus-
|
|
694
|
+
readonly pdf: "claude-opus-4-8";
|
|
716
695
|
};
|
|
717
696
|
readonly bedrock: {
|
|
718
|
-
readonly fast: "us.
|
|
697
|
+
readonly fast: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
719
698
|
readonly chat: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
720
699
|
readonly reasoning: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
721
700
|
readonly pdf: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
@@ -723,7 +702,7 @@ declare const BYOK_DEFAULT_MODELS: {
|
|
|
723
702
|
readonly mistral: {
|
|
724
703
|
readonly fast: "mistral-small-latest";
|
|
725
704
|
readonly chat: "mistral-medium-latest";
|
|
726
|
-
readonly reasoning: "
|
|
705
|
+
readonly reasoning: "mistral-medium-latest";
|
|
727
706
|
readonly pdf: "mistral-large-latest";
|
|
728
707
|
};
|
|
729
708
|
};
|
|
@@ -732,7 +711,7 @@ declare const BYOK_DEFAULT_MODELS: {
|
|
|
732
711
|
* defaults with the providers that only the instance path uses
|
|
733
712
|
* (custom deployments and OpenAI-compatible endpoints).
|
|
734
713
|
*/
|
|
735
|
-
declare const DEFAULT_MODELS: {
|
|
714
|
+
export declare const DEFAULT_MODELS: {
|
|
736
715
|
readonly azure_foundry: {
|
|
737
716
|
readonly fast: "gpt-5.4-nano";
|
|
738
717
|
readonly chat: "gpt-5.4-mini";
|
|
@@ -771,12 +750,12 @@ declare const DEFAULT_MODELS: {
|
|
|
771
750
|
};
|
|
772
751
|
readonly anthropic: {
|
|
773
752
|
readonly fast: "claude-opus-5";
|
|
774
|
-
readonly chat: "claude-opus-
|
|
753
|
+
readonly chat: "claude-opus-4-8";
|
|
775
754
|
readonly reasoning: "claude-opus-5";
|
|
776
|
-
readonly pdf: "claude-opus-
|
|
755
|
+
readonly pdf: "claude-opus-4-8";
|
|
777
756
|
};
|
|
778
757
|
readonly bedrock: {
|
|
779
|
-
readonly fast: "us.
|
|
758
|
+
readonly fast: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
780
759
|
readonly chat: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
781
760
|
readonly reasoning: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
782
761
|
readonly pdf: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
@@ -784,7 +763,7 @@ declare const DEFAULT_MODELS: {
|
|
|
784
763
|
readonly mistral: {
|
|
785
764
|
readonly fast: "mistral-small-latest";
|
|
786
765
|
readonly chat: "mistral-medium-latest";
|
|
787
|
-
readonly reasoning: "
|
|
766
|
+
readonly reasoning: "mistral-medium-latest";
|
|
788
767
|
readonly pdf: "mistral-large-latest";
|
|
789
768
|
};
|
|
790
769
|
};
|
|
@@ -798,18 +777,18 @@ declare const DEFAULT_MODELS: {
|
|
|
798
777
|
* Providers without a first-class TanStack adapter path are intentionally
|
|
799
778
|
* not accepted at this boundary.
|
|
800
779
|
*/
|
|
801
|
-
declare const BYOK_MODEL_OPTIONS: {
|
|
780
|
+
export declare const BYOK_MODEL_OPTIONS: {
|
|
802
781
|
readonly google: readonly ["gemini-3.8-flash", "gemini-3.7-flash", "gemini-3.6-flash", "gemini-3.5-flash-lite", "gemini-3.1-pro-preview", "gemini-3.5-flash", "gemini-3.1-flash-lite"];
|
|
803
782
|
readonly anthropic: readonly ["claude-sonnet-5", "claude-fable-5-1", "claude-fable-5", "claude-opus-5", "claude-opus-4-8", "claude-opus-4-7", "claude-sonnet-4-6", "claude-opus-4-6", "claude-haiku-4-5-20251001"];
|
|
804
783
|
readonly openai: readonly ["gpt-6-astra", "gpt-5.6", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5.2"];
|
|
805
784
|
readonly openrouter: readonly ["openai/gpt-6-astra", "openai/gpt-5.6-luna", "openai/gpt-5.6-terra", "google/gemini-3.8-flash", "google/gemini-3.7-flash", "google/gemini-3.6-flash", "google/gemini-3.5-flash-lite", "google/gemini-3.1-pro-preview", "google/gemini-3.5-flash", "google/gemini-3.1-flash-lite", "anthropic/claude-sonnet-5", "anthropic/claude-opus-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6", "openai/gpt-5.5", "openai/gpt-5.4-mini"];
|
|
806
785
|
readonly bedrock: readonly ["us.anthropic.claude-sonnet-4-5-20250929-v1:0", "us.anthropic.claude-haiku-4-5-20251001-v1:0", "us.amazon.nova-pro-v1:0", "us.amazon.nova-lite-v1:0", "us.amazon.nova-micro-v1:0", "openai.gpt-oss-120b-1:0", "openai.gpt-oss-20b-1:0", "us.deepseek.r1-v1:0"];
|
|
807
|
-
readonly mistral: readonly ["mistral-large-latest", "mistral-medium-latest", "mistral-small-latest"
|
|
786
|
+
readonly mistral: readonly ["mistral-large-latest", "mistral-medium-latest", "mistral-small-latest"];
|
|
808
787
|
};
|
|
809
|
-
type BYOKProvider = keyof typeof BYOK_MODEL_OPTIONS;
|
|
810
|
-
type BYOKModelIdByProvider = { [TProvider in BYOKProvider]: (typeof BYOK_MODEL_OPTIONS)[TProvider][number]; };
|
|
811
|
-
type OfferedBYOKModelId = BYOKModelIdByProvider[BYOKProvider];
|
|
812
|
-
type ModelDisplayMetadata = {
|
|
788
|
+
export type BYOKProvider = keyof typeof BYOK_MODEL_OPTIONS;
|
|
789
|
+
export type BYOKModelIdByProvider = { [TProvider in BYOKProvider]: (typeof BYOK_MODEL_OPTIONS)[TProvider][number]; };
|
|
790
|
+
export type OfferedBYOKModelId = BYOKModelIdByProvider[BYOKProvider];
|
|
791
|
+
export type ModelDisplayMetadata = {
|
|
813
792
|
/** Human-readable product name; model names are trademarks and stay untranslated. */
|
|
814
793
|
displayName: string;
|
|
815
794
|
/** Brand mark to show. This may differ from the routing provider. */
|
|
@@ -821,7 +800,7 @@ type ModelDisplayMetadata = {
|
|
|
821
800
|
* into user-facing pickers. OpenRouter entries deliberately carry their model
|
|
822
801
|
* creator's icon while their routing provider remains available separately.
|
|
823
802
|
*/
|
|
824
|
-
declare const MODEL_DISPLAY_METADATA: {
|
|
803
|
+
export declare const MODEL_DISPLAY_METADATA: {
|
|
825
804
|
readonly "gemini-3.8-flash": {
|
|
826
805
|
readonly displayName: "Gemini 3.8 Flash";
|
|
827
806
|
readonly iconProvider: "google";
|
|
@@ -1030,26 +1009,14 @@ declare const MODEL_DISPLAY_METADATA: {
|
|
|
1030
1009
|
readonly displayName: "Mistral Small";
|
|
1031
1010
|
readonly iconProvider: "mistral";
|
|
1032
1011
|
};
|
|
1033
|
-
readonly "magistral-medium-latest": {
|
|
1034
|
-
readonly displayName: "Magistral Medium";
|
|
1035
|
-
readonly iconProvider: "mistral";
|
|
1036
|
-
};
|
|
1037
|
-
readonly "magistral-small": {
|
|
1038
|
-
readonly displayName: "Magistral Small";
|
|
1039
|
-
readonly iconProvider: "mistral";
|
|
1040
|
-
};
|
|
1041
|
-
readonly "pixtral-large-latest": {
|
|
1042
|
-
readonly displayName: "Pixtral Large";
|
|
1043
|
-
readonly iconProvider: "mistral";
|
|
1044
|
-
};
|
|
1045
1012
|
};
|
|
1046
|
-
declare const getModelDisplayMetadata: (modelId: string) => ModelDisplayMetadata | null;
|
|
1013
|
+
export declare const getModelDisplayMetadata: (modelId: string) => ModelDisplayMetadata | null;
|
|
1047
1014
|
/**
|
|
1048
1015
|
* Offered models whose provider API accepts PDF/file content. Generated from
|
|
1049
1016
|
* live models.dev input modalities plus dated, reviewed source corrections;
|
|
1050
1017
|
* the nightly upstream check rejects drift.
|
|
1051
1018
|
*/
|
|
1052
|
-
declare const BYOK_DOCUMENT_INPUT_MODEL_OPTIONS: {
|
|
1019
|
+
export declare const BYOK_DOCUMENT_INPUT_MODEL_OPTIONS: {
|
|
1053
1020
|
readonly google: readonly ["gemini-3.8-flash", "gemini-3.7-flash", "gemini-3.6-flash", "gemini-3.5-flash-lite", "gemini-3.1-pro-preview", "gemini-3.5-flash", "gemini-3.1-flash-lite"];
|
|
1054
1021
|
readonly openrouter: readonly ["openai/gpt-6-astra", "openai/gpt-5.6-luna", "openai/gpt-5.6-terra", "google/gemini-3.8-flash", "google/gemini-3.7-flash", "google/gemini-3.6-flash", "google/gemini-3.5-flash-lite", "google/gemini-3.1-pro-preview", "google/gemini-3.5-flash", "google/gemini-3.1-flash-lite", "anthropic/claude-sonnet-5", "anthropic/claude-opus-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6", "openai/gpt-5.5", "openai/gpt-5.4-mini"];
|
|
1055
1022
|
readonly openai: readonly ["gpt-6-astra", "gpt-5.6", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5.2"];
|
|
@@ -1057,11 +1024,11 @@ declare const BYOK_DOCUMENT_INPUT_MODEL_OPTIONS: {
|
|
|
1057
1024
|
readonly bedrock: readonly ["us.anthropic.claude-sonnet-4-5-20250929-v1:0", "us.anthropic.claude-haiku-4-5-20251001-v1:0", "us.amazon.nova-pro-v1:0", "us.amazon.nova-lite-v1:0"];
|
|
1058
1025
|
readonly mistral: readonly [];
|
|
1059
1026
|
};
|
|
1060
|
-
declare const isBYOKProviderRoleSupported: ({ provider, role }: {
|
|
1027
|
+
export declare const isBYOKProviderRoleSupported: ({ provider, role }: {
|
|
1061
1028
|
provider: BYOKProvider;
|
|
1062
1029
|
role: ModelRole;
|
|
1063
1030
|
}) => boolean;
|
|
1064
|
-
declare const isBYOKModelRoleSupported: ({ provider, modelId, role }: {
|
|
1031
|
+
export declare const isBYOKModelRoleSupported: ({ provider, modelId, role }: {
|
|
1065
1032
|
provider: BYOKProvider;
|
|
1066
1033
|
modelId: string;
|
|
1067
1034
|
role: ModelRole;
|
|
@@ -1079,15 +1046,15 @@ declare const isBYOKModelRoleSupported: ({ provider, modelId, role }: {
|
|
|
1079
1046
|
* `BYOK_DOCUMENT_INPUT_MODEL_OPTIONS` (which excludes Mistral). Superset
|
|
1080
1047
|
* invariant: every pdf-role document model also accepts a PDF chat attachment.
|
|
1081
1048
|
*/
|
|
1082
|
-
declare const CHAT_PDF_ATTACHMENT_MODEL_OPTIONS: {
|
|
1083
|
-
readonly mistral: readonly ["mistral-medium-latest", "mistral-small-latest"
|
|
1049
|
+
export declare const CHAT_PDF_ATTACHMENT_MODEL_OPTIONS: {
|
|
1050
|
+
readonly mistral: readonly ["mistral-medium-latest", "mistral-small-latest"];
|
|
1084
1051
|
readonly google: readonly ["gemini-3.8-flash", "gemini-3.7-flash", "gemini-3.6-flash", "gemini-3.5-flash-lite", "gemini-3.1-pro-preview", "gemini-3.5-flash", "gemini-3.1-flash-lite"];
|
|
1085
1052
|
readonly openrouter: readonly ["openai/gpt-6-astra", "openai/gpt-5.6-luna", "openai/gpt-5.6-terra", "google/gemini-3.8-flash", "google/gemini-3.7-flash", "google/gemini-3.6-flash", "google/gemini-3.5-flash-lite", "google/gemini-3.1-pro-preview", "google/gemini-3.5-flash", "google/gemini-3.1-flash-lite", "anthropic/claude-sonnet-5", "anthropic/claude-opus-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6", "openai/gpt-5.5", "openai/gpt-5.4-mini"];
|
|
1086
1053
|
readonly openai: readonly ["gpt-6-astra", "gpt-5.6", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5.2"];
|
|
1087
1054
|
readonly anthropic: readonly ["claude-sonnet-5", "claude-fable-5-1", "claude-fable-5", "claude-opus-5", "claude-opus-4-8", "claude-opus-4-7", "claude-sonnet-4-6", "claude-opus-4-6", "claude-haiku-4-5-20251001"];
|
|
1088
1055
|
readonly bedrock: readonly ["us.anthropic.claude-sonnet-4-5-20250929-v1:0", "us.anthropic.claude-haiku-4-5-20251001-v1:0", "us.amazon.nova-pro-v1:0", "us.amazon.nova-lite-v1:0"];
|
|
1089
1056
|
};
|
|
1090
|
-
declare const isChatPdfAttachmentModelSupported: ({ provider, modelId }: {
|
|
1057
|
+
export declare const isChatPdfAttachmentModelSupported: ({ provider, modelId }: {
|
|
1091
1058
|
provider: BYOKProvider;
|
|
1092
1059
|
modelId: string;
|
|
1093
1060
|
}) => boolean;
|
|
@@ -1105,7 +1072,7 @@ declare const isChatPdfAttachmentModelSupported: ({ provider, modelId }: {
|
|
|
1105
1072
|
* catalog bump, so generation resolves to a supported model instead of
|
|
1106
1073
|
* 400-ing (or forwarding a retired id to the provider).
|
|
1107
1074
|
*/
|
|
1108
|
-
declare const resolveWorkingBYOKModelForRole: ({ provider, modelId, role }: {
|
|
1075
|
+
export declare const resolveWorkingBYOKModelForRole: ({ provider, modelId, role }: {
|
|
1109
1076
|
provider: BYOKProvider;
|
|
1110
1077
|
modelId: string;
|
|
1111
1078
|
role: ModelRole;
|
|
@@ -1116,15 +1083,15 @@ declare const resolveWorkingBYOKModelForRole: ({ provider, modelId, role }: {
|
|
|
1116
1083
|
* legacy budget-based form, so every Opus 4.6+/Sonnet 4.6/Fable entry
|
|
1117
1084
|
* offered above must appear here or it will 400 on the reasoning role.
|
|
1118
1085
|
*/
|
|
1119
|
-
declare const ANTHROPIC_ADAPTIVE_THINKING_MODELS: readonly ["claude-sonnet-5", "claude-opus-5", "claude-sonnet-4-6", "claude-opus-4-6", "claude-opus-4-7", "claude-opus-4-8", "claude-fable-5", "claude-fable-5-1"];
|
|
1086
|
+
export declare const ANTHROPIC_ADAPTIVE_THINKING_MODELS: readonly ["claude-sonnet-5", "claude-opus-5", "claude-sonnet-4-6", "claude-opus-4-6", "claude-opus-4-7", "claude-opus-4-8", "claude-fable-5", "claude-fable-5-1"];
|
|
1120
1087
|
/**
|
|
1121
1088
|
* Canonical reasoning-effort ladder, ordered weakest to strongest.
|
|
1122
1089
|
* Union of every effort keyword the offered providers accept; no
|
|
1123
1090
|
* single model accepts all of them, which is exactly why the
|
|
1124
1091
|
* generated per-model `MODEL_REASONING_EFFORTS` exists.
|
|
1125
1092
|
*/
|
|
1126
|
-
declare const REASONING_EFFORTS: readonly ["none", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
1127
|
-
type ReasoningEffort = (typeof REASONING_EFFORTS)[number];
|
|
1093
|
+
export declare const REASONING_EFFORTS: readonly ["none", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
1094
|
+
export type ReasoningEffort = (typeof REASONING_EFFORTS)[number];
|
|
1128
1095
|
declare const resolvedReasoningEffortSchema: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["none", "minimal", "low", "medium", "high", "xhigh", "max"], undefined>, v.BrandAction<"none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "ResolvedReasoningEffort">]>;
|
|
1129
1096
|
/**
|
|
1130
1097
|
* A reasoning effort proven to be accepted by the model it targets.
|
|
@@ -1133,7 +1100,7 @@ declare const resolvedReasoningEffortSchema: v.SchemaWithPipe<readonly [v.Pickli
|
|
|
1133
1100
|
* (e.g. `"none"` to a model whose reasoning cannot be disabled) —
|
|
1134
1101
|
* that mistake now fails typecheck instead of 502-ing at runtime.
|
|
1135
1102
|
*/
|
|
1136
|
-
type ResolvedReasoningEffort = v.InferOutput<typeof resolvedReasoningEffortSchema>;
|
|
1103
|
+
export type ResolvedReasoningEffort = v.InferOutput<typeof resolvedReasoningEffortSchema>;
|
|
1137
1104
|
/**
|
|
1138
1105
|
* Per-provider model served when a user's included budget is exhausted
|
|
1139
1106
|
* and no explicit selection overrides it. Falls back to each
|
|
@@ -1141,12 +1108,12 @@ type ResolvedReasoningEffort = v.InferOutput<typeof resolvedReasoningEffortSchem
|
|
|
1141
1108
|
* adapter path cannot serve the lane. Total over providers so a new
|
|
1142
1109
|
* provider lands with an explicit decision.
|
|
1143
1110
|
*/
|
|
1144
|
-
declare const FALLBACK_CHAT_MODEL_BY_PROVIDER: {
|
|
1111
|
+
export declare const FALLBACK_CHAT_MODEL_BY_PROVIDER: {
|
|
1145
1112
|
readonly google: "gemini-3.7-flash";
|
|
1146
1113
|
readonly openrouter: "openai/gpt-5.6-luna";
|
|
1147
1114
|
readonly openai: "gpt-5.6-luna";
|
|
1148
1115
|
readonly anthropic: "claude-opus-5";
|
|
1149
|
-
readonly bedrock: "us.
|
|
1116
|
+
readonly bedrock: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
1150
1117
|
readonly mistral: "mistral-small-latest";
|
|
1151
1118
|
readonly azure_foundry: null;
|
|
1152
1119
|
readonly openai_compatible: null;
|
|
@@ -1157,12 +1124,12 @@ declare const FALLBACK_CHAT_MODEL_BY_PROVIDER: {
|
|
|
1157
1124
|
* Every metadata lookup normalizes here, so instance/dev overrides cannot
|
|
1158
1125
|
* bypass rates or capabilities and duplicated alias rows cannot drift apart.
|
|
1159
1126
|
*/
|
|
1160
|
-
declare const MODEL_CATALOG_ID_ALIASES: {
|
|
1127
|
+
export declare const MODEL_CATALOG_ID_ALIASES: {
|
|
1161
1128
|
readonly "gpt-5.6-sol": "gpt-5.6";
|
|
1162
1129
|
readonly "claude-opus-4.8": "claude-opus-4-8";
|
|
1163
1130
|
readonly "claude-sonnet-4.6": "claude-sonnet-4-6";
|
|
1164
1131
|
};
|
|
1165
|
-
declare const normalizeModelCatalogId: (modelId: string) => string;
|
|
1132
|
+
export declare const normalizeModelCatalogId: (modelId: string) => string;
|
|
1166
1133
|
/**
|
|
1167
1134
|
* Whether stella should emit a `temperature` override for this model.
|
|
1168
1135
|
* This is deliberately stricter than provider acceptance: deprecated
|
|
@@ -1171,20 +1138,20 @@ declare const normalizeModelCatalogId: (modelId: string) => string;
|
|
|
1171
1138
|
* never index `MODEL_TEMPERATURE_POLICIES` directly with
|
|
1172
1139
|
* a runtime string.
|
|
1173
1140
|
*/
|
|
1174
|
-
declare const shouldEmitTemperature: (modelId: string) => boolean;
|
|
1141
|
+
export declare const shouldEmitTemperature: (modelId: string) => boolean;
|
|
1175
1142
|
/**
|
|
1176
1143
|
* Declared reasoning-effort values for a model ID, or `null` when the
|
|
1177
1144
|
* model has no effort control or is not catalogued (custom deployments,
|
|
1178
1145
|
* env overrides). Callers must never index `MODEL_REASONING_EFFORTS`
|
|
1179
1146
|
* directly with a runtime string.
|
|
1180
1147
|
*/
|
|
1181
|
-
declare const getModelReasoningEfforts: (modelId: string) => readonly ReasoningEffort[] | null;
|
|
1148
|
+
export declare const getModelReasoningEfforts: (modelId: string) => readonly ReasoningEffort[] | null;
|
|
1182
1149
|
/**
|
|
1183
1150
|
* Concrete provider-default effort published for a model, or null when the
|
|
1184
1151
|
* provider exposes no named default. Unknown ids also resolve to null.
|
|
1185
1152
|
*/
|
|
1186
|
-
declare const getModelDefaultReasoningEffort: (modelId: string) => ReasoningEffort | null;
|
|
1187
|
-
type ResolveReasoningEffortOptions = {
|
|
1153
|
+
export declare const getModelDefaultReasoningEffort: (modelId: string) => ReasoningEffort | null;
|
|
1154
|
+
export type ResolveReasoningEffortOptions = {
|
|
1188
1155
|
modelId: string;
|
|
1189
1156
|
requested: ReasoningEffort;
|
|
1190
1157
|
};
|
|
@@ -1200,8 +1167,8 @@ type ResolveReasoningEffortOptions = {
|
|
|
1200
1167
|
* reasoning-mandatory model degrades to its weakest tier instead of
|
|
1201
1168
|
* erroring, and requests above the model's ceiling clamp down to it.
|
|
1202
1169
|
*/
|
|
1203
|
-
declare const resolveReasoningEffort: ({ modelId, requested }: ResolveReasoningEffortOptions) => ResolvedReasoningEffort | null;
|
|
1204
|
-
declare const getModelRate: (modelId: string) => ModelRate | undefined;
|
|
1170
|
+
export declare const resolveReasoningEffort: ({ modelId, requested }: ResolveReasoningEffortOptions) => ResolvedReasoningEffort | null;
|
|
1171
|
+
export declare const getModelRate: (modelId: string) => ModelRate | undefined;
|
|
1205
1172
|
/**
|
|
1206
1173
|
* Documented input context-window sizes (in tokens) per model ID.
|
|
1207
1174
|
*
|
|
@@ -1219,7 +1186,7 @@ declare const getModelRate: (modelId: string) => ModelRate | undefined;
|
|
|
1219
1186
|
* validate this map, so an unknown model degrades to the conservative
|
|
1220
1187
|
* default rather than failing CI.
|
|
1221
1188
|
*/
|
|
1222
|
-
declare const CONTEXT_WINDOW_TOKENS: {
|
|
1189
|
+
export declare const CONTEXT_WINDOW_TOKENS: {
|
|
1223
1190
|
readonly "gemini-2.5-flash": 1048576;
|
|
1224
1191
|
readonly "gemini-2.5-pro": 1048576;
|
|
1225
1192
|
readonly "gemini-3.1-flash-lite": 1048576;
|
|
@@ -1253,10 +1220,7 @@ declare const CONTEXT_WINDOW_TOKENS: {
|
|
|
1253
1220
|
readonly "mistral-large-latest": 128000;
|
|
1254
1221
|
readonly "mistral-medium-latest": 128000;
|
|
1255
1222
|
readonly "mistral-medium-3-5": 128000;
|
|
1256
|
-
readonly "magistral-medium-latest": 128000;
|
|
1257
1223
|
readonly "magistral-small-latest": 128000;
|
|
1258
|
-
readonly "magistral-small": 128000;
|
|
1259
|
-
readonly "pixtral-large-latest": 128000;
|
|
1260
1224
|
readonly "google/gemini-3.8-flash": 1048576;
|
|
1261
1225
|
readonly "google/gemini-3.7-flash": 1048576;
|
|
1262
1226
|
readonly "google/gemini-3.6-flash": 1048576;
|
|
@@ -1287,12 +1251,12 @@ declare const CONTEXT_WINDOW_TOKENS: {
|
|
|
1287
1251
|
* `CONTEXT_WINDOW_TOKENS` (custom deployments, OpenAI-compatible
|
|
1288
1252
|
* endpoints, brand-new IDs not yet catalogued).
|
|
1289
1253
|
*/
|
|
1290
|
-
declare const DEFAULT_CONTEXT_WINDOW_TOKENS = 128000;
|
|
1254
|
+
export declare const DEFAULT_CONTEXT_WINDOW_TOKENS = 128000;
|
|
1291
1255
|
/**
|
|
1292
1256
|
* Documented input context window for a model ID, or the conservative
|
|
1293
1257
|
* default for unlisted IDs. Callers must never index
|
|
1294
1258
|
* `CONTEXT_WINDOW_TOKENS` directly.
|
|
1295
1259
|
*/
|
|
1296
|
-
declare const getContextWindowTokens: (modelId: string) => number;
|
|
1260
|
+
export declare const getContextWindowTokens: (modelId: string) => number;
|
|
1297
1261
|
//#endregion
|
|
1298
|
-
export {
|
|
1262
|
+
export type { CapabilityOverride, DocumentInputOverride, ModelRate, ModelRateAmounts, ModelsDevRateProvider };
|
package/dist/index.js
CHANGED
|
@@ -356,10 +356,7 @@ const MODEL_REASONING_EFFORTS = {
|
|
|
356
356
|
"us.deepseek.r1-v1:0": null,
|
|
357
357
|
"mistral-large-latest": null,
|
|
358
358
|
"mistral-medium-latest": ["none", "high"],
|
|
359
|
-
"mistral-small-latest": ["none", "high"]
|
|
360
|
-
"magistral-medium-latest": null,
|
|
361
|
-
"magistral-small": null,
|
|
362
|
-
"pixtral-large-latest": null
|
|
359
|
+
"mistral-small-latest": ["none", "high"]
|
|
363
360
|
};
|
|
364
361
|
/**
|
|
365
362
|
* Concrete provider-default effort where the upstream catalogue publishes
|
|
@@ -418,10 +415,7 @@ const MODEL_DEFAULT_REASONING_EFFORTS = {
|
|
|
418
415
|
"us.deepseek.r1-v1:0": null,
|
|
419
416
|
"mistral-large-latest": null,
|
|
420
417
|
"mistral-medium-latest": null,
|
|
421
|
-
"mistral-small-latest": null
|
|
422
|
-
"magistral-medium-latest": null,
|
|
423
|
-
"magistral-small": null,
|
|
424
|
-
"pixtral-large-latest": null
|
|
418
|
+
"mistral-small-latest": null
|
|
425
419
|
};
|
|
426
420
|
/**
|
|
427
421
|
* Whether stella should emit a `temperature` sampling override.
|
|
@@ -480,10 +474,7 @@ const MODEL_TEMPERATURE_POLICIES = {
|
|
|
480
474
|
"us.deepseek.r1-v1:0": "emit",
|
|
481
475
|
"mistral-large-latest": "emit",
|
|
482
476
|
"mistral-medium-latest": "emit",
|
|
483
|
-
"mistral-small-latest": "emit"
|
|
484
|
-
"magistral-medium-latest": "emit",
|
|
485
|
-
"magistral-small": "emit",
|
|
486
|
-
"pixtral-large-latest": "emit"
|
|
477
|
+
"mistral-small-latest": "emit"
|
|
487
478
|
};
|
|
488
479
|
//#endregion
|
|
489
480
|
//#region src/model-rates.gen.ts
|
|
@@ -729,19 +720,22 @@ const MODEL_RATES = {
|
|
|
729
720
|
kind: "flat",
|
|
730
721
|
inputPerMTok: 8e4,
|
|
731
722
|
outputPerMTok: 32e4,
|
|
732
|
-
cachedInputPerMTok: 2e4
|
|
723
|
+
cachedInputPerMTok: 2e4,
|
|
724
|
+
cachedWriteInputPerMTok: 8e4
|
|
733
725
|
},
|
|
734
726
|
"us.amazon.nova-lite-v1:0": {
|
|
735
727
|
kind: "flat",
|
|
736
728
|
inputPerMTok: 6e3,
|
|
737
729
|
outputPerMTok: 24e3,
|
|
738
|
-
cachedInputPerMTok: 1500
|
|
730
|
+
cachedInputPerMTok: 1500,
|
|
731
|
+
cachedWriteInputPerMTok: 6e3
|
|
739
732
|
},
|
|
740
733
|
"us.amazon.nova-micro-v1:0": {
|
|
741
734
|
kind: "flat",
|
|
742
735
|
inputPerMTok: 3500,
|
|
743
736
|
outputPerMTok: 14e3,
|
|
744
|
-
cachedInputPerMTok: 875
|
|
737
|
+
cachedInputPerMTok: 875,
|
|
738
|
+
cachedWriteInputPerMTok: 3500
|
|
745
739
|
},
|
|
746
740
|
"openai.gpt-oss-120b-1:0": {
|
|
747
741
|
kind: "flat",
|
|
@@ -773,21 +767,6 @@ const MODEL_RATES = {
|
|
|
773
767
|
inputPerMTok: 15e3,
|
|
774
768
|
outputPerMTok: 6e4
|
|
775
769
|
},
|
|
776
|
-
"magistral-medium-latest": {
|
|
777
|
-
kind: "flat",
|
|
778
|
-
inputPerMTok: 2e5,
|
|
779
|
-
outputPerMTok: 5e5
|
|
780
|
-
},
|
|
781
|
-
"magistral-small": {
|
|
782
|
-
kind: "flat",
|
|
783
|
-
inputPerMTok: 5e4,
|
|
784
|
-
outputPerMTok: 15e4
|
|
785
|
-
},
|
|
786
|
-
"pixtral-large-latest": {
|
|
787
|
-
kind: "flat",
|
|
788
|
-
inputPerMTok: 2e5,
|
|
789
|
-
outputPerMTok: 6e5
|
|
790
|
-
},
|
|
791
770
|
"gemini-2.5-flash": {
|
|
792
771
|
kind: "flat",
|
|
793
772
|
inputPerMTok: 3e4,
|
|
@@ -893,14 +872,6 @@ const DOCUMENT_INPUT_OVERRIDES = {
|
|
|
893
872
|
"gpt-5.2": {
|
|
894
873
|
supported: true,
|
|
895
874
|
reason: "2026-08-20: OpenAI Responses accepts input_file PDF content for this vision-capable model; models.dev currently omits the pdf modality"
|
|
896
|
-
},
|
|
897
|
-
"us.amazon.nova-pro-v1:0": {
|
|
898
|
-
supported: true,
|
|
899
|
-
reason: "2026-09-09: AWS documents PDF input for Nova Pro through Bedrock Converse; models.dev lists text, image and video only"
|
|
900
|
-
},
|
|
901
|
-
"us.amazon.nova-lite-v1:0": {
|
|
902
|
-
supported: true,
|
|
903
|
-
reason: "2026-09-09: AWS documents PDF input for Nova Lite through Bedrock Converse; models.dev lists text, image and video only"
|
|
904
875
|
}
|
|
905
876
|
};
|
|
906
877
|
//#endregion
|
|
@@ -1006,12 +977,12 @@ const BYOK_DEFAULT_MODELS = {
|
|
|
1006
977
|
},
|
|
1007
978
|
anthropic: {
|
|
1008
979
|
fast: "claude-opus-5",
|
|
1009
|
-
chat: "claude-opus-
|
|
980
|
+
chat: "claude-opus-4-8",
|
|
1010
981
|
reasoning: "claude-opus-5",
|
|
1011
|
-
pdf: "claude-opus-
|
|
982
|
+
pdf: "claude-opus-4-8"
|
|
1012
983
|
},
|
|
1013
984
|
bedrock: {
|
|
1014
|
-
fast: "us.
|
|
985
|
+
fast: "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
|
|
1015
986
|
chat: "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
|
|
1016
987
|
reasoning: "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
|
|
1017
988
|
pdf: "us.anthropic.claude-sonnet-4-5-20250929-v1:0"
|
|
@@ -1019,7 +990,7 @@ const BYOK_DEFAULT_MODELS = {
|
|
|
1019
990
|
mistral: {
|
|
1020
991
|
fast: "mistral-small-latest",
|
|
1021
992
|
chat: "mistral-medium-latest",
|
|
1022
|
-
reasoning: "
|
|
993
|
+
reasoning: "mistral-medium-latest",
|
|
1023
994
|
pdf: "mistral-large-latest"
|
|
1024
995
|
}
|
|
1025
996
|
};
|
|
@@ -1122,10 +1093,7 @@ const BYOK_MODEL_OPTIONS = {
|
|
|
1122
1093
|
mistral: [
|
|
1123
1094
|
"mistral-large-latest",
|
|
1124
1095
|
"mistral-medium-latest",
|
|
1125
|
-
"mistral-small-latest"
|
|
1126
|
-
"magistral-medium-latest",
|
|
1127
|
-
"magistral-small",
|
|
1128
|
-
"pixtral-large-latest"
|
|
1096
|
+
"mistral-small-latest"
|
|
1129
1097
|
]
|
|
1130
1098
|
};
|
|
1131
1099
|
/**
|
|
@@ -1342,18 +1310,6 @@ const MODEL_DISPLAY_METADATA = {
|
|
|
1342
1310
|
"mistral-small-latest": {
|
|
1343
1311
|
displayName: "Mistral Small",
|
|
1344
1312
|
iconProvider: "mistral"
|
|
1345
|
-
},
|
|
1346
|
-
"magistral-medium-latest": {
|
|
1347
|
-
displayName: "Magistral Medium",
|
|
1348
|
-
iconProvider: "mistral"
|
|
1349
|
-
},
|
|
1350
|
-
"magistral-small": {
|
|
1351
|
-
displayName: "Magistral Small",
|
|
1352
|
-
iconProvider: "mistral"
|
|
1353
|
-
},
|
|
1354
|
-
"pixtral-large-latest": {
|
|
1355
|
-
displayName: "Pixtral Large",
|
|
1356
|
-
iconProvider: "mistral"
|
|
1357
1313
|
}
|
|
1358
1314
|
};
|
|
1359
1315
|
const MODEL_DISPLAY_METADATA_BY_ID = MODEL_DISPLAY_METADATA;
|
|
@@ -1384,11 +1340,7 @@ const isBYOKModelRoleSupported = ({ provider, modelId, role }) => {
|
|
|
1384
1340
|
*/
|
|
1385
1341
|
const CHAT_PDF_ATTACHMENT_MODEL_OPTIONS = {
|
|
1386
1342
|
...BYOK_DOCUMENT_INPUT_MODEL_OPTIONS,
|
|
1387
|
-
mistral: [
|
|
1388
|
-
"mistral-medium-latest",
|
|
1389
|
-
"mistral-small-latest",
|
|
1390
|
-
"pixtral-large-latest"
|
|
1391
|
-
]
|
|
1343
|
+
mistral: ["mistral-medium-latest", "mistral-small-latest"]
|
|
1392
1344
|
};
|
|
1393
1345
|
const isChatPdfAttachmentModelSupported = ({ provider, modelId }) => {
|
|
1394
1346
|
return CHAT_PDF_ATTACHMENT_MODEL_OPTIONS[provider].includes(modelId);
|
|
@@ -1611,10 +1563,7 @@ const CONTEXT_WINDOW_TOKENS = {
|
|
|
1611
1563
|
"mistral-large-latest": 128e3,
|
|
1612
1564
|
"mistral-medium-latest": 128e3,
|
|
1613
1565
|
"mistral-medium-3-5": 128e3,
|
|
1614
|
-
"magistral-medium-latest": 128e3,
|
|
1615
1566
|
"magistral-small-latest": 128e3,
|
|
1616
|
-
"magistral-small": 128e3,
|
|
1617
|
-
"pixtral-large-latest": 128e3,
|
|
1618
1567
|
"google/gemini-3.8-flash": 1048576,
|
|
1619
1568
|
"google/gemini-3.7-flash": 1048576,
|
|
1620
1569
|
"google/gemini-3.6-flash": 1048576,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stll/ai-catalog",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Provider-neutral AI model roles, capabilities, and curated model metadata.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@stll/typescript-config": "0.0.0",
|
|
54
|
-
"@tanstack/ai-anthropic": "0.18.
|
|
55
|
-
"@tanstack/ai-bedrock": "0.3.
|
|
56
|
-
"@tanstack/ai-gemini": "0.
|
|
57
|
-
"@tanstack/ai-mistral": "0.
|
|
58
|
-
"@tanstack/ai-openrouter": "0.19.
|
|
54
|
+
"@tanstack/ai-anthropic": "0.18.5",
|
|
55
|
+
"@tanstack/ai-bedrock": "0.3.7",
|
|
56
|
+
"@tanstack/ai-gemini": "0.29.1",
|
|
57
|
+
"@tanstack/ai-mistral": "0.6.1",
|
|
58
|
+
"@tanstack/ai-openrouter": "0.19.8",
|
|
59
59
|
"bun-types": "1.4.2",
|
|
60
|
-
"tsdown": "0.
|
|
60
|
+
"tsdown": "0.23.0"
|
|
61
61
|
},
|
|
62
62
|
"main": "./dist/index.js",
|
|
63
63
|
"types": "./dist/index.d.ts"
|