@agentproto/model-catalog 0.6.0 → 0.7.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.
@@ -1,8 +1,8 @@
1
- export { A as AccessDecision, a as AccessEffect, b as AccessEvalInput, c as AccessRule, d as AccessTarget, e as AppScope, f as evaluateAccess } from '../evaluate-Df3GphJP.js';
2
- import { R as ResolvedModel } from '../index-C2XMLGDa.js';
1
+ export { A as AccessDecision, a as AccessEffect, b as AccessEvalInput, c as AccessRule, d as AccessTarget, e as AppScope, f as evaluateAccess } from '../evaluate-BKCR5Huz.js';
2
+ import { R as ResolvedModel } from '../index-avZZsCtQ.js';
3
3
  import '../base-B8IIoaqg.js';
4
4
  import 'zod';
5
- import '../catalog-CLQ-Bo1n.js';
5
+ import '../catalog-BbfjJxKT.js';
6
6
  import '../image/index.js';
7
7
  import '../video/index.js';
8
8
  import '../audio/index.js';
@@ -684,6 +684,19 @@ type KnownLlmId = LlmModelId | LlmModelAlias;
684
684
  * accounting; semantics are load-bearing for migration.
685
685
  */
686
686
  declare function resolvePricing(modelId: string): LLMPricing | undefined;
687
+ /**
688
+ * Like {@link resolvePricing} but WITHOUT the substring/partial-prefix
689
+ * fallback — an id resolves ONLY on an exact catalog key or an exact alias.
690
+ * The substring scan in `resolvePricing` (intended for dated snapshots like
691
+ * `claude-sonnet-4-6-20260301` → `claude-sonnet-4`) also over-fires for
692
+ * unrelated cross-product siblings (`gemini-2.5-flash-image` substring-hits
693
+ * the `gemini-2.5-flash` row), so any caller that must PROVE a verbatim
694
+ * first-party identity — e.g. the direct-vendor route restore in
695
+ * `serviceableModelRoutes` — needs this exact form instead. Semantics of
696
+ * `resolvePricing`/`resolveAlias` are intentionally left unchanged for their
697
+ * existing callers.
698
+ */
699
+ declare function resolvePricingExact(modelId: string): LLMPricing | undefined;
687
700
  /**
688
701
  * Resolves a model id to its canonical catalog key (or the original id if no
689
702
  * match). Public surface for consumers that need the canonical id without
@@ -850,4 +863,4 @@ interface CacheStats {
850
863
  */
851
864
  declare function getCacheStats(modelId: string, usage: LLMUsageBreakdown, opts?: CalculateLLMCreditCostOptions): CacheStats;
852
865
 
853
- export { type CacheStats as C, DEFAULT_PRICING as D, type KnownLlmId as K, type LLMCreditCostResult as L, MODEL_ALIASES as M, type CalculateLLMCreditCostOptions as a, type ContextWindowEntry as b, type LLMPricing as c, type LLMUsageBreakdown as d, LLM_PRICING_CATALOG as e, type LlmModelAlias as f, type LlmModelId as g, type ModelRoute as h, calculateLLMCreditCost as i, getCacheStats as j, getModelProvider as k, resolveContextWindow as l, resolveModelRoute as m, resolvePricing as n, resolveAlias as r };
866
+ export { type CacheStats as C, DEFAULT_PRICING as D, type KnownLlmId as K, type LLMCreditCostResult as L, MODEL_ALIASES as M, type CalculateLLMCreditCostOptions as a, type ContextWindowEntry as b, type LLMPricing as c, type LLMUsageBreakdown as d, LLM_PRICING_CATALOG as e, type LlmModelAlias as f, type LlmModelId as g, type ModelRoute as h, calculateLLMCreditCost as i, getCacheStats as j, getModelProvider as k, resolveContextWindow as l, resolveModelRoute as m, resolvePricing as n, resolvePricingExact as o, resolveAlias as r };
@@ -1,4 +1,4 @@
1
- import { listModels } from './chunk-34LOJCOZ.mjs';
1
+ import { listModels } from './chunk-OWNEHUFQ.mjs';
2
2
  import { modelHasTag } from './chunk-WTHHXXIK.mjs';
3
3
 
4
4
  /**
@@ -130,5 +130,5 @@ function filterVoicesByProviders(voices, providerTokens) {
130
130
  }
131
131
 
132
132
  export { applyProfile, expandProviders, filterVoicesByProviders, getProviderGroup, getSurfaceProfile, groupForProvider, listProviderGroups, listSurfaceProfiles, listSurfaced, modelMatchesProfile };
133
- //# sourceMappingURL=chunk-DUAH5LWG.mjs.map
134
- //# sourceMappingURL=chunk-DUAH5LWG.mjs.map
133
+ //# sourceMappingURL=chunk-6AXCZGQY.mjs.map
134
+ //# sourceMappingURL=chunk-6AXCZGQY.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../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* model-access (who MAY use a model: tier/scope policy). Curation is the\n * \"feature/provider catalog\" layer: an app composes views over the one\n * registry (\"all s2s voices from OpenAI OR Google\", \"images only\", …)\n * without touching the underlying data.\n *\n * Two registries, both following the canonical profile-registry shape\n * (`listX()` / `getX(id)` throwing with the known-id list):\n *\n * 1. PROVIDER GROUPS — a company (`openai`) maps to every provider tag\n * it owns across kinds (`openai` for the LLM/audio company tag,\n * `openai-realtime` for its voice engine). This is what reconciles\n * the two provider vocabularies in the registry: audio MODELS are\n * tagged by company, voices by engine. Curating by group spans both.\n *\n * 2. SURFACE PROFILES — named presets (`voice-s2s`, `images`, …) an app\n * selects from. Permissive by default (`all`); apps narrow only when\n * a picker should diverge.\n *\n * Selection precedence (caller's job): per-call arg → per-app/guild\n * config → env → `all` fallback.\n */\n\nimport {\n listModels,\n type CatalogKind,\n type ResolvedModel,\n} from \"../registry/index.js\"\nimport { modelHasTag } from \"../enrichment/index.js\"\nimport type { CatalogVoice } from \"../schema/voice.js\"\n\n// ───────────────────────────────────────────────────────────────────────\n// Provider groups — company → provider tags across kinds\n// ───────────────────────────────────────────────────────────────────────\n\nexport interface ProviderGroup {\n /** Canonical company id, e.g. \"openai\", \"google\". */\n id: string\n /** Display label. */\n label: string\n /**\n * Every provider tag this company owns across kinds. Audio/image/LLM use\n * the company tag (`openai`); the voice engine uses its own (`openai-realtime`).\n */\n providers: readonly string[]\n}\n\nconst PROVIDER_GROUPS: readonly ProviderGroup[] = [\n { id: \"openai\", label: \"OpenAI\", providers: [\"openai\", \"openai-realtime\"] },\n { id: \"google\", label: \"Google\", providers: [\"google\", \"gemini-live\"] },\n { id: \"anthropic\", label: \"Anthropic\", providers: [\"anthropic\"] },\n { id: \"minimax\", label: \"MiniMax\", providers: [\"minimax\"] },\n { id: \"elevenlabs\", label: \"ElevenLabs\", providers: [\"elevenlabs\"] },\n { id: \"replicate\", label: \"Replicate\", providers: [\"replicate\"] },\n { id: \"deepgram\", label: \"Deepgram\", providers: [\"deepgram\"] },\n { id: \"assemblyai\", label: \"AssemblyAI\", providers: [\"assemblyai\"] },\n]\n\nexport function listProviderGroups(): readonly ProviderGroup[] {\n return PROVIDER_GROUPS\n}\n\nexport function getProviderGroup(id: string): ProviderGroup {\n const group = PROVIDER_GROUPS.find(g => g.id === id)\n if (!group) {\n const known = PROVIDER_GROUPS.map(g => g.id).join(\", \")\n throw new Error(`curation: unknown provider group \"${id}\". Known: ${known}`)\n }\n return group\n}\n\n/** The group that owns a raw provider tag, if any. */\nexport function groupForProvider(\n providerTag: string\n): ProviderGroup | undefined {\n return PROVIDER_GROUPS.find(g => g.providers.includes(providerTag))\n}\n\n/**\n * Expand a mixed list of provider-group ids and raw provider tags into the\n * flat set of provider tags to match against. A token that is a known\n * group id expands to its members; anything else passes through as a raw\n * tag (so callers can target an engine directly, e.g. `gemini-live`).\n */\nexport function expandProviders(tokens: readonly string[]): string[] {\n const out = new Set<string>()\n for (const token of tokens) {\n const group = PROVIDER_GROUPS.find(g => g.id === token)\n if (group) {\n for (const p of group.providers) out.add(p)\n } else {\n out.add(token)\n }\n }\n return [...out]\n}\n\n// ───────────────────────────────────────────────────────────────────────\n// Surface profiles — named views an app surfaces\n// ───────────────────────────────────────────────────────────────────────\n\nexport interface SurfaceProfile {\n id: string\n description: string\n /** Restrict to these kinds. Undefined/empty = every kind. */\n kinds?: readonly CatalogKind[]\n /**\n * Restrict to these provider GROUP ids or raw provider tags (OR-set).\n * Expanded via `expandProviders`, so `[\"openai\"]` covers both the\n * `openai` company tag and the `openai-realtime` voice engine.\n */\n providers?: readonly string[]\n /** Require all of these capability tags (AND-set): `s2s`, `tts`, `edit`, … */\n capabilities?: readonly string[]\n /** Require all of these arbitrary tags (AND-set). */\n tags?: readonly string[]\n}\n\nconst SURFACE_PROFILES: readonly SurfaceProfile[] = [\n {\n id: \"all\",\n description: \"Everything the catalog offers — the permissive default\",\n },\n {\n id: \"text\",\n description: \"Text models (LLMs) only\",\n kinds: [\"llm\"],\n },\n {\n id: \"images\",\n description: \"Image models only\",\n kinds: [\"image\"],\n },\n {\n id: \"video\",\n description: \"Video models only\",\n kinds: [\"video\"],\n },\n {\n id: \"audio\",\n description: \"Audio models (TTS / STT / s2s) only\",\n kinds: [\"audio\"],\n },\n {\n id: \"voice\",\n description: \"Every curated voice, any provider\",\n kinds: [\"voice\"],\n },\n {\n id: \"voice-s2s\",\n description:\n \"Speech-to-speech voice engines (OpenAI Realtime, Gemini Live)\",\n kinds: [\"voice\"],\n capabilities: [\"s2s\"],\n },\n {\n id: \"voice-tts\",\n description: \"Sequential TTS voices (MiniMax, ElevenLabs)\",\n kinds: [\"voice\"],\n capabilities: [\"tts\"],\n },\n]\n\nexport function listSurfaceProfiles(): readonly SurfaceProfile[] {\n return SURFACE_PROFILES\n}\n\nexport function getSurfaceProfile(id: string): SurfaceProfile {\n const profile = SURFACE_PROFILES.find(p => p.id === id)\n if (!profile) {\n const known = SURFACE_PROFILES.map(p => p.id).join(\", \")\n throw new Error(\n `curation: unknown surface profile \"${id}\". Known: ${known}`\n )\n }\n return profile\n}\n\n// ───────────────────────────────────────────────────────────────────────\n// Filters\n// ───────────────────────────────────────────────────────────────────────\n\n/**\n * True iff a model passes a surface profile. Provider membership, like\n * capability/tag membership, is checked against the enrichment tag\n * vocabulary (every kind emits its provider as a tag), so this is uniform\n * across kinds and naturally spans the company/engine provider split.\n */\nexport function modelMatchesProfile(\n model: ResolvedModel,\n profile: SurfaceProfile\n): boolean {\n if (profile.kinds && profile.kinds.length > 0) {\n if (!profile.kinds.includes(model.kind)) return false\n }\n if (profile.providers && profile.providers.length > 0) {\n const tags = expandProviders(profile.providers)\n if (!tags.some(tag => modelHasTag(model, tag))) return false\n }\n if (profile.capabilities) {\n if (!profile.capabilities.every(cap => modelHasTag(model, cap)))\n return false\n }\n if (profile.tags) {\n if (!profile.tags.every(tag => modelHasTag(model, tag))) return false\n }\n return true\n}\n\n/** Filter a model list down to what a surface profile exposes. */\nexport function applyProfile(\n models: ResolvedModel[],\n profile: SurfaceProfile\n): ResolvedModel[] {\n return models.filter(model => modelMatchesProfile(model, profile))\n}\n\n/**\n * The catalog as a surface profile exposes it — `applyProfile` over the\n * full registry. The composable entry point for \"show me this view\".\n */\nexport function listSurfaced(profile: SurfaceProfile): ResolvedModel[] {\n return applyProfile(listModels(), profile)\n}\n\n/**\n * Voice-list curation. The merged voice catalog (curated + live\n * ElevenLabs) is `CatalogVoice[]`, not `ResolvedModel[]`, so it gets its\n * own provider filter — same group-expansion semantics. Only the provider\n * facet of a profile applies to a raw voice list (kind is implicitly\n * voice; capability/tag live on the registry projection).\n */\nexport function filterVoicesByProviders(\n voices: CatalogVoice[],\n providerTokens: readonly string[]\n): CatalogVoice[] {\n if (providerTokens.length === 0) return voices\n const tags = new Set(expandProviders(providerTokens))\n return voices.filter(v => tags.has(v.provider))\n}\n"]}
1
+ {"version":3,"sources":["../src/curation/index.ts"],"names":[],"mappings":";;;;;;;;;;AAgDA,IAAM,eAAA,GAA4C;AAAA,EAChD,EAAE,IAAI,QAAA,EAAU,KAAA,EAAO,UAAU,SAAA,EAAW,CAAC,QAAA,EAAU,iBAAiB,CAAA,EAAE;AAAA,EAC1E,EAAE,IAAI,QAAA,EAAU,KAAA,EAAO,UAAU,SAAA,EAAW,CAAC,QAAA,EAAU,aAAa,CAAA,EAAE;AAAA,EACtE,EAAE,IAAI,WAAA,EAAa,KAAA,EAAO,aAAa,SAAA,EAAW,CAAC,WAAW,CAAA,EAAE;AAAA,EAChE,EAAE,IAAI,SAAA,EAAW,KAAA,EAAO,WAAW,SAAA,EAAW,CAAC,SAAS,CAAA,EAAE;AAAA,EAC1D,EAAE,IAAI,YAAA,EAAc,KAAA,EAAO,cAAc,SAAA,EAAW,CAAC,YAAY,CAAA,EAAE;AAAA,EACnE,EAAE,IAAI,WAAA,EAAa,KAAA,EAAO,aAAa,SAAA,EAAW,CAAC,WAAW,CAAA,EAAE;AAAA,EAChE,EAAE,IAAI,UAAA,EAAY,KAAA,EAAO,YAAY,SAA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AA,CAAO,CAAA,KAAA,KAAS,mBAAA,CAAoB,KAAA,EAAO,OAAO,CAAC,CAAA;AACnE;AAMO,SAAS,aAAa,OAAA,EAA0C;AACrE,EAAA,OAAO,YAAA,CAAa,UAAA,EAAW,EAAG,OAAO,CAAA;AAC3C;AASO,SAAS,uBAAA,CACd,QACA,cAAA,EACgB;AAChB,EAAA,IAAI,cAAA,CAAe,MAAA,KAAW,CAAA,EAAG,OAAO,MAAA;AACxC,EAAA,MAAM,IAAA,GAAO,IAAI,GAAA,CAAI,eAAA,CAAgB,cAAc,CAAC,CAAA;AACpD,EAAA,OAAO,OAAO,MAAA,CAAO,CAAA,CAAA,KAAK,KAAK,GAAA,CAAI,CAAA,CAAE,QAAQ,CAAC,CAAA;AAChD","file":"chunk-6AXCZGQY.mjs","sourcesContent":["/**\n * Curation — what an app SURFACES from the catalog, distinct from\n * model-access (who MAY use a model: tier/scope policy). Curation is the\n * \"feature/provider catalog\" layer: an app composes views over the one\n * registry (\"all s2s voices from OpenAI OR Google\", \"images only\", …)\n * without touching the underlying data.\n *\n * Two registries, both following the canonical profile-registry shape\n * (`listX()` / `getX(id)` throwing with the known-id list):\n *\n * 1. PROVIDER GROUPS — a company (`openai`) maps to every provider tag\n * it owns across kinds (`openai` for the LLM/audio company tag,\n * `openai-realtime` for its voice engine). This is what reconciles\n * the two provider vocabularies in the registry: audio MODELS are\n * tagged by company, voices by engine. Curating by group spans both.\n *\n * 2. SURFACE PROFILES — named presets (`voice-s2s`, `images`, …) an app\n * selects from. Permissive by default (`all`); apps narrow only when\n * a picker should diverge.\n *\n * Selection precedence (caller's job): per-call arg → per-app/guild\n * config → env → `all` fallback.\n */\n\nimport {\n listModels,\n type CatalogKind,\n type ResolvedModel,\n} from \"../registry/index.js\"\nimport { modelHasTag } from \"../enrichment/index.js\"\nimport type { CatalogVoice } from \"../schema/voice.js\"\n\n// ───────────────────────────────────────────────────────────────────────\n// Provider groups — company → provider tags across kinds\n// ───────────────────────────────────────────────────────────────────────\n\nexport interface ProviderGroup {\n /** Canonical company id, e.g. \"openai\", \"google\". */\n id: string\n /** Display label. */\n label: string\n /**\n * Every provider tag this company owns across kinds. Audio/image/LLM use\n * the company tag (`openai`); the voice engine uses its own (`openai-realtime`).\n */\n providers: readonly string[]\n}\n\nconst PROVIDER_GROUPS: readonly ProviderGroup[] = [\n { id: \"openai\", label: \"OpenAI\", providers: [\"openai\", \"openai-realtime\"] },\n { id: \"google\", label: \"Google\", providers: [\"google\", \"gemini-live\"] },\n { id: \"anthropic\", label: \"Anthropic\", providers: [\"anthropic\"] },\n { id: \"minimax\", label: \"MiniMax\", providers: [\"minimax\"] },\n { id: \"elevenlabs\", label: \"ElevenLabs\", providers: [\"elevenlabs\"] },\n { id: \"replicate\", label: \"Replicate\", providers: [\"replicate\"] },\n { id: \"deepgram\", label: \"Deepgram\", providers: [\"deepgram\"] },\n { id: \"assemblyai\", label: \"AssemblyAI\", providers: [\"assemblyai\"] },\n]\n\nexport function listProviderGroups(): readonly ProviderGroup[] {\n return PROVIDER_GROUPS\n}\n\nexport function getProviderGroup(id: string): ProviderGroup {\n const group = PROVIDER_GROUPS.find(g => g.id === id)\n if (!group) {\n const known = PROVIDER_GROUPS.map(g => g.id).join(\", \")\n throw new Error(`curation: unknown provider group \"${id}\". Known: ${known}`)\n }\n return group\n}\n\n/** The group that owns a raw provider tag, if any. */\nexport function groupForProvider(\n providerTag: string\n): ProviderGroup | undefined {\n return PROVIDER_GROUPS.find(g => g.providers.includes(providerTag))\n}\n\n/**\n * Expand a mixed list of provider-group ids and raw provider tags into the\n * flat set of provider tags to match against. A token that is a known\n * group id expands to its members; anything else passes through as a raw\n * tag (so callers can target an engine directly, e.g. `gemini-live`).\n */\nexport function expandProviders(tokens: readonly string[]): string[] {\n const out = new Set<string>()\n for (const token of tokens) {\n const group = PROVIDER_GROUPS.find(g => g.id === token)\n if (group) {\n for (const p of group.providers) out.add(p)\n } else {\n out.add(token)\n }\n }\n return [...out]\n}\n\n// ───────────────────────────────────────────────────────────────────────\n// Surface profiles — named views an app surfaces\n// ───────────────────────────────────────────────────────────────────────\n\nexport interface SurfaceProfile {\n id: string\n description: string\n /** Restrict to these kinds. Undefined/empty = every kind. */\n kinds?: readonly CatalogKind[]\n /**\n * Restrict to these provider GROUP ids or raw provider tags (OR-set).\n * Expanded via `expandProviders`, so `[\"openai\"]` covers both the\n * `openai` company tag and the `openai-realtime` voice engine.\n */\n providers?: readonly string[]\n /** Require all of these capability tags (AND-set): `s2s`, `tts`, `edit`, … */\n capabilities?: readonly string[]\n /** Require all of these arbitrary tags (AND-set). */\n tags?: readonly string[]\n}\n\nconst SURFACE_PROFILES: readonly SurfaceProfile[] = [\n {\n id: \"all\",\n description: \"Everything the catalog offers — the permissive default\",\n },\n {\n id: \"text\",\n description: \"Text models (LLMs) only\",\n kinds: [\"llm\"],\n },\n {\n id: \"images\",\n description: \"Image models only\",\n kinds: [\"image\"],\n },\n {\n id: \"video\",\n description: \"Video models only\",\n kinds: [\"video\"],\n },\n {\n id: \"audio\",\n description: \"Audio models (TTS / STT / s2s) only\",\n kinds: [\"audio\"],\n },\n {\n id: \"voice\",\n description: \"Every curated voice, any provider\",\n kinds: [\"voice\"],\n },\n {\n id: \"voice-s2s\",\n description:\n \"Speech-to-speech voice engines (OpenAI Realtime, Gemini Live)\",\n kinds: [\"voice\"],\n capabilities: [\"s2s\"],\n },\n {\n id: \"voice-tts\",\n description: \"Sequential TTS voices (MiniMax, ElevenLabs)\",\n kinds: [\"voice\"],\n capabilities: [\"tts\"],\n },\n]\n\nexport function listSurfaceProfiles(): readonly SurfaceProfile[] {\n return SURFACE_PROFILES\n}\n\nexport function getSurfaceProfile(id: string): SurfaceProfile {\n const profile = SURFACE_PROFILES.find(p => p.id === id)\n if (!profile) {\n const known = SURFACE_PROFILES.map(p => p.id).join(\", \")\n throw new Error(\n `curation: unknown surface profile \"${id}\". Known: ${known}`\n )\n }\n return profile\n}\n\n// ───────────────────────────────────────────────────────────────────────\n// Filters\n// ───────────────────────────────────────────────────────────────────────\n\n/**\n * True iff a model passes a surface profile. Provider membership, like\n * capability/tag membership, is checked against the enrichment tag\n * vocabulary (every kind emits its provider as a tag), so this is uniform\n * across kinds and naturally spans the company/engine provider split.\n */\nexport function modelMatchesProfile(\n model: ResolvedModel,\n profile: SurfaceProfile\n): boolean {\n if (profile.kinds && profile.kinds.length > 0) {\n if (!profile.kinds.includes(model.kind)) return false\n }\n if (profile.providers && profile.providers.length > 0) {\n const tags = expandProviders(profile.providers)\n if (!tags.some(tag => modelHasTag(model, tag))) return false\n }\n if (profile.capabilities) {\n if (!profile.capabilities.every(cap => modelHasTag(model, cap)))\n return false\n }\n if (profile.tags) {\n if (!profile.tags.every(tag => modelHasTag(model, tag))) return false\n }\n return true\n}\n\n/** Filter a model list down to what a surface profile exposes. */\nexport function applyProfile(\n models: ResolvedModel[],\n profile: SurfaceProfile\n): ResolvedModel[] {\n return models.filter(model => modelMatchesProfile(model, profile))\n}\n\n/**\n * The catalog as a surface profile exposes it — `applyProfile` over the\n * full registry. The composable entry point for \"show me this view\".\n */\nexport function listSurfaced(profile: SurfaceProfile): ResolvedModel[] {\n return applyProfile(listModels(), profile)\n}\n\n/**\n * Voice-list curation. The merged voice catalog (curated + live\n * ElevenLabs) is `CatalogVoice[]`, not `ResolvedModel[]`, so it gets its\n * own provider filter — same group-expansion semantics. Only the provider\n * facet of a profile applies to a raw voice list (kind is implicitly\n * voice; capability/tag live on the registry projection).\n */\nexport function filterVoicesByProviders(\n voices: CatalogVoice[],\n providerTokens: readonly string[]\n): CatalogVoice[] {\n if (providerTokens.length === 0) return voices\n const tags = new Set(expandProviders(providerTokens))\n return voices.filter(v => tags.has(v.provider))\n}\n"]}
@@ -172,6 +172,22 @@ var OPENROUTER_ROUTES = {
172
172
  vendor: "anthropic",
173
173
  provider: "openrouter"
174
174
  },
175
+ "anthropic/claude-opus-5": {
176
+ inputPer1M: 5,
177
+ outputPer1M: 25,
178
+ cacheReadMultiplier: 0.1,
179
+ cacheWriteMultiplier: 1.25,
180
+ vendor: "anthropic",
181
+ provider: "openrouter"
182
+ },
183
+ "anthropic/claude-opus-5-fast": {
184
+ inputPer1M: 10,
185
+ outputPer1M: 50,
186
+ cacheReadMultiplier: 0.1,
187
+ cacheWriteMultiplier: 1.25,
188
+ vendor: "anthropic",
189
+ provider: "openrouter"
190
+ },
175
191
  "anthropic/claude-sonnet-4": {
176
192
  inputPer1M: 3,
177
193
  outputPer1M: 15,
@@ -205,9 +221,9 @@ var OPENROUTER_ROUTES = {
205
221
  provider: "openrouter"
206
222
  },
207
223
  "arcee-ai/trinity-large-thinking": {
208
- inputPer1M: 0.25,
209
- outputPer1M: 0.8,
210
- cacheReadMultiplier: 0.24,
224
+ inputPer1M: 0.22,
225
+ outputPer1M: 0.85,
226
+ cacheReadMultiplier: 0.272727,
211
227
  vendor: "arcee-ai",
212
228
  provider: "openrouter"
213
229
  },
@@ -350,8 +366,8 @@ var OPENROUTER_ROUTES = {
350
366
  provider: "openrouter"
351
367
  },
352
368
  "deepseek/deepseek-v4-flash": {
353
- inputPer1M: 0.098,
354
- outputPer1M: 0.196,
369
+ inputPer1M: 0.0938,
370
+ outputPer1M: 0.1876,
355
371
  cacheReadMultiplier: 0.2,
356
372
  vendor: "deepseek",
357
373
  provider: "openrouter"
@@ -493,6 +509,22 @@ var OPENROUTER_ROUTES = {
493
509
  vendor: "google",
494
510
  provider: "openrouter"
495
511
  },
512
+ "google/gemini-3.5-flash-lite": {
513
+ inputPer1M: 0.3,
514
+ outputPer1M: 2.5,
515
+ cacheReadMultiplier: 0.1,
516
+ cacheWriteMultiplier: 0.277777,
517
+ vendor: "google",
518
+ provider: "openrouter"
519
+ },
520
+ "google/gemini-3.6-flash": {
521
+ inputPer1M: 1.5,
522
+ outputPer1M: 7.5,
523
+ cacheReadMultiplier: 0.1,
524
+ cacheWriteMultiplier: 0.055555,
525
+ vendor: "google",
526
+ provider: "openrouter"
527
+ },
496
528
  "google/gemma-2-27b-it": {
497
529
  inputPer1M: 0.65,
498
530
  outputPer1M: 0.65,
@@ -506,8 +538,9 @@ var OPENROUTER_ROUTES = {
506
538
  provider: "openrouter"
507
539
  },
508
540
  "google/gemma-3-27b-it": {
509
- inputPer1M: 0.1,
510
- outputPer1M: 0.3,
541
+ inputPer1M: 0.08,
542
+ outputPer1M: 0.45,
543
+ cacheReadMultiplier: 0.5,
511
544
  vendor: "google",
512
545
  provider: "openrouter"
513
546
  },
@@ -524,14 +557,15 @@ var OPENROUTER_ROUTES = {
524
557
  provider: "openrouter"
525
558
  },
526
559
  "google/gemma-4-26b-a4b-it": {
527
- inputPer1M: 0.1,
528
- outputPer1M: 0.3,
560
+ inputPer1M: 0.12,
561
+ outputPer1M: 0.35,
562
+ cacheReadMultiplier: 0.416667,
529
563
  vendor: "google",
530
564
  provider: "openrouter"
531
565
  },
532
566
  "google/gemma-4-31b-it": {
533
- inputPer1M: 0.12,
534
- outputPer1M: 0.37,
567
+ inputPer1M: 0.14,
568
+ outputPer1M: 0.4,
535
569
  vendor: "google",
536
570
  provider: "openrouter"
537
571
  },
@@ -621,6 +655,13 @@ var OPENROUTER_ROUTES = {
621
655
  vendor: "mancer",
622
656
  provider: "openrouter"
623
657
  },
658
+ "meituan/longcat-2.0": {
659
+ inputPer1M: 0.3,
660
+ outputPer1M: 1.2,
661
+ cacheReadMultiplier: 0.02,
662
+ vendor: "meituan",
663
+ provider: "openrouter"
664
+ },
624
665
  "meta-llama/llama-3.1-70b-instruct": {
625
666
  inputPer1M: 0.4,
626
667
  outputPer1M: 0.4,
@@ -641,8 +682,8 @@ var OPENROUTER_ROUTES = {
641
682
  provider: "openrouter"
642
683
  },
643
684
  "meta-llama/llama-3.2-3b-instruct": {
644
- inputPer1M: 0.0509,
645
- outputPer1M: 0.335,
685
+ inputPer1M: 0.05,
686
+ outputPer1M: 0.33,
646
687
  vendor: "meta-llama",
647
688
  provider: "openrouter"
648
689
  },
@@ -898,16 +939,16 @@ var OPENROUTER_ROUTES = {
898
939
  provider: "openrouter"
899
940
  },
900
941
  "moonshotai/kimi-k2.6": {
901
- inputPer1M: 0.95,
902
- outputPer1M: 4,
942
+ inputPer1M: 0.646,
943
+ outputPer1M: 2.72,
903
944
  cacheReadMultiplier: 0.168421,
904
945
  vendor: "moonshotai",
905
946
  provider: "openrouter"
906
947
  },
907
948
  "moonshotai/kimi-k2.7-code": {
908
- inputPer1M: 0.85,
909
- outputPer1M: 3.79,
910
- cacheReadMultiplier: 0.209412,
949
+ inputPer1M: 0.78,
950
+ outputPer1M: 3.5,
951
+ cacheReadMultiplier: 0.192308,
911
952
  vendor: "moonshotai",
912
953
  provider: "openrouter"
913
954
  },
@@ -975,9 +1016,8 @@ var OPENROUTER_ROUTES = {
975
1016
  provider: "openrouter"
976
1017
  },
977
1018
  "nvidia/nemotron-3-super-120b-a12b": {
978
- inputPer1M: 0.21,
979
- outputPer1M: 0.455,
980
- cacheReadMultiplier: 0.285714,
1019
+ inputPer1M: 0.085,
1020
+ outputPer1M: 0.4,
981
1021
  vendor: "nvidia",
982
1022
  provider: "openrouter"
983
1023
  },
@@ -1510,6 +1550,13 @@ var OPENROUTER_ROUTES = {
1510
1550
  vendor: "poolside",
1511
1551
  provider: "openrouter"
1512
1552
  },
1553
+ "poolside/laguna-s-2.1": {
1554
+ inputPer1M: 0.1,
1555
+ outputPer1M: 0.2,
1556
+ cacheReadMultiplier: 0.1,
1557
+ vendor: "poolside",
1558
+ provider: "openrouter"
1559
+ },
1513
1560
  "poolside/laguna-xs-2.1": {
1514
1561
  inputPer1M: 0.06,
1515
1562
  outputPer1M: 0.12,
@@ -1582,8 +1629,8 @@ var OPENROUTER_ROUTES = {
1582
1629
  provider: "openrouter"
1583
1630
  },
1584
1631
  "qwen/qwen3-235b-a22b-thinking-2507": {
1585
- inputPer1M: 0.1495,
1586
- outputPer1M: 1.495,
1632
+ inputPer1M: 0.3,
1633
+ outputPer1M: 3,
1587
1634
  vendor: "qwen",
1588
1635
  provider: "openrouter"
1589
1636
  },
@@ -1694,8 +1741,8 @@ var OPENROUTER_ROUTES = {
1694
1741
  provider: "openrouter"
1695
1742
  },
1696
1743
  "qwen/qwen3-vl-30b-a3b-instruct": {
1697
- inputPer1M: 0.13,
1698
- outputPer1M: 0.52,
1744
+ inputPer1M: 0.15,
1745
+ outputPer1M: 0.6,
1699
1746
  vendor: "qwen",
1700
1747
  provider: "openrouter"
1701
1748
  },
@@ -1730,8 +1777,8 @@ var OPENROUTER_ROUTES = {
1730
1777
  provider: "openrouter"
1731
1778
  },
1732
1779
  "qwen/qwen3.5-27b": {
1733
- inputPer1M: 0.26,
1734
- outputPer1M: 2.6,
1780
+ inputPer1M: 0.195,
1781
+ outputPer1M: 1.56,
1735
1782
  vendor: "qwen",
1736
1783
  provider: "openrouter"
1737
1784
  },
@@ -1773,8 +1820,8 @@ var OPENROUTER_ROUTES = {
1773
1820
  provider: "openrouter"
1774
1821
  },
1775
1822
  "qwen/qwen3.6-27b": {
1776
- inputPer1M: 0.45,
1777
- outputPer1M: 2.7,
1823
+ inputPer1M: 0.289,
1824
+ outputPer1M: 2.4,
1778
1825
  vendor: "qwen",
1779
1826
  provider: "openrouter"
1780
1827
  },
@@ -1890,8 +1937,8 @@ var OPENROUTER_ROUTES = {
1890
1937
  provider: "openrouter"
1891
1938
  },
1892
1939
  "tencent/hy3": {
1893
- inputPer1M: 0.2,
1894
- outputPer1M: 0.8,
1940
+ inputPer1M: 0.132,
1941
+ outputPer1M: 0.528,
1895
1942
  cacheReadMultiplier: 0.25,
1896
1943
  vendor: "tencent",
1897
1944
  provider: "openrouter"
@@ -1979,7 +2026,7 @@ var OPENROUTER_ROUTES = {
1979
2026
  "x-ai/grok-4.5": {
1980
2027
  inputPer1M: 2,
1981
2028
  outputPer1M: 6,
1982
- cacheReadMultiplier: 0.25,
2029
+ cacheReadMultiplier: 0.15,
1983
2030
  vendor: "x-ai",
1984
2031
  provider: "openrouter"
1985
2032
  },
@@ -2047,15 +2094,16 @@ var OPENROUTER_ROUTES = {
2047
2094
  provider: "openrouter"
2048
2095
  },
2049
2096
  "z-ai/glm-4.7-flash": {
2050
- inputPer1M: 0.0605,
2097
+ inputPer1M: 0.06,
2051
2098
  outputPer1M: 0.4,
2099
+ cacheReadMultiplier: 0.166667,
2052
2100
  vendor: "z-ai",
2053
2101
  provider: "openrouter"
2054
2102
  },
2055
2103
  "z-ai/glm-5": {
2056
2104
  inputPer1M: 0.95,
2057
- outputPer1M: 3.15,
2058
- cacheReadMultiplier: 0.2,
2105
+ outputPer1M: 2.55,
2106
+ cacheReadMultiplier: 0.210526,
2059
2107
  vendor: "z-ai",
2060
2108
  provider: "openrouter"
2061
2109
  },
@@ -2074,8 +2122,8 @@ var OPENROUTER_ROUTES = {
2074
2122
  provider: "openrouter"
2075
2123
  },
2076
2124
  "z-ai/glm-5.2": {
2077
- inputPer1M: 0.2744,
2078
- outputPer1M: 0.8624,
2125
+ inputPer1M: 0.714,
2126
+ outputPer1M: 2.244,
2079
2127
  cacheReadMultiplier: 0.185714,
2080
2128
  vendor: "z-ai",
2081
2129
  provider: "openrouter"
@@ -2121,7 +2169,7 @@ var OPENROUTER_ROUTES = {
2121
2169
  },
2122
2170
  "~google/gemini-flash-latest": {
2123
2171
  inputPer1M: 1.5,
2124
- outputPer1M: 9,
2172
+ outputPer1M: 7.5,
2125
2173
  cacheReadMultiplier: 0.1,
2126
2174
  cacheWriteMultiplier: 0.055555,
2127
2175
  vendor: "~google",
@@ -2160,7 +2208,7 @@ var OPENROUTER_ROUTES = {
2160
2208
  "~x-ai/grok-latest": {
2161
2209
  inputPer1M: 2,
2162
2210
  outputPer1M: 6,
2163
- cacheReadMultiplier: 0.25,
2211
+ cacheReadMultiplier: 0.15,
2164
2212
  vendor: "~x-ai",
2165
2213
  provider: "openrouter"
2166
2214
  }
@@ -2954,6 +3002,12 @@ function resolvePricing(modelId) {
2954
3002
  }
2955
3003
  return void 0;
2956
3004
  }
3005
+ function resolvePricingExact(modelId) {
3006
+ if (PRICING_BY_ID[modelId]) return PRICING_BY_ID[modelId];
3007
+ const alias = ALIAS_BY_ID[modelId];
3008
+ if (alias && PRICING_BY_ID[alias]) return PRICING_BY_ID[alias];
3009
+ return void 0;
3010
+ }
2957
3011
  function resolveAlias(modelId) {
2958
3012
  if (PRICING_BY_ID[modelId]) return modelId;
2959
3013
  const alias = ALIAS_BY_ID[modelId];
@@ -3069,6 +3123,6 @@ function getCacheStats(modelId, usage, opts) {
3069
3123
  };
3070
3124
  }
3071
3125
 
3072
- export { DEFAULT_PRICING, LLM_PRICING_CATALOG, MODEL_ALIASES, OPENROUTER_ROUTES, calculateLLMCreditCost, getCacheStats, getModelProvider, resolveAlias, resolveContextWindow, resolveModelRoute, resolvePricing };
3073
- //# sourceMappingURL=chunk-EXT2CSSJ.mjs.map
3074
- //# sourceMappingURL=chunk-EXT2CSSJ.mjs.map
3126
+ export { DEFAULT_PRICING, LLM_PRICING_CATALOG, MODEL_ALIASES, OPENROUTER_ROUTES, calculateLLMCreditCost, getCacheStats, getModelProvider, resolveAlias, resolveContextWindow, resolveModelRoute, resolvePricing, resolvePricingExact };
3127
+ //# sourceMappingURL=chunk-6VDWPE62.mjs.map
3128
+ //# sourceMappingURL=chunk-6VDWPE62.mjs.map