@agentproto/model-catalog 0.10.3 → 0.11.1

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 (36) hide show
  1. package/dist/access/index.d.ts +3 -3
  2. package/dist/access/index.mjs +4 -4
  3. package/dist/{catalog-BAb74hY-.d.ts → catalog-C7U9nauo.d.ts} +580 -31
  4. package/dist/{chunk-5VXG5VZA.mjs → chunk-CP7JCOA5.mjs} +5 -5
  5. package/dist/{chunk-5VXG5VZA.mjs.map → chunk-CP7JCOA5.mjs.map} +1 -1
  6. package/dist/{chunk-PL4ALP73.mjs → chunk-D3I73UJI.mjs} +68 -87
  7. package/dist/chunk-D3I73UJI.mjs.map +1 -0
  8. package/dist/{chunk-Z6DB2FB7.mjs → chunk-FKBNW5BP.mjs} +3 -3
  9. package/dist/{chunk-Z6DB2FB7.mjs.map → chunk-FKBNW5BP.mjs.map} +1 -1
  10. package/dist/{chunk-7DKQFHCJ.mjs → chunk-GVYUTTTK.mjs} +4 -4
  11. package/dist/{chunk-7DKQFHCJ.mjs.map → chunk-GVYUTTTK.mjs.map} +1 -1
  12. package/dist/{chunk-ZQ6VOPGQ.mjs → chunk-SORQIIXD.mjs} +3 -3
  13. package/dist/{chunk-ZQ6VOPGQ.mjs.map → chunk-SORQIIXD.mjs.map} +1 -1
  14. package/dist/{chunk-DHMYBXQB.mjs → chunk-VABWB67A.mjs} +3 -3
  15. package/dist/{chunk-DHMYBXQB.mjs.map → chunk-VABWB67A.mjs.map} +1 -1
  16. package/dist/{chunk-S2EJIT6D.mjs → chunk-VZCVDFNS.mjs} +216 -128
  17. package/dist/chunk-VZCVDFNS.mjs.map +1 -0
  18. package/dist/{chunk-KJYNTETN.mjs → chunk-X4GZCBVI.mjs} +4 -4
  19. package/dist/{chunk-KJYNTETN.mjs.map → chunk-X4GZCBVI.mjs.map} +1 -1
  20. package/dist/cost/index.mjs +6 -6
  21. package/dist/curation/index.d.ts +2 -2
  22. package/dist/curation/index.mjs +6 -6
  23. package/dist/{evaluate-B83jX17h.d.ts → evaluate-Dm45YM9p.d.ts} +1 -1
  24. package/dist/{index-BWvtVzEG.d.ts → index-D9Ir5Xyq.d.ts} +2 -2
  25. package/dist/{index-vC37SFpk.d.ts → index-qTi3go0T.d.ts} +1 -1
  26. package/dist/index.d.ts +5 -5
  27. package/dist/index.mjs +10 -10
  28. package/dist/llm/index.d.ts +1 -1
  29. package/dist/llm/index.mjs +2 -2
  30. package/dist/overlay/index.d.ts +1 -1
  31. package/dist/picker/index.d.ts +4 -4
  32. package/dist/route-identity/index.d.ts +1 -1
  33. package/dist/route-identity/index.mjs +2 -2
  34. package/package.json +1 -1
  35. package/dist/chunk-PL4ALP73.mjs.map +0 -1
  36. package/dist/chunk-S2EJIT6D.mjs.map +0 -1
@@ -1,7 +1,7 @@
1
- import { listRouterLlmRoutes, formatModelRef } from './chunk-PL4ALP73.mjs';
2
- import { modelHasTag } from './chunk-ZQ6VOPGQ.mjs';
1
+ import { listRouterLlmRoutes, formatModelRef } from './chunk-D3I73UJI.mjs';
2
+ import { modelHasTag } from './chunk-SORQIIXD.mjs';
3
3
  import { getMergedOverlay } from './chunk-H6JUTF3U.mjs';
4
- import { resolvePricing, resolveAlias, isKnownLlmId, getModelProvider, LLM_PRICING_CATALOG, listUnpricedKnownLlmIds } from './chunk-S2EJIT6D.mjs';
4
+ import { resolvePricing, resolveAlias, isKnownLlmId, getModelProvider, LLM_PRICING_CATALOG, listUnpricedKnownLlmIds } from './chunk-VZCVDFNS.mjs';
5
5
  import { IMAGE_MODEL_CATALOG } from './chunk-2LWYZOWB.mjs';
6
6
  import { VIDEO_MODEL_CATALOG } from './chunk-IJZ4XPO2.mjs';
7
7
  import { AUDIO_MODEL_CATALOG } from './chunk-WRUWNKDB.mjs';
@@ -202,5 +202,5 @@ function resolveAlias2(id) {
202
202
  }
203
203
 
204
204
  export { getModel, getModelsByProvider, getStaticModelProvider, isAgentVisible, listModels, resolveAlias2 as resolveAlias };
205
- //# sourceMappingURL=chunk-5VXG5VZA.mjs.map
206
- //# sourceMappingURL=chunk-5VXG5VZA.mjs.map
205
+ //# sourceMappingURL=chunk-CP7JCOA5.mjs.map
206
+ //# sourceMappingURL=chunk-CP7JCOA5.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/registry/index.ts"],"names":["resolveAlias"],"mappings":";;;;;;;;;;;;;;;;AAsCA,SAAS,WAAA,CAAY,IAAY,EAAA,EAA2B;AAC1D,EAAA,IAAI,GAAA,GAAM,EAAA;AACV,EAAA,MAAM,IAAA,uBAAW,GAAA,EAAY;AAC7B,EAAA,WAAS;AACP,IAAA,MAAM,IAAA,GAAO,EAAA,CAAG,OAAA,CAAQ,GAAG,CAAA;AAC3B,IAAA,IAAI,IAAA,KAAS,MAAA,IAAa,IAAA,CAAK,GAAA,CAAI,GAAG,CAAA,EAAG;AACzC,IAAA,IAAA,CAAK,IAAI,GAAG,CAAA;AACZ,IAAA,GAAA,GAAM,IAAA;AAAA,EACR;AACA,EAAA,OAAO,GAAA;AACT;AAGA,SAAS,YAAA,CAAa,IAAmB,GAAA,EAAuC;AAC9E,EAAA,OAAO,GAAG,KAAA,CAAM,IAAA;AAAA,IACd,CAAA,CAAA,KACE,CAAA,CAAE,SAAA,KAAc,GAAA,IAChB,CAAA,CAAE,eAAA,KAAoB,GAAA,IAAA,CACrB,CAAA,CAAE,OAAA,IAAW,EAAC,EAAG,QAAA,CAAS,GAAG;AAAA,GAClC;AACF;AAuCA,IAAM,WAAA,GAAyC,IAAI,GAAA,CAAI;AAAA,EACrD,GAAG,cAAc,GAAA,CAAI,CAAA,CAAA,KAAK,CAAC,CAAA,CAAE,eAAA,EAAiB,CAAC,CAAU,CAAA;AAAA,EACzD,GAAG,cAAc,GAAA,CAAI,CAAA,CAAA,KAAK,CAAC,CAAA,CAAE,SAAA,EAAW,CAAC,CAAU,CAAA;AAAA,EACnD,GAAG,aAAA,CAAc,OAAA;AAAA,IAAQ,CAAC,CAAA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AAA,EAAI,GAAG,CAAA,EAAG,OAAO,GAAA;AAClC,EAAA,IAAI,EAAA,CAAG,GAAA,CAAI,GAAG,CAAA,EAAG,OAAO,GAAA;AACxB,EAAA,IAAI,mBAAA,CAAoB,GAAG,CAAA,EAAG,OAAO,GAAA;AACrC,EAAA,IAAI,mBAAA,CAAoB,GAAG,CAAA,EAAG,OAAO,GAAA;AACrC,EAAA,IAAI,mBAAA,CAAoB,GAAG,CAAA,EAAG,OAAO,GAAA;AACrC,EAAA,IAAI,WAAA,CAAY,GAAA,CAAI,GAAG,CAAA,EAAG,OAAO,GAAA;AACjC,EAAA,OAAO,aAAgB,GAAG,CAAA;AAC5B","file":"chunk-5VXG5VZA.mjs","sourcesContent":["/**\n * Cross-kind registry. Resolves a model id against every catalog (LLM,\n * image, video, audio) and returns a discriminated `ResolvedModel`.\n *\n * v1 returns the legacy per-kind data shapes verbatim — image/video keep\n * `*ModelDefinition`, LLM keeps `LLMPricing`, audio surfaces voices.\n * Callers (cost dispatcher, access evaluator) match on `.kind` and dig\n * into the per-kind payload as needed.\n */\n\nimport {\n LLM_PRICING_CATALOG,\n resolveAlias as resolveLlmAlias,\n resolvePricing,\n isKnownLlmId,\n listUnpricedKnownLlmIds,\n getModelProvider,\n type LLMPricing,\n} from \"../llm/index.js\"\nimport {\n IMAGE_MODEL_CATALOG,\n type ImageModelDefinition,\n} from \"../image/index.js\"\nimport {\n VIDEO_MODEL_CATALOG,\n type VideoModelDefinition,\n} from \"../video/index.js\"\nimport {\n AUDIO_MODEL_CATALOG,\n type AudioModelDefinition,\n} from \"../audio/index.js\"\nimport { VOICE_CATALOG, type CatalogVoice } from \"../voice/index.js\"\nimport { modelHasTag } from \"../enrichment/index.js\"\nimport { getMergedOverlay, type MergedOverlay } from \"../overlay/index.js\"\nimport { listRouterLlmRoutes, formatModelRef } from \"../route-identity/index.js\"\n\n/** Follow consumer-overlay alias hops to a concrete id (cycle-guarded).\n * Ids with no overlay alias pass through unchanged. */\nfunction followAlias(id: string, ov: MergedOverlay): string {\n let cur = id\n const seen = new Set<string>()\n for (;;) {\n const next = ov.aliases[cur]\n if (next === undefined || seen.has(cur)) break\n seen.add(cur)\n cur = next\n }\n return cur\n}\n\n/** Find an overlay voice by catalogId / providerVoiceId / alias. */\nfunction overlayVoice(ov: MergedOverlay, key: string): CatalogVoice | undefined {\n return ov.voice.find(\n v =>\n v.catalogId === key ||\n v.providerVoiceId === key ||\n (v.aliases ?? []).includes(key),\n )\n}\n\n/**\n * `audio` resolves to either an audio MODEL (priced TTS/STT) or a\n * voice (downstream metadata). Most call sites care about the model\n * (pricing, capabilities); a few (voice pickers) want the voice. They\n * share the resolver but discriminate on the inner payload.\n */\nexport type ResolvedModel =\n | {\n kind: \"llm\"\n id: string\n canonicalId: string\n /** Undefined for a real, known id with no pricing row yet — existence\n * and pricing are independent, see `LlmModelId`'s doc comment in\n * `llm/catalog.ts`. Every reader MUST handle the absent case; never\n * assume a `kind: \"llm\"` result is priced. */\n pricing: LLMPricing | undefined\n /** Best-effort provider even when `pricing` is absent (falls back to\n * `CONTEXT_WINDOWS`'s own provider field — see `getModelProvider`).\n * Prefer this over `pricing?.provider` when you only need routing. */\n provider: string | undefined\n }\n | { kind: \"image\"; id: string; def: ImageModelDefinition }\n | { kind: \"video\"; id: string; def: VideoModelDefinition }\n | { kind: \"audio\"; id: string; def: AudioModelDefinition }\n | { kind: \"voice\"; id: string; voice: CatalogVoice }\n\n/**\n * Every kind the registry can resolve. Broader than the catalog\n * `ModelKind` (llm/image/video/audio) because voices are a first-class\n * registry kind but not a priced model family. Derived from\n * `ResolvedModel` so it can never drift.\n */\nexport type CatalogKind = ResolvedModel[\"kind\"]\n\n// Voices resolve by canonical id (\"minimax-french-female-anchor\"), native\n// provider id (\"French_FemaleAnchor\"), or a consumer-overlay alias — index\n// all three so new slugs, native ids, and persisted operator rows all hit.\nconst VOICE_INDEX: Map<string, CatalogVoice> = new Map([\n ...VOICE_CATALOG.map(v => [v.providerVoiceId, v] as const),\n ...VOICE_CATALOG.map(v => [v.catalogId, v] as const),\n ...VOICE_CATALOG.flatMap((v: CatalogVoice) =>\n (v.aliases ?? []).map(a => [a, v] as const)\n ),\n])\n\n/**\n * Resolves a model id across every catalog.\n *\n * Lookup order: image → video → audio → LLM (last because LLM has the\n * partial-prefix fallback that can match other strings if probed first).\n *\n * Returns `undefined` for unknown ids — callers decide whether to throw\n * or fall back. LLM uses fallback pricing inside its own dispatcher\n * (preserves existing behavior at the orchestrator).\n */\nexport function getModel(id: string): ResolvedModel | undefined {\n // Consumer overlays first: resolve any overlay alias to a concrete id,\n // then let overlay entries override/extend the generated catalogs. The\n // returned `id` echoes what the caller asked for (alias-preserving), as\n // the legacy voice-alias path already did.\n const ov = getMergedOverlay()\n const key = followAlias(id, ov)\n\n if (ov.image[key]) return { kind: \"image\", id, def: ov.image[key]! }\n if (ov.video[key]) return { kind: \"video\", id, def: ov.video[key]! }\n if (ov.audio[key]) return { kind: \"audio\", id, def: ov.audio[key]! }\n const ovVoice = overlayVoice(ov, key)\n if (ovVoice) return { kind: \"voice\", id, voice: ovVoice }\n if (ov.llm[key]) {\n const pricing = ov.llm[key]!\n return { kind: \"llm\", id, canonicalId: key, pricing, provider: pricing.provider }\n }\n\n const imageDef = IMAGE_MODEL_CATALOG[key]\n if (imageDef) return { kind: \"image\", id, def: imageDef }\n\n const videoDef = VIDEO_MODEL_CATALOG[key]\n if (videoDef) return { kind: \"video\", id, def: videoDef }\n\n // Audio MODEL (priced TTS/STT) — checked before voice lookup so an\n // id that exists in both maps lands on the priced entry.\n const audioDef = AUDIO_MODEL_CATALOG[key]\n if (audioDef) return { kind: \"audio\", id, def: audioDef }\n\n const voice = VOICE_INDEX.get(key)\n if (voice) return { kind: \"voice\", id, voice }\n\n const llmPricing = resolvePricing(key)\n if (llmPricing) {\n const canonicalId = resolveLlmAlias(key)\n return { kind: \"llm\", id, canonicalId, pricing: llmPricing, provider: llmPricing.provider }\n }\n // Known id, no pricing row yet (see `LlmModelId`'s doc comment in\n // llm/catalog.ts) — still resolves, just unpriced. This is the case that\n // used to make a real, live, provider-published model (e.g. a brand-new\n // Anthropic release the day it ships, before the next pricing sync)\n // disappear from every downstream surface instead of showing up unpriced.\n if (isKnownLlmId(key)) {\n return { kind: \"llm\", id, canonicalId: key, pricing: undefined, provider: getModelProvider(key) }\n }\n\n return undefined\n}\n\n/**\n * Returns true iff the id is exposed to agents.\n *\n * - LLM: every entry in `LLM_PRICING_CATALOG` is considered visible\n * (legacy convention; refine in v2 with per-entry `agentVisible`).\n * - Image / Video: respects the `agentVisible` flag.\n * - Audio voices: all voices are visible (catalog itself is curated).\n */\nexport function isAgentVisible(id: string): boolean {\n const m = getModel(id)\n if (!m) return false\n switch (m.kind) {\n case \"image\":\n return m.def.agentVisible\n case \"video\":\n return m.def.agentVisible\n case \"audio\":\n return m.def.agentVisible\n case \"llm\":\n return (\n id in LLM_PRICING_CATALOG || resolveLlmAlias(id) in LLM_PRICING_CATALOG\n )\n case \"voice\":\n return true\n }\n}\n\nexport interface ListModelsFilter {\n kind?: CatalogKind\n /** Single provider (back-compat). Folded into `providers` internally. */\n provider?: string\n /** Provider OR-set — a model matches if its provider is any of these. */\n providers?: string[]\n /**\n * Capability tags a model must carry (ALL of them). Capabilities are\n * emitted as tags by enrichment — audio `tts`/`stt`/`s2s`, image\n * `edit`/`upscale`, video `i2v`/`t2v` — so this filters on the same\n * vocabulary `listModels({capabilities:[\"s2s\"]})` would expect.\n */\n capabilities?: string[]\n /** Arbitrary tags a model must carry (ALL of them). */\n tags?: string[]\n agentVisibleOnly?: boolean\n}\n\n/**\n * Cross-kind listing. Useful for catalog browsers and capability search.\n * Returns `ResolvedModel[]` (discriminated by kind).\n *\n * Provider is an OR-set (`providers` ∪ the singular `provider`); capability\n * and tag filters are AND-sets (a model must carry every listed value).\n * Composed: `listModels({ kind:\"audio\", capabilities:[\"s2s\"],\n * providers:[\"gemini-live\",\"openai-realtime\"] })` → all s2s models from\n * Gemini OR OpenAI.\n */\nexport function listModels(filter: ListModelsFilter = {}): ResolvedModel[] {\n const providerSet =\n filter.provider || filter.providers\n ? new Set([\n ...(filter.provider ? [filter.provider] : []),\n ...(filter.providers ?? []),\n ])\n : undefined\n const providerMatches = (provider: string | undefined): boolean =>\n !providerSet || (provider !== undefined && providerSet.has(provider))\n\n const ov = getMergedOverlay()\n const out: ResolvedModel[] = []\n // Overlay entries override core ones with the same id, so collect ids the\n // overlay has already supplied per kind and skip the core duplicate.\n const seen = { image: new Set<string>(), video: new Set<string>(), audio: new Set<string>(), voice: new Set<string>(), llm: new Set<string>() }\n\n if (!filter.kind || filter.kind === \"image\") {\n for (const [id, def] of Object.entries(ov.image)) {\n if (!providerMatches(def.provider)) continue\n if (filter.agentVisibleOnly && !def.agentVisible) continue\n seen.image.add(id)\n out.push({ kind: \"image\", id, def })\n }\n for (const [id, def] of Object.entries(IMAGE_MODEL_CATALOG)) {\n if (seen.image.has(id) || !providerMatches(def.provider)) continue\n if (filter.agentVisibleOnly && !def.agentVisible) continue\n out.push({ kind: \"image\", id, def })\n }\n }\n if (!filter.kind || filter.kind === \"video\") {\n for (const [id, def] of Object.entries(ov.video)) {\n if (!providerMatches(def.provider)) continue\n if (filter.agentVisibleOnly && !def.agentVisible) continue\n seen.video.add(id)\n out.push({ kind: \"video\", id, def })\n }\n for (const [id, def] of Object.entries(VIDEO_MODEL_CATALOG)) {\n if (seen.video.has(id) || !providerMatches(def.provider)) continue\n if (filter.agentVisibleOnly && !def.agentVisible) continue\n out.push({ kind: \"video\", id, def })\n }\n }\n if (!filter.kind || filter.kind === \"audio\") {\n for (const [id, def] of Object.entries(ov.audio)) {\n if (!providerMatches(def.provider)) continue\n if (filter.agentVisibleOnly && !def.agentVisible) continue\n seen.audio.add(id)\n out.push({ kind: \"audio\", id, def })\n }\n for (const [id, def] of Object.entries(AUDIO_MODEL_CATALOG)) {\n if (seen.audio.has(id) || !providerMatches(def.provider)) continue\n if (filter.agentVisibleOnly && !def.agentVisible) continue\n out.push({ kind: \"audio\", id, def })\n }\n }\n if (!filter.kind || filter.kind === \"voice\") {\n for (const v of ov.voice) {\n if (!providerMatches(v.provider)) continue\n seen.voice.add(v.catalogId)\n out.push({ kind: \"voice\", id: v.catalogId, voice: v })\n }\n for (const v of VOICE_CATALOG) {\n if (seen.voice.has(v.catalogId) || !providerMatches(v.provider)) continue\n out.push({ kind: \"voice\", id: v.catalogId, voice: v })\n }\n }\n if (!filter.kind || filter.kind === \"llm\") {\n for (const [id, pricing] of Object.entries(ov.llm)) {\n if (!providerMatches(pricing.provider)) continue\n seen.llm.add(id)\n out.push({ kind: \"llm\", id, canonicalId: id, pricing, provider: pricing.provider })\n }\n for (const [id, pricing] of Object.entries(LLM_PRICING_CATALOG)) {\n if (seen.llm.has(id) || !providerMatches(pricing.provider)) continue\n seen.llm.add(id)\n out.push({ kind: \"llm\", id, canonicalId: id, pricing, provider: pricing.provider })\n }\n // Known ids with no pricing row yet (see `LlmModelId`'s doc comment in\n // llm/catalog.ts) — surfaced unpriced rather than silently dropped.\n for (const { id, provider } of listUnpricedKnownLlmIds()) {\n if (seen.llm.has(id) || !providerMatches(provider)) continue\n out.push({ kind: \"llm\", id, canonicalId: id, pricing: undefined, provider })\n }\n }\n\n // Capability + tag filters are AND-sets, applied over the enrichment tag\n // vocabulary (capabilities are emitted as tags). Skipped entirely when\n // unset so the common path stays allocation-free.\n const required = [...(filter.capabilities ?? []), ...(filter.tags ?? [])]\n if (required.length === 0) return out\n return out.filter(model => required.every(tag => modelHasTag(model, tag)))\n}\n\n/**\n * Provider-centric view — every model a provider offers across all kinds\n * (llm / image / video / audio incl. tts/stt/s2s). This is the \"provider\n * catalog\" (openai, google, anthropic, replicate, openrouter, …): a\n * derived query over the kind-organized catalogs, NOT a parallel store.\n *\n * When `provider` names a router or a routed endpoint (openrouter, requesty,\n * huggingface, opencode, opencode-go), this also folds in that provider's\n * generated route table (`listRouterLlmRoutes`) — the provider's full\n * surface, not just what happens to be curated into `LLM_PRICING_CATALOG`.\n * The emitted id is whatever `formatModelRef` produces for the resolved ref:\n * `vendor/product@router` for the vendor-namespacing routers, and the bare\n * `opencode-go/glm-5.3` / `opencode/claude-sonnet-4-6` form for the two\n * OpenCode endpoints, whose route IS the id's leading segment (so there is no\n * `@route` to append). OpenRouter's routes are already spread into\n * `LLM_PRICING_CATALOG` (bare `vendor/product` ids, `llm/catalog.ts`), so its\n * router-table entries are deduped against the bare ids `listModels` already\n * returned; Requesty, HuggingFace and the two OpenCode endpoints have no such\n * overlap, so their route table entries are added in full. Deliberately NOT\n * achieved by spreading `REQUESTY_ROUTES`/`HUGGINGFACE_ROUTES`/\n * `OPENCODE_*_ROUTES` into `LLM_PRICING_CATALOG` itself — that catalog is the\n * legacy bare-id path, and a bare id must keep meaning direct-vendor pricing\n * (`route-identity/index.ts`).\n */\nexport function getModelsByProvider(provider: string): ResolvedModel[] {\n const models = listModels({ provider })\n const routerRoutes = listRouterLlmRoutes(provider)\n if (routerRoutes.length === 0) return models\n\n const existingIds = new Set(models.map(m => m.id))\n const routed: ResolvedModel[] = []\n for (const route of routerRoutes) {\n const bareId = `${route.vendor}/${route.product}`\n if (existingIds.has(bareId)) continue\n const id = formatModelRef(route.ref)\n routed.push({ kind: \"llm\", id, canonicalId: id, pricing: route.pricing, provider: route.pricing.provider })\n }\n return [...models, ...routed]\n}\n\n/**\n * Returns the platform a model's adapter is **statically pinned** to,\n * if known. ONLY meaningful for image / video / audio — those adapters\n * are constructed per-platform (Replicate adapter, MiniMax adapter…),\n * so the model's `def.provider` IS the runtime connector.\n *\n * For LLM, returns `undefined` — the runtime connector is determined\n * at call time by `pickLlmConnector(connectors, parseModelId(id).provider)`\n * against the guild's installed connectors, NOT by the model id alone.\n * The same `anthropic/claude-sonnet-4-5` can route through OpenRouter\n * OR direct Anthropic depending on which connectors the guild has\n * installed. Recording call sites MUST pass the actual `connectorUsed`\n * they invoked; do not infer from id.\n *\n * Use case: image/video workflow steps fetch `model.def.provider`\n * directly (no ambiguity). LLM call sites use the runtime resolver.\n */\nexport function getStaticModelProvider(\n model: ResolvedModel\n): string | undefined {\n switch (model.kind) {\n case \"image\":\n case \"video\":\n case \"audio\":\n return model.def.provider\n case \"voice\":\n return model.voice.provider\n case \"llm\":\n // Runtime routing — caller knows, we don't.\n return undefined\n }\n}\n\n/**\n * Resolves an id to its canonical catalog key across kinds. For ids that\n * have no alias, returns the id unchanged. Used by callers that want to\n * normalize before persisting (e.g., `byok_usage` rows).\n */\nexport function resolveAlias(id: string): string {\n const ov = getMergedOverlay()\n const key = followAlias(id, ov)\n if (ov.image[key] || ov.video[key] || ov.audio[key]) return key\n if (overlayVoice(ov, key)) return key\n if (ov.llm[key]) return key\n if (IMAGE_MODEL_CATALOG[key]) return key\n if (VIDEO_MODEL_CATALOG[key]) return key\n if (AUDIO_MODEL_CATALOG[key]) return key\n if (VOICE_INDEX.has(key)) return key\n return resolveLlmAlias(key)\n}\n"]}
1
+ {"version":3,"sources":["../src/registry/index.ts"],"names":["resolveAlias"],"mappings":";;;;;;;;;;;;;;;;AAsCA,SAAS,WAAA,CAAY,IAAY,EAAA,EAA2B;AAC1D,EAAA,IAAI,GAAA,GAAM,EAAA;AACV,EAAA,MAAM,IAAA,uBAAW,GAAA,EAAY;AAC7B,EAAA,WAAS;AACP,IAAA,MAAM,IAAA,GAAO,EAAA,CAAG,OAAA,CAAQ,GAAG,CAAA;AAC3B,IAAA,IAAI,IAAA,KAAS,MAAA,IAAa,IAAA,CAAK,GAAA,CAAI,GAAG,CAAA,EAAG;AACzC,IAAA,IAAA,CAAK,IAAI,GAAG,CAAA;AACZ,IAAA,GAAA,GAAM,IAAA;AAAA,EACR;AACA,EAAA,OAAO,GAAA;AACT;AAGA,SAAS,YAAA,CAAa,IAAmB,GAAA,EAAuC;AAC9E,EAAA,OAAO,GAAG,KAAA,CAAM,IAAA;AAAA,IACd,CAAA,CAAA,KACE,CAAA,CAAE,SAAA,KAAc,GAAA,IAChB,CAAA,CAAE,eAAA,KAAoB,G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AM,QAAA;AAAA,IACrB,KAAK,KAAA;AAEH,MAAA,OAAO,MAAA;AAAA;AAEb;AAOO,SAASA,cAAa,EAAA,EAAoB;AAC/C,EAAA,MAAM,KAAK,gBAAA,EAAiB;AAC5B,EAAA,MAAM,GAAA,GAAM,WAAA,CAAY,EAAA,EAAI,EAAE,CAAA;AAC9B,EAAA,IAAI,EAAA,CAAG,KAAA,CAAM,GAAG,CAAA,IAAK,EAAA,CAAG,KAAA,CAAM,GAAG,CAAA,IAAK,EAAA,CAAG,KAAA,CAAM,GAAG,CAAA,EAAG,OAAO,GAAA;AAC5D,EAAA,IAAI,YAAA,CAAa,EAAA,EAAI,GAAG,CAAA,EAAG,OAAO,GAAA;AAClC,EAAA,IAAI,EAAA,CAAG,GAAA,CAAI,GAAG,CAAA,EAAG,OAAO,GAAA;AACxB,EAAA,IAAI,mBAAA,CAAoB,GAAG,CAAA,EAAG,OAAO,GAAA;AACrC,EAAA,IAAI,mBAAA,CAAoB,GAAG,CAAA,EAAG,OAAO,GAAA;AACrC,EAAA,IAAI,mBAAA,CAAoB,GAAG,CAAA,EAAG,OAAO,GAAA;AACrC,EAAA,IAAI,WAAA,CAAY,GAAA,CAAI,GAAG,CAAA,EAAG,OAAO,GAAA;AACjC,EAAA,OAAO,aAAgB,GAAG,CAAA;AAC5B","file":"chunk-CP7JCOA5.mjs","sourcesContent":["/**\n * Cross-kind registry. Resolves a model id against every catalog (LLM,\n * image, video, audio) and returns a discriminated `ResolvedModel`.\n *\n * v1 returns the legacy per-kind data shapes verbatim — image/video keep\n * `*ModelDefinition`, LLM keeps `LLMPricing`, audio surfaces voices.\n * Callers (cost dispatcher, access evaluator) match on `.kind` and dig\n * into the per-kind payload as needed.\n */\n\nimport {\n LLM_PRICING_CATALOG,\n resolveAlias as resolveLlmAlias,\n resolvePricing,\n isKnownLlmId,\n listUnpricedKnownLlmIds,\n getModelProvider,\n type LLMPricing,\n} from \"../llm/index.js\"\nimport {\n IMAGE_MODEL_CATALOG,\n type ImageModelDefinition,\n} from \"../image/index.js\"\nimport {\n VIDEO_MODEL_CATALOG,\n type VideoModelDefinition,\n} from \"../video/index.js\"\nimport {\n AUDIO_MODEL_CATALOG,\n type AudioModelDefinition,\n} from \"../audio/index.js\"\nimport { VOICE_CATALOG, type CatalogVoice } from \"../voice/index.js\"\nimport { modelHasTag } from \"../enrichment/index.js\"\nimport { getMergedOverlay, type MergedOverlay } from \"../overlay/index.js\"\nimport { listRouterLlmRoutes, formatModelRef } from \"../route-identity/index.js\"\n\n/** Follow consumer-overlay alias hops to a concrete id (cycle-guarded).\n * Ids with no overlay alias pass through unchanged. */\nfunction followAlias(id: string, ov: MergedOverlay): string {\n let cur = id\n const seen = new Set<string>()\n for (;;) {\n const next = ov.aliases[cur]\n if (next === undefined || seen.has(cur)) break\n seen.add(cur)\n cur = next\n }\n return cur\n}\n\n/** Find an overlay voice by catalogId / providerVoiceId / alias. */\nfunction overlayVoice(ov: MergedOverlay, key: string): CatalogVoice | undefined {\n return ov.voice.find(\n v =>\n v.catalogId === key ||\n v.providerVoiceId === key ||\n (v.aliases ?? []).includes(key),\n )\n}\n\n/**\n * `audio` resolves to either an audio MODEL (priced TTS/STT) or a\n * voice (downstream metadata). Most call sites care about the model\n * (pricing, capabilities); a few (voice pickers) want the voice. They\n * share the resolver but discriminate on the inner payload.\n */\nexport type ResolvedModel =\n | {\n kind: \"llm\"\n id: string\n canonicalId: string\n /** Undefined for a real, known id with no pricing row yet — existence\n * and pricing are independent, see `LlmModelId`'s doc comment in\n * `llm/catalog.ts`. Every reader MUST handle the absent case; never\n * assume a `kind: \"llm\"` result is priced. */\n pricing: LLMPricing | undefined\n /** Best-effort provider even when `pricing` is absent (falls back to\n * `CONTEXT_WINDOWS`'s own provider field — see `getModelProvider`).\n * Prefer this over `pricing?.provider` when you only need routing. */\n provider: string | undefined\n }\n | { kind: \"image\"; id: string; def: ImageModelDefinition }\n | { kind: \"video\"; id: string; def: VideoModelDefinition }\n | { kind: \"audio\"; id: string; def: AudioModelDefinition }\n | { kind: \"voice\"; id: string; voice: CatalogVoice }\n\n/**\n * Every kind the registry can resolve. Broader than the catalog\n * `ModelKind` (llm/image/video/audio) because voices are a first-class\n * registry kind but not a priced model family. Derived from\n * `ResolvedModel` so it can never drift.\n */\nexport type CatalogKind = ResolvedModel[\"kind\"]\n\n// Voices resolve by canonical id (\"minimax-french-female-anchor\"), native\n// provider id (\"French_FemaleAnchor\"), or a consumer-overlay alias — index\n// all three so new slugs, native ids, and persisted operator rows all hit.\nconst VOICE_INDEX: Map<string, CatalogVoice> = new Map([\n ...VOICE_CATALOG.map(v => [v.providerVoiceId, v] as const),\n ...VOICE_CATALOG.map(v => [v.catalogId, v] as const),\n ...VOICE_CATALOG.flatMap((v: CatalogVoice) =>\n (v.aliases ?? []).map(a => [a, v] as const)\n ),\n])\n\n/**\n * Resolves a model id across every catalog.\n *\n * Lookup order: image → video → audio → LLM (last because LLM has the\n * partial-prefix fallback that can match other strings if probed first).\n *\n * Returns `undefined` for unknown ids — callers decide whether to throw\n * or fall back. LLM uses fallback pricing inside its own dispatcher\n * (preserves existing behavior at the orchestrator).\n */\nexport function getModel(id: string): ResolvedModel | undefined {\n // Consumer overlays first: resolve any overlay alias to a concrete id,\n // then let overlay entries override/extend the generated catalogs. The\n // returned `id` echoes what the caller asked for (alias-preserving), as\n // the legacy voice-alias path already did.\n const ov = getMergedOverlay()\n const key = followAlias(id, ov)\n\n if (ov.image[key]) return { kind: \"image\", id, def: ov.image[key]! }\n if (ov.video[key]) return { kind: \"video\", id, def: ov.video[key]! }\n if (ov.audio[key]) return { kind: \"audio\", id, def: ov.audio[key]! }\n const ovVoice = overlayVoice(ov, key)\n if (ovVoice) return { kind: \"voice\", id, voice: ovVoice }\n if (ov.llm[key]) {\n const pricing = ov.llm[key]!\n return { kind: \"llm\", id, canonicalId: key, pricing, provider: pricing.provider }\n }\n\n const imageDef = IMAGE_MODEL_CATALOG[key]\n if (imageDef) return { kind: \"image\", id, def: imageDef }\n\n const videoDef = VIDEO_MODEL_CATALOG[key]\n if (videoDef) return { kind: \"video\", id, def: videoDef }\n\n // Audio MODEL (priced TTS/STT) — checked before voice lookup so an\n // id that exists in both maps lands on the priced entry.\n const audioDef = AUDIO_MODEL_CATALOG[key]\n if (audioDef) return { kind: \"audio\", id, def: audioDef }\n\n const voice = VOICE_INDEX.get(key)\n if (voice) return { kind: \"voice\", id, voice }\n\n const llmPricing = resolvePricing(key)\n if (llmPricing) {\n const canonicalId = resolveLlmAlias(key)\n return { kind: \"llm\", id, canonicalId, pricing: llmPricing, provider: llmPricing.provider }\n }\n // Known id, no pricing row yet (see `LlmModelId`'s doc comment in\n // llm/catalog.ts) — still resolves, just unpriced. This is the case that\n // used to make a real, live, provider-published model (e.g. a brand-new\n // Anthropic release the day it ships, before the next pricing sync)\n // disappear from every downstream surface instead of showing up unpriced.\n if (isKnownLlmId(key)) {\n return { kind: \"llm\", id, canonicalId: key, pricing: undefined, provider: getModelProvider(key) }\n }\n\n return undefined\n}\n\n/**\n * Returns true iff the id is exposed to agents.\n *\n * - LLM: every entry in `LLM_PRICING_CATALOG` is considered visible\n * (legacy convention; refine in v2 with per-entry `agentVisible`).\n * - Image / Video: respects the `agentVisible` flag.\n * - Audio voices: all voices are visible (catalog itself is curated).\n */\nexport function isAgentVisible(id: string): boolean {\n const m = getModel(id)\n if (!m) return false\n switch (m.kind) {\n case \"image\":\n return m.def.agentVisible\n case \"video\":\n return m.def.agentVisible\n case \"audio\":\n return m.def.agentVisible\n case \"llm\":\n return (\n id in LLM_PRICING_CATALOG || resolveLlmAlias(id) in LLM_PRICING_CATALOG\n )\n case \"voice\":\n return true\n }\n}\n\nexport interface ListModelsFilter {\n kind?: CatalogKind\n /** Single provider (back-compat). Folded into `providers` internally. */\n provider?: string\n /** Provider OR-set — a model matches if its provider is any of these. */\n providers?: string[]\n /**\n * Capability tags a model must carry (ALL of them). Capabilities are\n * emitted as tags by enrichment — audio `tts`/`stt`/`s2s`, image\n * `edit`/`upscale`, video `i2v`/`t2v` — so this filters on the same\n * vocabulary `listModels({capabilities:[\"s2s\"]})` would expect.\n */\n capabilities?: string[]\n /** Arbitrary tags a model must carry (ALL of them). */\n tags?: string[]\n agentVisibleOnly?: boolean\n}\n\n/**\n * Cross-kind listing. Useful for catalog browsers and capability search.\n * Returns `ResolvedModel[]` (discriminated by kind).\n *\n * Provider is an OR-set (`providers` ∪ the singular `provider`); capability\n * and tag filters are AND-sets (a model must carry every listed value).\n * Composed: `listModels({ kind:\"audio\", capabilities:[\"s2s\"],\n * providers:[\"gemini-live\",\"openai-realtime\"] })` → all s2s models from\n * Gemini OR OpenAI.\n */\nexport function listModels(filter: ListModelsFilter = {}): ResolvedModel[] {\n const providerSet =\n filter.provider || filter.providers\n ? new Set([\n ...(filter.provider ? [filter.provider] : []),\n ...(filter.providers ?? []),\n ])\n : undefined\n const providerMatches = (provider: string | undefined): boolean =>\n !providerSet || (provider !== undefined && providerSet.has(provider))\n\n const ov = getMergedOverlay()\n const out: ResolvedModel[] = []\n // Overlay entries override core ones with the same id, so collect ids the\n // overlay has already supplied per kind and skip the core duplicate.\n const seen = { image: new Set<string>(), video: new Set<string>(), audio: new Set<string>(), voice: new Set<string>(), llm: new Set<string>() }\n\n if (!filter.kind || filter.kind === \"image\") {\n for (const [id, def] of Object.entries(ov.image)) {\n if (!providerMatches(def.provider)) continue\n if (filter.agentVisibleOnly && !def.agentVisible) continue\n seen.image.add(id)\n out.push({ kind: \"image\", id, def })\n }\n for (const [id, def] of Object.entries(IMAGE_MODEL_CATALOG)) {\n if (seen.image.has(id) || !providerMatches(def.provider)) continue\n if (filter.agentVisibleOnly && !def.agentVisible) continue\n out.push({ kind: \"image\", id, def })\n }\n }\n if (!filter.kind || filter.kind === \"video\") {\n for (const [id, def] of Object.entries(ov.video)) {\n if (!providerMatches(def.provider)) continue\n if (filter.agentVisibleOnly && !def.agentVisible) continue\n seen.video.add(id)\n out.push({ kind: \"video\", id, def })\n }\n for (const [id, def] of Object.entries(VIDEO_MODEL_CATALOG)) {\n if (seen.video.has(id) || !providerMatches(def.provider)) continue\n if (filter.agentVisibleOnly && !def.agentVisible) continue\n out.push({ kind: \"video\", id, def })\n }\n }\n if (!filter.kind || filter.kind === \"audio\") {\n for (const [id, def] of Object.entries(ov.audio)) {\n if (!providerMatches(def.provider)) continue\n if (filter.agentVisibleOnly && !def.agentVisible) continue\n seen.audio.add(id)\n out.push({ kind: \"audio\", id, def })\n }\n for (const [id, def] of Object.entries(AUDIO_MODEL_CATALOG)) {\n if (seen.audio.has(id) || !providerMatches(def.provider)) continue\n if (filter.agentVisibleOnly && !def.agentVisible) continue\n out.push({ kind: \"audio\", id, def })\n }\n }\n if (!filter.kind || filter.kind === \"voice\") {\n for (const v of ov.voice) {\n if (!providerMatches(v.provider)) continue\n seen.voice.add(v.catalogId)\n out.push({ kind: \"voice\", id: v.catalogId, voice: v })\n }\n for (const v of VOICE_CATALOG) {\n if (seen.voice.has(v.catalogId) || !providerMatches(v.provider)) continue\n out.push({ kind: \"voice\", id: v.catalogId, voice: v })\n }\n }\n if (!filter.kind || filter.kind === \"llm\") {\n for (const [id, pricing] of Object.entries(ov.llm)) {\n if (!providerMatches(pricing.provider)) continue\n seen.llm.add(id)\n out.push({ kind: \"llm\", id, canonicalId: id, pricing, provider: pricing.provider })\n }\n for (const [id, pricing] of Object.entries(LLM_PRICING_CATALOG)) {\n if (seen.llm.has(id) || !providerMatches(pricing.provider)) continue\n seen.llm.add(id)\n out.push({ kind: \"llm\", id, canonicalId: id, pricing, provider: pricing.provider })\n }\n // Known ids with no pricing row yet (see `LlmModelId`'s doc comment in\n // llm/catalog.ts) — surfaced unpriced rather than silently dropped.\n for (const { id, provider } of listUnpricedKnownLlmIds()) {\n if (seen.llm.has(id) || !providerMatches(provider)) continue\n out.push({ kind: \"llm\", id, canonicalId: id, pricing: undefined, provider })\n }\n }\n\n // Capability + tag filters are AND-sets, applied over the enrichment tag\n // vocabulary (capabilities are emitted as tags). Skipped entirely when\n // unset so the common path stays allocation-free.\n const required = [...(filter.capabilities ?? []), ...(filter.tags ?? [])]\n if (required.length === 0) return out\n return out.filter(model => required.every(tag => modelHasTag(model, tag)))\n}\n\n/**\n * Provider-centric view — every model a provider offers across all kinds\n * (llm / image / video / audio incl. tts/stt/s2s). This is the \"provider\n * catalog\" (openai, google, anthropic, replicate, openrouter, …): a\n * derived query over the kind-organized catalogs, NOT a parallel store.\n *\n * When `provider` names a router or a routed endpoint (openrouter, requesty,\n * huggingface, opencode, opencode-go), this also folds in that provider's\n * generated route table (`listRouterLlmRoutes`) — the provider's full\n * surface, not just what happens to be curated into `LLM_PRICING_CATALOG`.\n * The emitted id is whatever `formatModelRef` produces for the resolved ref:\n * `vendor/product@router` for the vendor-namespacing routers, and the bare\n * `opencode-go/glm-5.3` / `opencode/claude-sonnet-4-6` form for the two\n * OpenCode endpoints, whose route IS the id's leading segment (so there is no\n * `@route` to append). OpenRouter's routes are already spread into\n * `LLM_PRICING_CATALOG` (bare `vendor/product` ids, `llm/catalog.ts`), so its\n * router-table entries are deduped against the bare ids `listModels` already\n * returned; Requesty, HuggingFace and the two OpenCode endpoints have no such\n * overlap, so their route table entries are added in full. Deliberately NOT\n * achieved by spreading `REQUESTY_ROUTES`/`HUGGINGFACE_ROUTES`/\n * `OPENCODE_*_ROUTES` into `LLM_PRICING_CATALOG` itself — that catalog is the\n * legacy bare-id path, and a bare id must keep meaning direct-vendor pricing\n * (`route-identity/index.ts`).\n */\nexport function getModelsByProvider(provider: string): ResolvedModel[] {\n const models = listModels({ provider })\n const routerRoutes = listRouterLlmRoutes(provider)\n if (routerRoutes.length === 0) return models\n\n const existingIds = new Set(models.map(m => m.id))\n const routed: ResolvedModel[] = []\n for (const route of routerRoutes) {\n const bareId = `${route.vendor}/${route.product}`\n if (existingIds.has(bareId)) continue\n const id = formatModelRef(route.ref)\n routed.push({ kind: \"llm\", id, canonicalId: id, pricing: route.pricing, provider: route.pricing.provider })\n }\n return [...models, ...routed]\n}\n\n/**\n * Returns the platform a model's adapter is **statically pinned** to,\n * if known. ONLY meaningful for image / video / audio — those adapters\n * are constructed per-platform (Replicate adapter, MiniMax adapter…),\n * so the model's `def.provider` IS the runtime connector.\n *\n * For LLM, returns `undefined` — the runtime connector is determined\n * at call time by `pickLlmConnector(connectors, parseModelId(id).provider)`\n * against the guild's installed connectors, NOT by the model id alone.\n * The same `anthropic/claude-sonnet-4-5` can route through OpenRouter\n * OR direct Anthropic depending on which connectors the guild has\n * installed. Recording call sites MUST pass the actual `connectorUsed`\n * they invoked; do not infer from id.\n *\n * Use case: image/video workflow steps fetch `model.def.provider`\n * directly (no ambiguity). LLM call sites use the runtime resolver.\n */\nexport function getStaticModelProvider(\n model: ResolvedModel\n): string | undefined {\n switch (model.kind) {\n case \"image\":\n case \"video\":\n case \"audio\":\n return model.def.provider\n case \"voice\":\n return model.voice.provider\n case \"llm\":\n // Runtime routing — caller knows, we don't.\n return undefined\n }\n}\n\n/**\n * Resolves an id to its canonical catalog key across kinds. For ids that\n * have no alias, returns the id unchanged. Used by callers that want to\n * normalize before persisting (e.g., `byok_usage` rows).\n */\nexport function resolveAlias(id: string): string {\n const ov = getMergedOverlay()\n const key = followAlias(id, ov)\n if (ov.image[key] || ov.video[key] || ov.audio[key]) return key\n if (overlayVoice(ov, key)) return key\n if (ov.llm[key]) return key\n if (IMAGE_MODEL_CATALOG[key]) return key\n if (VIDEO_MODEL_CATALOG[key]) return key\n if (AUDIO_MODEL_CATALOG[key]) return key\n if (VOICE_INDEX.has(key)) return key\n return resolveLlmAlias(key)\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { CatalogProviderSchema } from './chunk-WG4F6IRS.mjs';
2
- import { resolvePricing, resolveAlias, OPENCODE_GO_ROUTES, OPENCODE_ZEN_ROUTES, OPENROUTER_ROUTES, DEFAULT_PRICING } from './chunk-S2EJIT6D.mjs';
2
+ import { resolvePricing, resolveAlias, OPENCODE_GO_ROUTES, OPENCODE_ZEN_ROUTES, OPENROUTER_ROUTES, DEFAULT_PRICING } from './chunk-VZCVDFNS.mjs';
3
3
 
4
4
  /**
5
5
  * @agentproto/model-catalog v0.1.0
@@ -5390,17 +5390,6 @@ var HUGGINGFACE_ROUTES = {
5390
5390
  }
5391
5391
  ]
5392
5392
  },
5393
- "CohereLabs/command-a-vision-07-2025": {
5394
- wireId: "CohereLabs/command-a-vision-07-2025",
5395
- providers: [
5396
- {
5397
- provider: "cohere",
5398
- status: "live",
5399
- supportsTools: false,
5400
- supportsStructuredOutput: true
5401
- }
5402
- ]
5403
- },
5404
5393
  "CohereLabs/tiny-aya-earth": {
5405
5394
  wireId: "CohereLabs/tiny-aya-earth",
5406
5395
  providers: [
@@ -5775,7 +5764,7 @@ var HUGGINGFACE_ROUTES = {
5775
5764
  inputPer1M: 0.09,
5776
5765
  outputPer1M: 0.58,
5777
5766
  supportsTools: true,
5778
- supportsStructuredOutput: true
5767
+ supportsStructuredOutput: false
5779
5768
  },
5780
5769
  {
5781
5770
  provider: "nscale",
@@ -5885,10 +5874,6 @@ var HUGGINGFACE_ROUTES = {
5885
5874
  "Qwen/Qwen3-4B-Thinking-2507": {
5886
5875
  wireId: "Qwen/Qwen3-4B-Thinking-2507",
5887
5876
  providers: [
5888
- {
5889
- provider: "featherless-ai",
5890
- status: "live"
5891
- },
5892
5877
  {
5893
5878
  provider: "nscale",
5894
5879
  status: "live",
@@ -6171,7 +6156,7 @@ var HUGGINGFACE_ROUTES = {
6171
6156
  inputPer1M: 0.71,
6172
6157
  outputPer1M: 4.25,
6173
6158
  supportsTools: true,
6174
- supportsStructuredOutput: false
6159
+ supportsStructuredOutput: true
6175
6160
  },
6176
6161
  {
6177
6162
  provider: "scaleway",
@@ -6323,6 +6308,10 @@ var HUGGINGFACE_ROUTES = {
6323
6308
  supportsTools: true,
6324
6309
  supportsStructuredOutput: true
6325
6310
  },
6311
+ {
6312
+ provider: "featherless-ai",
6313
+ status: "live"
6314
+ },
6326
6315
  {
6327
6316
  provider: "novita",
6328
6317
  status: "live",
@@ -6330,7 +6319,7 @@ var HUGGINGFACE_ROUTES = {
6330
6319
  inputPer1M: 0.42,
6331
6320
  outputPer1M: 3,
6332
6321
  supportsTools: true,
6333
- supportsStructuredOutput: true
6322
+ supportsStructuredOutput: false
6334
6323
  },
6335
6324
  {
6336
6325
  provider: "ovhcloud",
@@ -6500,8 +6489,8 @@ var HUGGINGFACE_ROUTES = {
6500
6489
  contextLength: 64e3,
6501
6490
  inputPer1M: 0.7,
6502
6491
  outputPer1M: 2.5,
6503
- supportsTools: true,
6504
- supportsStructuredOutput: true
6492
+ supportsTools: false,
6493
+ supportsStructuredOutput: false
6505
6494
  }
6506
6495
  ]
6507
6496
  },
@@ -6528,7 +6517,7 @@ var HUGGINGFACE_ROUTES = {
6528
6517
  inputPer1M: 0.7,
6529
6518
  outputPer1M: 2.5,
6530
6519
  supportsTools: false,
6531
- supportsStructuredOutput: true
6520
+ supportsStructuredOutput: false
6532
6521
  }
6533
6522
  ]
6534
6523
  },
@@ -6564,7 +6553,7 @@ var HUGGINGFACE_ROUTES = {
6564
6553
  inputPer1M: 0.05,
6565
6554
  outputPer1M: 0.05,
6566
6555
  supportsTools: false,
6567
- supportsStructuredOutput: false
6556
+ supportsStructuredOutput: true
6568
6557
  }
6569
6558
  ]
6570
6559
  },
@@ -6582,7 +6571,7 @@ var HUGGINGFACE_ROUTES = {
6582
6571
  inputPer1M: 0.2,
6583
6572
  outputPer1M: 0.2,
6584
6573
  supportsTools: false,
6585
- supportsStructuredOutput: false
6574
+ supportsStructuredOutput: true
6586
6575
  }
6587
6576
  ]
6588
6577
  },
@@ -6783,13 +6772,6 @@ var HUGGINGFACE_ROUTES = {
6783
6772
  provider: "featherless-ai",
6784
6773
  status: "live"
6785
6774
  },
6786
- {
6787
- provider: "fireworks-ai",
6788
- status: "live",
6789
- contextLength: 1048576,
6790
- supportsTools: true,
6791
- supportsStructuredOutput: true
6792
- },
6793
6775
  {
6794
6776
  provider: "novita",
6795
6777
  status: "live",
@@ -6828,13 +6810,6 @@ var HUGGINGFACE_ROUTES = {
6828
6810
  supportsTools: true,
6829
6811
  supportsStructuredOutput: true
6830
6812
  },
6831
- {
6832
- provider: "fireworks-ai",
6833
- status: "live",
6834
- contextLength: 1048576,
6835
- supportsTools: true,
6836
- supportsStructuredOutput: true
6837
- },
6838
6813
  {
6839
6814
  provider: "novita",
6840
6815
  status: "live",
@@ -6903,13 +6878,6 @@ var HUGGINGFACE_ROUTES = {
6903
6878
  supportsTools: true,
6904
6879
  supportsStructuredOutput: true
6905
6880
  },
6906
- {
6907
- provider: "fireworks-ai",
6908
- status: "live",
6909
- contextLength: 1048576,
6910
- supportsTools: true,
6911
- supportsStructuredOutput: true
6912
- },
6913
6881
  {
6914
6882
  provider: "novita",
6915
6883
  status: "live",
@@ -6940,7 +6908,7 @@ var HUGGINGFACE_ROUTES = {
6940
6908
  inputPer1M: 0.3,
6941
6909
  outputPer1M: 1.2,
6942
6910
  supportsTools: true,
6943
- supportsStructuredOutput: false
6911
+ supportsStructuredOutput: true
6944
6912
  },
6945
6913
  {
6946
6914
  provider: "deepinfra",
@@ -7089,6 +7057,20 @@ var HUGGINGFACE_ROUTES = {
7089
7057
  }
7090
7058
  ]
7091
7059
  },
7060
+ "ibm-granite/granite-4.2-30b": {
7061
+ wireId: "ibm-granite/granite-4.2-30b",
7062
+ providers: [
7063
+ {
7064
+ provider: "deepinfra",
7065
+ status: "live",
7066
+ contextLength: 131072,
7067
+ inputPer1M: 0.16,
7068
+ outputPer1M: 0.65,
7069
+ supportsTools: true,
7070
+ supportsStructuredOutput: false
7071
+ }
7072
+ ]
7073
+ },
7092
7074
  "ibm-granite/granite-4.2-3b": {
7093
7075
  wireId: "ibm-granite/granite-4.2-3b",
7094
7076
  providers: [
@@ -7150,7 +7132,7 @@ var HUGGINGFACE_ROUTES = {
7150
7132
  inputPer1M: 0.06,
7151
7133
  outputPer1M: 0.18,
7152
7134
  supportsTools: true,
7153
- supportsStructuredOutput: true
7135
+ supportsStructuredOutput: false
7154
7136
  },
7155
7137
  {
7156
7138
  provider: "novita",
@@ -7342,13 +7324,6 @@ var HUGGINGFACE_ROUTES = {
7342
7324
  provider: "featherless-ai",
7343
7325
  status: "live"
7344
7326
  },
7345
- {
7346
- provider: "fireworks-ai",
7347
- status: "live",
7348
- contextLength: 131072,
7349
- supportsTools: true,
7350
- supportsStructuredOutput: false
7351
- },
7352
7327
  {
7353
7328
  provider: "together",
7354
7329
  status: "live",
@@ -7433,7 +7408,7 @@ var HUGGINGFACE_ROUTES = {
7433
7408
  inputPer1M: 0.6,
7434
7409
  outputPer1M: 3,
7435
7410
  supportsTools: true,
7436
- supportsStructuredOutput: false
7411
+ supportsStructuredOutput: true
7437
7412
  }
7438
7413
  ]
7439
7414
  },
@@ -7462,15 +7437,6 @@ var HUGGINGFACE_ROUTES = {
7462
7437
  provider: "featherless-ai",
7463
7438
  status: "live"
7464
7439
  },
7465
- {
7466
- provider: "fireworks-ai",
7467
- status: "live",
7468
- contextLength: 262144,
7469
- inputPer1M: 0.95,
7470
- outputPer1M: 4,
7471
- supportsTools: true,
7472
- supportsStructuredOutput: true
7473
- },
7474
7440
  {
7475
7441
  provider: "novita",
7476
7442
  status: "live",
@@ -7507,15 +7473,6 @@ var HUGGINGFACE_ROUTES = {
7507
7473
  provider: "featherless-ai",
7508
7474
  status: "live"
7509
7475
  },
7510
- {
7511
- provider: "fireworks-ai",
7512
- status: "live",
7513
- contextLength: 262144,
7514
- inputPer1M: 0.95,
7515
- outputPer1M: 4,
7516
- supportsTools: true,
7517
- supportsStructuredOutput: true
7518
- },
7519
7476
  {
7520
7477
  provider: "novita",
7521
7478
  status: "live",
@@ -7539,6 +7496,15 @@ var HUGGINGFACE_ROUTES = {
7539
7496
  supportsTools: true,
7540
7497
  supportsStructuredOutput: true
7541
7498
  },
7499
+ {
7500
+ provider: "deepinfra",
7501
+ status: "live",
7502
+ contextLength: 1048576,
7503
+ inputPer1M: 2.85,
7504
+ outputPer1M: 14.25,
7505
+ supportsTools: true,
7506
+ supportsStructuredOutput: true
7507
+ },
7542
7508
  {
7543
7509
  provider: "featherless-ai",
7544
7510
  status: "live"
@@ -7662,7 +7628,7 @@ var HUGGINGFACE_ROUTES = {
7662
7628
  inputPer1M: 0.05,
7663
7629
  outputPer1M: 0.25,
7664
7630
  supportsTools: true,
7665
- supportsStructuredOutput: false
7631
+ supportsStructuredOutput: true
7666
7632
  },
7667
7633
  {
7668
7634
  provider: "nscale",
@@ -7742,7 +7708,7 @@ var HUGGINGFACE_ROUTES = {
7742
7708
  inputPer1M: 0.05,
7743
7709
  outputPer1M: 0.2,
7744
7710
  supportsTools: true,
7745
- supportsStructuredOutput: false
7711
+ supportsStructuredOutput: true
7746
7712
  },
7747
7713
  {
7748
7714
  provider: "ovhcloud",
@@ -7869,7 +7835,7 @@ var HUGGINGFACE_ROUTES = {
7869
7835
  status: "live",
7870
7836
  inputPer1M: 0.1,
7871
7837
  outputPer1M: 0.2,
7872
- supportsTools: true,
7838
+ supportsTools: false,
7873
7839
  supportsStructuredOutput: true
7874
7840
  }
7875
7841
  ]
@@ -7912,6 +7878,15 @@ var HUGGINGFACE_ROUTES = {
7912
7878
  "tencent/Hy4-preview": {
7913
7879
  wireId: "tencent/Hy4-preview",
7914
7880
  providers: [
7881
+ {
7882
+ provider: "deepinfra",
7883
+ status: "live",
7884
+ contextLength: 1048576,
7885
+ inputPer1M: 0.834,
7886
+ outputPer1M: 2.501,
7887
+ supportsTools: true,
7888
+ supportsStructuredOutput: true
7889
+ },
7915
7890
  {
7916
7891
  provider: "novita",
7917
7892
  status: "live",
@@ -7919,7 +7894,7 @@ var HUGGINGFACE_ROUTES = {
7919
7894
  inputPer1M: 0.834,
7920
7895
  outputPer1M: 2.501,
7921
7896
  supportsTools: true,
7922
- supportsStructuredOutput: false
7897
+ supportsStructuredOutput: true
7923
7898
  }
7924
7899
  ]
7925
7900
  },
@@ -7942,7 +7917,7 @@ var HUGGINGFACE_ROUTES = {
7942
7917
  inputPer1M: 0.95,
7943
7918
  outputPer1M: 4.05,
7944
7919
  supportsTools: true,
7945
- supportsStructuredOutput: true
7920
+ supportsStructuredOutput: false
7946
7921
  },
7947
7922
  {
7948
7923
  provider: "fireworks-ai",
@@ -8112,6 +8087,17 @@ var HUGGINGFACE_ROUTES = {
8112
8087
  }
8113
8088
  ]
8114
8089
  },
8090
+ "zai-org/GLM-4.6-FP8": {
8091
+ wireId: "zai-org/GLM-4.6-FP8",
8092
+ providers: [
8093
+ {
8094
+ provider: "zai-org",
8095
+ status: "live",
8096
+ supportsTools: true,
8097
+ supportsStructuredOutput: false
8098
+ }
8099
+ ]
8100
+ },
8115
8101
  "zai-org/GLM-4.6V": {
8116
8102
  wireId: "zai-org/GLM-4.6V",
8117
8103
  providers: [
@@ -8187,12 +8173,6 @@ var HUGGINGFACE_ROUTES = {
8187
8173
  outputPer1M: 2.2,
8188
8174
  supportsTools: true,
8189
8175
  supportsStructuredOutput: false
8190
- },
8191
- {
8192
- provider: "zai-org",
8193
- status: "live",
8194
- supportsTools: true,
8195
- supportsStructuredOutput: false
8196
8176
  }
8197
8177
  ]
8198
8178
  },
@@ -8518,6 +8498,7 @@ var HUGGINGFACE_ROUTES = {
8518
8498
 
8519
8499
  // src/route-identity/index.ts
8520
8500
  var SEGMENT_RE = /^[a-zA-Z0-9_.-]+$/;
8501
+ var PRODUCT_RE = /^[a-zA-Z0-9_.-]+(?:\[\d+(?:\.\d+)?[kKmM]\])?$/;
8521
8502
  var OPENROUTER_VARIANTS = [
8522
8503
  "free",
8523
8504
  "nitro",
@@ -8602,7 +8583,7 @@ function parseModelRef(raw) {
8602
8583
  if (value.length === 0) {
8603
8584
  throw new InvalidModelRefError(raw, `${label} segment is empty`);
8604
8585
  }
8605
- if (!SEGMENT_RE.test(value)) {
8586
+ if (!(label === "product" ? PRODUCT_RE : SEGMENT_RE).test(value)) {
8606
8587
  throw new InvalidModelRefError(
8607
8588
  raw,
8608
8589
  `${label} "${value}" contains invalid characters (no '/' or '@')`
@@ -8855,5 +8836,5 @@ function diagnoseModelRef(input) {
8855
8836
  }
8856
8837
 
8857
8838
  export { InvalidModelRefError, OPENROUTER_VARIANTS, clearCustomRoutes, diagnoseModelRef, formatModelRef, isModelRefString, listRouterLlmRoutes, parseModelRef, registerCustomRoute, resolveCustomRoute, resolveLlmModelRoute, stripAnthropicNativeVendor, stripFixedNativeVendor, stripRouteSuffix, tryParseModelRef };
8858
- //# sourceMappingURL=chunk-PL4ALP73.mjs.map
8859
- //# sourceMappingURL=chunk-PL4ALP73.mjs.map
8839
+ //# sourceMappingURL=chunk-D3I73UJI.mjs.map
8840
+ //# sourceMappingURL=chunk-D3I73UJI.mjs.map