@stll/ai-catalog 0.2.2 → 0.3.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.ts +74 -0
- package/dist/index.js +74 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -460,6 +460,8 @@ type CapabilityOverride = {
|
|
|
460
460
|
documentInput: boolean;
|
|
461
461
|
documentInputReason: string;
|
|
462
462
|
reasoningEfforts: readonly ReasoningEffort[] | null;
|
|
463
|
+
/** The most output tokens one response may carry, from the provider docs. */
|
|
464
|
+
outputTokens: number;
|
|
463
465
|
temperatureSupported: boolean;
|
|
464
466
|
/**
|
|
465
467
|
* Every role sends tool definitions or structured output, so an
|
|
@@ -679,6 +681,70 @@ export declare const MODEL_TEMPERATURE_POLICIES: {
|
|
|
679
681
|
readonly "mistral-medium-latest": "emit";
|
|
680
682
|
readonly "mistral-small-latest": "emit";
|
|
681
683
|
};
|
|
684
|
+
/**
|
|
685
|
+
* The most output tokens one response of each offered model may carry
|
|
686
|
+
* (models.dev `limit.output`). Consumers must go through
|
|
687
|
+
* `getOutputTokenLimit`.
|
|
688
|
+
*/
|
|
689
|
+
export declare const MODEL_OUTPUT_TOKEN_LIMITS: {
|
|
690
|
+
readonly "gemini-3.8-flash": 65536;
|
|
691
|
+
readonly "gemini-3.7-flash": 65536;
|
|
692
|
+
readonly "gemini-3.6-flash": 65536;
|
|
693
|
+
readonly "gemini-3.5-flash-lite": 65536;
|
|
694
|
+
readonly "gemini-3.1-pro-preview": 65536;
|
|
695
|
+
readonly "gemini-3.5-flash": 65536;
|
|
696
|
+
readonly "gemini-3.1-flash-lite": 65536;
|
|
697
|
+
readonly "openai/gpt-6-astra": 128000;
|
|
698
|
+
readonly "openai/gpt-6-sol": 128000;
|
|
699
|
+
readonly "openai/gpt-6-luna": 128000;
|
|
700
|
+
readonly "openai/gpt-5.6-sol": 128000;
|
|
701
|
+
readonly "openai/gpt-5.6-terra": 128000;
|
|
702
|
+
readonly "openai/gpt-5.6-luna": 128000;
|
|
703
|
+
readonly "google/gemini-3.8-flash": 65536;
|
|
704
|
+
readonly "google/gemini-3.7-flash": 65536;
|
|
705
|
+
readonly "google/gemini-3.6-flash": 65536;
|
|
706
|
+
readonly "google/gemini-3.5-flash-lite": 65536;
|
|
707
|
+
readonly "google/gemini-3.1-pro-preview": 65536;
|
|
708
|
+
readonly "google/gemini-3.5-flash": 65536;
|
|
709
|
+
readonly "google/gemini-3.1-flash-lite": 65536;
|
|
710
|
+
readonly "anthropic/claude-sonnet-5": 128000;
|
|
711
|
+
readonly "anthropic/claude-opus-5": 128000;
|
|
712
|
+
readonly "anthropic/claude-opus-4.8": 128000;
|
|
713
|
+
readonly "anthropic/claude-sonnet-4.6": 128000;
|
|
714
|
+
readonly "openai/gpt-5.5": 128000;
|
|
715
|
+
readonly "openai/gpt-5.4-mini": 128000;
|
|
716
|
+
readonly "gpt-6-astra": 128000;
|
|
717
|
+
readonly "gpt-6-sol": 128000;
|
|
718
|
+
readonly "gpt-6-luna": 128000;
|
|
719
|
+
readonly "gpt-5.6": 128000;
|
|
720
|
+
readonly "gpt-5.6-terra": 128000;
|
|
721
|
+
readonly "gpt-5.6-luna": 128000;
|
|
722
|
+
readonly "gpt-5.5": 128000;
|
|
723
|
+
readonly "gpt-5.4": 128000;
|
|
724
|
+
readonly "gpt-5.4-mini": 128000;
|
|
725
|
+
readonly "gpt-5.4-nano": 128000;
|
|
726
|
+
readonly "gpt-5.2": 128000;
|
|
727
|
+
readonly "claude-sonnet-5": 128000;
|
|
728
|
+
readonly "claude-fable-5-1": 128000;
|
|
729
|
+
readonly "claude-fable-5": 128000;
|
|
730
|
+
readonly "claude-opus-5-5": 128000;
|
|
731
|
+
readonly "claude-opus-5": 128000;
|
|
732
|
+
readonly "claude-opus-4-8": 128000;
|
|
733
|
+
readonly "claude-opus-4-7": 128000;
|
|
734
|
+
readonly "claude-sonnet-4-6": 128000;
|
|
735
|
+
readonly "claude-opus-4-6": 128000;
|
|
736
|
+
readonly "claude-haiku-4-5-20251001": 64000;
|
|
737
|
+
readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": 64000;
|
|
738
|
+
readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": 64000;
|
|
739
|
+
readonly "us.amazon.nova-pro-v1:0": 10000;
|
|
740
|
+
readonly "us.amazon.nova-lite-v1:0": 10000;
|
|
741
|
+
readonly "us.amazon.nova-micro-v1:0": 10000;
|
|
742
|
+
readonly "openai.gpt-oss-120b-1:0": 128000;
|
|
743
|
+
readonly "openai.gpt-oss-20b-1:0": 128000;
|
|
744
|
+
readonly "mistral-large-latest": 262144;
|
|
745
|
+
readonly "mistral-medium-latest": 262144;
|
|
746
|
+
readonly "mistral-small-latest": 256000;
|
|
747
|
+
};
|
|
682
748
|
//#endregion
|
|
683
749
|
//#region src/index.d.ts
|
|
684
750
|
/**
|
|
@@ -1224,6 +1290,14 @@ export declare const normalizeModelCatalogId: (modelId: string) => string;
|
|
|
1224
1290
|
* a runtime string.
|
|
1225
1291
|
*/
|
|
1226
1292
|
export declare const shouldEmitTemperature: (modelId: string) => boolean;
|
|
1293
|
+
/**
|
|
1294
|
+
* The most output tokens one response of `modelId` may carry, from the
|
|
1295
|
+
* catalog. `undefined` for an id the catalog does not list (a deployment
|
|
1296
|
+
* override, a dev model): the catalog knows nothing about it, so callers leave
|
|
1297
|
+
* the allowance to the provider rather than guess one. Callers must never
|
|
1298
|
+
* index `MODEL_OUTPUT_TOKEN_LIMITS` directly with a runtime string.
|
|
1299
|
+
*/
|
|
1300
|
+
export declare const getOutputTokenLimit: (modelId: string) => number | undefined;
|
|
1227
1301
|
/**
|
|
1228
1302
|
* Whether a model accepts tool use on a streaming request.
|
|
1229
1303
|
*
|
package/dist/index.js
CHANGED
|
@@ -538,6 +538,70 @@ const MODEL_TEMPERATURE_POLICIES = {
|
|
|
538
538
|
"mistral-medium-latest": "emit",
|
|
539
539
|
"mistral-small-latest": "emit"
|
|
540
540
|
};
|
|
541
|
+
/**
|
|
542
|
+
* The most output tokens one response of each offered model may carry
|
|
543
|
+
* (models.dev `limit.output`). Consumers must go through
|
|
544
|
+
* `getOutputTokenLimit`.
|
|
545
|
+
*/
|
|
546
|
+
const MODEL_OUTPUT_TOKEN_LIMITS = {
|
|
547
|
+
"gemini-3.8-flash": 65536,
|
|
548
|
+
"gemini-3.7-flash": 65536,
|
|
549
|
+
"gemini-3.6-flash": 65536,
|
|
550
|
+
"gemini-3.5-flash-lite": 65536,
|
|
551
|
+
"gemini-3.1-pro-preview": 65536,
|
|
552
|
+
"gemini-3.5-flash": 65536,
|
|
553
|
+
"gemini-3.1-flash-lite": 65536,
|
|
554
|
+
"openai/gpt-6-astra": 128e3,
|
|
555
|
+
"openai/gpt-6-sol": 128e3,
|
|
556
|
+
"openai/gpt-6-luna": 128e3,
|
|
557
|
+
"openai/gpt-5.6-sol": 128e3,
|
|
558
|
+
"openai/gpt-5.6-terra": 128e3,
|
|
559
|
+
"openai/gpt-5.6-luna": 128e3,
|
|
560
|
+
"google/gemini-3.8-flash": 65536,
|
|
561
|
+
"google/gemini-3.7-flash": 65536,
|
|
562
|
+
"google/gemini-3.6-flash": 65536,
|
|
563
|
+
"google/gemini-3.5-flash-lite": 65536,
|
|
564
|
+
"google/gemini-3.1-pro-preview": 65536,
|
|
565
|
+
"google/gemini-3.5-flash": 65536,
|
|
566
|
+
"google/gemini-3.1-flash-lite": 65536,
|
|
567
|
+
"anthropic/claude-sonnet-5": 128e3,
|
|
568
|
+
"anthropic/claude-opus-5": 128e3,
|
|
569
|
+
"anthropic/claude-opus-4.8": 128e3,
|
|
570
|
+
"anthropic/claude-sonnet-4.6": 128e3,
|
|
571
|
+
"openai/gpt-5.5": 128e3,
|
|
572
|
+
"openai/gpt-5.4-mini": 128e3,
|
|
573
|
+
"gpt-6-astra": 128e3,
|
|
574
|
+
"gpt-6-sol": 128e3,
|
|
575
|
+
"gpt-6-luna": 128e3,
|
|
576
|
+
"gpt-5.6": 128e3,
|
|
577
|
+
"gpt-5.6-terra": 128e3,
|
|
578
|
+
"gpt-5.6-luna": 128e3,
|
|
579
|
+
"gpt-5.5": 128e3,
|
|
580
|
+
"gpt-5.4": 128e3,
|
|
581
|
+
"gpt-5.4-mini": 128e3,
|
|
582
|
+
"gpt-5.4-nano": 128e3,
|
|
583
|
+
"gpt-5.2": 128e3,
|
|
584
|
+
"claude-sonnet-5": 128e3,
|
|
585
|
+
"claude-fable-5-1": 128e3,
|
|
586
|
+
"claude-fable-5": 128e3,
|
|
587
|
+
"claude-opus-5-5": 128e3,
|
|
588
|
+
"claude-opus-5": 128e3,
|
|
589
|
+
"claude-opus-4-8": 128e3,
|
|
590
|
+
"claude-opus-4-7": 128e3,
|
|
591
|
+
"claude-sonnet-4-6": 128e3,
|
|
592
|
+
"claude-opus-4-6": 128e3,
|
|
593
|
+
"claude-haiku-4-5-20251001": 64e3,
|
|
594
|
+
"us.anthropic.claude-sonnet-4-5-20250929-v1:0": 64e3,
|
|
595
|
+
"us.anthropic.claude-haiku-4-5-20251001-v1:0": 64e3,
|
|
596
|
+
"us.amazon.nova-pro-v1:0": 1e4,
|
|
597
|
+
"us.amazon.nova-lite-v1:0": 1e4,
|
|
598
|
+
"us.amazon.nova-micro-v1:0": 1e4,
|
|
599
|
+
"openai.gpt-oss-120b-1:0": 128e3,
|
|
600
|
+
"openai.gpt-oss-20b-1:0": 128e3,
|
|
601
|
+
"mistral-large-latest": 262144,
|
|
602
|
+
"mistral-medium-latest": 262144,
|
|
603
|
+
"mistral-small-latest": 256e3
|
|
604
|
+
};
|
|
541
605
|
//#endregion
|
|
542
606
|
//#region src/model-rates.gen.ts
|
|
543
607
|
const MODEL_RATES = {
|
|
@@ -1625,6 +1689,15 @@ const MODEL_TEMPERATURE_POLICY_BY_ID = MODEL_TEMPERATURE_POLICIES;
|
|
|
1625
1689
|
* a runtime string.
|
|
1626
1690
|
*/
|
|
1627
1691
|
const shouldEmitTemperature = (modelId) => MODEL_TEMPERATURE_POLICY_BY_ID[normalizeModelCatalogId(modelId)] === "emit";
|
|
1692
|
+
const MODEL_OUTPUT_TOKEN_LIMIT_BY_ID = MODEL_OUTPUT_TOKEN_LIMITS;
|
|
1693
|
+
/**
|
|
1694
|
+
* The most output tokens one response of `modelId` may carry, from the
|
|
1695
|
+
* catalog. `undefined` for an id the catalog does not list (a deployment
|
|
1696
|
+
* override, a dev model): the catalog knows nothing about it, so callers leave
|
|
1697
|
+
* the allowance to the provider rather than guess one. Callers must never
|
|
1698
|
+
* index `MODEL_OUTPUT_TOKEN_LIMITS` directly with a runtime string.
|
|
1699
|
+
*/
|
|
1700
|
+
const getOutputTokenLimit = (modelId) => MODEL_OUTPUT_TOKEN_LIMIT_BY_ID[normalizeModelCatalogId(modelId)];
|
|
1628
1701
|
/**
|
|
1629
1702
|
* Whether a model accepts tool use on a streaming request.
|
|
1630
1703
|
*
|
|
@@ -1862,4 +1935,4 @@ const DEFAULT_CONTEXT_WINDOW_TOKENS = 128e3;
|
|
|
1862
1935
|
*/
|
|
1863
1936
|
const getContextWindowTokens = (modelId) => CONTEXT_WINDOW_TOKENS_BY_ID[normalizeModelCatalogId(modelId)] ?? 128e3;
|
|
1864
1937
|
//#endregion
|
|
1865
|
-
export { AI_PROVIDERS, ANTHROPIC_ADAPTIVE_THINKING_MODELS, BYOK_DEFAULT_MODELS, BYOK_DOCUMENT_INPUT_MODEL_OPTIONS, BYOK_MODEL_OPTIONS, CAPABILITY_OVERRIDES, CHAT_PDF_ATTACHMENT_MODEL_OPTIONS, CONTEXT_WINDOW_TOKENS, DEFAULT_CONTEXT_WINDOW_TOKENS, DEFAULT_MODELS, DOCUMENT_INPUT_OVERRIDES, FALLBACK_CHAT_MODEL_BY_PROVIDER, FIRST_PARTY_MODEL_PROVIDERS, MODELS_DEV_RATE_PROVIDER_BY_CATALOG_PROVIDER, MODELS_DEV_RATE_SOURCE_ALIASES, MODEL_CATALOG_ID_ALIASES, MODEL_CATALOG_PROVIDER_KIND, MODEL_DEFAULT_REASONING_EFFORTS, MODEL_DISPLAY_METADATA, MODEL_RATES, MODEL_RATE_UNITS_PER_USD, MODEL_REASONING_EFFORTS, MODEL_ROLES, MODEL_STREAMING_TOOL_USE, MODEL_TEMPERATURE_POLICIES, REASONING_EFFORTS, RETAINED_MODELS_DEV_RATE_ENTRIES, STREAMING_TOOL_USE_SUPPORTS, TANSTACK_AI_PROVIDERS, TEMPERATURE_POLICIES, getContextWindowTokens, getModelDefaultReasoningEffort, getModelDisplayMetadata, getModelRate, getModelReasoningEfforts, getStandardModelRate, isBYOKModelRoleSupported, isBYOKProviderRoleSupported, isChatPdfAttachmentModelSupported, normalizeModelCatalogId, resolveModelRate, resolveReasoningEffort, resolveWorkingBYOKModelForRole, shouldEmitTemperature, supportsStreamingToolUse };
|
|
1938
|
+
export { AI_PROVIDERS, ANTHROPIC_ADAPTIVE_THINKING_MODELS, BYOK_DEFAULT_MODELS, BYOK_DOCUMENT_INPUT_MODEL_OPTIONS, BYOK_MODEL_OPTIONS, CAPABILITY_OVERRIDES, CHAT_PDF_ATTACHMENT_MODEL_OPTIONS, CONTEXT_WINDOW_TOKENS, DEFAULT_CONTEXT_WINDOW_TOKENS, DEFAULT_MODELS, DOCUMENT_INPUT_OVERRIDES, FALLBACK_CHAT_MODEL_BY_PROVIDER, FIRST_PARTY_MODEL_PROVIDERS, MODELS_DEV_RATE_PROVIDER_BY_CATALOG_PROVIDER, MODELS_DEV_RATE_SOURCE_ALIASES, MODEL_CATALOG_ID_ALIASES, MODEL_CATALOG_PROVIDER_KIND, MODEL_DEFAULT_REASONING_EFFORTS, MODEL_DISPLAY_METADATA, MODEL_OUTPUT_TOKEN_LIMITS, MODEL_RATES, MODEL_RATE_UNITS_PER_USD, MODEL_REASONING_EFFORTS, MODEL_ROLES, MODEL_STREAMING_TOOL_USE, MODEL_TEMPERATURE_POLICIES, REASONING_EFFORTS, RETAINED_MODELS_DEV_RATE_ENTRIES, STREAMING_TOOL_USE_SUPPORTS, TANSTACK_AI_PROVIDERS, TEMPERATURE_POLICIES, getContextWindowTokens, getModelDefaultReasoningEffort, getModelDisplayMetadata, getModelRate, getModelReasoningEfforts, getOutputTokenLimit, getStandardModelRate, isBYOKModelRoleSupported, isBYOKProviderRoleSupported, isChatPdfAttachmentModelSupported, normalizeModelCatalogId, resolveModelRate, resolveReasoningEffort, resolveWorkingBYOKModelForRole, shouldEmitTemperature, supportsStreamingToolUse };
|