@agentproto/model-catalog 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/LICENSE +202 -21
  2. package/dist/access/index.d.ts +5 -5
  3. package/dist/audio/index.d.ts +1 -1
  4. package/dist/{audio-BzVF_wke.d.ts → audio-DcaMq62v.d.ts} +1 -0
  5. package/dist/{base-BNHcMifc.d.ts → base-BJo3zO1J.d.ts} +21 -1
  6. package/dist/{catalog-aQHd559b.d.ts → catalog-BXCENAMh.d.ts} +62 -1
  7. package/dist/{chunk-GH7PB5FB.mjs → chunk-2LUKUCDK.mjs} +3 -3
  8. package/dist/{chunk-GH7PB5FB.mjs.map → chunk-2LUKUCDK.mjs.map} +1 -1
  9. package/dist/{chunk-IORIAFK2.mjs → chunk-7FUGMXL4.mjs} +4 -4
  10. package/dist/{chunk-IORIAFK2.mjs.map → chunk-7FUGMXL4.mjs.map} +1 -1
  11. package/dist/chunk-O7TXHU5W.mjs +52 -0
  12. package/dist/chunk-O7TXHU5W.mjs.map +1 -0
  13. package/dist/{chunk-OHAMH3ZE.mjs → chunk-OCVWDFVT.mjs} +81 -47
  14. package/dist/chunk-OCVWDFVT.mjs.map +1 -0
  15. package/dist/{chunk-CINXNTU3.mjs → chunk-PNWSXXRU.mjs} +3 -3
  16. package/dist/{chunk-CINXNTU3.mjs.map → chunk-PNWSXXRU.mjs.map} +1 -1
  17. package/dist/{chunk-F7OEHYUI.mjs → chunk-XEYWCRAJ.mjs} +21 -4
  18. package/dist/chunk-XEYWCRAJ.mjs.map +1 -0
  19. package/dist/cost/index.mjs +4 -3
  20. package/dist/curation/index.d.ts +4 -4
  21. package/dist/curation/index.mjs +4 -3
  22. package/dist/{evaluate-DisH3H7u.d.ts → evaluate-BWuQauRR.d.ts} +2 -2
  23. package/dist/{index-D8nL3fPZ.d.ts → index-BgW4RQUV.d.ts} +3 -3
  24. package/dist/{index-BICjPG8H.d.ts → index-DL-GcOAF.d.ts} +1 -1
  25. package/dist/index.d.ts +7 -7
  26. package/dist/index.mjs +7 -6
  27. package/dist/index.mjs.map +1 -1
  28. package/dist/llm/index.d.ts +2 -2
  29. package/dist/llm/index.mjs +2 -1
  30. package/dist/overlay/index.d.ts +3 -3
  31. package/dist/picker/index.d.ts +6 -6
  32. package/dist/route-identity/index.d.ts +157 -0
  33. package/dist/route-identity/index.mjs +177 -0
  34. package/dist/route-identity/index.mjs.map +1 -0
  35. package/dist/schema/index.d.ts +9 -2
  36. package/dist/schema/index.mjs +1 -1
  37. package/package.json +7 -2
  38. package/dist/chunk-F7OEHYUI.mjs.map +0 -1
  39. package/dist/chunk-OHAMH3ZE.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
- import { R as ResolvedModel } from './index-BICjPG8H.js';
2
- import { M as ModelKind } from './base-BNHcMifc.js';
1
+ import { R as ResolvedModel } from './index-DL-GcOAF.js';
2
+ import { M as ModelKind } from './base-BJo3zO1J.js';
3
3
 
4
4
  /**
5
5
  * Access control types — workspace-override rules + app scope.
@@ -1,6 +1,6 @@
1
- import { A as AccessDecision } from './evaluate-DisH3H7u.js';
2
- import { a as CatalogPriceTier, L as Lifecycle, M as ModelKind } from './base-BNHcMifc.js';
3
- import { R as ResolvedModel } from './index-BICjPG8H.js';
1
+ import { A as AccessDecision } from './evaluate-BWuQauRR.js';
2
+ import { a as CatalogPriceTier, L as Lifecycle, M as ModelKind } from './base-BJo3zO1J.js';
3
+ import { R as ResolvedModel } from './index-DL-GcOAF.js';
4
4
 
5
5
  /**
6
6
  * Model enrichment — `catalogPriceTier` / `tags` / `lifecycle` / `actions`
@@ -1,4 +1,4 @@
1
- import { b as LLMPricing } from './catalog-aQHd559b.js';
1
+ import { b as LLMPricing } from './catalog-BXCENAMh.js';
2
2
  import { ImageModelDefinition } from './image/index.js';
3
3
  import { VideoModelDefinition } from './video/index.js';
4
4
  import { AudioModelDefinition } from './audio/index.js';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { ImageAspectRatio, ImageAspectRatioSchema, ImageCapabilities, ImageCapabilitiesSchema, ImageEntry, ImageEntrySchema, ImagePricing, ImagePricingSchema, ImageReferenceImages, ImageReferenceImagesSchema, LLMEntry, LLMEntrySchema, LlmPricing, LlmPricingSchema, ModelEntry, ModelEntrySchema, VideoCapabilities, VideoCapabilitiesSchema, VideoCostMultipliers, VideoCostMultipliersSchema, VideoEntry, VideoEntrySchema, VideoPricing, VideoPricingSchema, VideoResolution, VideoResolutionSchema } from './schema/index.js';
2
- export { D as DEFAULT_PRICING, L as LLMCreditCostResult, b as LLMPricing, c as LLMUsageBreakdown, d as LLM_PRICING_CATALOG, M as MODEL_ALIASES, h as calculateLLMCreditCost, l as resolvePricing } from './catalog-aQHd559b.js';
2
+ export { D as DEFAULT_PRICING, L as LLMCreditCostResult, b as LLMPricing, c as LLMUsageBreakdown, d as LLM_PRICING_CATALOG, M as MODEL_ALIASES, h as calculateLLMCreditCost, l as resolvePricing } from './catalog-BXCENAMh.js';
3
3
  export { AGENT_EDITABLE_MODEL_IDS, AGENT_GENERATIVE_MODEL_IDS, AGENT_IMAGE_MODEL_IDS, IMAGE_MODEL_CATALOG, IMAGE_MODEL_IDS, ImageModelDefinition, generateImageModelTable } from './image/index.js';
4
4
  export { AGENT_VIDEO_MODEL_IDS, VIDEO_MODEL_CATALOG, VIDEO_MODEL_IDS, VideoModelDefinition, generateVideoModelTable } from './video/index.js';
5
5
  export { AGENT_AUDIO_MODEL_IDS, AGENT_STT_MODEL_IDS, AGENT_TTS_MODEL_IDS, AUDIO_MODEL_CATALOG, AUDIO_MODEL_IDS, AudioBillingUnit, AudioModality, AudioModelDefinition, AudioProvider, DEFAULT_GEMINI_LIVE_MODEL, GEMINI_LIVE_MODEL_IDS, S2S_MODEL_IDS, generateAudioModelTable, isAcceptedGeminiLiveModel } from './audio/index.js';
@@ -9,14 +9,14 @@ export { ProviderGroup, SurfaceProfile, applyProfile, expandProviders, filterVoi
9
9
  export { CC_USD_RATE, CREDIT_USD_RATE, DEFAULT_PRICING_FLOORS, DEFAULT_PRICING_MARKUP, PricingCategory, PricingMarkup, computeCenticredits, pricingRegistry } from './pricing/index.js';
10
10
  export { CalculateCostOptions, CostResult, CostUsage, CostUsageKindMismatchError, UnknownModelError, calculateAudioCost, calculateCost, calculateImageCost, calculateLLMCost, calculateVideoCost } from './cost/index.js';
11
11
  export { ShouldDebitDecision, ShouldDebitInput, shouldDebit } from './byok/index.js';
12
- export { A as AccessDecision, a as AccessEffect, b as AccessEvalInput, c as AccessRule, d as AccessTarget, e as AppScope, f as evaluateAccess } from './evaluate-DisH3H7u.js';
12
+ export { A as AccessDecision, a as AccessEffect, b as AccessEvalInput, c as AccessRule, d as AccessTarget, e as AppScope, f as evaluateAccess } from './evaluate-BWuQauRR.js';
13
13
  export { CatalogDefaultDecision, evaluateCatalogDefaults } from './access/index.js';
14
14
  export { CatalogOverlay, MergedOverlay, clearCatalogOverlays, getMergedOverlay, registerCatalogOverlay } from './overlay/index.js';
15
- import { R as ResolvedModel } from './index-BICjPG8H.js';
16
- export { C as CatalogKind, L as ListModelsFilter, g as getModel, a as getModelsByProvider, b as getStaticModelProvider, i as isAgentVisible, l as listModels, r as resolveAlias } from './index-BICjPG8H.js';
17
- export { A as AvailableConnector, a as AvailableModel, b as AvailableModelCapabilities, c as AvailableModelsActor, d as AvailableModelsResponse, L as ListAvailableModelsParams, M as ModelEnrichment, g as getEnrichment, m as modelHasAction, e as modelHasTag, f as modelMatchesCatalogPriceTier, h as modelMatchesKind, i as modelMatchesPriceTier, p as priceTierForModel } from './index-D8nL3fPZ.js';
18
- export { A as AudioCapabilities, a as AudioCapabilitiesSchema, b as AudioEntry, c as AudioEntrySchema, d as AudioPricing, e as AudioPricingSchema } from './audio-BzVF_wke.js';
19
- export { a as CatalogPriceTier, b as CatalogPriceTierSchema, C as CatalogProvider, c as CatalogProviderSchema, L as Lifecycle, d as LifecycleSchema, M as ModelKind, e as ModelKindSchema, N as NsfwPolicy, f as NsfwPolicySchema, g as baseEntryShape } from './base-BNHcMifc.js';
15
+ import { R as ResolvedModel } from './index-DL-GcOAF.js';
16
+ export { C as CatalogKind, L as ListModelsFilter, g as getModel, a as getModelsByProvider, b as getStaticModelProvider, i as isAgentVisible, l as listModels, r as resolveAlias } from './index-DL-GcOAF.js';
17
+ export { A as AvailableConnector, a as AvailableModel, b as AvailableModelCapabilities, c as AvailableModelsActor, d as AvailableModelsResponse, L as ListAvailableModelsParams, M as ModelEnrichment, g as getEnrichment, m as modelHasAction, e as modelHasTag, f as modelMatchesCatalogPriceTier, h as modelMatchesKind, i as modelMatchesPriceTier, p as priceTierForModel } from './index-BgW4RQUV.js';
18
+ export { A as AudioCapabilities, a as AudioCapabilitiesSchema, b as AudioEntry, c as AudioEntrySchema, d as AudioPricing, e as AudioPricingSchema } from './audio-DcaMq62v.js';
19
+ export { a as CatalogPriceTier, b as CatalogPriceTierSchema, C as CatalogProvider, c as CatalogProviderSchema, L as Lifecycle, d as LifecycleSchema, M as ModelKind, e as ModelKindSchema, N as NsfwPolicy, f as NsfwPolicySchema, P as PROVIDER_KEY_ENV, g as baseEntryShape } from './base-BJo3zO1J.js';
20
20
  import 'zod';
21
21
 
22
22
  /**
package/dist/index.mjs CHANGED
@@ -1,14 +1,15 @@
1
- export { applyProfile, expandProviders, filterVoicesByProviders, getProviderGroup, getSurfaceProfile, groupForProvider, listProviderGroups, listSurfaceProfiles, listSurfaced, modelMatchesProfile } from './chunk-CINXNTU3.mjs';
2
- export { CostUsageKindMismatchError, UnknownModelError, calculateAudioCost, calculateCost, calculateImageCost, calculateLLMCost, calculateVideoCost } from './chunk-IORIAFK2.mjs';
3
- import { getModel } from './chunk-GH7PB5FB.mjs';
4
- export { getModel, getModelsByProvider, getStaticModelProvider, isAgentVisible, listModels, resolveAlias } from './chunk-GH7PB5FB.mjs';
1
+ export { applyProfile, expandProviders, filterVoicesByProviders, getProviderGroup, getSurfaceProfile, groupForProvider, listProviderGroups, listSurfaceProfiles, listSurfaced, modelMatchesProfile } from './chunk-PNWSXXRU.mjs';
2
+ export { CostUsageKindMismatchError, UnknownModelError, calculateAudioCost, calculateCost, calculateImageCost, calculateLLMCost, calculateVideoCost } from './chunk-7FUGMXL4.mjs';
3
+ import { getModel } from './chunk-2LUKUCDK.mjs';
4
+ export { getModel, getModelsByProvider, getStaticModelProvider, isAgentVisible, listModels, resolveAlias } from './chunk-2LUKUCDK.mjs';
5
5
  export { shouldDebit } from './chunk-XFDXTFV3.mjs';
6
6
  export { evaluateAccess, evaluateCatalogDefaults } from './chunk-HRRG2RZO.mjs';
7
7
  import { priceTierForModel } from './chunk-WTHHXXIK.mjs';
8
8
  export { assertReservedPrefixDiscipline, getActions, getEnrichment, isActionTag, modelHasAction, modelHasTag, modelMatchesCatalogPriceTier, modelMatchesKind, modelMatchesPriceTier, priceTierForModel } from './chunk-WTHHXXIK.mjs';
9
9
  export { clearCatalogOverlays, getMergedOverlay, registerCatalogOverlay } from './chunk-H6JUTF3U.mjs';
10
- export { AudioCapabilitiesSchema, AudioEntrySchema, AudioPricingSchema, CatalogPriceTierSchema, CatalogProviderSchema, ImageAspectRatioSchema, ImageCapabilitiesSchema, ImageEntrySchema, ImagePricingSchema, ImageReferenceImagesSchema, LLMEntrySchema, LifecycleSchema, LlmPricingSchema, ModelEntrySchema, ModelKindSchema, NsfwPolicySchema, VideoCapabilitiesSchema, VideoCostMultipliersSchema, VideoEntrySchema, VideoPricingSchema, VideoResolutionSchema, baseEntryShape } from './chunk-F7OEHYUI.mjs';
11
- export { DEFAULT_PRICING, LLM_PRICING_CATALOG, MODEL_ALIASES, calculateLLMCreditCost, resolvePricing } from './chunk-OHAMH3ZE.mjs';
10
+ export { AudioCapabilitiesSchema, AudioEntrySchema, AudioPricingSchema, CatalogPriceTierSchema, CatalogProviderSchema, ImageAspectRatioSchema, ImageCapabilitiesSchema, ImageEntrySchema, ImagePricingSchema, ImageReferenceImagesSchema, LLMEntrySchema, LifecycleSchema, LlmPricingSchema, ModelEntrySchema, ModelKindSchema, NsfwPolicySchema, PROVIDER_KEY_ENV, VideoCapabilitiesSchema, VideoCostMultipliersSchema, VideoEntrySchema, VideoPricingSchema, VideoResolutionSchema, baseEntryShape } from './chunk-XEYWCRAJ.mjs';
11
+ import './chunk-O7TXHU5W.mjs';
12
+ export { DEFAULT_PRICING, LLM_PRICING_CATALOG, MODEL_ALIASES, calculateLLMCreditCost, resolvePricing } from './chunk-OCVWDFVT.mjs';
12
13
  export { CC_USD_RATE, CREDIT_USD_RATE, DEFAULT_PRICING_FLOORS, DEFAULT_PRICING_MARKUP, computeCenticredits, pricingRegistry } from './chunk-QHELXPSL.mjs';
13
14
  export { AGENT_EDITABLE_MODEL_IDS, AGENT_GENERATIVE_MODEL_IDS, AGENT_IMAGE_MODEL_IDS, IMAGE_MODEL_CATALOG, IMAGE_MODEL_IDS, generateImageModelTable } from './chunk-2LWYZOWB.mjs';
14
15
  export { AGENT_VIDEO_MODEL_IDS, VIDEO_MODEL_CATALOG, VIDEO_MODEL_IDS, generateVideoModelTable } from './chunk-IJZ4XPO2.mjs';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoEO,SAAS,oBAAoB,EAAA,EAAoB;AACtD,EAAA,MAAM,KAAA,GAAQ,SAAS,EAAE,CAAA;AACzB,EAAA,OAAO,KAAA,GAAQ,iBAAA,CAA0B,KAAK,CAAA,GAAI,CAAA;AACpD","file":"index.mjs","sourcesContent":["/**\n * @agentproto/model-catalog — unified model catalog.\n *\n * Single source of truth for LLM, image, video, audio, and voice model\n * entries. Owns cost dispatch, BYOK policy, and access control evaluation.\n * Zod-only OSS core; @agentproto/model-catalog layers billing/access/BYOK\n * policy on top.\n *\n * Subpath imports for tree-shaking:\n * import { LLM_PRICING_CATALOG } from \"@agentproto/model-catalog/llm\"\n * import { calculateCost } from \"@agentproto/model-catalog/cost\"\n * import { shouldDebit } from \"@agentproto/model-catalog/byok\"\n * import { evaluateAccess } from \"@agentproto/model-catalog/access\"\n * import { VOICE_CATALOG } from \"@agentproto/model-catalog/voice\"\n * import { listSurfaced } from \"@agentproto/model-catalog/curation\"\n */\n\nexport * from \"./schema/index.js\"\n// LLM has its own `resolveAlias` (legacy back-compat for the app legacy pricing module).\n// At the top level we prefer the cross-kind `resolveAlias` from the registry.\nexport {\n LLM_PRICING_CATALOG,\n MODEL_ALIASES,\n DEFAULT_PRICING,\n resolvePricing,\n calculateLLMCreditCost,\n} from \"./llm/index.js\"\nexport type {\n LLMPricing,\n LLMUsageBreakdown,\n LLMCreditCostResult,\n} from \"./llm/index.js\"\nexport * from \"./image/index.js\"\nexport * from \"./video/index.js\"\nexport * from \"./audio/index.js\"\nexport * from \"./voice/index.js\"\nexport * from \"./curation/index.js\"\nexport * from \"./pricing/index.js\"\nexport * from \"./cost/index.js\"\nexport * from \"./byok/index.js\"\nexport * from \"./access/index.js\"\nexport * from \"./overlay/index.js\"\nexport * from \"./registry/index.js\"\nexport {\n getActions,\n isActionTag,\n assertReservedPrefixDiscipline,\n} from \"./registry/actions.js\"\nexport {\n getEnrichment,\n modelHasTag,\n modelHasAction,\n modelMatchesCatalogPriceTier,\n modelMatchesPriceTier,\n modelMatchesKind,\n priceTierForModel,\n type ModelEnrichment,\n} from \"./enrichment/index.js\"\n\nimport { getModel } from \"./registry/index.js\"\nimport { priceTierForModel as priceTierForModelInternal } from \"./enrichment/index.js\"\n\n/**\n * Display price gauge level (1..5) for a model id — resolves the catalog\n * entry then defers to {@link priceTierForModel}. 0 for an unknown id.\n * The id→level convenience used by the WhatsApp / slash pickers, which carry\n * a model id rather than a resolved model.\n */\nexport function priceTierForModelId(id: string): number {\n const model = getModel(id)\n return model ? priceTierForModelInternal(model) : 0\n}\nexport type {\n AvailableModel,\n AvailableModelCapabilities,\n AvailableConnector,\n AvailableModelsActor,\n AvailableModelsResponse,\n ListAvailableModelsParams,\n} from \"./picker/index.js\"\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAoEO,SAAS,oBAAoB,EAAA,EAAoB;AACtD,EAAA,MAAM,KAAA,GAAQ,SAAS,EAAE,CAAA;AACzB,EAAA,OAAO,KAAA,GAAQ,iBAAA,CAA0B,KAAK,CAAA,GAAI,CAAA;AACpD","file":"index.mjs","sourcesContent":["/**\n * @agentproto/model-catalog — unified model catalog.\n *\n * Single source of truth for LLM, image, video, audio, and voice model\n * entries. Owns cost dispatch, BYOK policy, and access control evaluation.\n * Zod-only OSS core; @agentproto/model-catalog layers billing/access/BYOK\n * policy on top.\n *\n * Subpath imports for tree-shaking:\n * import { LLM_PRICING_CATALOG } from \"@agentproto/model-catalog/llm\"\n * import { calculateCost } from \"@agentproto/model-catalog/cost\"\n * import { shouldDebit } from \"@agentproto/model-catalog/byok\"\n * import { evaluateAccess } from \"@agentproto/model-catalog/access\"\n * import { VOICE_CATALOG } from \"@agentproto/model-catalog/voice\"\n * import { listSurfaced } from \"@agentproto/model-catalog/curation\"\n */\n\nexport * from \"./schema/index.js\"\n// LLM has its own `resolveAlias` (legacy back-compat for the app legacy pricing module).\n// At the top level we prefer the cross-kind `resolveAlias` from the registry.\nexport {\n LLM_PRICING_CATALOG,\n MODEL_ALIASES,\n DEFAULT_PRICING,\n resolvePricing,\n calculateLLMCreditCost,\n} from \"./llm/index.js\"\nexport type {\n LLMPricing,\n LLMUsageBreakdown,\n LLMCreditCostResult,\n} from \"./llm/index.js\"\nexport * from \"./image/index.js\"\nexport * from \"./video/index.js\"\nexport * from \"./audio/index.js\"\nexport * from \"./voice/index.js\"\nexport * from \"./curation/index.js\"\nexport * from \"./pricing/index.js\"\nexport * from \"./cost/index.js\"\nexport * from \"./byok/index.js\"\nexport * from \"./access/index.js\"\nexport * from \"./overlay/index.js\"\nexport * from \"./registry/index.js\"\nexport {\n getActions,\n isActionTag,\n assertReservedPrefixDiscipline,\n} from \"./registry/actions.js\"\nexport {\n getEnrichment,\n modelHasTag,\n modelHasAction,\n modelMatchesCatalogPriceTier,\n modelMatchesPriceTier,\n modelMatchesKind,\n priceTierForModel,\n type ModelEnrichment,\n} from \"./enrichment/index.js\"\n\nimport { getModel } from \"./registry/index.js\"\nimport { priceTierForModel as priceTierForModelInternal } from \"./enrichment/index.js\"\n\n/**\n * Display price gauge level (1..5) for a model id — resolves the catalog\n * entry then defers to {@link priceTierForModel}. 0 for an unknown id.\n * The id→level convenience used by the WhatsApp / slash pickers, which carry\n * a model id rather than a resolved model.\n */\nexport function priceTierForModelId(id: string): number {\n const model = getModel(id)\n return model ? priceTierForModelInternal(model) : 0\n}\nexport type {\n AvailableModel,\n AvailableModelCapabilities,\n AvailableConnector,\n AvailableModelsActor,\n AvailableModelsResponse,\n ListAvailableModelsParams,\n} from \"./picker/index.js\"\n"]}
@@ -1,5 +1,5 @@
1
- export { C as CacheStats, a as CalculateLLMCreditCostOptions, D as DEFAULT_PRICING, K as KnownLlmId, L as LLMCreditCostResult, b as LLMPricing, c as LLMUsageBreakdown, d as LLM_PRICING_CATALOG, e as LlmModelAlias, f as LlmModelId, M as MODEL_ALIASES, g as ModelRoute, h as calculateLLMCreditCost, i as getCacheStats, j as getModelProvider, r as resolveAlias, k as resolveModelRoute, l as resolvePricing } from '../catalog-aQHd559b.js';
2
- import '../base-BNHcMifc.js';
1
+ export { C as CacheStats, a as CalculateLLMCreditCostOptions, D as DEFAULT_PRICING, K as KnownLlmId, L as LLMCreditCostResult, b as LLMPricing, c as LLMUsageBreakdown, d as LLM_PRICING_CATALOG, e as LlmModelAlias, f as LlmModelId, M as MODEL_ALIASES, g as ModelRoute, h as calculateLLMCreditCost, i as getCacheStats, j as getModelProvider, r as resolveAlias, k as resolveModelRoute, l as resolvePricing } from '../catalog-BXCENAMh.js';
2
+ import '../base-BJo3zO1J.js';
3
3
  import 'zod';
4
4
 
5
5
  /**
@@ -1,4 +1,5 @@
1
- export { DEFAULT_PRICING, LLM_PRICING_CATALOG, LLM_TIERS, MODEL_ALIASES, OPERATOR_AGENT_MODELS, OPERATOR_DEFAULT_GEMINI, OPERATOR_DEFAULT_PREMIUM, OPERATOR_DEFAULT_STANDARD, WORKFLOW_FAST_MODEL, WORKFLOW_PREMIUM_MODEL, WORKFLOW_TINY_MODEL, calculateLLMCreditCost, getCacheStats, getModelProvider, resolveAlias, resolveModelRoute, resolvePricing } from '../chunk-OHAMH3ZE.mjs';
1
+ export { LLM_TIERS, OPERATOR_AGENT_MODELS, OPERATOR_DEFAULT_GEMINI, OPERATOR_DEFAULT_PREMIUM, OPERATOR_DEFAULT_STANDARD, WORKFLOW_FAST_MODEL, WORKFLOW_PREMIUM_MODEL, WORKFLOW_TINY_MODEL } from '../chunk-O7TXHU5W.mjs';
2
+ export { DEFAULT_PRICING, LLM_PRICING_CATALOG, MODEL_ALIASES, calculateLLMCreditCost, getCacheStats, getModelProvider, resolveAlias, resolveModelRoute, resolvePricing } from '../chunk-OCVWDFVT.mjs';
2
3
  import '../chunk-QHELXPSL.mjs';
3
4
  //# sourceMappingURL=index.mjs.map
4
5
  //# sourceMappingURL=index.mjs.map
@@ -1,11 +1,11 @@
1
- import { b as LLMPricing } from '../catalog-aQHd559b.js';
1
+ import { b as LLMPricing } from '../catalog-BXCENAMh.js';
2
2
  import { ImageModelDefinition } from '../image/index.js';
3
3
  import { VideoModelDefinition } from '../video/index.js';
4
4
  import { AudioModelDefinition } from '../audio/index.js';
5
5
  import { CatalogVoice } from '../schema/voice.js';
6
- import '../base-BNHcMifc.js';
6
+ import '../base-BJo3zO1J.js';
7
7
  import 'zod';
8
- import '../audio-BzVF_wke.js';
8
+ import '../audio-DcaMq62v.js';
9
9
 
10
10
  /**
11
11
  * Consumer catalog overlays.
@@ -1,11 +1,11 @@
1
- import '../evaluate-DisH3H7u.js';
2
- import '../base-BNHcMifc.js';
3
- export { A as AvailableConnector, a as AvailableModel, b as AvailableModelCapabilities, c as AvailableModelsActor, d as AvailableModelsResponse, L as ListAvailableModelsParams, P as PRICE_TIER_NAMES, j as PRICE_TIER_SLOTS, k as priceTierBar, l as priceTierName } from '../index-D8nL3fPZ.js';
4
- import '../index-BICjPG8H.js';
5
- import '../catalog-aQHd559b.js';
1
+ import '../evaluate-BWuQauRR.js';
2
+ import '../base-BJo3zO1J.js';
3
+ export { A as AvailableConnector, a as AvailableModel, b as AvailableModelCapabilities, c as AvailableModelsActor, d as AvailableModelsResponse, L as ListAvailableModelsParams, P as PRICE_TIER_NAMES, j as PRICE_TIER_SLOTS, k as priceTierBar, l as priceTierName } from '../index-BgW4RQUV.js';
4
+ import '../index-DL-GcOAF.js';
5
+ import '../catalog-BXCENAMh.js';
6
6
  import '../image/index.js';
7
7
  import '../video/index.js';
8
8
  import '../audio/index.js';
9
- import '../audio-BzVF_wke.js';
9
+ import '../audio-DcaMq62v.js';
10
10
  import 'zod';
11
11
  import '../schema/voice.js';
@@ -0,0 +1,157 @@
1
+ import { b as LLMPricing } from '../catalog-BXCENAMh.js';
2
+ import '../base-BJo3zO1J.js';
3
+ import 'zod';
4
+
5
+ /**
6
+ * Route-aware model identity.
7
+ *
8
+ * Canonical reference syntax:
9
+ * vendor/product[@route]
10
+ *
11
+ * A model product (who built it + what product) is separate from its serving
12
+ * route (how we reach it / how we are billed).
13
+ *
14
+ * Examples:
15
+ * openai/gpt-4o → vendor openai, product gpt-4o, route openai (direct)
16
+ * openai/gpt-4o@openrouter → same product, routed through OpenRouter
17
+ * openai/gpt-4o@agentik-proxy → same product, operator-configured proxy route
18
+ *
19
+ * Design invariants:
20
+ * - `vendor` is who built the model; `route` is how we reach it.
21
+ * - `provider/model` strings parse as vendor/product with implicit route = vendor
22
+ * (backward-compatible reference form).
23
+ * - Unscoped `xx@yy` is rejected.
24
+ * - Route metadata (pricing, limits, transport, availability) is separate from
25
+ * product metadata and computed at resolution time.
26
+ * - The abstraction is generic across model kinds; only LLM has a concrete
27
+ * resolver today.
28
+ */
29
+
30
+ interface ModelRef {
31
+ /** The original, trimmed string. */
32
+ raw: string;
33
+ /** Model author / builder (permanent identity). */
34
+ vendor: string;
35
+ /** Specific model product. */
36
+ product: string;
37
+ /** Routing target — defaults to vendor for direct vendor access. */
38
+ route: string;
39
+ }
40
+ declare class InvalidModelRefError extends Error {
41
+ readonly raw: string;
42
+ readonly name = "InvalidModelRefError";
43
+ constructor(raw: string, message: string);
44
+ }
45
+ /**
46
+ * Parse a model reference in `vendor/product[@route]` form.
47
+ *
48
+ * - `openai/gpt-4o` → `{ vendor: "openai", product: "gpt-4o", route: "openai" }`
49
+ * - `openai/gpt-4o@openrouter` → route "openrouter"
50
+ *
51
+ * Rejects empty strings, unscoped `@` refs, missing segments, and segments
52
+ * containing `/` or `@`.
53
+ */
54
+ declare function parseModelRef(raw: string): ModelRef;
55
+ /**
56
+ * Format a {@link ModelRef} back to its canonical string.
57
+ * Implicit direct routes omit the `@route` suffix.
58
+ */
59
+ declare function formatModelRef(ref: ModelRef): string;
60
+ /** True when `raw` matches the `vendor/product[@route]` shape. */
61
+ declare function isModelRefString(raw: string): boolean;
62
+ interface ModelRouteLimits {
63
+ contextWindow?: number;
64
+ maxInputTokens?: number;
65
+ maxOutputTokens?: number;
66
+ }
67
+ type ModelRouteAvailability = "available" | "preview" | "unavailable";
68
+ interface ModelRouteTransport {
69
+ /** API/schema flavor: e.g. "openai", "anthropic", "openrouter", "custom". */
70
+ flavor: string;
71
+ /** Optional explicit base URL for the route. */
72
+ baseUrl?: string;
73
+ }
74
+ /** Product metadata — independent of the serving route. */
75
+ interface ModelProductMeta {
76
+ vendor: string;
77
+ product: string;
78
+ /** Canonical product id after alias resolution. */
79
+ canonicalProductId: string;
80
+ }
81
+ /** Route metadata — pricing, limits, transport, availability. */
82
+ interface ModelRouteMeta<TPricing = unknown> {
83
+ route: string;
84
+ transport: ModelRouteTransport;
85
+ availability: ModelRouteAvailability;
86
+ limits: ModelRouteLimits;
87
+ pricing: TPricing;
88
+ }
89
+ /** Fully resolved model route: product identity + route metadata. */
90
+ interface ResolvedModelRoute<TPricing = unknown> extends ModelProductMeta, ModelRouteMeta<TPricing> {
91
+ /** The parsed reference. */
92
+ ref: ModelRef;
93
+ }
94
+ type ResolvedLlmModelRoute = ResolvedModelRoute<LLMPricing>;
95
+ /**
96
+ * Operator-configurable custom route.
97
+ *
98
+ * No credential values live here — only the *name* of an env var (`authEnv`)
99
+ * so adapters can resolve secrets at runtime. `agentik-proxy` is registered
100
+ * through this shape; it is never hardcoded in the catalog. No private
101
+ * models, hosts, or prices are committed.
102
+ */
103
+ interface CustomRouteConfig {
104
+ label?: string;
105
+ /** API/schema flavor the route speaks. */
106
+ flavor?: string;
107
+ /** Base URL the adapter should hit. */
108
+ baseUrl?: string;
109
+ /** Name of the env var holding the API key/secret (not the value). */
110
+ authEnv?: string;
111
+ availability?: ModelRouteAvailability;
112
+ limits?: ModelRouteLimits;
113
+ /** Route-level pricing override. Unset fields fall back to product pricing. */
114
+ pricing?: Partial<LLMPricing>;
115
+ }
116
+ declare function registerCustomRoute(id: string, config: CustomRouteConfig): void;
117
+ declare function resolveCustomRoute(id: string): CustomRouteConfig | undefined;
118
+ /** Test helper: clear all registered custom routes. */
119
+ declare function clearCustomRoutes(): void;
120
+ /**
121
+ * Resolve a model reference to an LLM route, distinguishing direct vendor
122
+ * access from explicit router/proxy routes.
123
+ *
124
+ * openai/gpt-4o → direct OpenAI pricing / transport
125
+ * openai/gpt-4o@openrouter → OpenRouter route pricing / transport
126
+ * openai/gpt-4o@agentik-proxy → custom route config (if registered)
127
+ *
128
+ * Bare legacy ids (e.g. `gpt-4o`, `claude-sonnet-4-5`) are also accepted and
129
+ * resolved through the legacy pricing catalog, with the route inferred from
130
+ * the catalog entry's provider/vendor.
131
+ *
132
+ * Returns `undefined` when the product or route is unknown.
133
+ */
134
+ declare function resolveLlmModelRoute(input: string | ModelRef): ResolvedLlmModelRoute | undefined;
135
+ interface ModelRefDiagnostic {
136
+ ref: ModelRef;
137
+ /** True if this string is a legacy bare id rather than vendor/product. */
138
+ legacyBareId: boolean;
139
+ /** True if a direct vendor route exists for the product. */
140
+ directAvailable: boolean;
141
+ /** True if an OpenRouter route exists for vendor/product. */
142
+ openRouterAvailable: boolean;
143
+ /** True if a custom route is registered for the route segment. */
144
+ customRouteAvailable: boolean;
145
+ /** Human-readable note when ambiguity or a deprecation applies. */
146
+ note?: string;
147
+ }
148
+ /**
149
+ * Inspect a model reference and report what routes are available for it.
150
+ *
151
+ * Useful for CLI/UI warnings when a user types `openai/gpt-4o` and an
152
+ * explicit `@openrouter` form also exists: the direct form is chosen, but
153
+ * the note explains how to request the OpenRouter route explicitly.
154
+ */
155
+ declare function diagnoseModelRef(input: string | ModelRef): ModelRefDiagnostic | undefined;
156
+
157
+ export { type CustomRouteConfig, InvalidModelRefError, type ModelProductMeta, type ModelRef, type ModelRefDiagnostic, type ModelRouteAvailability, type ModelRouteLimits, type ModelRouteMeta, type ModelRouteTransport, type ResolvedLlmModelRoute, type ResolvedModelRoute, clearCustomRoutes, diagnoseModelRef, formatModelRef, isModelRefString, parseModelRef, registerCustomRoute, resolveCustomRoute, resolveLlmModelRoute };
@@ -0,0 +1,177 @@
1
+ import { resolvePricing, resolveAlias, OPENROUTER_ROUTES, DEFAULT_PRICING } from '../chunk-OCVWDFVT.mjs';
2
+ import '../chunk-QHELXPSL.mjs';
3
+
4
+ /**
5
+ * @agentproto/model-catalog v0.1.0
6
+ * Unified model catalog: LLM, image, video, audio entries + cost dispatcher + picker.
7
+ * Zod-only OSS core; @agstudio/model-catalog layers billing/access/BYOK on top.
8
+ */
9
+
10
+ // src/route-identity/index.ts
11
+ var SEGMENT_RE = /^[a-zA-Z0-9_.-]+$/;
12
+ var REF_RE = /^([^/@]+)\/([^/@]+)(?:@([^/@]+))?$/;
13
+ var InvalidModelRefError = class extends Error {
14
+ constructor(raw, message) {
15
+ super(`Invalid model reference "${raw}": ${message}`);
16
+ this.raw = raw;
17
+ }
18
+ raw;
19
+ name = "InvalidModelRefError";
20
+ };
21
+ function parseModelRef(raw) {
22
+ const input = raw.trim();
23
+ if (input.length === 0) {
24
+ throw new InvalidModelRefError(raw, "model reference is empty");
25
+ }
26
+ if (input.includes("@") && !input.includes("/")) {
27
+ throw new InvalidModelRefError(
28
+ raw,
29
+ "unscoped @ route is not allowed; use vendor/product[@route]"
30
+ );
31
+ }
32
+ const match = REF_RE.exec(input);
33
+ if (!match) {
34
+ throw new InvalidModelRefError(
35
+ raw,
36
+ "expected vendor/product[@route] (e.g. openai/gpt-4o or openai/gpt-4o@openrouter)"
37
+ );
38
+ }
39
+ const vendor = match[1].trim();
40
+ const product = match[2].trim();
41
+ const route = (match[3] ?? vendor).trim();
42
+ for (const [label, value] of [
43
+ ["vendor", vendor],
44
+ ["product", product],
45
+ ["route", route]
46
+ ]) {
47
+ if (value.length === 0) {
48
+ throw new InvalidModelRefError(raw, `${label} segment is empty`);
49
+ }
50
+ if (!SEGMENT_RE.test(value)) {
51
+ throw new InvalidModelRefError(
52
+ raw,
53
+ `${label} "${value}" contains invalid characters (no '/' or '@')`
54
+ );
55
+ }
56
+ }
57
+ return { raw: input, vendor, product, route };
58
+ }
59
+ function formatModelRef(ref) {
60
+ if (ref.route === ref.vendor) {
61
+ return `${ref.vendor}/${ref.product}`;
62
+ }
63
+ return `${ref.vendor}/${ref.product}@${ref.route}`;
64
+ }
65
+ function isModelRefString(raw) {
66
+ try {
67
+ parseModelRef(raw);
68
+ return true;
69
+ } catch {
70
+ return false;
71
+ }
72
+ }
73
+ var customRoutes = /* @__PURE__ */ new Map();
74
+ function registerCustomRoute(id, config) {
75
+ customRoutes.set(id, config);
76
+ }
77
+ function resolveCustomRoute(id) {
78
+ return customRoutes.get(id);
79
+ }
80
+ function clearCustomRoutes() {
81
+ customRoutes.clear();
82
+ }
83
+ function resolveLlmModelRoute(input) {
84
+ const ref = typeof input === "string" ? tryParseOrLegacy(input) : { ref: input, legacy: false };
85
+ if (!ref) return void 0;
86
+ const { ref: modelRef, legacy } = ref;
87
+ const directPricing = resolvePricing(modelRef.product);
88
+ const canonicalProductId = resolveAlias(modelRef.product);
89
+ if (modelRef.route === modelRef.vendor) {
90
+ if (!directPricing) return void 0;
91
+ return buildLlmRoute(modelRef, canonicalProductId, directPricing, {
92
+ flavor: modelRef.vendor
93
+ });
94
+ }
95
+ if (modelRef.route === "openrouter") {
96
+ const key = `${modelRef.vendor}/${modelRef.product}`;
97
+ const pricing2 = OPENROUTER_ROUTES[key];
98
+ if (!pricing2) return void 0;
99
+ return buildLlmRoute(modelRef, canonicalProductId, pricing2, {
100
+ flavor: "openrouter"
101
+ });
102
+ }
103
+ const custom = resolveCustomRoute(modelRef.route);
104
+ if (!custom) return void 0;
105
+ const basePricing = directPricing ?? DEFAULT_PRICING;
106
+ const pricing = {
107
+ ...basePricing,
108
+ ...custom.pricing,
109
+ vendor: custom.pricing?.vendor ?? basePricing.vendor
110
+ };
111
+ return buildLlmRoute(
112
+ modelRef,
113
+ canonicalProductId,
114
+ pricing,
115
+ {
116
+ flavor: custom.flavor ?? "custom",
117
+ baseUrl: custom.baseUrl
118
+ },
119
+ custom
120
+ );
121
+ }
122
+ function buildLlmRoute(ref, canonicalProductId, pricing, transport, custom) {
123
+ return {
124
+ ref,
125
+ vendor: ref.vendor,
126
+ product: ref.product,
127
+ canonicalProductId,
128
+ route: ref.route,
129
+ transport,
130
+ availability: custom?.availability ?? "available",
131
+ limits: custom?.limits ?? {},
132
+ pricing
133
+ };
134
+ }
135
+ function tryParseOrLegacy(raw) {
136
+ if (raw.includes("/")) {
137
+ return { ref: parseModelRef(raw), legacy: false };
138
+ }
139
+ const pricing = resolvePricing(raw);
140
+ if (!pricing) return void 0;
141
+ const vendor = pricing.vendor ?? pricing.provider ?? "unknown";
142
+ const route = pricing.provider ?? vendor;
143
+ return {
144
+ ref: { raw, vendor, product: raw, route },
145
+ legacy: true
146
+ };
147
+ }
148
+ function diagnoseModelRef(input) {
149
+ const parsed = typeof input === "string" ? tryParseOrLegacy(input) : { ref: input, legacy: false };
150
+ if (!parsed) return void 0;
151
+ const { ref, legacy } = parsed;
152
+ const directPricing = resolvePricing(ref.product);
153
+ const openRouterKey = `${ref.vendor}/${ref.product}`;
154
+ const openRouterPricing = OPENROUTER_ROUTES[openRouterKey];
155
+ const custom = resolveCustomRoute(ref.route);
156
+ const directAvailable = !!directPricing;
157
+ const openRouterAvailable = !!openRouterPricing;
158
+ const customRouteAvailable = !!custom;
159
+ let note;
160
+ if (legacy) {
161
+ note = `Bare product id "${ref.product}" is a legacy form; prefer ${ref.vendor}/${ref.product}.`;
162
+ } else if (ref.route === ref.vendor && openRouterAvailable) {
163
+ note = `Direct vendor route selected. Use ${ref.vendor}/${ref.product}@openrouter for the OpenRouter route.`;
164
+ }
165
+ return {
166
+ ref,
167
+ legacyBareId: legacy,
168
+ directAvailable,
169
+ openRouterAvailable,
170
+ customRouteAvailable,
171
+ note
172
+ };
173
+ }
174
+
175
+ export { InvalidModelRefError, clearCustomRoutes, diagnoseModelRef, formatModelRef, isModelRefString, parseModelRef, registerCustomRoute, resolveCustomRoute, resolveLlmModelRoute };
176
+ //# sourceMappingURL=index.mjs.map
177
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/route-identity/index.ts"],"names":["pricing"],"mappings":";;;;;;;;;;AAmCA,IAAM,UAAA,GAAa,mBAAA;AACnB,IAAM,MAAA,GAAS,oCAAA;AAaR,IAAM,oBAAA,GAAN,cAAmC,KAAA,CAAM;AAAA,EAE9C,WAAA,CACkB,KAChB,OAAA,EACA;AACA,IAAA,KAAA,CAAM,CAAA,yBAAA,EAA4B,GAAG,CAAA,GAAA,EAAM,OAAO,CAAA,CAAE,CAAA;AAHpC,IAAA,IAAA,CAAA,GAAA,GAAA,GAAA;AAAA,EAIlB;AAAA,EAJkB,GAAA;AAAA,EAFT,IAAA,GAAO,sBAAA;AAOlB;AAWO,SAAS,cAAc,GAAA,EAAuB;AACnD,EAAA,MAAM,KAAA,GAAQ,IAAI,IAAA,EAAK;A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AAA,EAAK,MAAA,EAAO,GAAI,MAAA;AACxB,EAAA,MAAM,aAAA,GAAgB,cAAA,CAAe,GAAA,CAAI,OAAO,CAAA;AAChD,EAAA,MAAM,gBAAgB,CAAA,EAAG,GAAA,CAAI,MAAM,CAAA,CAAA,EAAI,IAAI,OAAO,CAAA,CAAA;AAClD,EAAA,MAAM,iBAAA,GAAoB,kBAAkB,aAAa,CAAA;AACzD,EAAA,MAAM,MAAA,GAAS,kBAAA,CAAmB,GAAA,CAAI,KAAK,CAAA;AAE3C,EAAA,MAAM,eAAA,GAAkB,CAAC,CAAC,aAAA;AAC1B,EAAA,MAAM,mBAAA,GAAsB,CAAC,CAAC,iBAAA;AAC9B,EAAA,MAAM,oBAAA,GAAuB,CAAC,CAAC,MAAA;AAE/B,EAAA,IAAI,IAAA;AACJ,EAAA,IAAI,MAAA,EAAQ;AACV,IAAA,IAAA,GAAO,CAAA,iBAAA,EAAoB,IAAI,OAAO,CAAA,2BAAA,EAA8B,IAAI,MAAM,CAAA,CAAA,EAAI,IAAI,OAAO,CAAA,CAAA,CAAA;AAAA,EAC/F,CAAA,MAAA,IAAW,GAAA,CAAI,KAAA,KAAU,GAAA,CAAI,UAAU,mBAAA,EAAqB;AAC1D,IAAA,IAAA,GAAO,CAAA,kCAAA,EAAqC,GAAA,CAAI,MAAM,CAAA,CAAA,EAAI,IAAI,OAAO,CAAA,qCAAA,CAAA;AAAA,EACvE;AAEA,EAAA,OAAO;AAAA,IACL,GAAA;AAAA,IACA,YAAA,EAAc,MAAA;AAAA,IACd,eAAA;AAAA,IACA,mBAAA;AAAA,IACA,oBAAA;AAAA,IACA;AAAA,GACF;AACF","file":"index.mjs","sourcesContent":["/**\n * Route-aware model identity.\n *\n * Canonical reference syntax:\n * vendor/product[@route]\n *\n * A model product (who built it + what product) is separate from its serving\n * route (how we reach it / how we are billed).\n *\n * Examples:\n * openai/gpt-4o → vendor openai, product gpt-4o, route openai (direct)\n * openai/gpt-4o@openrouter → same product, routed through OpenRouter\n * openai/gpt-4o@agentik-proxy → same product, operator-configured proxy route\n *\n * Design invariants:\n * - `vendor` is who built the model; `route` is how we reach it.\n * - `provider/model` strings parse as vendor/product with implicit route = vendor\n * (backward-compatible reference form).\n * - Unscoped `xx@yy` is rejected.\n * - Route metadata (pricing, limits, transport, availability) is separate from\n * product metadata and computed at resolution time.\n * - The abstraction is generic across model kinds; only LLM has a concrete\n * resolver today.\n */\n\nimport type { LLMPricing } from \"../llm/catalog.js\"\nimport {\n resolvePricing,\n resolveAlias,\n DEFAULT_PRICING,\n} from \"../llm/catalog.js\"\nimport { OPENROUTER_ROUTES } from \"../llm/openrouter-routes.generated.js\"\n\n// ── Parser ─────────────────────────────────────────────────────────────────\n\nconst SEGMENT_RE = /^[a-zA-Z0-9_.-]+$/\nconst REF_RE = /^([^/@]+)\\/([^/@]+)(?:@([^/@]+))?$/\n\nexport interface ModelRef {\n /** The original, trimmed string. */\n raw: string\n /** Model author / builder (permanent identity). */\n vendor: string\n /** Specific model product. */\n product: string\n /** Routing target — defaults to vendor for direct vendor access. */\n route: string\n}\n\nexport class InvalidModelRefError extends Error {\n readonly name = \"InvalidModelRefError\"\n constructor(\n public readonly raw: string,\n message: string\n ) {\n super(`Invalid model reference \"${raw}\": ${message}`)\n }\n}\n\n/**\n * Parse a model reference in `vendor/product[@route]` form.\n *\n * - `openai/gpt-4o` → `{ vendor: \"openai\", product: \"gpt-4o\", route: \"openai\" }`\n * - `openai/gpt-4o@openrouter` → route \"openrouter\"\n *\n * Rejects empty strings, unscoped `@` refs, missing segments, and segments\n * containing `/` or `@`.\n */\nexport function parseModelRef(raw: string): ModelRef {\n const input = raw.trim()\n if (input.length === 0) {\n throw new InvalidModelRefError(raw, \"model reference is empty\")\n }\n\n // Reject unscoped `xx@yy` before attempting the slash-based regex.\n if (input.includes(\"@\") && !input.includes(\"/\")) {\n throw new InvalidModelRefError(\n raw,\n \"unscoped @ route is not allowed; use vendor/product[@route]\"\n )\n }\n\n const match = REF_RE.exec(input)\n if (!match) {\n throw new InvalidModelRefError(\n raw,\n \"expected vendor/product[@route] (e.g. openai/gpt-4o or openai/gpt-4o@openrouter)\"\n )\n }\n\n const vendor = match[1]!.trim()\n const product = match[2]!.trim()\n const route = (match[3] ?? vendor).trim()\n\n for (const [label, value] of [\n [\"vendor\", vendor],\n [\"product\", product],\n [\"route\", route],\n ] as const) {\n if (value.length === 0) {\n throw new InvalidModelRefError(raw, `${label} segment is empty`)\n }\n if (!SEGMENT_RE.test(value)) {\n throw new InvalidModelRefError(\n raw,\n `${label} \"${value}\" contains invalid characters (no '/' or '@')`\n )\n }\n }\n\n return { raw: input, vendor, product, route }\n}\n\n/**\n * Format a {@link ModelRef} back to its canonical string.\n * Implicit direct routes omit the `@route` suffix.\n */\nexport function formatModelRef(ref: ModelRef): string {\n if (ref.route === ref.vendor) {\n return `${ref.vendor}/${ref.product}`\n }\n return `${ref.vendor}/${ref.product}@${ref.route}`\n}\n\n/** True when `raw` matches the `vendor/product[@route]` shape. */\nexport function isModelRefString(raw: string): boolean {\n try {\n parseModelRef(raw)\n return true\n } catch {\n return false\n }\n}\n\n// ── Product vs route metadata ──────────────────────────────────────────────\n\nexport interface ModelRouteLimits {\n contextWindow?: number\n maxInputTokens?: number\n maxOutputTokens?: number\n}\n\nexport type ModelRouteAvailability = \"available\" | \"preview\" | \"unavailable\"\n\nexport interface ModelRouteTransport {\n /** API/schema flavor: e.g. \"openai\", \"anthropic\", \"openrouter\", \"custom\". */\n flavor: string\n /** Optional explicit base URL for the route. */\n baseUrl?: string\n}\n\n/** Product metadata — independent of the serving route. */\nexport interface ModelProductMeta {\n vendor: string\n product: string\n /** Canonical product id after alias resolution. */\n canonicalProductId: string\n}\n\n/** Route metadata — pricing, limits, transport, availability. */\nexport interface ModelRouteMeta<TPricing = unknown> {\n route: string\n transport: ModelRouteTransport\n availability: ModelRouteAvailability\n limits: ModelRouteLimits\n pricing: TPricing\n}\n\n/** Fully resolved model route: product identity + route metadata. */\nexport interface ResolvedModelRoute<TPricing = unknown>\n extends ModelProductMeta,\n ModelRouteMeta<TPricing> {\n /** The parsed reference. */\n ref: ModelRef\n}\n\nexport type ResolvedLlmModelRoute = ResolvedModelRoute<LLMPricing>\n\n// ── Custom route config ────────────────────────────────────────────────────\n\n/**\n * Operator-configurable custom route.\n *\n * No credential values live here — only the *name* of an env var (`authEnv`)\n * so adapters can resolve secrets at runtime. `agentik-proxy` is registered\n * through this shape; it is never hardcoded in the catalog. No private\n * models, hosts, or prices are committed.\n */\nexport interface CustomRouteConfig {\n label?: string\n /** API/schema flavor the route speaks. */\n flavor?: string\n /** Base URL the adapter should hit. */\n baseUrl?: string\n /** Name of the env var holding the API key/secret (not the value). */\n authEnv?: string\n availability?: ModelRouteAvailability\n limits?: ModelRouteLimits\n /** Route-level pricing override. Unset fields fall back to product pricing. */\n pricing?: Partial<LLMPricing>\n}\n\nconst customRoutes = new Map<string, CustomRouteConfig>()\n\nexport function registerCustomRoute(\n id: string,\n config: CustomRouteConfig\n): void {\n customRoutes.set(id, config)\n}\n\nexport function resolveCustomRoute(id: string): CustomRouteConfig | undefined {\n return customRoutes.get(id)\n}\n\n/** Test helper: clear all registered custom routes. */\nexport function clearCustomRoutes(): void {\n customRoutes.clear()\n}\n\n// ── LLM route resolution ───────────────────────────────────────────────────\n\n/**\n * Resolve a model reference to an LLM route, distinguishing direct vendor\n * access from explicit router/proxy routes.\n *\n * openai/gpt-4o → direct OpenAI pricing / transport\n * openai/gpt-4o@openrouter → OpenRouter route pricing / transport\n * openai/gpt-4o@agentik-proxy → custom route config (if registered)\n *\n * Bare legacy ids (e.g. `gpt-4o`, `claude-sonnet-4-5`) are also accepted and\n * resolved through the legacy pricing catalog, with the route inferred from\n * the catalog entry's provider/vendor.\n *\n * Returns `undefined` when the product or route is unknown.\n */\nexport function resolveLlmModelRoute(\n input: string | ModelRef\n): ResolvedLlmModelRoute | undefined {\n const ref =\n typeof input === \"string\"\n ? tryParseOrLegacy(input)\n : { ref: input, legacy: false }\n\n if (!ref) return undefined\n\n const { ref: modelRef, legacy } = ref\n const directPricing = resolvePricing(modelRef.product)\n const canonicalProductId = resolveAlias(modelRef.product)\n\n // ── Direct vendor route ─────────────────────────────────────────────────\n if (modelRef.route === modelRef.vendor) {\n if (!directPricing) return undefined\n return buildLlmRoute(modelRef, canonicalProductId, directPricing, {\n flavor: modelRef.vendor,\n })\n }\n\n // ── OpenRouter route ────────────────────────────────────────────────────\n if (modelRef.route === \"openrouter\") {\n const key = `${modelRef.vendor}/${modelRef.product}`\n const pricing = OPENROUTER_ROUTES[key]\n if (!pricing) return undefined\n return buildLlmRoute(modelRef, canonicalProductId, pricing, {\n flavor: \"openrouter\",\n })\n }\n\n // ── Custom route (e.g. agentik-proxy) ───────────────────────────────────\n const custom = resolveCustomRoute(modelRef.route)\n if (!custom) return undefined\n\n const basePricing = directPricing ?? DEFAULT_PRICING\n const pricing: LLMPricing = {\n ...basePricing,\n ...custom.pricing,\n vendor: custom.pricing?.vendor ?? basePricing.vendor,\n }\n\n return buildLlmRoute(\n modelRef,\n canonicalProductId,\n pricing,\n {\n flavor: custom.flavor ?? \"custom\",\n baseUrl: custom.baseUrl,\n },\n custom\n )\n}\n\nfunction buildLlmRoute(\n ref: ModelRef,\n canonicalProductId: string,\n pricing: LLMPricing,\n transport: ModelRouteTransport,\n custom?: CustomRouteConfig\n): ResolvedLlmModelRoute {\n return {\n ref,\n vendor: ref.vendor,\n product: ref.product,\n canonicalProductId,\n route: ref.route,\n transport,\n availability: custom?.availability ?? \"available\",\n limits: custom?.limits ?? {},\n pricing,\n }\n}\n\ninterface ParseResult {\n ref: ModelRef\n legacy: boolean\n}\n\n/**\n * Parse a canonical ref, or interpret a bare legacy id as a product-only ref\n * when it resolves through the legacy catalog.\n */\nfunction tryParseOrLegacy(raw: string): ParseResult | undefined {\n if (raw.includes(\"/\")) {\n return { ref: parseModelRef(raw), legacy: false }\n }\n const pricing = resolvePricing(raw)\n if (!pricing) return undefined\n const vendor = pricing.vendor ?? pricing.provider ?? \"unknown\"\n const route = pricing.provider ?? vendor\n return {\n ref: { raw, vendor, product: raw, route },\n legacy: true,\n }\n}\n\n// ── Diagnostics ────────────────────────────────────────────────────────────\n\nexport interface ModelRefDiagnostic {\n ref: ModelRef\n /** True if this string is a legacy bare id rather than vendor/product. */\n legacyBareId: boolean\n /** True if a direct vendor route exists for the product. */\n directAvailable: boolean\n /** True if an OpenRouter route exists for vendor/product. */\n openRouterAvailable: boolean\n /** True if a custom route is registered for the route segment. */\n customRouteAvailable: boolean\n /** Human-readable note when ambiguity or a deprecation applies. */\n note?: string\n}\n\n/**\n * Inspect a model reference and report what routes are available for it.\n *\n * Useful for CLI/UI warnings when a user types `openai/gpt-4o` and an\n * explicit `@openrouter` form also exists: the direct form is chosen, but\n * the note explains how to request the OpenRouter route explicitly.\n */\nexport function diagnoseModelRef(\n input: string | ModelRef\n): ModelRefDiagnostic | undefined {\n const parsed =\n typeof input === \"string\" ? tryParseOrLegacy(input) : { ref: input, legacy: false }\n if (!parsed) return undefined\n\n const { ref, legacy } = parsed\n const directPricing = resolvePricing(ref.product)\n const openRouterKey = `${ref.vendor}/${ref.product}`\n const openRouterPricing = OPENROUTER_ROUTES[openRouterKey]\n const custom = resolveCustomRoute(ref.route)\n\n const directAvailable = !!directPricing\n const openRouterAvailable = !!openRouterPricing\n const customRouteAvailable = !!custom\n\n let note: string | undefined\n if (legacy) {\n note = `Bare product id \"${ref.product}\" is a legacy form; prefer ${ref.vendor}/${ref.product}.`\n } else if (ref.route === ref.vendor && openRouterAvailable) {\n note = `Direct vendor route selected. Use ${ref.vendor}/${ref.product}@openrouter for the OpenRouter route.`\n }\n\n return {\n ref,\n legacyBareId: legacy,\n directAvailable,\n openRouterAvailable,\n customRouteAvailable,\n note,\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- export { a as CatalogPriceTier, b as CatalogPriceTierSchema, C as CatalogProvider, c as CatalogProviderSchema, L as Lifecycle, d as LifecycleSchema, M as ModelKind, e as ModelKindSchema, N as NsfwPolicy, f as NsfwPolicySchema, g as baseEntryShape } from '../base-BNHcMifc.js';
3
- export { A as AudioCapabilities, a as AudioCapabilitiesSchema, b as AudioEntry, c as AudioEntrySchema, d as AudioPricing, e as AudioPricingSchema } from '../audio-BzVF_wke.js';
2
+ export { a as CatalogPriceTier, b as CatalogPriceTierSchema, C as CatalogProvider, c as CatalogProviderSchema, L as Lifecycle, d as LifecycleSchema, M as ModelKind, e as ModelKindSchema, N as NsfwPolicy, f as NsfwPolicySchema, P as PROVIDER_KEY_ENV, g as baseEntryShape } from '../base-BJo3zO1J.js';
3
+ export { A as AudioCapabilities, a as AudioCapabilitiesSchema, b as AudioEntry, c as AudioEntrySchema, d as AudioPricing, e as AudioPricingSchema } from '../audio-DcaMq62v.js';
4
4
  export { CatalogVoice, CatalogVoiceProvider, CatalogVoiceProviderSchema, CatalogVoiceSchema } from './voice.js';
5
5
 
6
6
  /**
@@ -49,6 +49,7 @@ declare const LLMEntrySchema: z.ZodObject<{
49
49
  "openai-realtime": "openai-realtime";
50
50
  openrouter: "openrouter";
51
51
  replicate: "replicate";
52
+ xai: "xai";
52
53
  }>;
53
54
  providerId: z.ZodString;
54
55
  agentVisible: z.ZodDefault<z.ZodBoolean>;
@@ -180,6 +181,7 @@ declare const ImageEntrySchema: z.ZodObject<{
180
181
  "openai-realtime": "openai-realtime";
181
182
  openrouter: "openrouter";
182
183
  replicate: "replicate";
184
+ xai: "xai";
183
185
  }>;
184
186
  providerId: z.ZodString;
185
187
  agentVisible: z.ZodDefault<z.ZodBoolean>;
@@ -319,6 +321,7 @@ declare const VideoEntrySchema: z.ZodObject<{
319
321
  "openai-realtime": "openai-realtime";
320
322
  openrouter: "openrouter";
321
323
  replicate: "replicate";
324
+ xai: "xai";
322
325
  }>;
323
326
  providerId: z.ZodString;
324
327
  agentVisible: z.ZodDefault<z.ZodBoolean>;
@@ -375,6 +378,7 @@ declare const ModelEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
375
378
  "openai-realtime": "openai-realtime";
376
379
  openrouter: "openrouter";
377
380
  replicate: "replicate";
381
+ xai: "xai";
378
382
  }>;
379
383
  providerId: z.ZodString;
380
384
  agentVisible: z.ZodDefault<z.ZodBoolean>;
@@ -453,6 +457,7 @@ declare const ModelEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
453
457
  "openai-realtime": "openai-realtime";
454
458
  openrouter: "openrouter";
455
459
  replicate: "replicate";
460
+ xai: "xai";
456
461
  }>;
457
462
  providerId: z.ZodString;
458
463
  agentVisible: z.ZodDefault<z.ZodBoolean>;
@@ -536,6 +541,7 @@ declare const ModelEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
536
541
  "openai-realtime": "openai-realtime";
537
542
  openrouter: "openrouter";
538
543
  replicate: "replicate";
544
+ xai: "xai";
539
545
  }>;
540
546
  providerId: z.ZodString;
541
547
  agentVisible: z.ZodDefault<z.ZodBoolean>;
@@ -599,6 +605,7 @@ declare const ModelEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
599
605
  "openai-realtime": "openai-realtime";
600
606
  openrouter: "openrouter";
601
607
  replicate: "replicate";
608
+ xai: "xai";
602
609
  }>;
603
610
  providerId: z.ZodString;
604
611
  agentVisible: z.ZodDefault<z.ZodBoolean>;
@@ -1,4 +1,4 @@
1
- export { AudioCapabilitiesSchema, AudioEntrySchema, AudioPricingSchema, CatalogPriceTierSchema, CatalogProviderSchema, ImageAspectRatioSchema, ImageCapabilitiesSchema, ImageEntrySchema, ImagePricingSchema, ImageReferenceImagesSchema, LLMEntrySchema, LifecycleSchema, LlmPricingSchema, ModelEntrySchema, ModelKindSchema, NsfwPolicySchema, VideoCapabilitiesSchema, VideoCostMultipliersSchema, VideoEntrySchema, VideoPricingSchema, VideoResolutionSchema, baseEntryShape } from '../chunk-F7OEHYUI.mjs';
1
+ export { AudioCapabilitiesSchema, AudioEntrySchema, AudioPricingSchema, CatalogPriceTierSchema, CatalogProviderSchema, ImageAspectRatioSchema, ImageCapabilitiesSchema, ImageEntrySchema, ImagePricingSchema, ImageReferenceImagesSchema, LLMEntrySchema, LifecycleSchema, LlmPricingSchema, ModelEntrySchema, ModelKindSchema, NsfwPolicySchema, PROVIDER_KEY_ENV, VideoCapabilitiesSchema, VideoCostMultipliersSchema, VideoEntrySchema, VideoPricingSchema, VideoResolutionSchema, baseEntryShape } from '../chunk-XEYWCRAJ.mjs';
2
2
  export { CatalogVoiceProviderSchema, CatalogVoiceSchema } from '../chunk-HEDDSOZF.mjs';
3
3
  //# sourceMappingURL=index.mjs.map
4
4
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentproto/model-catalog",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Unified, dependency-light model catalog: LLM, image, video, audio entries + cost dispatcher + picker. Zod-only; the OSS core that @agstudio/model-catalog layers billing/access/BYOK on top of.",
5
5
  "keywords": [
6
6
  "agentproto",
@@ -18,7 +18,7 @@
18
18
  "bugs": {
19
19
  "url": "https://github.com/agentproto/ts/issues"
20
20
  },
21
- "license": "MIT",
21
+ "license": "Apache-2.0",
22
22
  "publishConfig": {
23
23
  "access": "public"
24
24
  },
@@ -111,6 +111,11 @@
111
111
  "types": "./dist/overlay/index.d.ts",
112
112
  "import": "./dist/overlay/index.mjs",
113
113
  "default": "./dist/overlay/index.mjs"
114
+ },
115
+ "./route-identity": {
116
+ "types": "./dist/route-identity/index.d.ts",
117
+ "import": "./dist/route-identity/index.mjs",
118
+ "default": "./dist/route-identity/index.mjs"
114
119
  }
115
120
  },
116
121
  "dependencies": {