@stll/ai-catalog 0.3.2 → 0.4.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 +92 -1
- package/dist/index.js +92 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -498,6 +498,14 @@ type CapabilityOverride = {
|
|
|
498
498
|
reason: string;
|
|
499
499
|
};
|
|
500
500
|
export declare const CAPABILITY_OVERRIDES: Partial<Record<OfferedBYOKModelId, CapabilityOverride>>;
|
|
501
|
+
type ImageInputOverride = {
|
|
502
|
+
supported: boolean;
|
|
503
|
+
/** Dated correction with an official provider documentation URL. */
|
|
504
|
+
reason: string;
|
|
505
|
+
};
|
|
506
|
+
type ImageInputOverrides = { [TProvider in BYOKProvider]?: Partial<Record<BYOKModelIdByProvider[TProvider], ImageInputOverride>>; };
|
|
507
|
+
/** Only official provider documentation may override input-modality evidence. */
|
|
508
|
+
export declare const IMAGE_INPUT_OVERRIDES: ImageInputOverrides;
|
|
501
509
|
//#endregion
|
|
502
510
|
//#region src/document-input-overrides.d.ts
|
|
503
511
|
type DocumentInputOverride = {
|
|
@@ -514,6 +522,82 @@ type DocumentInputOverride = {
|
|
|
514
522
|
export declare const DOCUMENT_INPUT_OVERRIDES: Partial<Record<OfferedBYOKModelId, DocumentInputOverride>>;
|
|
515
523
|
//#endregion
|
|
516
524
|
//#region src/capabilities.gen.d.ts
|
|
525
|
+
/** Every offered provider/model pair has explicit image-input evidence. */
|
|
526
|
+
export declare const MODEL_IMAGE_INPUT_CAPABILITIES: {
|
|
527
|
+
readonly google: {
|
|
528
|
+
readonly "gemini-3.8-flash": "supported";
|
|
529
|
+
readonly "gemini-3.7-flash": "supported";
|
|
530
|
+
readonly "gemini-3.6-flash": "supported";
|
|
531
|
+
readonly "gemini-3.5-flash-lite": "supported";
|
|
532
|
+
readonly "gemini-3.1-pro-preview": "supported";
|
|
533
|
+
readonly "gemini-3.5-flash": "supported";
|
|
534
|
+
readonly "gemini-3.1-flash-lite": "supported";
|
|
535
|
+
};
|
|
536
|
+
readonly openrouter: {
|
|
537
|
+
readonly "openai/gpt-6.1-sol": "supported";
|
|
538
|
+
readonly "openai/gpt-6-astra": "supported";
|
|
539
|
+
readonly "openai/gpt-6-sol": "supported";
|
|
540
|
+
readonly "openai/gpt-6-luna": "supported";
|
|
541
|
+
readonly "openai/gpt-5.6-sol": "supported";
|
|
542
|
+
readonly "openai/gpt-5.6-terra": "supported";
|
|
543
|
+
readonly "openai/gpt-5.6-luna": "supported";
|
|
544
|
+
readonly "google/gemini-3.8-flash": "supported";
|
|
545
|
+
readonly "google/gemini-3.7-flash": "supported";
|
|
546
|
+
readonly "google/gemini-3.6-flash": "supported";
|
|
547
|
+
readonly "google/gemini-3.5-flash-lite": "supported";
|
|
548
|
+
readonly "google/gemini-3.1-pro-preview": "supported";
|
|
549
|
+
readonly "google/gemini-3.5-flash": "supported";
|
|
550
|
+
readonly "google/gemini-3.1-flash-lite": "supported";
|
|
551
|
+
readonly "anthropic/claude-sonnet-5.5": "supported";
|
|
552
|
+
readonly "anthropic/claude-sonnet-5": "supported";
|
|
553
|
+
readonly "anthropic/claude-opus-5": "supported";
|
|
554
|
+
readonly "anthropic/claude-opus-4.8": "supported";
|
|
555
|
+
readonly "anthropic/claude-sonnet-4.6": "supported";
|
|
556
|
+
readonly "openai/gpt-5.5": "supported";
|
|
557
|
+
readonly "openai/gpt-5.4-mini": "supported";
|
|
558
|
+
};
|
|
559
|
+
readonly openai: {
|
|
560
|
+
readonly "gpt-6.1-sol": "supported";
|
|
561
|
+
readonly "gpt-6-astra": "supported";
|
|
562
|
+
readonly "gpt-6-sol": "supported";
|
|
563
|
+
readonly "gpt-6-luna": "supported";
|
|
564
|
+
readonly "gpt-5.6": "supported";
|
|
565
|
+
readonly "gpt-5.6-terra": "supported";
|
|
566
|
+
readonly "gpt-5.6-luna": "supported";
|
|
567
|
+
readonly "gpt-5.5": "supported";
|
|
568
|
+
readonly "gpt-5.4": "supported";
|
|
569
|
+
readonly "gpt-5.4-mini": "supported";
|
|
570
|
+
readonly "gpt-5.4-nano": "supported";
|
|
571
|
+
readonly "gpt-5.2": "supported";
|
|
572
|
+
};
|
|
573
|
+
readonly anthropic: {
|
|
574
|
+
readonly "claude-sonnet-5-5": "supported";
|
|
575
|
+
readonly "claude-sonnet-5": "supported";
|
|
576
|
+
readonly "claude-fable-5-1": "supported";
|
|
577
|
+
readonly "claude-fable-5": "supported";
|
|
578
|
+
readonly "claude-opus-5-5": "supported";
|
|
579
|
+
readonly "claude-opus-5": "supported";
|
|
580
|
+
readonly "claude-opus-4-8": "supported";
|
|
581
|
+
readonly "claude-opus-4-7": "supported";
|
|
582
|
+
readonly "claude-sonnet-4-6": "supported";
|
|
583
|
+
readonly "claude-opus-4-6": "supported";
|
|
584
|
+
readonly "claude-haiku-4-5-20251001": "supported";
|
|
585
|
+
};
|
|
586
|
+
readonly bedrock: {
|
|
587
|
+
readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": "supported";
|
|
588
|
+
readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": "supported";
|
|
589
|
+
readonly "us.amazon.nova-pro-v1:0": "supported";
|
|
590
|
+
readonly "us.amazon.nova-lite-v1:0": "supported";
|
|
591
|
+
readonly "us.amazon.nova-micro-v1:0": "unsupported";
|
|
592
|
+
readonly "openai.gpt-oss-120b-1:0": "unsupported";
|
|
593
|
+
readonly "openai.gpt-oss-20b-1:0": "unsupported";
|
|
594
|
+
};
|
|
595
|
+
readonly mistral: {
|
|
596
|
+
readonly "mistral-large-latest": "supported";
|
|
597
|
+
readonly "mistral-medium-latest": "supported";
|
|
598
|
+
readonly "mistral-small-latest": "supported";
|
|
599
|
+
};
|
|
600
|
+
};
|
|
517
601
|
/**
|
|
518
602
|
* Reasoning-effort values each offered model accepts, `null` when the
|
|
519
603
|
* model exposes no effort-style reasoning control. A missing `"none"`
|
|
@@ -802,6 +886,8 @@ export declare const MODEL_ROLES: readonly ["fast", "chat", "reasoning", "pdf"];
|
|
|
802
886
|
export type ModelRole = (typeof MODEL_ROLES)[number];
|
|
803
887
|
export declare const TEMPERATURE_POLICIES: readonly ["emit", "omit"];
|
|
804
888
|
export type TemperaturePolicy = (typeof TEMPERATURE_POLICIES)[number];
|
|
889
|
+
export declare const IMAGE_INPUT_CAPABILITIES: readonly ["supported", "unsupported", "unknown"];
|
|
890
|
+
export type ImageInputCapability = (typeof IMAGE_INPUT_CAPABILITIES)[number];
|
|
805
891
|
export declare const STREAMING_TOOL_USE_SUPPORTS: readonly ["supported", "unsupported"];
|
|
806
892
|
export type StreamingToolUseSupport = (typeof STREAMING_TOOL_USE_SUPPORTS)[number];
|
|
807
893
|
export declare const AI_PROVIDERS: readonly ["google", "openrouter", "openai", "azure_foundry", "anthropic", "bedrock", "mistral", "openai_compatible", "huggingface"];
|
|
@@ -1233,6 +1319,11 @@ export declare const BYOK_DOCUMENT_INPUT_MODEL_OPTIONS: {
|
|
|
1233
1319
|
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"];
|
|
1234
1320
|
readonly mistral: readonly [];
|
|
1235
1321
|
};
|
|
1322
|
+
/** Unoffered IDs have no entry; offered IDs explicitly include unknown. */
|
|
1323
|
+
export declare const getModelImageInputCapability: ({ provider, modelId }: {
|
|
1324
|
+
provider: BYOKProvider;
|
|
1325
|
+
modelId: string;
|
|
1326
|
+
}) => ImageInputCapability | undefined;
|
|
1236
1327
|
export declare const isBYOKProviderRoleSupported: ({ provider, role }: {
|
|
1237
1328
|
provider: BYOKProvider;
|
|
1238
1329
|
role: ModelRole;
|
|
@@ -1570,4 +1661,4 @@ export declare const DEFAULT_CONTEXT_WINDOW_TOKENS = 128000;
|
|
|
1570
1661
|
*/
|
|
1571
1662
|
export declare const getContextWindowTokens: (modelId: string) => number;
|
|
1572
1663
|
//#endregion
|
|
1573
|
-
export type { CapabilityOverride, DocumentInputOverride, ModelRate, ModelRateAmounts, ModelsDevRateProvider };
|
|
1664
|
+
export type { CapabilityOverride, DocumentInputOverride, ImageInputOverride, ImageInputOverrides, ModelRate, ModelRateAmounts, ModelsDevRateProvider };
|
package/dist/index.js
CHANGED
|
@@ -72,6 +72,82 @@ const MODEL_DOCUMENT_INPUT_OPTIONS = {
|
|
|
72
72
|
],
|
|
73
73
|
mistral: []
|
|
74
74
|
};
|
|
75
|
+
/** Every offered provider/model pair has explicit image-input evidence. */
|
|
76
|
+
const MODEL_IMAGE_INPUT_CAPABILITIES = {
|
|
77
|
+
google: {
|
|
78
|
+
"gemini-3.8-flash": "supported",
|
|
79
|
+
"gemini-3.7-flash": "supported",
|
|
80
|
+
"gemini-3.6-flash": "supported",
|
|
81
|
+
"gemini-3.5-flash-lite": "supported",
|
|
82
|
+
"gemini-3.1-pro-preview": "supported",
|
|
83
|
+
"gemini-3.5-flash": "supported",
|
|
84
|
+
"gemini-3.1-flash-lite": "supported"
|
|
85
|
+
},
|
|
86
|
+
openrouter: {
|
|
87
|
+
"openai/gpt-6.1-sol": "supported",
|
|
88
|
+
"openai/gpt-6-astra": "supported",
|
|
89
|
+
"openai/gpt-6-sol": "supported",
|
|
90
|
+
"openai/gpt-6-luna": "supported",
|
|
91
|
+
"openai/gpt-5.6-sol": "supported",
|
|
92
|
+
"openai/gpt-5.6-terra": "supported",
|
|
93
|
+
"openai/gpt-5.6-luna": "supported",
|
|
94
|
+
"google/gemini-3.8-flash": "supported",
|
|
95
|
+
"google/gemini-3.7-flash": "supported",
|
|
96
|
+
"google/gemini-3.6-flash": "supported",
|
|
97
|
+
"google/gemini-3.5-flash-lite": "supported",
|
|
98
|
+
"google/gemini-3.1-pro-preview": "supported",
|
|
99
|
+
"google/gemini-3.5-flash": "supported",
|
|
100
|
+
"google/gemini-3.1-flash-lite": "supported",
|
|
101
|
+
"anthropic/claude-sonnet-5.5": "supported",
|
|
102
|
+
"anthropic/claude-sonnet-5": "supported",
|
|
103
|
+
"anthropic/claude-opus-5": "supported",
|
|
104
|
+
"anthropic/claude-opus-4.8": "supported",
|
|
105
|
+
"anthropic/claude-sonnet-4.6": "supported",
|
|
106
|
+
"openai/gpt-5.5": "supported",
|
|
107
|
+
"openai/gpt-5.4-mini": "supported"
|
|
108
|
+
},
|
|
109
|
+
openai: {
|
|
110
|
+
"gpt-6.1-sol": "supported",
|
|
111
|
+
"gpt-6-astra": "supported",
|
|
112
|
+
"gpt-6-sol": "supported",
|
|
113
|
+
"gpt-6-luna": "supported",
|
|
114
|
+
"gpt-5.6": "supported",
|
|
115
|
+
"gpt-5.6-terra": "supported",
|
|
116
|
+
"gpt-5.6-luna": "supported",
|
|
117
|
+
"gpt-5.5": "supported",
|
|
118
|
+
"gpt-5.4": "supported",
|
|
119
|
+
"gpt-5.4-mini": "supported",
|
|
120
|
+
"gpt-5.4-nano": "supported",
|
|
121
|
+
"gpt-5.2": "supported"
|
|
122
|
+
},
|
|
123
|
+
anthropic: {
|
|
124
|
+
"claude-sonnet-5-5": "supported",
|
|
125
|
+
"claude-sonnet-5": "supported",
|
|
126
|
+
"claude-fable-5-1": "supported",
|
|
127
|
+
"claude-fable-5": "supported",
|
|
128
|
+
"claude-opus-5-5": "supported",
|
|
129
|
+
"claude-opus-5": "supported",
|
|
130
|
+
"claude-opus-4-8": "supported",
|
|
131
|
+
"claude-opus-4-7": "supported",
|
|
132
|
+
"claude-sonnet-4-6": "supported",
|
|
133
|
+
"claude-opus-4-6": "supported",
|
|
134
|
+
"claude-haiku-4-5-20251001": "supported"
|
|
135
|
+
},
|
|
136
|
+
bedrock: {
|
|
137
|
+
"us.anthropic.claude-sonnet-4-5-20250929-v1:0": "supported",
|
|
138
|
+
"us.anthropic.claude-haiku-4-5-20251001-v1:0": "supported",
|
|
139
|
+
"us.amazon.nova-pro-v1:0": "supported",
|
|
140
|
+
"us.amazon.nova-lite-v1:0": "supported",
|
|
141
|
+
"us.amazon.nova-micro-v1:0": "unsupported",
|
|
142
|
+
"openai.gpt-oss-120b-1:0": "unsupported",
|
|
143
|
+
"openai.gpt-oss-20b-1:0": "unsupported"
|
|
144
|
+
},
|
|
145
|
+
mistral: {
|
|
146
|
+
"mistral-large-latest": "supported",
|
|
147
|
+
"mistral-medium-latest": "supported",
|
|
148
|
+
"mistral-small-latest": "supported"
|
|
149
|
+
}
|
|
150
|
+
};
|
|
75
151
|
/**
|
|
76
152
|
* Reasoning-effort values each offered model accepts, `null` when the
|
|
77
153
|
* model exposes no effort-style reasoning control. A missing `"none"`
|
|
@@ -1092,6 +1168,8 @@ const MODELS_DEV_RATE_SOURCE_ALIASES = defineRateSourceAliases({});
|
|
|
1092
1168
|
//#endregion
|
|
1093
1169
|
//#region src/capabilities-overrides.ts
|
|
1094
1170
|
const CAPABILITY_OVERRIDES = {};
|
|
1171
|
+
/** Only official provider documentation may override input-modality evidence. */
|
|
1172
|
+
const IMAGE_INPUT_OVERRIDES = {};
|
|
1095
1173
|
//#endregion
|
|
1096
1174
|
//#region src/document-input-overrides.ts
|
|
1097
1175
|
/**
|
|
@@ -1152,6 +1230,11 @@ const MODEL_ROLES = [
|
|
|
1152
1230
|
"pdf"
|
|
1153
1231
|
];
|
|
1154
1232
|
const TEMPERATURE_POLICIES = ["emit", "omit"];
|
|
1233
|
+
const IMAGE_INPUT_CAPABILITIES = [
|
|
1234
|
+
"supported",
|
|
1235
|
+
"unsupported",
|
|
1236
|
+
"unknown"
|
|
1237
|
+
];
|
|
1155
1238
|
const STREAMING_TOOL_USE_SUPPORTS = ["supported", "unsupported"];
|
|
1156
1239
|
const AI_PROVIDERS = [
|
|
1157
1240
|
"google",
|
|
@@ -1649,6 +1732,13 @@ const getModelDisplayMetadata = (modelId) => MODEL_DISPLAY_METADATA_BY_ID[normal
|
|
|
1649
1732
|
* the nightly upstream check rejects drift.
|
|
1650
1733
|
*/
|
|
1651
1734
|
const BYOK_DOCUMENT_INPUT_MODEL_OPTIONS = MODEL_DOCUMENT_INPUT_OPTIONS;
|
|
1735
|
+
const IMAGE_INPUT_BY_PROVIDER = MODEL_IMAGE_INPUT_CAPABILITIES;
|
|
1736
|
+
/** Unoffered IDs have no entry; offered IDs explicitly include unknown. */
|
|
1737
|
+
const getModelImageInputCapability = ({ provider, modelId }) => {
|
|
1738
|
+
const capabilities = IMAGE_INPUT_BY_PROVIDER[provider];
|
|
1739
|
+
const normalized = normalizeModelCatalogId(modelId);
|
|
1740
|
+
return Object.hasOwn(capabilities, normalized) ? capabilities[normalized] : void 0;
|
|
1741
|
+
};
|
|
1652
1742
|
const isBYOKProviderRoleSupported = ({ provider, role }) => role !== "pdf" || BYOK_DOCUMENT_INPUT_MODEL_OPTIONS[provider].length > 0;
|
|
1653
1743
|
const isBYOKModelRoleSupported = ({ provider, modelId, role }) => {
|
|
1654
1744
|
if (role !== "pdf") return true;
|
|
@@ -1780,7 +1870,7 @@ const MODEL_CATALOG_ID_ALIASES = {
|
|
|
1780
1870
|
"claude-sonnet-4.6": "claude-sonnet-4-6"
|
|
1781
1871
|
};
|
|
1782
1872
|
const MODEL_CATALOG_ID_ALIAS_TARGET_BY_ID = MODEL_CATALOG_ID_ALIASES;
|
|
1783
|
-
const normalizeModelCatalogId = (modelId) => MODEL_CATALOG_ID_ALIAS_TARGET_BY_ID[modelId] ?? modelId;
|
|
1873
|
+
const normalizeModelCatalogId = (modelId) => Object.hasOwn(MODEL_CATALOG_ID_ALIAS_TARGET_BY_ID, modelId) ? MODEL_CATALOG_ID_ALIAS_TARGET_BY_ID[modelId] ?? modelId : modelId;
|
|
1784
1874
|
const MODEL_TEMPERATURE_POLICY_BY_ID = MODEL_TEMPERATURE_POLICIES;
|
|
1785
1875
|
/**
|
|
1786
1876
|
* Whether stella should emit a `temperature` override for this model.
|
|
@@ -2045,4 +2135,4 @@ const DEFAULT_CONTEXT_WINDOW_TOKENS = 128e3;
|
|
|
2045
2135
|
*/
|
|
2046
2136
|
const getContextWindowTokens = (modelId) => CONTEXT_WINDOW_TOKENS_BY_ID[normalizeModelCatalogId(modelId)] ?? 128e3;
|
|
2047
2137
|
//#endregion
|
|
2048
|
-
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 };
|
|
2138
|
+
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, IMAGE_INPUT_CAPABILITIES, IMAGE_INPUT_OVERRIDES, 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_IMAGE_INPUT_CAPABILITIES, 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, getModelImageInputCapability, getModelRate, getModelReasoningEfforts, getOutputTokenLimit, getStandardModelRate, isBYOKModelRoleSupported, isBYOKProviderRoleSupported, isChatPdfAttachmentModelSupported, normalizeModelCatalogId, resolveModelRate, resolveReasoningEffort, resolveWorkingBYOKModelForRole, shouldEmitTemperature, supportsStreamingToolUse };
|