@dexto/llm 1.10.2 → 1.10.4

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.cjs CHANGED
@@ -23,17 +23,20 @@ __export(index_exports, {
23
23
  ANTHROPIC_BETA_HEADER: () => ANTHROPIC_BETA_HEADER,
24
24
  ANTHROPIC_INTERLEAVED_THINKING_BETA: () => ANTHROPIC_INTERLEAVED_THINKING_BETA,
25
25
  DEFAULT_MAX_INPUT_TOKENS: () => DEFAULT_MAX_INPUT_TOKENS,
26
+ DEFAULT_MODEL_REGISTRY: () => DEFAULT_MODEL_REGISTRY,
26
27
  LLM_PRICING_STATUSES: () => LLM_PRICING_STATUSES,
27
28
  LLM_PROVIDERS: () => LLM_PROVIDERS,
28
29
  LLM_REGISTRY: () => LLM_REGISTRY,
29
30
  LlmCatalogError: () => LlmCatalogError,
30
31
  MIME_TYPE_TO_FILE_TYPE: () => MIME_TYPE_TO_FILE_TYPE,
32
+ ModelRegistry: () => ModelRegistry,
31
33
  SUPPORTED_FILE_TYPES: () => SUPPORTED_FILE_TYPES,
32
34
  acceptsAnyModel: () => acceptsAnyModel,
33
35
  buildGoogleReasoningProfile: () => buildGoogleReasoningProfile,
34
36
  calculateCost: () => calculateCost,
35
37
  calculateCostBreakdown: () => calculateCostBreakdown,
36
38
  coerceOpenAIReasoningEffort: () => coerceOpenAIReasoningEffort,
39
+ createModelRegistry: () => createModelRegistry,
37
40
  getAllModelsForProvider: () => getAllModelsForProvider,
38
41
  getAllSupportedModels: () => getAllSupportedModels,
39
42
  getAllowedMimeTypes: () => getAllowedMimeTypes,
@@ -20950,6 +20953,31 @@ function unknownModel(provider, model) {
20950
20953
  function modelProviderUnknown(model) {
20951
20954
  return new LlmCatalogError("MODEL_UNKNOWN", `Could not infer provider for model '${model}'`);
20952
20955
  }
20956
+ var MODEL_PRICING_FIELDS = [
20957
+ "inputPerM",
20958
+ "outputPerM",
20959
+ "cacheReadPerM",
20960
+ "cacheWritePerM",
20961
+ "reasoningPerM",
20962
+ "inputAudioPerM",
20963
+ "outputAudioPerM"
20964
+ ];
20965
+ var LONG_CONTEXT_PRICING_FIELDS = [
20966
+ "inputTokensAbove",
20967
+ "inputPerM",
20968
+ "outputPerM",
20969
+ "cacheReadPerM",
20970
+ "cacheWritePerM"
20971
+ ];
20972
+ var MODEL_BOOLEAN_FIELDS = [
20973
+ "default",
20974
+ "reasoning",
20975
+ "supportsTemperature",
20976
+ "supportsInterleaved",
20977
+ "supportsToolCall"
20978
+ ];
20979
+ var MODEL_STRING_FIELDS = ["displayName", "releaseDate", "status"];
20980
+ var MODEL_MODALITIES = ["text", "audio", "image", "video", "pdf"];
20953
20981
  function getNormalizedModelIdForLookup(model) {
20954
20982
  const stripped = stripBedrockRegionPrefix(model);
20955
20983
  return stripped.toLowerCase();
@@ -21177,6 +21205,302 @@ var LLM_REGISTRY = {
21177
21205
  supportsAllRegistryModels: true
21178
21206
  }
21179
21207
  };
21208
+ var ModelRegistry = class {
21209
+ #providers;
21210
+ constructor(providers) {
21211
+ validateRegistryProviders(providers);
21212
+ this.#providers = cloneRegistryProviders(providers);
21213
+ }
21214
+ /**
21215
+ * Replaces the active provider snapshot after validating and cloning it.
21216
+ *
21217
+ * Hosts that refresh the bundled registry can update the shared default instance without
21218
+ * exposing mutable provider records to consumers that already hold a ModelRegistry reference.
21219
+ */
21220
+ replaceProviders(providers) {
21221
+ validateRegistryProviders(providers);
21222
+ this.#providers = cloneRegistryProviders(providers);
21223
+ }
21224
+ getProvider(provider) {
21225
+ return cloneProviderInfo(this.#providers[provider]);
21226
+ }
21227
+ getModel(provider, model) {
21228
+ const modelInfo = findModelInfoInRegistry(this.#providers, provider, model);
21229
+ return modelInfo === null ? null : cloneModelInfo(modelInfo);
21230
+ }
21231
+ getModelCapabilities(provider, model) {
21232
+ const modelInfo = this.getModel(provider, model);
21233
+ if (modelInfo === null) return null;
21234
+ return {
21235
+ maxInputTokens: modelInfo.maxInputTokens,
21236
+ reasoning: modelInfo.reasoning === true,
21237
+ supportedFileTypes: [...modelInfo.supportedFileTypes],
21238
+ supportsInterleaved: modelInfo.supportsInterleaved === true,
21239
+ supportsTemperature: modelInfo.supportsTemperature === true,
21240
+ supportsToolCall: modelInfo.supportsToolCall === true,
21241
+ ...modelInfo.modalities ? {
21242
+ modalities: {
21243
+ input: [...modelInfo.modalities.input],
21244
+ output: [...modelInfo.modalities.output]
21245
+ }
21246
+ } : {}
21247
+ };
21248
+ }
21249
+ getSupportedModels(provider) {
21250
+ return this.#providers[provider].models.map((model) => model.name);
21251
+ }
21252
+ getDefaultModelForProvider(provider) {
21253
+ const models = this.#providers[provider].models;
21254
+ const explicit = models.find((model) => model.default)?.name;
21255
+ if (explicit) return explicit;
21256
+ if (models.length === 0) return null;
21257
+ return [...models].sort((left, right) => left.name.localeCompare(right.name))[0]?.name ?? null;
21258
+ }
21259
+ getMaxInputTokensForModel(provider, model, logger) {
21260
+ const modelInfo = findModelInfoInRegistry(this.#providers, provider, model);
21261
+ if (!modelInfo) {
21262
+ const supportedModels = this.getSupportedModels(provider).join(", ");
21263
+ logger?.error(
21264
+ `Model '${model}' not found for provider '${provider}' in LLM registry. Supported models: ${supportedModels}`
21265
+ );
21266
+ throw unknownModel(provider, model);
21267
+ }
21268
+ logger?.debug(`Found max tokens for ${provider}/${model}: ${modelInfo.maxInputTokens}`);
21269
+ return modelInfo.maxInputTokens;
21270
+ }
21271
+ getModelPricing(provider, model) {
21272
+ if (this.acceptsAnyModel(provider)) return void 0;
21273
+ const modelInfo = findModelInfoInRegistry(this.#providers, provider, model);
21274
+ return modelInfo?.pricing ? cloneModelInfo(modelInfo).pricing : void 0;
21275
+ }
21276
+ isReasoningCapableModel(model, provider) {
21277
+ const registryProvider = (() => {
21278
+ if (model.includes("/")) return "openrouter";
21279
+ if (provider) return provider;
21280
+ try {
21281
+ return this.getProviderFromModel(model);
21282
+ } catch {
21283
+ return void 0;
21284
+ }
21285
+ })();
21286
+ if (registryProvider) {
21287
+ const modelInfo = findModelInfoInRegistry(this.#providers, registryProvider, model);
21288
+ if (modelInfo?.reasoning === true) return true;
21289
+ if (modelInfo?.reasoning === false) return false;
21290
+ }
21291
+ const modelIdForHeuristics = model.includes("/") ? model.split("/").pop() ?? model : model;
21292
+ const modelLower = modelIdForHeuristics.toLowerCase();
21293
+ if (modelLower.includes("codex")) return true;
21294
+ if (modelLower.startsWith("o1") || modelLower.startsWith("o3") || modelLower.startsWith("o4")) {
21295
+ return true;
21296
+ }
21297
+ if (modelLower.includes("gpt-5")) return true;
21298
+ if (modelLower.includes("gemini-2.5") || modelLower.includes("gemini-3")) return true;
21299
+ return false;
21300
+ }
21301
+ getProviderFromModel(model) {
21302
+ if (model.includes("/")) throw modelProviderUnknown(model);
21303
+ const normalizedModel = getNormalizedModelIdForLookup(model);
21304
+ for (const provider of LLM_PROVIDERS) {
21305
+ const info = this.#providers[provider];
21306
+ if (info.models.some((candidate) => candidate.name.toLowerCase() === normalizedModel)) {
21307
+ return provider;
21308
+ }
21309
+ }
21310
+ throw modelProviderUnknown(model);
21311
+ }
21312
+ acceptsAnyModel(provider) {
21313
+ return this.#providers[provider].models.length === 0;
21314
+ }
21315
+ supportsCustomModels(provider) {
21316
+ return this.#providers[provider].supportsCustomModels === true;
21317
+ }
21318
+ hasAllRegistryModelsSupport(provider) {
21319
+ return this.#providers[provider].supportsAllRegistryModels === true;
21320
+ }
21321
+ supportsBaseURL(provider) {
21322
+ return this.#providers[provider].baseURLSupport !== "none";
21323
+ }
21324
+ isValidProviderModel(provider, model) {
21325
+ const normalizedModel = getNormalizedModelIdForLookup(model);
21326
+ return this.#providers[provider].models.some(
21327
+ (candidate) => candidate.name.toLowerCase() === normalizedModel
21328
+ );
21329
+ }
21330
+ getSupportedFileTypesForModel(provider, model) {
21331
+ const providerInfo = this.#providers[provider];
21332
+ if (this.acceptsAnyModel(provider)) return [...providerInfo.supportedFileTypes];
21333
+ const modelInfo = findModelInfoInRegistry(this.#providers, provider, model);
21334
+ if (modelInfo) return [...modelInfo.supportedFileTypes];
21335
+ if (this.supportsCustomModels(provider)) return [...providerInfo.supportedFileTypes];
21336
+ throw unknownModel(provider, model);
21337
+ }
21338
+ getAllModelsForProvider(provider) {
21339
+ const providerInfo = this.#providers[provider];
21340
+ const ownModels = providerInfo.models.map((model) => ({
21341
+ ...cloneModelInfo(model),
21342
+ originalProvider: provider
21343
+ }));
21344
+ if (!providerInfo.supportsAllRegistryModels || provider === "openrouter") {
21345
+ return ownModels;
21346
+ }
21347
+ const seen = new Set(ownModels.map((model) => model.name.toLowerCase()));
21348
+ const inherited = this.#providers.openrouter.models.filter((model) => !seen.has(model.name.toLowerCase())).map((model) => ({
21349
+ ...cloneModelInfo(model),
21350
+ originalProvider: "openrouter"
21351
+ }));
21352
+ return [...ownModels, ...inherited];
21353
+ }
21354
+ };
21355
+ function createModelRegistry(providers) {
21356
+ return new ModelRegistry(providers);
21357
+ }
21358
+ var DEFAULT_MODEL_REGISTRY = createModelRegistry(LLM_REGISTRY);
21359
+ function cloneRegistryProviders(providers) {
21360
+ const cloned = { ...providers };
21361
+ for (const provider of LLM_PROVIDERS) {
21362
+ cloned[provider] = cloneProviderInfo(providers[provider]);
21363
+ }
21364
+ return cloned;
21365
+ }
21366
+ function validateRegistryProviders(providers) {
21367
+ for (const provider of LLM_PROVIDERS) {
21368
+ const providerInfo = providers[provider];
21369
+ if (!isRecord(providerInfo) || !Array.isArray(providerInfo.models) || !["none", "optional", "required"].includes(providerInfo.baseURLSupport) || !Array.isArray(providerInfo.supportedFileTypes) || !providerInfo.supportedFileTypes.every(isSupportedFileType)) {
21370
+ throw new LlmCatalogError(
21371
+ "REGISTRY_INVALID",
21372
+ `Invalid registry provider definition for '${provider}'`
21373
+ );
21374
+ }
21375
+ if (providerInfo.supportsCustomModels !== void 0 && typeof providerInfo.supportsCustomModels !== "boolean" || providerInfo.supportsAllRegistryModels !== void 0 && typeof providerInfo.supportsAllRegistryModels !== "boolean" || providerInfo.modelsDev !== void 0 && !isValidModelsDevMetadata(providerInfo.modelsDev)) {
21376
+ throw new LlmCatalogError(
21377
+ "REGISTRY_INVALID",
21378
+ `Invalid registry provider metadata for '${provider}'`
21379
+ );
21380
+ }
21381
+ const modelNames = /* @__PURE__ */ new Set();
21382
+ for (const [modelIndex, model] of providerInfo.models.entries()) {
21383
+ const modelObject = isRecord(model) ? model : null;
21384
+ const modelName = modelObject && typeof modelObject.name === "string" ? modelObject.name : `<index ${modelIndex}>`;
21385
+ if (!modelObject || typeof modelObject.name !== "string" || modelObject.name.trim().length === 0 || !Number.isInteger(modelObject.maxInputTokens) || modelObject.maxInputTokens < 0 || !Array.isArray(modelObject.supportedFileTypes) || !modelObject.supportedFileTypes.every(isSupportedFileType)) {
21386
+ throw new LlmCatalogError(
21387
+ "REGISTRY_INVALID",
21388
+ `Invalid registry model definition for '${provider}/${modelName}'`
21389
+ );
21390
+ }
21391
+ const normalizedModelName = modelObject.name.toLowerCase();
21392
+ if (modelNames.has(normalizedModelName)) {
21393
+ throw new LlmCatalogError(
21394
+ "REGISTRY_INVALID",
21395
+ `Duplicate registry model definition for '${provider}/${modelObject.name}'`
21396
+ );
21397
+ }
21398
+ modelNames.add(normalizedModelName);
21399
+ if (!isValidModelMetadata(modelObject)) {
21400
+ throw new LlmCatalogError(
21401
+ "REGISTRY_INVALID",
21402
+ `Invalid registry metadata for '${provider}/${modelObject.name}'`
21403
+ );
21404
+ }
21405
+ if (!isValidModelPricing(modelObject.pricing)) {
21406
+ throw new LlmCatalogError(
21407
+ "REGISTRY_INVALID",
21408
+ `Invalid registry pricing for '${provider}/${modelName}'`
21409
+ );
21410
+ }
21411
+ }
21412
+ }
21413
+ }
21414
+ function isSupportedFileType(value) {
21415
+ return typeof value === "string" && SUPPORTED_FILE_TYPES.some((supportedFileType) => supportedFileType === value);
21416
+ }
21417
+ function isRecord(value) {
21418
+ return typeof value === "object" && value !== null;
21419
+ }
21420
+ function isValidPricingNumber(value) {
21421
+ return typeof value === "number" && Number.isFinite(value) && value >= 0;
21422
+ }
21423
+ function isValidModelsDevMetadata(value) {
21424
+ if (!isRecord(value) || !Array.isArray(value.env) || !value.env.every(isString)) {
21425
+ return false;
21426
+ }
21427
+ return ["npm", "api", "doc"].every(
21428
+ (field) => value[field] === void 0 || isString(value[field])
21429
+ );
21430
+ }
21431
+ function isValidModelMetadata(value) {
21432
+ if (!MODEL_BOOLEAN_FIELDS.every(
21433
+ (field) => value[field] === void 0 || typeof value[field] === "boolean"
21434
+ ) || !MODEL_STRING_FIELDS.every((field) => value[field] === void 0 || isString(value[field]))) {
21435
+ return false;
21436
+ }
21437
+ if (value.modalities !== void 0 && !isValidModelModalities(value.modalities)) {
21438
+ return false;
21439
+ }
21440
+ if (value.providerMetadata !== void 0 && !isValidProviderMetadata(value.providerMetadata)) {
21441
+ return false;
21442
+ }
21443
+ if (value.interleaved !== void 0 && !isValidInterleavedMetadata(value.interleaved)) {
21444
+ return false;
21445
+ }
21446
+ return true;
21447
+ }
21448
+ function isValidModelModalities(value) {
21449
+ if (!isRecord(value) || !Array.isArray(value.input) || !Array.isArray(value.output)) {
21450
+ return false;
21451
+ }
21452
+ return value.input.every(isSupportedModelModality) && value.output.every(isSupportedModelModality);
21453
+ }
21454
+ function isValidProviderMetadata(value) {
21455
+ return isRecord(value) && ["npm", "api"].every((field) => value[field] === void 0 || isString(value[field]));
21456
+ }
21457
+ function isValidInterleavedMetadata(value) {
21458
+ return value === true || isRecord(value) && (value.field === void 0 || isString(value.field));
21459
+ }
21460
+ function isSupportedModelModality(value) {
21461
+ return typeof value === "string" && MODEL_MODALITIES.some((modality) => modality === value);
21462
+ }
21463
+ function isString(value) {
21464
+ return typeof value === "string";
21465
+ }
21466
+ function isValidModelPricing(value) {
21467
+ if (value === void 0) return true;
21468
+ if (!isRecord(value)) return false;
21469
+ if (value.currency !== void 0 && value.currency !== "USD") return false;
21470
+ if (value.unit !== void 0 && value.unit !== "per_million_tokens") return false;
21471
+ for (const field of MODEL_PRICING_FIELDS) {
21472
+ if (field in value && !isValidPricingNumber(value[field])) return false;
21473
+ }
21474
+ if (!isValidPricingNumber(value.inputPerM) || !isValidPricingNumber(value.outputPerM)) {
21475
+ return false;
21476
+ }
21477
+ const longContextPricing = value.contextOver200kPerM;
21478
+ if (longContextPricing === void 0) return true;
21479
+ if (!isRecord(longContextPricing)) return false;
21480
+ const inputTokensAbove = longContextPricing.inputTokensAbove;
21481
+ if (inputTokensAbove !== void 0 && (typeof inputTokensAbove !== "number" || !Number.isInteger(inputTokensAbove) || inputTokensAbove < 0)) {
21482
+ return false;
21483
+ }
21484
+ for (const field of LONG_CONTEXT_PRICING_FIELDS) {
21485
+ if (field in longContextPricing && !isValidPricingNumber(longContextPricing[field])) {
21486
+ return false;
21487
+ }
21488
+ }
21489
+ return isValidPricingNumber(longContextPricing.inputPerM) && isValidPricingNumber(longContextPricing.outputPerM);
21490
+ }
21491
+ function findModelInfoInRegistry(providers, provider, model) {
21492
+ const normalizedModel = getNormalizedModelIdForLookup(model);
21493
+ const direct = providers[provider].models.find(
21494
+ (candidate) => candidate.name.toLowerCase() === normalizedModel
21495
+ );
21496
+ if (direct) return direct;
21497
+ if (provider !== "openrouter" && providers[provider].supportsAllRegistryModels && model.includes("/")) {
21498
+ return providers.openrouter.models.find(
21499
+ (candidate) => candidate.name.toLowerCase() === normalizedModel
21500
+ ) ?? null;
21501
+ }
21502
+ return null;
21503
+ }
21180
21504
  function cloneModelInfo(model) {
21181
21505
  return {
21182
21506
  ...model,
@@ -21341,9 +21665,8 @@ function supportsCustomModels(provider) {
21341
21665
  const providerInfo = LLM_REGISTRY[provider];
21342
21666
  return providerInfo.supportsCustomModels === true;
21343
21667
  }
21344
- function hasAllRegistryModelsSupport(provider) {
21345
- const providerInfo = LLM_REGISTRY[provider];
21346
- return providerInfo.supportsAllRegistryModels === true;
21668
+ function hasAllRegistryModelsSupport(provider, registry = DEFAULT_MODEL_REGISTRY) {
21669
+ return registry.hasAllRegistryModelsSupport(provider);
21347
21670
  }
21348
21671
  var OPENROUTER_PREFIX_BY_PROVIDER = {
21349
21672
  openai: "openai",
@@ -21354,8 +21677,8 @@ var OPENROUTER_PREFIX_BY_PROVIDER = {
21354
21677
  minimax: "minimax",
21355
21678
  glm: "z-ai"
21356
21679
  };
21357
- function getOpenRouterModelIdSet() {
21358
- return new Set(LLM_REGISTRY.openrouter.models.map((m) => m.name.toLowerCase()));
21680
+ function getOpenRouterModelIdSet(registry) {
21681
+ return new Set(registry.getSupportedModels("openrouter").map((model) => model.toLowerCase()));
21359
21682
  }
21360
21683
  function getOpenRouterCandidateModelIds(model, originalProvider) {
21361
21684
  if (model.includes("/")) return [model];
@@ -21374,8 +21697,8 @@ function getOpenRouterCandidateModelIds(model, originalProvider) {
21374
21697
  }
21375
21698
  return [`${prefix}/${model}`];
21376
21699
  }
21377
- function pickExistingOpenRouterModelId(candidates) {
21378
- const openrouterSet = getOpenRouterModelIdSet();
21700
+ function pickExistingOpenRouterModelId(candidates, registry) {
21701
+ const openrouterSet = getOpenRouterModelIdSet(registry);
21379
21702
  for (const candidate of candidates) {
21380
21703
  if (openrouterSet.has(candidate.toLowerCase())) {
21381
21704
  return candidate;
@@ -21436,11 +21759,11 @@ function getAllModelsForProvider(provider) {
21436
21759
  }
21437
21760
  return allModels;
21438
21761
  }
21439
- function transformModelNameForProvider(model, originalProvider, targetProvider) {
21440
- if (!hasAllRegistryModelsSupport(targetProvider)) {
21762
+ function transformModelNameForProvider(model, originalProvider, targetProvider, registry = DEFAULT_MODEL_REGISTRY) {
21763
+ if (!hasAllRegistryModelsSupport(targetProvider, registry)) {
21441
21764
  return model;
21442
21765
  }
21443
- if (hasAllRegistryModelsSupport(originalProvider)) {
21766
+ if (hasAllRegistryModelsSupport(originalProvider, registry)) {
21444
21767
  return model;
21445
21768
  }
21446
21769
  if (model.includes("/")) {
@@ -21448,7 +21771,7 @@ function transformModelNameForProvider(model, originalProvider, targetProvider)
21448
21771
  }
21449
21772
  const candidates = getOpenRouterCandidateModelIds(model, originalProvider);
21450
21773
  if (candidates.length === 0) return model;
21451
- return pickExistingOpenRouterModelId(candidates) ?? candidates[0];
21774
+ return pickExistingOpenRouterModelId(candidates, registry) ?? candidates[0];
21452
21775
  }
21453
21776
  function isModelValidForProvider(provider, model) {
21454
21777
  const providerInfo = LLM_REGISTRY[provider];
@@ -21498,11 +21821,11 @@ function getSupportedFileTypesForModel(provider, model) {
21498
21821
  }
21499
21822
  throw unknownModel(provider, model);
21500
21823
  }
21501
- function modelSupportsFileType(provider, model, fileType) {
21502
- const supportedTypes = getSupportedFileTypesForModel(provider, model);
21824
+ function modelSupportsFileType(provider, model, fileType, registry = DEFAULT_MODEL_REGISTRY) {
21825
+ const supportedTypes = registry === DEFAULT_MODEL_REGISTRY ? getSupportedFileTypesForModel(provider, model) : registry.getSupportedFileTypesForModel(provider, model);
21503
21826
  return supportedTypes.includes(fileType);
21504
21827
  }
21505
- function validateModelFileSupport(provider, model, mimeType) {
21828
+ function validateModelFileSupport(provider, model, mimeType, registry = DEFAULT_MODEL_REGISTRY) {
21506
21829
  const baseMimeType = mimeType.toLowerCase().split(";")[0]?.trim() || mimeType.toLowerCase();
21507
21830
  const fileType = MIME_TYPE_TO_FILE_TYPE[baseMimeType];
21508
21831
  if (!fileType) {
@@ -21512,7 +21835,7 @@ function validateModelFileSupport(provider, model, mimeType) {
21512
21835
  };
21513
21836
  }
21514
21837
  try {
21515
- if (!modelSupportsFileType(provider, model, fileType)) {
21838
+ if (!modelSupportsFileType(provider, model, fileType, registry)) {
21516
21839
  return {
21517
21840
  isSupported: false,
21518
21841
  fileType,
@@ -21620,7 +21943,7 @@ function getModelPricing(provider, model) {
21620
21943
  return void 0;
21621
21944
  }
21622
21945
  const modelInfo = findModelInfo(provider, model);
21623
- return modelInfo?.pricing;
21946
+ return modelInfo?.pricing ? cloneModelInfo(modelInfo).pricing : void 0;
21624
21947
  }
21625
21948
  function getModelDisplayName(model, provider) {
21626
21949
  if (provider) {
@@ -21639,7 +21962,10 @@ function getModelDisplayName(model, provider) {
21639
21962
  return model;
21640
21963
  }
21641
21964
  }
21642
- function isReasoningCapableModel(model, provider) {
21965
+ function isReasoningCapableModel(model, provider, registry = DEFAULT_MODEL_REGISTRY) {
21966
+ if (registry !== DEFAULT_MODEL_REGISTRY) {
21967
+ return registry.isReasoningCapableModel(model, provider);
21968
+ }
21643
21969
  const registryProvider = (() => {
21644
21970
  if (model.includes("/")) return "openrouter";
21645
21971
  if (provider) return provider;
@@ -22164,38 +22490,38 @@ var GOOGLE_PROFILE_CONFIG = {
22164
22490
  supportsBudgetTokensForBudgetParadigm: true,
22165
22491
  supportsBudgetTokensForThinkingLevelParadigm: false
22166
22492
  };
22167
- function isAnthropicStyleReasoningCapable(provider, model) {
22168
- return isReasoningCapableModel(model, provider) || parseClaudeVersion(model) !== null || isAnthropicAdaptiveThinkingModel(model);
22493
+ function isAnthropicStyleReasoningCapable(provider, model, registry) {
22494
+ return registry.isReasoningCapableModel(model, provider) || parseClaudeVersion(model) !== null || isAnthropicAdaptiveThinkingModel(model);
22169
22495
  }
22170
- function getNativeReasoningProfile(provider, model) {
22496
+ function getNativeReasoningProfile(provider, model, registry) {
22171
22497
  switch (provider) {
22172
22498
  case "openai":
22173
- if (!isReasoningCapableModel(model, "openai")) {
22499
+ if (!registry.isReasoningCapableModel(model, "openai")) {
22174
22500
  return nonCapableProfile();
22175
22501
  }
22176
22502
  return buildOpenAIReasoningProfile(model);
22177
22503
  case "anthropic":
22178
- if (!isAnthropicStyleReasoningCapable("anthropic", model)) {
22504
+ if (!isAnthropicStyleReasoningCapable("anthropic", model, registry)) {
22179
22505
  return nonCapableProfile();
22180
22506
  }
22181
22507
  return buildAnthropicReasoningProfile({ model, ...ANTHROPIC_PROFILE_CONFIG });
22182
22508
  case "bedrock":
22183
- if (!isReasoningCapableModel(model, "bedrock") && !model.toLowerCase().includes("nova")) {
22509
+ if (!registry.isReasoningCapableModel(model, "bedrock") && !model.toLowerCase().includes("nova")) {
22184
22510
  return nonCapableProfile();
22185
22511
  }
22186
22512
  return buildBedrockReasoningProfile(model);
22187
22513
  case "google":
22188
- if (!isReasoningCapableModel(model, "google")) {
22514
+ if (!registry.isReasoningCapableModel(model, "google")) {
22189
22515
  return nonCapableProfile();
22190
22516
  }
22191
22517
  return buildGoogleReasoningProfile({ model, ...GOOGLE_PROFILE_CONFIG });
22192
22518
  case "vertex":
22193
- if (!isAnthropicStyleReasoningCapable("vertex", model)) {
22519
+ if (!isAnthropicStyleReasoningCapable("vertex", model, registry)) {
22194
22520
  return nonCapableProfile();
22195
22521
  }
22196
22522
  return buildVertexReasoningProfile(model);
22197
22523
  case "openai-compatible":
22198
- if (!isReasoningCapableModel(model, "openai-compatible")) {
22524
+ if (!registry.isReasoningCapableModel(model, "openai-compatible")) {
22199
22525
  return nonCapableProfile();
22200
22526
  }
22201
22527
  return buildOpenAICompatibleReasoningProfile();
@@ -22220,16 +22546,20 @@ function toGatewayReasoningProfile(nativeProfile) {
22220
22546
  ...defaultVariant !== void 0 && { defaultVariant }
22221
22547
  };
22222
22548
  }
22223
- function getReasoningProfile(provider, model) {
22549
+ function getReasoningProfile(provider, model, registry = DEFAULT_MODEL_REGISTRY) {
22224
22550
  if (isOpenRouterGatewayProvider(provider)) {
22225
22551
  const target = getOpenRouterReasoningTarget(model);
22226
22552
  if (!target) {
22227
22553
  return nonCapableProfile();
22228
22554
  }
22229
- const nativeProfile = getNativeReasoningProfile(target.upstreamProvider, target.modelId);
22555
+ const nativeProfile = getNativeReasoningProfile(
22556
+ target.upstreamProvider,
22557
+ target.modelId,
22558
+ registry
22559
+ );
22230
22560
  return toGatewayReasoningProfile(nativeProfile);
22231
22561
  }
22232
- return getNativeReasoningProfile(provider, model);
22562
+ return getNativeReasoningProfile(provider, model, registry);
22233
22563
  }
22234
22564
  function supportsReasoningVariant(profile, variant) {
22235
22565
  return profile.variants.some((entry) => entry.id === variant);
@@ -22239,17 +22569,20 @@ function supportsReasoningVariant(profile, variant) {
22239
22569
  ANTHROPIC_BETA_HEADER,
22240
22570
  ANTHROPIC_INTERLEAVED_THINKING_BETA,
22241
22571
  DEFAULT_MAX_INPUT_TOKENS,
22572
+ DEFAULT_MODEL_REGISTRY,
22242
22573
  LLM_PRICING_STATUSES,
22243
22574
  LLM_PROVIDERS,
22244
22575
  LLM_REGISTRY,
22245
22576
  LlmCatalogError,
22246
22577
  MIME_TYPE_TO_FILE_TYPE,
22578
+ ModelRegistry,
22247
22579
  SUPPORTED_FILE_TYPES,
22248
22580
  acceptsAnyModel,
22249
22581
  buildGoogleReasoningProfile,
22250
22582
  calculateCost,
22251
22583
  calculateCostBreakdown,
22252
22584
  coerceOpenAIReasoningEffort,
22585
+ createModelRegistry,
22253
22586
  getAllModelsForProvider,
22254
22587
  getAllSupportedModels,
22255
22588
  getAllowedMimeTypes,
package/dist/index.js CHANGED
@@ -20865,6 +20865,31 @@ function unknownModel(provider, model) {
20865
20865
  function modelProviderUnknown(model) {
20866
20866
  return new LlmCatalogError("MODEL_UNKNOWN", `Could not infer provider for model '${model}'`);
20867
20867
  }
20868
+ var MODEL_PRICING_FIELDS = [
20869
+ "inputPerM",
20870
+ "outputPerM",
20871
+ "cacheReadPerM",
20872
+ "cacheWritePerM",
20873
+ "reasoningPerM",
20874
+ "inputAudioPerM",
20875
+ "outputAudioPerM"
20876
+ ];
20877
+ var LONG_CONTEXT_PRICING_FIELDS = [
20878
+ "inputTokensAbove",
20879
+ "inputPerM",
20880
+ "outputPerM",
20881
+ "cacheReadPerM",
20882
+ "cacheWritePerM"
20883
+ ];
20884
+ var MODEL_BOOLEAN_FIELDS = [
20885
+ "default",
20886
+ "reasoning",
20887
+ "supportsTemperature",
20888
+ "supportsInterleaved",
20889
+ "supportsToolCall"
20890
+ ];
20891
+ var MODEL_STRING_FIELDS = ["displayName", "releaseDate", "status"];
20892
+ var MODEL_MODALITIES = ["text", "audio", "image", "video", "pdf"];
20868
20893
  function getNormalizedModelIdForLookup(model) {
20869
20894
  const stripped = stripBedrockRegionPrefix(model);
20870
20895
  return stripped.toLowerCase();
@@ -21092,6 +21117,302 @@ var LLM_REGISTRY = {
21092
21117
  supportsAllRegistryModels: true
21093
21118
  }
21094
21119
  };
21120
+ var ModelRegistry = class {
21121
+ #providers;
21122
+ constructor(providers) {
21123
+ validateRegistryProviders(providers);
21124
+ this.#providers = cloneRegistryProviders(providers);
21125
+ }
21126
+ /**
21127
+ * Replaces the active provider snapshot after validating and cloning it.
21128
+ *
21129
+ * Hosts that refresh the bundled registry can update the shared default instance without
21130
+ * exposing mutable provider records to consumers that already hold a ModelRegistry reference.
21131
+ */
21132
+ replaceProviders(providers) {
21133
+ validateRegistryProviders(providers);
21134
+ this.#providers = cloneRegistryProviders(providers);
21135
+ }
21136
+ getProvider(provider) {
21137
+ return cloneProviderInfo(this.#providers[provider]);
21138
+ }
21139
+ getModel(provider, model) {
21140
+ const modelInfo = findModelInfoInRegistry(this.#providers, provider, model);
21141
+ return modelInfo === null ? null : cloneModelInfo(modelInfo);
21142
+ }
21143
+ getModelCapabilities(provider, model) {
21144
+ const modelInfo = this.getModel(provider, model);
21145
+ if (modelInfo === null) return null;
21146
+ return {
21147
+ maxInputTokens: modelInfo.maxInputTokens,
21148
+ reasoning: modelInfo.reasoning === true,
21149
+ supportedFileTypes: [...modelInfo.supportedFileTypes],
21150
+ supportsInterleaved: modelInfo.supportsInterleaved === true,
21151
+ supportsTemperature: modelInfo.supportsTemperature === true,
21152
+ supportsToolCall: modelInfo.supportsToolCall === true,
21153
+ ...modelInfo.modalities ? {
21154
+ modalities: {
21155
+ input: [...modelInfo.modalities.input],
21156
+ output: [...modelInfo.modalities.output]
21157
+ }
21158
+ } : {}
21159
+ };
21160
+ }
21161
+ getSupportedModels(provider) {
21162
+ return this.#providers[provider].models.map((model) => model.name);
21163
+ }
21164
+ getDefaultModelForProvider(provider) {
21165
+ const models = this.#providers[provider].models;
21166
+ const explicit = models.find((model) => model.default)?.name;
21167
+ if (explicit) return explicit;
21168
+ if (models.length === 0) return null;
21169
+ return [...models].sort((left, right) => left.name.localeCompare(right.name))[0]?.name ?? null;
21170
+ }
21171
+ getMaxInputTokensForModel(provider, model, logger) {
21172
+ const modelInfo = findModelInfoInRegistry(this.#providers, provider, model);
21173
+ if (!modelInfo) {
21174
+ const supportedModels = this.getSupportedModels(provider).join(", ");
21175
+ logger?.error(
21176
+ `Model '${model}' not found for provider '${provider}' in LLM registry. Supported models: ${supportedModels}`
21177
+ );
21178
+ throw unknownModel(provider, model);
21179
+ }
21180
+ logger?.debug(`Found max tokens for ${provider}/${model}: ${modelInfo.maxInputTokens}`);
21181
+ return modelInfo.maxInputTokens;
21182
+ }
21183
+ getModelPricing(provider, model) {
21184
+ if (this.acceptsAnyModel(provider)) return void 0;
21185
+ const modelInfo = findModelInfoInRegistry(this.#providers, provider, model);
21186
+ return modelInfo?.pricing ? cloneModelInfo(modelInfo).pricing : void 0;
21187
+ }
21188
+ isReasoningCapableModel(model, provider) {
21189
+ const registryProvider = (() => {
21190
+ if (model.includes("/")) return "openrouter";
21191
+ if (provider) return provider;
21192
+ try {
21193
+ return this.getProviderFromModel(model);
21194
+ } catch {
21195
+ return void 0;
21196
+ }
21197
+ })();
21198
+ if (registryProvider) {
21199
+ const modelInfo = findModelInfoInRegistry(this.#providers, registryProvider, model);
21200
+ if (modelInfo?.reasoning === true) return true;
21201
+ if (modelInfo?.reasoning === false) return false;
21202
+ }
21203
+ const modelIdForHeuristics = model.includes("/") ? model.split("/").pop() ?? model : model;
21204
+ const modelLower = modelIdForHeuristics.toLowerCase();
21205
+ if (modelLower.includes("codex")) return true;
21206
+ if (modelLower.startsWith("o1") || modelLower.startsWith("o3") || modelLower.startsWith("o4")) {
21207
+ return true;
21208
+ }
21209
+ if (modelLower.includes("gpt-5")) return true;
21210
+ if (modelLower.includes("gemini-2.5") || modelLower.includes("gemini-3")) return true;
21211
+ return false;
21212
+ }
21213
+ getProviderFromModel(model) {
21214
+ if (model.includes("/")) throw modelProviderUnknown(model);
21215
+ const normalizedModel = getNormalizedModelIdForLookup(model);
21216
+ for (const provider of LLM_PROVIDERS) {
21217
+ const info = this.#providers[provider];
21218
+ if (info.models.some((candidate) => candidate.name.toLowerCase() === normalizedModel)) {
21219
+ return provider;
21220
+ }
21221
+ }
21222
+ throw modelProviderUnknown(model);
21223
+ }
21224
+ acceptsAnyModel(provider) {
21225
+ return this.#providers[provider].models.length === 0;
21226
+ }
21227
+ supportsCustomModels(provider) {
21228
+ return this.#providers[provider].supportsCustomModels === true;
21229
+ }
21230
+ hasAllRegistryModelsSupport(provider) {
21231
+ return this.#providers[provider].supportsAllRegistryModels === true;
21232
+ }
21233
+ supportsBaseURL(provider) {
21234
+ return this.#providers[provider].baseURLSupport !== "none";
21235
+ }
21236
+ isValidProviderModel(provider, model) {
21237
+ const normalizedModel = getNormalizedModelIdForLookup(model);
21238
+ return this.#providers[provider].models.some(
21239
+ (candidate) => candidate.name.toLowerCase() === normalizedModel
21240
+ );
21241
+ }
21242
+ getSupportedFileTypesForModel(provider, model) {
21243
+ const providerInfo = this.#providers[provider];
21244
+ if (this.acceptsAnyModel(provider)) return [...providerInfo.supportedFileTypes];
21245
+ const modelInfo = findModelInfoInRegistry(this.#providers, provider, model);
21246
+ if (modelInfo) return [...modelInfo.supportedFileTypes];
21247
+ if (this.supportsCustomModels(provider)) return [...providerInfo.supportedFileTypes];
21248
+ throw unknownModel(provider, model);
21249
+ }
21250
+ getAllModelsForProvider(provider) {
21251
+ const providerInfo = this.#providers[provider];
21252
+ const ownModels = providerInfo.models.map((model) => ({
21253
+ ...cloneModelInfo(model),
21254
+ originalProvider: provider
21255
+ }));
21256
+ if (!providerInfo.supportsAllRegistryModels || provider === "openrouter") {
21257
+ return ownModels;
21258
+ }
21259
+ const seen = new Set(ownModels.map((model) => model.name.toLowerCase()));
21260
+ const inherited = this.#providers.openrouter.models.filter((model) => !seen.has(model.name.toLowerCase())).map((model) => ({
21261
+ ...cloneModelInfo(model),
21262
+ originalProvider: "openrouter"
21263
+ }));
21264
+ return [...ownModels, ...inherited];
21265
+ }
21266
+ };
21267
+ function createModelRegistry(providers) {
21268
+ return new ModelRegistry(providers);
21269
+ }
21270
+ var DEFAULT_MODEL_REGISTRY = createModelRegistry(LLM_REGISTRY);
21271
+ function cloneRegistryProviders(providers) {
21272
+ const cloned = { ...providers };
21273
+ for (const provider of LLM_PROVIDERS) {
21274
+ cloned[provider] = cloneProviderInfo(providers[provider]);
21275
+ }
21276
+ return cloned;
21277
+ }
21278
+ function validateRegistryProviders(providers) {
21279
+ for (const provider of LLM_PROVIDERS) {
21280
+ const providerInfo = providers[provider];
21281
+ if (!isRecord(providerInfo) || !Array.isArray(providerInfo.models) || !["none", "optional", "required"].includes(providerInfo.baseURLSupport) || !Array.isArray(providerInfo.supportedFileTypes) || !providerInfo.supportedFileTypes.every(isSupportedFileType)) {
21282
+ throw new LlmCatalogError(
21283
+ "REGISTRY_INVALID",
21284
+ `Invalid registry provider definition for '${provider}'`
21285
+ );
21286
+ }
21287
+ if (providerInfo.supportsCustomModels !== void 0 && typeof providerInfo.supportsCustomModels !== "boolean" || providerInfo.supportsAllRegistryModels !== void 0 && typeof providerInfo.supportsAllRegistryModels !== "boolean" || providerInfo.modelsDev !== void 0 && !isValidModelsDevMetadata(providerInfo.modelsDev)) {
21288
+ throw new LlmCatalogError(
21289
+ "REGISTRY_INVALID",
21290
+ `Invalid registry provider metadata for '${provider}'`
21291
+ );
21292
+ }
21293
+ const modelNames = /* @__PURE__ */ new Set();
21294
+ for (const [modelIndex, model] of providerInfo.models.entries()) {
21295
+ const modelObject = isRecord(model) ? model : null;
21296
+ const modelName = modelObject && typeof modelObject.name === "string" ? modelObject.name : `<index ${modelIndex}>`;
21297
+ if (!modelObject || typeof modelObject.name !== "string" || modelObject.name.trim().length === 0 || !Number.isInteger(modelObject.maxInputTokens) || modelObject.maxInputTokens < 0 || !Array.isArray(modelObject.supportedFileTypes) || !modelObject.supportedFileTypes.every(isSupportedFileType)) {
21298
+ throw new LlmCatalogError(
21299
+ "REGISTRY_INVALID",
21300
+ `Invalid registry model definition for '${provider}/${modelName}'`
21301
+ );
21302
+ }
21303
+ const normalizedModelName = modelObject.name.toLowerCase();
21304
+ if (modelNames.has(normalizedModelName)) {
21305
+ throw new LlmCatalogError(
21306
+ "REGISTRY_INVALID",
21307
+ `Duplicate registry model definition for '${provider}/${modelObject.name}'`
21308
+ );
21309
+ }
21310
+ modelNames.add(normalizedModelName);
21311
+ if (!isValidModelMetadata(modelObject)) {
21312
+ throw new LlmCatalogError(
21313
+ "REGISTRY_INVALID",
21314
+ `Invalid registry metadata for '${provider}/${modelObject.name}'`
21315
+ );
21316
+ }
21317
+ if (!isValidModelPricing(modelObject.pricing)) {
21318
+ throw new LlmCatalogError(
21319
+ "REGISTRY_INVALID",
21320
+ `Invalid registry pricing for '${provider}/${modelName}'`
21321
+ );
21322
+ }
21323
+ }
21324
+ }
21325
+ }
21326
+ function isSupportedFileType(value) {
21327
+ return typeof value === "string" && SUPPORTED_FILE_TYPES.some((supportedFileType) => supportedFileType === value);
21328
+ }
21329
+ function isRecord(value) {
21330
+ return typeof value === "object" && value !== null;
21331
+ }
21332
+ function isValidPricingNumber(value) {
21333
+ return typeof value === "number" && Number.isFinite(value) && value >= 0;
21334
+ }
21335
+ function isValidModelsDevMetadata(value) {
21336
+ if (!isRecord(value) || !Array.isArray(value.env) || !value.env.every(isString)) {
21337
+ return false;
21338
+ }
21339
+ return ["npm", "api", "doc"].every(
21340
+ (field) => value[field] === void 0 || isString(value[field])
21341
+ );
21342
+ }
21343
+ function isValidModelMetadata(value) {
21344
+ if (!MODEL_BOOLEAN_FIELDS.every(
21345
+ (field) => value[field] === void 0 || typeof value[field] === "boolean"
21346
+ ) || !MODEL_STRING_FIELDS.every((field) => value[field] === void 0 || isString(value[field]))) {
21347
+ return false;
21348
+ }
21349
+ if (value.modalities !== void 0 && !isValidModelModalities(value.modalities)) {
21350
+ return false;
21351
+ }
21352
+ if (value.providerMetadata !== void 0 && !isValidProviderMetadata(value.providerMetadata)) {
21353
+ return false;
21354
+ }
21355
+ if (value.interleaved !== void 0 && !isValidInterleavedMetadata(value.interleaved)) {
21356
+ return false;
21357
+ }
21358
+ return true;
21359
+ }
21360
+ function isValidModelModalities(value) {
21361
+ if (!isRecord(value) || !Array.isArray(value.input) || !Array.isArray(value.output)) {
21362
+ return false;
21363
+ }
21364
+ return value.input.every(isSupportedModelModality) && value.output.every(isSupportedModelModality);
21365
+ }
21366
+ function isValidProviderMetadata(value) {
21367
+ return isRecord(value) && ["npm", "api"].every((field) => value[field] === void 0 || isString(value[field]));
21368
+ }
21369
+ function isValidInterleavedMetadata(value) {
21370
+ return value === true || isRecord(value) && (value.field === void 0 || isString(value.field));
21371
+ }
21372
+ function isSupportedModelModality(value) {
21373
+ return typeof value === "string" && MODEL_MODALITIES.some((modality) => modality === value);
21374
+ }
21375
+ function isString(value) {
21376
+ return typeof value === "string";
21377
+ }
21378
+ function isValidModelPricing(value) {
21379
+ if (value === void 0) return true;
21380
+ if (!isRecord(value)) return false;
21381
+ if (value.currency !== void 0 && value.currency !== "USD") return false;
21382
+ if (value.unit !== void 0 && value.unit !== "per_million_tokens") return false;
21383
+ for (const field of MODEL_PRICING_FIELDS) {
21384
+ if (field in value && !isValidPricingNumber(value[field])) return false;
21385
+ }
21386
+ if (!isValidPricingNumber(value.inputPerM) || !isValidPricingNumber(value.outputPerM)) {
21387
+ return false;
21388
+ }
21389
+ const longContextPricing = value.contextOver200kPerM;
21390
+ if (longContextPricing === void 0) return true;
21391
+ if (!isRecord(longContextPricing)) return false;
21392
+ const inputTokensAbove = longContextPricing.inputTokensAbove;
21393
+ if (inputTokensAbove !== void 0 && (typeof inputTokensAbove !== "number" || !Number.isInteger(inputTokensAbove) || inputTokensAbove < 0)) {
21394
+ return false;
21395
+ }
21396
+ for (const field of LONG_CONTEXT_PRICING_FIELDS) {
21397
+ if (field in longContextPricing && !isValidPricingNumber(longContextPricing[field])) {
21398
+ return false;
21399
+ }
21400
+ }
21401
+ return isValidPricingNumber(longContextPricing.inputPerM) && isValidPricingNumber(longContextPricing.outputPerM);
21402
+ }
21403
+ function findModelInfoInRegistry(providers, provider, model) {
21404
+ const normalizedModel = getNormalizedModelIdForLookup(model);
21405
+ const direct = providers[provider].models.find(
21406
+ (candidate) => candidate.name.toLowerCase() === normalizedModel
21407
+ );
21408
+ if (direct) return direct;
21409
+ if (provider !== "openrouter" && providers[provider].supportsAllRegistryModels && model.includes("/")) {
21410
+ return providers.openrouter.models.find(
21411
+ (candidate) => candidate.name.toLowerCase() === normalizedModel
21412
+ ) ?? null;
21413
+ }
21414
+ return null;
21415
+ }
21095
21416
  function cloneModelInfo(model) {
21096
21417
  return {
21097
21418
  ...model,
@@ -21256,9 +21577,8 @@ function supportsCustomModels(provider) {
21256
21577
  const providerInfo = LLM_REGISTRY[provider];
21257
21578
  return providerInfo.supportsCustomModels === true;
21258
21579
  }
21259
- function hasAllRegistryModelsSupport(provider) {
21260
- const providerInfo = LLM_REGISTRY[provider];
21261
- return providerInfo.supportsAllRegistryModels === true;
21580
+ function hasAllRegistryModelsSupport(provider, registry = DEFAULT_MODEL_REGISTRY) {
21581
+ return registry.hasAllRegistryModelsSupport(provider);
21262
21582
  }
21263
21583
  var OPENROUTER_PREFIX_BY_PROVIDER = {
21264
21584
  openai: "openai",
@@ -21269,8 +21589,8 @@ var OPENROUTER_PREFIX_BY_PROVIDER = {
21269
21589
  minimax: "minimax",
21270
21590
  glm: "z-ai"
21271
21591
  };
21272
- function getOpenRouterModelIdSet() {
21273
- return new Set(LLM_REGISTRY.openrouter.models.map((m) => m.name.toLowerCase()));
21592
+ function getOpenRouterModelIdSet(registry) {
21593
+ return new Set(registry.getSupportedModels("openrouter").map((model) => model.toLowerCase()));
21274
21594
  }
21275
21595
  function getOpenRouterCandidateModelIds(model, originalProvider) {
21276
21596
  if (model.includes("/")) return [model];
@@ -21289,8 +21609,8 @@ function getOpenRouterCandidateModelIds(model, originalProvider) {
21289
21609
  }
21290
21610
  return [`${prefix}/${model}`];
21291
21611
  }
21292
- function pickExistingOpenRouterModelId(candidates) {
21293
- const openrouterSet = getOpenRouterModelIdSet();
21612
+ function pickExistingOpenRouterModelId(candidates, registry) {
21613
+ const openrouterSet = getOpenRouterModelIdSet(registry);
21294
21614
  for (const candidate of candidates) {
21295
21615
  if (openrouterSet.has(candidate.toLowerCase())) {
21296
21616
  return candidate;
@@ -21351,11 +21671,11 @@ function getAllModelsForProvider(provider) {
21351
21671
  }
21352
21672
  return allModels;
21353
21673
  }
21354
- function transformModelNameForProvider(model, originalProvider, targetProvider) {
21355
- if (!hasAllRegistryModelsSupport(targetProvider)) {
21674
+ function transformModelNameForProvider(model, originalProvider, targetProvider, registry = DEFAULT_MODEL_REGISTRY) {
21675
+ if (!hasAllRegistryModelsSupport(targetProvider, registry)) {
21356
21676
  return model;
21357
21677
  }
21358
- if (hasAllRegistryModelsSupport(originalProvider)) {
21678
+ if (hasAllRegistryModelsSupport(originalProvider, registry)) {
21359
21679
  return model;
21360
21680
  }
21361
21681
  if (model.includes("/")) {
@@ -21363,7 +21683,7 @@ function transformModelNameForProvider(model, originalProvider, targetProvider)
21363
21683
  }
21364
21684
  const candidates = getOpenRouterCandidateModelIds(model, originalProvider);
21365
21685
  if (candidates.length === 0) return model;
21366
- return pickExistingOpenRouterModelId(candidates) ?? candidates[0];
21686
+ return pickExistingOpenRouterModelId(candidates, registry) ?? candidates[0];
21367
21687
  }
21368
21688
  function isModelValidForProvider(provider, model) {
21369
21689
  const providerInfo = LLM_REGISTRY[provider];
@@ -21413,11 +21733,11 @@ function getSupportedFileTypesForModel(provider, model) {
21413
21733
  }
21414
21734
  throw unknownModel(provider, model);
21415
21735
  }
21416
- function modelSupportsFileType(provider, model, fileType) {
21417
- const supportedTypes = getSupportedFileTypesForModel(provider, model);
21736
+ function modelSupportsFileType(provider, model, fileType, registry = DEFAULT_MODEL_REGISTRY) {
21737
+ const supportedTypes = registry === DEFAULT_MODEL_REGISTRY ? getSupportedFileTypesForModel(provider, model) : registry.getSupportedFileTypesForModel(provider, model);
21418
21738
  return supportedTypes.includes(fileType);
21419
21739
  }
21420
- function validateModelFileSupport(provider, model, mimeType) {
21740
+ function validateModelFileSupport(provider, model, mimeType, registry = DEFAULT_MODEL_REGISTRY) {
21421
21741
  const baseMimeType = mimeType.toLowerCase().split(";")[0]?.trim() || mimeType.toLowerCase();
21422
21742
  const fileType = MIME_TYPE_TO_FILE_TYPE[baseMimeType];
21423
21743
  if (!fileType) {
@@ -21427,7 +21747,7 @@ function validateModelFileSupport(provider, model, mimeType) {
21427
21747
  };
21428
21748
  }
21429
21749
  try {
21430
- if (!modelSupportsFileType(provider, model, fileType)) {
21750
+ if (!modelSupportsFileType(provider, model, fileType, registry)) {
21431
21751
  return {
21432
21752
  isSupported: false,
21433
21753
  fileType,
@@ -21535,7 +21855,7 @@ function getModelPricing(provider, model) {
21535
21855
  return void 0;
21536
21856
  }
21537
21857
  const modelInfo = findModelInfo(provider, model);
21538
- return modelInfo?.pricing;
21858
+ return modelInfo?.pricing ? cloneModelInfo(modelInfo).pricing : void 0;
21539
21859
  }
21540
21860
  function getModelDisplayName(model, provider) {
21541
21861
  if (provider) {
@@ -21554,7 +21874,10 @@ function getModelDisplayName(model, provider) {
21554
21874
  return model;
21555
21875
  }
21556
21876
  }
21557
- function isReasoningCapableModel(model, provider) {
21877
+ function isReasoningCapableModel(model, provider, registry = DEFAULT_MODEL_REGISTRY) {
21878
+ if (registry !== DEFAULT_MODEL_REGISTRY) {
21879
+ return registry.isReasoningCapableModel(model, provider);
21880
+ }
21558
21881
  const registryProvider = (() => {
21559
21882
  if (model.includes("/")) return "openrouter";
21560
21883
  if (provider) return provider;
@@ -22079,38 +22402,38 @@ var GOOGLE_PROFILE_CONFIG = {
22079
22402
  supportsBudgetTokensForBudgetParadigm: true,
22080
22403
  supportsBudgetTokensForThinkingLevelParadigm: false
22081
22404
  };
22082
- function isAnthropicStyleReasoningCapable(provider, model) {
22083
- return isReasoningCapableModel(model, provider) || parseClaudeVersion(model) !== null || isAnthropicAdaptiveThinkingModel(model);
22405
+ function isAnthropicStyleReasoningCapable(provider, model, registry) {
22406
+ return registry.isReasoningCapableModel(model, provider) || parseClaudeVersion(model) !== null || isAnthropicAdaptiveThinkingModel(model);
22084
22407
  }
22085
- function getNativeReasoningProfile(provider, model) {
22408
+ function getNativeReasoningProfile(provider, model, registry) {
22086
22409
  switch (provider) {
22087
22410
  case "openai":
22088
- if (!isReasoningCapableModel(model, "openai")) {
22411
+ if (!registry.isReasoningCapableModel(model, "openai")) {
22089
22412
  return nonCapableProfile();
22090
22413
  }
22091
22414
  return buildOpenAIReasoningProfile(model);
22092
22415
  case "anthropic":
22093
- if (!isAnthropicStyleReasoningCapable("anthropic", model)) {
22416
+ if (!isAnthropicStyleReasoningCapable("anthropic", model, registry)) {
22094
22417
  return nonCapableProfile();
22095
22418
  }
22096
22419
  return buildAnthropicReasoningProfile({ model, ...ANTHROPIC_PROFILE_CONFIG });
22097
22420
  case "bedrock":
22098
- if (!isReasoningCapableModel(model, "bedrock") && !model.toLowerCase().includes("nova")) {
22421
+ if (!registry.isReasoningCapableModel(model, "bedrock") && !model.toLowerCase().includes("nova")) {
22099
22422
  return nonCapableProfile();
22100
22423
  }
22101
22424
  return buildBedrockReasoningProfile(model);
22102
22425
  case "google":
22103
- if (!isReasoningCapableModel(model, "google")) {
22426
+ if (!registry.isReasoningCapableModel(model, "google")) {
22104
22427
  return nonCapableProfile();
22105
22428
  }
22106
22429
  return buildGoogleReasoningProfile({ model, ...GOOGLE_PROFILE_CONFIG });
22107
22430
  case "vertex":
22108
- if (!isAnthropicStyleReasoningCapable("vertex", model)) {
22431
+ if (!isAnthropicStyleReasoningCapable("vertex", model, registry)) {
22109
22432
  return nonCapableProfile();
22110
22433
  }
22111
22434
  return buildVertexReasoningProfile(model);
22112
22435
  case "openai-compatible":
22113
- if (!isReasoningCapableModel(model, "openai-compatible")) {
22436
+ if (!registry.isReasoningCapableModel(model, "openai-compatible")) {
22114
22437
  return nonCapableProfile();
22115
22438
  }
22116
22439
  return buildOpenAICompatibleReasoningProfile();
@@ -22135,16 +22458,20 @@ function toGatewayReasoningProfile(nativeProfile) {
22135
22458
  ...defaultVariant !== void 0 && { defaultVariant }
22136
22459
  };
22137
22460
  }
22138
- function getReasoningProfile(provider, model) {
22461
+ function getReasoningProfile(provider, model, registry = DEFAULT_MODEL_REGISTRY) {
22139
22462
  if (isOpenRouterGatewayProvider(provider)) {
22140
22463
  const target = getOpenRouterReasoningTarget(model);
22141
22464
  if (!target) {
22142
22465
  return nonCapableProfile();
22143
22466
  }
22144
- const nativeProfile = getNativeReasoningProfile(target.upstreamProvider, target.modelId);
22467
+ const nativeProfile = getNativeReasoningProfile(
22468
+ target.upstreamProvider,
22469
+ target.modelId,
22470
+ registry
22471
+ );
22145
22472
  return toGatewayReasoningProfile(nativeProfile);
22146
22473
  }
22147
- return getNativeReasoningProfile(provider, model);
22474
+ return getNativeReasoningProfile(provider, model, registry);
22148
22475
  }
22149
22476
  function supportsReasoningVariant(profile, variant) {
22150
22477
  return profile.variants.some((entry) => entry.id === variant);
@@ -22153,17 +22480,20 @@ export {
22153
22480
  ANTHROPIC_BETA_HEADER,
22154
22481
  ANTHROPIC_INTERLEAVED_THINKING_BETA,
22155
22482
  DEFAULT_MAX_INPUT_TOKENS,
22483
+ DEFAULT_MODEL_REGISTRY,
22156
22484
  LLM_PRICING_STATUSES,
22157
22485
  LLM_PROVIDERS,
22158
22486
  LLM_REGISTRY,
22159
22487
  LlmCatalogError,
22160
22488
  MIME_TYPE_TO_FILE_TYPE,
22489
+ ModelRegistry,
22161
22490
  SUPPORTED_FILE_TYPES,
22162
22491
  acceptsAnyModel,
22163
22492
  buildGoogleReasoningProfile,
22164
22493
  calculateCost,
22165
22494
  calculateCostBreakdown,
22166
22495
  coerceOpenAIReasoningEffort,
22496
+ createModelRegistry,
22167
22497
  getAllModelsForProvider,
22168
22498
  getAllSupportedModels,
22169
22499
  getAllowedMimeTypes,
@@ -1,4 +1,5 @@
1
1
  import type { LLMProvider } from '../types.js';
2
+ import { type ModelRegistry } from '../registry/index.js';
2
3
  import { type ReasoningProfile } from './profiles/shared.js';
3
4
  export type { ReasoningParadigm, ReasoningProfile, ReasoningVariantOption, } from './profiles/shared.js';
4
5
  /**
@@ -8,6 +9,6 @@ export type { ReasoningParadigm, ReasoningProfile, ReasoningVariantOption, } fro
8
9
  * - No generic preset abstraction at this layer
9
10
  * - No guessed variants for unknown paradigms
10
11
  */
11
- export declare function getReasoningProfile(provider: LLMProvider, model: string): ReasoningProfile;
12
+ export declare function getReasoningProfile(provider: LLMProvider, model: string, registry?: ModelRegistry): ReasoningProfile;
12
13
  export declare function supportsReasoningVariant(profile: ReasoningProfile, variant: string): boolean;
13
14
  //# sourceMappingURL=profile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/reasoning/profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAa/C,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEhF,YAAY,EACR,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,GACzB,MAAM,sBAAsB,CAAC;AA6F9B;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAY1F;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAE5F"}
1
+ {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/reasoning/profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAYlF,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEhF,YAAY,EACR,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,GACzB,MAAM,sBAAsB,CAAC;AAkG9B;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAC/B,QAAQ,EAAE,WAAW,EACrB,KAAK,EAAE,MAAM,EACb,QAAQ,GAAE,aAAsC,GACjD,gBAAgB,CAgBlB;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAE5F"}
@@ -18,7 +18,7 @@ export interface LlmCatalogLogger {
18
18
  warn(message: string): void;
19
19
  error(message: string): void;
20
20
  }
21
- export type LlmCatalogErrorCode = 'MODEL_UNKNOWN';
21
+ export type LlmCatalogErrorCode = 'MODEL_UNKNOWN' | 'REGISTRY_INVALID';
22
22
  export declare class LlmCatalogError extends Error {
23
23
  readonly code: LlmCatalogErrorCode;
24
24
  constructor(code: LlmCatalogErrorCode, message: string);
@@ -146,6 +146,37 @@ interface EffectiveMaxInputTokensConfig {
146
146
  * - The web UI directly reflects these capabilities without fallback logic
147
147
  */
148
148
  export declare const LLM_REGISTRY: Record<LLMProvider, ProviderInfo>;
149
+ export declare class ModelRegistry {
150
+ #private;
151
+ constructor(providers: Record<LLMProvider, ProviderInfo>);
152
+ /**
153
+ * Replaces the active provider snapshot after validating and cloning it.
154
+ *
155
+ * Hosts that refresh the bundled registry can update the shared default instance without
156
+ * exposing mutable provider records to consumers that already hold a ModelRegistry reference.
157
+ */
158
+ replaceProviders(providers: Record<LLMProvider, ProviderInfo>): void;
159
+ getProvider(provider: LLMProvider): ProviderInfo;
160
+ getModel(provider: LLMProvider, model: string): ModelInfo | null;
161
+ getModelCapabilities(provider: LLMProvider, model: string): ModelCapabilities | null;
162
+ getSupportedModels(provider: LLMProvider): string[];
163
+ getDefaultModelForProvider(provider: LLMProvider): string | null;
164
+ getMaxInputTokensForModel(provider: LLMProvider, model: string, logger?: LlmCatalogLogger): number;
165
+ getModelPricing(provider: LLMProvider, model: string): ModelPricing | undefined;
166
+ isReasoningCapableModel(model: string, provider?: LLMProvider): boolean;
167
+ getProviderFromModel(model: string): LLMProvider;
168
+ acceptsAnyModel(provider: LLMProvider): boolean;
169
+ supportsCustomModels(provider: LLMProvider): boolean;
170
+ hasAllRegistryModelsSupport(provider: LLMProvider): boolean;
171
+ supportsBaseURL(provider: LLMProvider): boolean;
172
+ isValidProviderModel(provider: LLMProvider, model: string): boolean;
173
+ getSupportedFileTypesForModel(provider: LLMProvider, model: string): SupportedFileType[];
174
+ getAllModelsForProvider(provider: LLMProvider): Array<ModelInfo & {
175
+ originalProvider?: LLMProvider;
176
+ }>;
177
+ }
178
+ export declare function createModelRegistry(providers: Record<LLMProvider, ProviderInfo>): ModelRegistry;
179
+ export declare const DEFAULT_MODEL_REGISTRY: ModelRegistry;
149
180
  export declare function listProviders(): LLMProvider[];
150
181
  export declare function getProvider(provider: LLMProvider): ProviderInfo;
151
182
  export declare function getProvider(provider: string): ProviderInfo | null;
@@ -238,7 +269,7 @@ export declare function supportsCustomModels(provider: LLMProvider): boolean;
238
269
  * @param provider The name of the provider.
239
270
  * @returns True if the provider supports all registry models, false otherwise.
240
271
  */
241
- export declare function hasAllRegistryModelsSupport(provider: LLMProvider): boolean;
272
+ export declare function hasAllRegistryModelsSupport(provider: LLMProvider, registry?: ModelRegistry): boolean;
242
273
  export declare function getOpenRouterCandidateModelIds(model: string, originalProvider: LLMProvider): string[];
243
274
  /**
244
275
  * Gets all models available for a provider, including inherited models
@@ -270,7 +301,7 @@ export declare function getAllModelsForProvider(provider: LLMProvider): Array<Mo
270
301
  * @param targetProvider The provider to transform the model name for.
271
302
  * @returns The transformed model name.
272
303
  */
273
- export declare function transformModelNameForProvider(model: string, originalProvider: LLMProvider, targetProvider: LLMProvider): string;
304
+ export declare function transformModelNameForProvider(model: string, originalProvider: LLMProvider, targetProvider: LLMProvider, registry?: ModelRegistry): string;
274
305
  /**
275
306
  * Checks if a model is valid for a provider, considering supportsAllRegistryModels.
276
307
  * @param provider The provider to check.
@@ -305,7 +336,7 @@ export declare function getSupportedFileTypesForModel(provider: LLMProvider, mod
305
336
  * @param fileType The file type to check support for.
306
337
  * @returns True if the model supports the file type, false otherwise.
307
338
  */
308
- export declare function modelSupportsFileType(provider: LLMProvider, model: string, fileType: SupportedFileType): boolean;
339
+ export declare function modelSupportsFileType(provider: LLMProvider, model: string, fileType: SupportedFileType, registry?: ModelRegistry): boolean;
309
340
  /**
310
341
  * Validates if file data is supported by a specific model by checking the mimetype
311
342
  * @param provider The LLM provider name.
@@ -313,7 +344,7 @@ export declare function modelSupportsFileType(provider: LLMProvider, model: stri
313
344
  * @param mimeType The MIME type of the file to validate.
314
345
  * @returns Object containing validation result and details.
315
346
  */
316
- export declare function validateModelFileSupport(provider: LLMProvider, model: string, mimeType: string): {
347
+ export declare function validateModelFileSupport(provider: LLMProvider, model: string, mimeType: string, registry?: ModelRegistry): {
317
348
  isSupported: boolean;
318
349
  fileType?: SupportedFileType;
319
350
  error?: string;
@@ -361,7 +392,7 @@ export declare function getModelDisplayName(model: string, provider?: LLMProvide
361
392
  * @param provider Optional provider for context (defaults to detecting from model name).
362
393
  * @returns True if the registry marks this model as reasoning-capable.
363
394
  */
364
- export declare function isReasoningCapableModel(model: string, provider?: LLMProvider): boolean;
395
+ export declare function isReasoningCapableModel(model: string, provider?: LLMProvider, registry?: ModelRegistry): boolean;
365
396
  /**
366
397
  * Calculates the cost for a given token usage based on model pricing.
367
398
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/registry/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAEH,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EAClB,MAAM,aAAa,CAAC;AAOrB,MAAM,WAAW,gBAAgB;IAC7B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,IAA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AED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACpC,QAAQ,EAAE,WAAW,EACrB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,QAAQ,GAAE,aAAsC,GACjD;IACC,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAkCA;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,0BAA0B,CACtC,MAAM,EAAE,6BAA6B,EACrC,MAAM,EAAE,gBAAgB,GACzB,MAAM,CAyGR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAQ9F;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,WAAW,GAAG,MAAM,CAmBjF;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACnC,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,WAAW,EACtB,QAAQ,GAAE,aAAsC,GACjD,OAAO,CA4DT;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,MAAM,CAE9E;AAED,wBAAgB,sBAAsB,CAClC,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,YAAY,GACtB,uBAAuB,CAqCzB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexto/llm",
3
- "version": "1.10.2",
3
+ "version": "1.10.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,7 +24,8 @@
24
24
  "sideEffects": false,
25
25
  "devDependencies": {
26
26
  "tsup": "^8.0.0",
27
- "typescript": "^5"
27
+ "typescript": "^5",
28
+ "vitest": "^3.1.3"
28
29
  },
29
30
  "scripts": {
30
31
  "build": "tsup && node ../../scripts/clean-tsbuildinfo.mjs && tsc -b tsconfig.json --emitDeclarationOnly",