@stll/ai-catalog 0.1.14 → 0.2.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 +77 -0
- package/dist/index.js +78 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -634,6 +634,8 @@ export declare const MODEL_ROLES: readonly ["fast", "chat", "reasoning", "pdf"];
|
|
|
634
634
|
export type ModelRole = (typeof MODEL_ROLES)[number];
|
|
635
635
|
export declare const TEMPERATURE_POLICIES: readonly ["emit", "omit"];
|
|
636
636
|
export type TemperaturePolicy = (typeof TEMPERATURE_POLICIES)[number];
|
|
637
|
+
export declare const STREAMING_TOOL_USE_SUPPORTS: readonly ["supported", "unsupported"];
|
|
638
|
+
export type StreamingToolUseSupport = (typeof STREAMING_TOOL_USE_SUPPORTS)[number];
|
|
637
639
|
export declare const AI_PROVIDERS: readonly ["google", "openrouter", "openai", "azure_foundry", "anthropic", "bedrock", "mistral", "openai_compatible", "huggingface"];
|
|
638
640
|
export type AIProvider = (typeof AI_PROVIDERS)[number];
|
|
639
641
|
declare const AI_PROVIDER_ADAPTER_KIND: {
|
|
@@ -1146,6 +1148,81 @@ export declare const normalizeModelCatalogId: (modelId: string) => string;
|
|
|
1146
1148
|
* a runtime string.
|
|
1147
1149
|
*/
|
|
1148
1150
|
export declare const shouldEmitTemperature: (modelId: string) => boolean;
|
|
1151
|
+
/**
|
|
1152
|
+
* Whether a model accepts tool use on a streaming request.
|
|
1153
|
+
*
|
|
1154
|
+
* Every tool-carrying request stella sends is a stream, and structured
|
|
1155
|
+
* output is a forced tool call, so `"unsupported"` withdraws both: the
|
|
1156
|
+
* provider answers such a request with a fatal stream error rather than a
|
|
1157
|
+
* degraded result. models.dev does not publish this, so the map is
|
|
1158
|
+
* hand-declared here rather than in the generated `capabilities.gen.ts`,
|
|
1159
|
+
* and it is total over the offered catalog: a new model forces a decision.
|
|
1160
|
+
*
|
|
1161
|
+
* Consumers must go through `supportsStreamingToolUse`.
|
|
1162
|
+
*/
|
|
1163
|
+
export declare const MODEL_STREAMING_TOOL_USE: {
|
|
1164
|
+
readonly "gemini-3.8-flash": "supported";
|
|
1165
|
+
readonly "gemini-3.7-flash": "supported";
|
|
1166
|
+
readonly "gemini-3.6-flash": "supported";
|
|
1167
|
+
readonly "gemini-3.5-flash-lite": "supported";
|
|
1168
|
+
readonly "gemini-3.1-pro-preview": "supported";
|
|
1169
|
+
readonly "gemini-3.5-flash": "supported";
|
|
1170
|
+
readonly "gemini-3.1-flash-lite": "supported";
|
|
1171
|
+
readonly "openai/gpt-6-astra": "supported";
|
|
1172
|
+
readonly "openai/gpt-5.6-sol": "supported";
|
|
1173
|
+
readonly "openai/gpt-5.6-terra": "supported";
|
|
1174
|
+
readonly "openai/gpt-5.6-luna": "supported";
|
|
1175
|
+
readonly "google/gemini-3.8-flash": "supported";
|
|
1176
|
+
readonly "google/gemini-3.7-flash": "supported";
|
|
1177
|
+
readonly "google/gemini-3.6-flash": "supported";
|
|
1178
|
+
readonly "google/gemini-3.5-flash-lite": "supported";
|
|
1179
|
+
readonly "google/gemini-3.1-pro-preview": "supported";
|
|
1180
|
+
readonly "google/gemini-3.5-flash": "supported";
|
|
1181
|
+
readonly "google/gemini-3.1-flash-lite": "supported";
|
|
1182
|
+
readonly "anthropic/claude-sonnet-5": "supported";
|
|
1183
|
+
readonly "anthropic/claude-opus-5": "supported";
|
|
1184
|
+
readonly "anthropic/claude-opus-4.8": "supported";
|
|
1185
|
+
readonly "anthropic/claude-sonnet-4.6": "supported";
|
|
1186
|
+
readonly "openai/gpt-5.5": "supported";
|
|
1187
|
+
readonly "openai/gpt-5.4-mini": "supported";
|
|
1188
|
+
readonly "gpt-6-astra": "supported";
|
|
1189
|
+
readonly "gpt-5.6": "supported";
|
|
1190
|
+
readonly "gpt-5.6-terra": "supported";
|
|
1191
|
+
readonly "gpt-5.6-luna": "supported";
|
|
1192
|
+
readonly "gpt-5.5": "supported";
|
|
1193
|
+
readonly "gpt-5.4": "supported";
|
|
1194
|
+
readonly "gpt-5.4-mini": "supported";
|
|
1195
|
+
readonly "gpt-5.4-nano": "supported";
|
|
1196
|
+
readonly "gpt-5.2": "supported";
|
|
1197
|
+
readonly "claude-sonnet-5": "supported";
|
|
1198
|
+
readonly "claude-fable-5-1": "supported";
|
|
1199
|
+
readonly "claude-fable-5": "supported";
|
|
1200
|
+
readonly "claude-opus-5": "supported";
|
|
1201
|
+
readonly "claude-opus-4-8": "supported";
|
|
1202
|
+
readonly "claude-opus-4-7": "supported";
|
|
1203
|
+
readonly "claude-sonnet-4-6": "supported";
|
|
1204
|
+
readonly "claude-opus-4-6": "supported";
|
|
1205
|
+
readonly "claude-haiku-4-5-20251001": "supported";
|
|
1206
|
+
readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": "supported";
|
|
1207
|
+
readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": "supported";
|
|
1208
|
+
readonly "us.amazon.nova-pro-v1:0": "supported";
|
|
1209
|
+
readonly "us.amazon.nova-lite-v1:0": "supported";
|
|
1210
|
+
readonly "us.amazon.nova-micro-v1:0": "supported";
|
|
1211
|
+
readonly "openai.gpt-oss-120b-1:0": "supported";
|
|
1212
|
+
readonly "openai.gpt-oss-20b-1:0": "supported";
|
|
1213
|
+
readonly "us.deepseek.r1-v1:0": "unsupported";
|
|
1214
|
+
readonly "mistral-large-latest": "supported";
|
|
1215
|
+
readonly "mistral-medium-latest": "supported";
|
|
1216
|
+
readonly "mistral-small-latest": "supported";
|
|
1217
|
+
};
|
|
1218
|
+
/**
|
|
1219
|
+
* Whether stella may send tools (or a structured-output schema) to this
|
|
1220
|
+
* model on a streaming request. Unlisted ids resolve to `true`: custom
|
|
1221
|
+
* deployments and env overrides are overwhelmingly tool-capable, and
|
|
1222
|
+
* withdrawing tools from an uncatalogued model would silently strip the
|
|
1223
|
+
* agent loop rather than fail where it can be seen.
|
|
1224
|
+
*/
|
|
1225
|
+
export declare const supportsStreamingToolUse: (modelId: string) => boolean;
|
|
1149
1226
|
/**
|
|
1150
1227
|
* Declared reasoning-effort values for a model ID, or `null` when the
|
|
1151
1228
|
* model has no effort control or is not catalogued (custom deployments,
|
package/dist/index.js
CHANGED
|
@@ -924,6 +924,7 @@ const MODEL_ROLES = [
|
|
|
924
924
|
"pdf"
|
|
925
925
|
];
|
|
926
926
|
const TEMPERATURE_POLICIES = ["emit", "omit"];
|
|
927
|
+
const STREAMING_TOOL_USE_SUPPORTS = ["supported", "unsupported"];
|
|
927
928
|
const AI_PROVIDERS = [
|
|
928
929
|
"google",
|
|
929
930
|
"openrouter",
|
|
@@ -1493,6 +1494,82 @@ const MODEL_TEMPERATURE_POLICY_BY_ID = MODEL_TEMPERATURE_POLICIES;
|
|
|
1493
1494
|
* a runtime string.
|
|
1494
1495
|
*/
|
|
1495
1496
|
const shouldEmitTemperature = (modelId) => MODEL_TEMPERATURE_POLICY_BY_ID[normalizeModelCatalogId(modelId)] === "emit";
|
|
1497
|
+
/**
|
|
1498
|
+
* Whether a model accepts tool use on a streaming request.
|
|
1499
|
+
*
|
|
1500
|
+
* Every tool-carrying request stella sends is a stream, and structured
|
|
1501
|
+
* output is a forced tool call, so `"unsupported"` withdraws both: the
|
|
1502
|
+
* provider answers such a request with a fatal stream error rather than a
|
|
1503
|
+
* degraded result. models.dev does not publish this, so the map is
|
|
1504
|
+
* hand-declared here rather than in the generated `capabilities.gen.ts`,
|
|
1505
|
+
* and it is total over the offered catalog: a new model forces a decision.
|
|
1506
|
+
*
|
|
1507
|
+
* Consumers must go through `supportsStreamingToolUse`.
|
|
1508
|
+
*/
|
|
1509
|
+
const MODEL_STREAMING_TOOL_USE = {
|
|
1510
|
+
"gemini-3.8-flash": "supported",
|
|
1511
|
+
"gemini-3.7-flash": "supported",
|
|
1512
|
+
"gemini-3.6-flash": "supported",
|
|
1513
|
+
"gemini-3.5-flash-lite": "supported",
|
|
1514
|
+
"gemini-3.1-pro-preview": "supported",
|
|
1515
|
+
"gemini-3.5-flash": "supported",
|
|
1516
|
+
"gemini-3.1-flash-lite": "supported",
|
|
1517
|
+
"openai/gpt-6-astra": "supported",
|
|
1518
|
+
"openai/gpt-5.6-sol": "supported",
|
|
1519
|
+
"openai/gpt-5.6-terra": "supported",
|
|
1520
|
+
"openai/gpt-5.6-luna": "supported",
|
|
1521
|
+
"google/gemini-3.8-flash": "supported",
|
|
1522
|
+
"google/gemini-3.7-flash": "supported",
|
|
1523
|
+
"google/gemini-3.6-flash": "supported",
|
|
1524
|
+
"google/gemini-3.5-flash-lite": "supported",
|
|
1525
|
+
"google/gemini-3.1-pro-preview": "supported",
|
|
1526
|
+
"google/gemini-3.5-flash": "supported",
|
|
1527
|
+
"google/gemini-3.1-flash-lite": "supported",
|
|
1528
|
+
"anthropic/claude-sonnet-5": "supported",
|
|
1529
|
+
"anthropic/claude-opus-5": "supported",
|
|
1530
|
+
"anthropic/claude-opus-4.8": "supported",
|
|
1531
|
+
"anthropic/claude-sonnet-4.6": "supported",
|
|
1532
|
+
"openai/gpt-5.5": "supported",
|
|
1533
|
+
"openai/gpt-5.4-mini": "supported",
|
|
1534
|
+
"gpt-6-astra": "supported",
|
|
1535
|
+
"gpt-5.6": "supported",
|
|
1536
|
+
"gpt-5.6-terra": "supported",
|
|
1537
|
+
"gpt-5.6-luna": "supported",
|
|
1538
|
+
"gpt-5.5": "supported",
|
|
1539
|
+
"gpt-5.4": "supported",
|
|
1540
|
+
"gpt-5.4-mini": "supported",
|
|
1541
|
+
"gpt-5.4-nano": "supported",
|
|
1542
|
+
"gpt-5.2": "supported",
|
|
1543
|
+
"claude-sonnet-5": "supported",
|
|
1544
|
+
"claude-fable-5-1": "supported",
|
|
1545
|
+
"claude-fable-5": "supported",
|
|
1546
|
+
"claude-opus-5": "supported",
|
|
1547
|
+
"claude-opus-4-8": "supported",
|
|
1548
|
+
"claude-opus-4-7": "supported",
|
|
1549
|
+
"claude-sonnet-4-6": "supported",
|
|
1550
|
+
"claude-opus-4-6": "supported",
|
|
1551
|
+
"claude-haiku-4-5-20251001": "supported",
|
|
1552
|
+
"us.anthropic.claude-sonnet-4-5-20250929-v1:0": "supported",
|
|
1553
|
+
"us.anthropic.claude-haiku-4-5-20251001-v1:0": "supported",
|
|
1554
|
+
"us.amazon.nova-pro-v1:0": "supported",
|
|
1555
|
+
"us.amazon.nova-lite-v1:0": "supported",
|
|
1556
|
+
"us.amazon.nova-micro-v1:0": "supported",
|
|
1557
|
+
"openai.gpt-oss-120b-1:0": "supported",
|
|
1558
|
+
"openai.gpt-oss-20b-1:0": "supported",
|
|
1559
|
+
"us.deepseek.r1-v1:0": "unsupported",
|
|
1560
|
+
"mistral-large-latest": "supported",
|
|
1561
|
+
"mistral-medium-latest": "supported",
|
|
1562
|
+
"mistral-small-latest": "supported"
|
|
1563
|
+
};
|
|
1564
|
+
const MODEL_STREAMING_TOOL_USE_BY_ID = MODEL_STREAMING_TOOL_USE;
|
|
1565
|
+
/**
|
|
1566
|
+
* Whether stella may send tools (or a structured-output schema) to this
|
|
1567
|
+
* model on a streaming request. Unlisted ids resolve to `true`: custom
|
|
1568
|
+
* deployments and env overrides are overwhelmingly tool-capable, and
|
|
1569
|
+
* withdrawing tools from an uncatalogued model would silently strip the
|
|
1570
|
+
* agent loop rather than fail where it can be seen.
|
|
1571
|
+
*/
|
|
1572
|
+
const supportsStreamingToolUse = (modelId) => MODEL_STREAMING_TOOL_USE_BY_ID[normalizeModelCatalogId(modelId)] !== "unsupported";
|
|
1496
1573
|
const MODEL_REASONING_EFFORTS_BY_ID = MODEL_REASONING_EFFORTS;
|
|
1497
1574
|
/**
|
|
1498
1575
|
* Declared reasoning-effort values for a model ID, or `null` when the
|
|
@@ -1638,4 +1715,4 @@ const DEFAULT_CONTEXT_WINDOW_TOKENS = 128e3;
|
|
|
1638
1715
|
*/
|
|
1639
1716
|
const getContextWindowTokens = (modelId) => CONTEXT_WINDOW_TOKENS_BY_ID[normalizeModelCatalogId(modelId)] ?? 128e3;
|
|
1640
1717
|
//#endregion
|
|
1641
|
-
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_TEMPERATURE_POLICIES, REASONING_EFFORTS, RETAINED_MODELS_DEV_RATE_ENTRIES, TANSTACK_AI_PROVIDERS, TEMPERATURE_POLICIES, getContextWindowTokens, getModelDefaultReasoningEffort, getModelDisplayMetadata, getModelRate, getModelReasoningEfforts, getStandardModelRate, isBYOKModelRoleSupported, isBYOKProviderRoleSupported, isChatPdfAttachmentModelSupported, normalizeModelCatalogId, resolveModelRate, resolveReasoningEffort, resolveWorkingBYOKModelForRole, shouldEmitTemperature };
|
|
1718
|
+
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 };
|