@x12i/ai-profiles 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -8
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/modelIdentity.d.ts.map +1 -1
- package/dist/modelIdentity.js +32 -21
- package/dist/modelIdentity.js.map +1 -1
- package/dist/resolveModelIdentity.d.ts +17 -0
- package/dist/resolveModelIdentity.d.ts.map +1 -0
- package/dist/resolveModelIdentity.js +107 -0
- package/dist/resolveModelIdentity.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -90,28 +90,58 @@ npm install @x12i/ai-profiles
|
|
|
90
90
|
|
|
91
91
|
## Public API
|
|
92
92
|
|
|
93
|
+
### Profiles and registry loading
|
|
94
|
+
|
|
93
95
|
| Export | Sync? | Purpose |
|
|
94
96
|
|--------|-------|---------|
|
|
95
97
|
| `listAIProfiles(options?)` | No (async) | Profile summaries: primary `profile` key, `aliases[]`, choices, defaults |
|
|
96
98
|
| `getAIRegistryStatistics(options?)` | No (async) | Counts: profiles, choices, providers, shortcuts, catalog models, linkage health |
|
|
97
99
|
| `formatRegistryStatistics(stats)` | Yes | Human-readable summary for logs / CLI |
|
|
100
|
+
| `loadAIProfilesRegistry(options?)` | No (async) | Raw profiles + shortcuts registry (`auto` / `remote` / `bundled`, 24h memory cache) |
|
|
101
|
+
| `loadAIProfilesRegistryWithWarnings(options?)` | No (async) | Same as above, plus `warnings[]` (stale cache, bundled fallback, etc.) |
|
|
98
102
|
| `loadModelsCatalog(options?)` | No (async) | Unified models catalog (`auto` / `remote` / `bundled`, same cache pattern as profiles) |
|
|
103
|
+
| `loadBundledModelsCatalog()` | Yes | Package-shipped `models-catalog.json` only |
|
|
104
|
+
| `loadBundledModelsRegistry()` | Yes | Package-shipped `models-registry.json` (linkage index) |
|
|
99
105
|
| `listAIShortcuts()` | Yes | Shortcut table: `{ key, profile, choice?, description? }[]` |
|
|
100
|
-
| `resolveAIProfile(input, options?)` | No (async) | Resolve
|
|
101
|
-
| `
|
|
106
|
+
| `resolveAIProfile(input, options?)` | No (async) | Resolve profile/shortcut/alias → model, pricing, runtime, canonical `profile` key |
|
|
107
|
+
| `isKnownProfileOrShortcut(input)` | Yes (bundled only) | Whether input is a known primary key, shortcut, or alias |
|
|
108
|
+
| `AIProfilesError` | — | Typed errors (`UNKNOWN_PROFILE`, …) |
|
|
109
|
+
|
|
110
|
+
### Model identity (vendor + model strings)
|
|
111
|
+
|
|
112
|
+
Use these when callers pass **raw model ids or OpenRouter slugs**, not profile names.
|
|
113
|
+
|
|
114
|
+
| Export | Sync? | Purpose |
|
|
115
|
+
|--------|-------|---------|
|
|
116
|
+
| `resolveModelIdentity(input, options?)` | Yes | Given a bare id or `vendor/slug`, return `{ provider, modelId, invocation? }` via bundled registry + catalog fallback |
|
|
117
|
+
| `buildModelInvocation(provider, modelId)` | Yes | `{ direct, openrouter }` endpoints for a provider hint + model string |
|
|
118
|
+
| `buildDirectInvocation(provider, modelId)` | Yes | Vendor-direct `{ provider, modelId }`; splits prefixed slugs for all vendors |
|
|
102
119
|
| `buildOpenRouterModelId(provider, modelId)` | Yes | Build an OpenRouter slug (`openai/gpt-5.4`) from registry fields |
|
|
120
|
+
| `parseDirectFromOpenRouterSlug(slug, family?)` | Yes | Split `vendor/model` → direct slice (`custom` + bare id when vendor is not a first-class provider) |
|
|
121
|
+
| `normalizeAnthropicVersionSlug(slug)` | Yes | Dotted minor versions for Anthropic (`4-6` → `4.6`) |
|
|
122
|
+
| `buildRegistryKey(provider, modelId)` | Yes | Stable registry key (`vendor:…`) used in `models-registry.json` |
|
|
123
|
+
| `matchOpenRouterCatalog(provider, modelId, index)` | Yes | Match a choice against a catalog index |
|
|
124
|
+
| `lookupInvocationForChoice(registry, provider, modelId)` | Yes | Lookup prebuilt invocation from `models-registry.json` |
|
|
125
|
+
|
|
126
|
+
**Prefixed slugs:** `buildDirectInvocation("meta-llama", "meta-llama/llama-3.1-8b-instruct")` yields `{ provider: "meta-llama", modelId: "llama-3.1-8b-instruct" }`. Host paths keep the nested id when the provider hint differs (e.g. Together: `together` + `meta-llama/Llama-3.3-70b-instruct`). Bare and prefixed Anthropic inputs normalize to the same direct and OpenRouter ids.
|
|
127
|
+
|
|
128
|
+
### Routing, validation, and maintainer tooling
|
|
129
|
+
|
|
130
|
+
| Export | Sync? | Purpose |
|
|
131
|
+
|--------|-------|---------|
|
|
132
|
+
| `resolveUseOpenRouter(explicit?)` | Yes | Resolve OpenRouter vs vendor-direct routing (option → env → default) |
|
|
103
133
|
| `validateBundledProfileVendorCoverage(options?)` | Yes | Advisory report of leading-vendor coverage per profile |
|
|
104
134
|
| `isProfileVendorTrimReady(profile, allowedProviders)` | Yes | Whether auto-pick can satisfy a vendor filter |
|
|
105
135
|
| `listFaultyProfileChoices()` | Yes | Profile choices with faulty OpenRouter catalog linkage |
|
|
106
|
-
| `
|
|
107
|
-
| `AIProfilesError` | — | Typed errors (`UNKNOWN_PROFILE`, …) |
|
|
136
|
+
| `buildModelsRegistry`, `verifyOpenRouterAlignment`, … | Yes | Catalog/registry build and alignment (see scripts below) |
|
|
108
137
|
|
|
109
|
-
Registry JSON lives in
|
|
138
|
+
Registry JSON lives in four bundled assets:
|
|
110
139
|
|
|
111
140
|
| File | Schema | Role |
|
|
112
141
|
|------|--------|------|
|
|
113
142
|
| `models-profiles.json` | `x12i.ai-profiles.model-registry.v3` | Profile intent, choices, `requiredCapabilities`, `modelStatus` — **no embedded pricing** |
|
|
114
143
|
| `models-catalog.json` | `x12i.ai-profiles.models-catalog` | Per-model pricing, context window, capabilities (OpenRouter-normalized) |
|
|
144
|
+
| `models-registry.json` | `x12i.ai-profiles.models-registry` | Built linkage index: vendor keys, OpenRouter slugs, `invocation` pairs |
|
|
115
145
|
| `profiles-shortcuts.json` | `x12i.ai-profiles.shortcuts` | Named entry points |
|
|
116
146
|
|
|
117
147
|
**v3 contract:** `modelId` is **vendor-native** (e.g. `claude-sonnet-4-5`). OpenRouter slugs live under `choice.api.openRouterModelId`. `resolveAIProfile` merges catalog data into `resolved.pricing`, `resolved.limits`, and `resolved.capabilities`. Default choices use **verified** SKUs; forward-looking models remain as alternates with `modelStatus: predicted`.
|
|
@@ -297,15 +327,31 @@ await resolveAIProfile("cheap", { useOpenRouter: true }); // still OpenRouter
|
|
|
297
327
|
Helper exports:
|
|
298
328
|
|
|
299
329
|
```ts
|
|
300
|
-
import {
|
|
330
|
+
import {
|
|
331
|
+
resolveUseOpenRouter,
|
|
332
|
+
buildOpenRouterModelId,
|
|
333
|
+
buildModelInvocation,
|
|
334
|
+
resolveModelIdentity,
|
|
335
|
+
} from "@x12i/ai-profiles";
|
|
301
336
|
|
|
302
337
|
resolveUseOpenRouter(); // true by default
|
|
303
338
|
resolveUseOpenRouter(false); // explicit override
|
|
304
339
|
|
|
305
340
|
buildOpenRouterModelId("openai", "gpt-5.4"); // "openai/gpt-5.4"
|
|
341
|
+
|
|
342
|
+
// Same direct + OpenRouter shape whether input is bare or prefixed:
|
|
343
|
+
buildModelInvocation("anthropic", "claude-3-5-sonnet-20241022");
|
|
344
|
+
buildModelInvocation("anthropic", "anthropic/claude-3-5-sonnet-20241022");
|
|
345
|
+
|
|
346
|
+
// Bare model string → vendor + model (no profile name required):
|
|
347
|
+
resolveModelIdentity("google/gemini-2.5-flash-lite");
|
|
348
|
+
// { provider: "google", modelId: "gemini-2.5-flash-lite", invocation: { … } }
|
|
349
|
+
|
|
350
|
+
resolveModelIdentity("google/gemini-2.5-flash-lite", { asOpenRouter: true });
|
|
351
|
+
// { provider: "openrouter", modelId: "google/gemini-2.5-flash-lite", … }
|
|
306
352
|
```
|
|
307
353
|
|
|
308
|
-
Tests: `test/resolveModelRouting.test.ts`.
|
|
354
|
+
Tests: `test/resolveModelRouting.test.ts`, `test/modelIdentity.test.ts`, `test/resolveModelIdentity.test.ts`.
|
|
309
355
|
|
|
310
356
|
## Use bundled only
|
|
311
357
|
|
|
@@ -456,7 +502,7 @@ npm run verify:openrouter:live # legacy script vs live catalog
|
|
|
456
502
|
|
|
457
503
|
With the seed catalog (<50 models), choices not yet listed are marked `catalog-miss` in the registry (warnings in `reports/fault-report.json`, not CI failures). A full catalog promotes true `faulty` rows for slug mismatches.
|
|
458
504
|
|
|
459
|
-
Unit tests in `test/openrouterAlignment.test.ts`, `test/modelIdentity.test.ts`, and `test/resolveModelRouting.test.ts` guard resolution rules offline.
|
|
505
|
+
Unit tests in `test/openrouterAlignment.test.ts`, `test/modelIdentity.test.ts`, `test/resolveModelIdentity.test.ts`, and `test/resolveModelRouting.test.ts` guard resolution rules offline.
|
|
460
506
|
|
|
461
507
|
Vendor-direct-only choices (not routed via OpenRouter) can opt out:
|
|
462
508
|
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export { resolveAIProfile } from "./resolveAIProfile.js";
|
|
|
7
7
|
export { isKnownProfileOrShortcut } from "./isKnownProfileOrShortcut.js";
|
|
8
8
|
export { resolveUseOpenRouter, readUseOpenRouterFromEnv, buildOpenRouterModelId, } from "./resolveModelRouting.js";
|
|
9
9
|
export { buildModelInvocation, buildDirectInvocation, buildRegistryKey, matchOpenRouterCatalog, normalizeAnthropicVersionSlug, openRouterResolutionCandidates, } from "./modelIdentity.js";
|
|
10
|
+
export { resolveModelIdentity } from "./resolveModelIdentity.js";
|
|
11
|
+
export type { ModelVendorRef, ResolveModelIdentityOptions, } from "./resolveModelIdentity.js";
|
|
10
12
|
export { migrateModelsProfilesToV2, buildModelInvocationFromChoice, getChoiceVendorModelId, getChoiceOpenRouterModelId, getChoicePricing, flattenChoicePricing, fixVendorModelId, } from "./profileRegistryV2.js";
|
|
11
13
|
export { migrateModelsProfilesToV3, isModelsProfilesV3, applyVerifiedProfileDefaults, resolveChoicePricing, PREDICTED_VENDOR_MODEL_IDS, } from "./profileRegistryV3.js";
|
|
12
14
|
export { mergeCatalogSupplement } from "./mergeCatalogSupplement.js";
|
|
@@ -17,7 +19,8 @@ export { loadBundledModelsRegistry, loadModelsRegistryFromPath, lookupInvocation
|
|
|
17
19
|
export { validateProfileVendorCoverage, validateBundledProfileVendorCoverage, isProfileVendorTrimReady, isProfileLeadingVendorReady, } from "./validateProfileVendorCoverage.js";
|
|
18
20
|
export { LEADING_VENDORS, pickProfileChoice } from "./vendorPolicy.js";
|
|
19
21
|
export { verifyOpenRouterAlignment, formatOpenRouterAlignmentReport, OPENROUTER_MODELS_CATALOG_URL, } from "./validation/openRouterAlignment.js";
|
|
20
|
-
export { MODELS_CATALOG_FILENAME, MODELS_CATALOG_REMOTE_URL, MODELS_CATALOG_SCHEMA, normalizeModelsCatalog, buildModelsCatalogIndex, } from "./modelsCatalog.js";
|
|
22
|
+
export { MODELS_CATALOG_FILENAME, MODELS_CATALOG_REMOTE_URL, MODELS_CATALOG_SCHEMA, normalizeModelsCatalog, buildModelsCatalogIndex, parseDirectFromOpenRouterSlug, } from "./modelsCatalog.js";
|
|
23
|
+
export { loadAIProfilesRegistry, loadAIProfilesRegistryWithWarnings, } from "./loader/loadAIProfilesRegistry.js";
|
|
21
24
|
export { loadModelsCatalog, loadModelsCatalogWithWarnings } from "./loader/loadModelsCatalog.js";
|
|
22
25
|
export { loadBundledModelsCatalog } from "./loader/loadBundledModelsCatalog.js";
|
|
23
26
|
export { buildModelsCatalogFromOpenRouterApi, buildLegacyCatalogFromOpenRouterApi, } from "./buildCatalogFromOpenRouterApi.js";
|
|
@@ -25,6 +28,7 @@ export { REMOTE_MODELS_CATALOG_URL, OPENROUTER_MODELS_API_URL } from "./constant
|
|
|
25
28
|
export type { AIProfilesRegistry, AIProfileDefinition, AIProfileChoice, AIProfileShortcut, AIProfileSummary, AIShortcutSummary, ResolvedAIProfile, ListAIProfilesOptions, ResolveAIProfileOptions, AIProvider, AIModelPricing, AIRuntimeDefaults, AIProfileBackend, AIProfileWarning, InstructionTier, RegistrySourceMode, ModelInvocation, ModelInvocationEndpoint, ModelsRegistryJson, ModelRegistryEntry, ModelsCatalogJson, CatalogModelEntry, CatalogDirectSlice, CatalogOpenRouterSlice, OpenRouterModelsCatalogJson, ValidateProfileVendorCoverageResult, ProfileVendorCoverageResult, AIRegistryStatistics, GetAIRegistryStatisticsOptions, ProfileStatisticsFilter, ModelAvailabilityStatus, DeploymentType, ProfileRequiredCapabilities, ModelCapabilitiesSnapshot, } from "./types.js";
|
|
26
29
|
export type { GetAIRegistryStatisticsResult } from "./getAIRegistryStatistics.js";
|
|
27
30
|
export type { LoadCatalogResult } from "./loader/loadModelsCatalog.js";
|
|
31
|
+
export type { LoadRegistryOptions, LoadRegistryResult, } from "./types.js";
|
|
28
32
|
export type { AIModelRoutingMode } from "./resolveModelRouting.js";
|
|
29
33
|
export { AIProfilesError } from "./errors.js";
|
|
30
34
|
export type { AIProfilesErrorCode } from "./errors.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,gBAAg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Y,CAAC;AAEpB,YAAY,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAClF,YAAY,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,YAAY,EACV,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export { resolveAIProfile } from "./resolveAIProfile.js";
|
|
|
7
7
|
export { isKnownProfileOrShortcut } from "./isKnownProfileOrShortcut.js";
|
|
8
8
|
export { resolveUseOpenRouter, readUseOpenRouterFromEnv, buildOpenRouterModelId, } from "./resolveModelRouting.js";
|
|
9
9
|
export { buildModelInvocation, buildDirectInvocation, buildRegistryKey, matchOpenRouterCatalog, normalizeAnthropicVersionSlug, openRouterResolutionCandidates, } from "./modelIdentity.js";
|
|
10
|
+
export { resolveModelIdentity } from "./resolveModelIdentity.js";
|
|
10
11
|
export { migrateModelsProfilesToV2, buildModelInvocationFromChoice, getChoiceVendorModelId, getChoiceOpenRouterModelId, getChoicePricing, flattenChoicePricing, fixVendorModelId, } from "./profileRegistryV2.js";
|
|
11
12
|
export { migrateModelsProfilesToV3, isModelsProfilesV3, applyVerifiedProfileDefaults, resolveChoicePricing, PREDICTED_VENDOR_MODEL_IDS, } from "./profileRegistryV3.js";
|
|
12
13
|
export { mergeCatalogSupplement } from "./mergeCatalogSupplement.js";
|
|
@@ -17,7 +18,8 @@ export { loadBundledModelsRegistry, loadModelsRegistryFromPath, lookupInvocation
|
|
|
17
18
|
export { validateProfileVendorCoverage, validateBundledProfileVendorCoverage, isProfileVendorTrimReady, isProfileLeadingVendorReady, } from "./validateProfileVendorCoverage.js";
|
|
18
19
|
export { LEADING_VENDORS, pickProfileChoice } from "./vendorPolicy.js";
|
|
19
20
|
export { verifyOpenRouterAlignment, formatOpenRouterAlignmentReport, OPENROUTER_MODELS_CATALOG_URL, } from "./validation/openRouterAlignment.js";
|
|
20
|
-
export { MODELS_CATALOG_FILENAME, MODELS_CATALOG_REMOTE_URL, MODELS_CATALOG_SCHEMA, normalizeModelsCatalog, buildModelsCatalogIndex, } from "./modelsCatalog.js";
|
|
21
|
+
export { MODELS_CATALOG_FILENAME, MODELS_CATALOG_REMOTE_URL, MODELS_CATALOG_SCHEMA, normalizeModelsCatalog, buildModelsCatalogIndex, parseDirectFromOpenRouterSlug, } from "./modelsCatalog.js";
|
|
22
|
+
export { loadAIProfilesRegistry, loadAIProfilesRegistryWithWarnings, } from "./loader/loadAIProfilesRegistry.js";
|
|
21
23
|
export { loadModelsCatalog, loadModelsCatalogWithWarnings } from "./loader/loadModelsCatalog.js";
|
|
22
24
|
export { loadBundledModelsCatalog } from "./loader/loadBundledModelsCatalog.js";
|
|
23
25
|
export { buildModelsCatalogFromOpenRouterApi, buildLegacyCatalogFromOpenRouterApi, } from "./buildCatalogFromOpenRouterApi.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OA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OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,6BAA6B,EAC7B,oCAAoC,EACpC,wBAAwB,EACxB,2BAA2B,GAC5B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAC/B,6BAA6B,GAC9B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,sBAAsB,EACtB,kCAAkC,GACnC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AACjG,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EACL,mCAAmC,EACnC,mCAAmC,GACpC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAgDtF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelIdentity.d.ts","sourceRoot":"","sources":["../src/modelIdentity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modelIdentity.d.ts","sourceRoot":"","sources":["../src/modelIdentity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE9D,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE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AAE,kBAAkB,CAAC,GAC5D,GAAG,CAAC,MAAM,CAAC,GACd,OAAO,CAYT;AAED,8EAA8E;AAC9E,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAa/E"}
|
package/dist/modelIdentity.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { parseDirectFromOpenRouterSlug } from "./modelsCatalog.js";
|
|
1
2
|
function normalizeKey(value) {
|
|
2
3
|
return value.trim().toLowerCase();
|
|
3
4
|
}
|
|
@@ -42,32 +43,44 @@ export function buildRegistryKey(provider, modelId) {
|
|
|
42
43
|
*/
|
|
43
44
|
export function buildDirectInvocation(provider, modelId) {
|
|
44
45
|
if (modelId.includes("/")) {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
const parsed = parseDirectFromOpenRouterSlug(modelId);
|
|
47
|
+
if (parsed.provider !== "custom" && parsed.provider !== "openrouter") {
|
|
48
|
+
return {
|
|
49
|
+
provider: parsed.provider,
|
|
50
|
+
modelId: normalizeAnthropicVersionSlug(parsed.modelId),
|
|
51
|
+
};
|
|
50
52
|
}
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"mistral",
|
|
59
|
-
"groq",
|
|
60
|
-
"xai",
|
|
61
|
-
].includes(providerFromSlug)) {
|
|
62
|
-
return { provider: providerFromSlug, modelId: bareModel };
|
|
53
|
+
const vendorNs = parsed.vendorNamespace?.trim().toLowerCase();
|
|
54
|
+
const hint = provider.trim().toLowerCase();
|
|
55
|
+
if (vendorNs && vendorNs === hint) {
|
|
56
|
+
return {
|
|
57
|
+
provider: provider,
|
|
58
|
+
modelId: normalizeAnthropicVersionSlug(parsed.modelId),
|
|
59
|
+
};
|
|
63
60
|
}
|
|
64
|
-
return {
|
|
61
|
+
return {
|
|
62
|
+
provider: provider,
|
|
63
|
+
modelId: normalizeAnthropicVersionSlug(modelId),
|
|
64
|
+
};
|
|
65
65
|
}
|
|
66
66
|
return {
|
|
67
67
|
provider: provider,
|
|
68
68
|
modelId: normalizeAnthropicVersionSlug(modelId),
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
+
function resolveOpenRouterModelId(provider, modelId, direct) {
|
|
72
|
+
if (modelId.toLowerCase().startsWith("x-ai/")) {
|
|
73
|
+
return normalizeAnthropicVersionSlug(modelId);
|
|
74
|
+
}
|
|
75
|
+
if (modelId.includes("/")) {
|
|
76
|
+
const parsed = parseDirectFromOpenRouterSlug(modelId);
|
|
77
|
+
const orProvider = direct.provider === "custom" || parsed.provider === "custom"
|
|
78
|
+
? (parsed.vendorNamespace ?? provider)
|
|
79
|
+
: direct.provider;
|
|
80
|
+
return buildOpenRouterModelId(orProvider, direct.modelId);
|
|
81
|
+
}
|
|
82
|
+
return buildOpenRouterModelId(direct.provider, direct.modelId);
|
|
83
|
+
}
|
|
71
84
|
export function buildOpenRouterModelId(provider, modelId) {
|
|
72
85
|
if (modelId.includes("/")) {
|
|
73
86
|
return modelId;
|
|
@@ -83,9 +96,7 @@ export function buildModelInvocation(provider, modelId) {
|
|
|
83
96
|
if (modelId.startsWith("funcx:") || modelId.startsWith("Xenova/")) {
|
|
84
97
|
return { direct, openrouter: null };
|
|
85
98
|
}
|
|
86
|
-
const openrouterModelId = modelId
|
|
87
|
-
? modelId
|
|
88
|
-
: buildOpenRouterModelId(direct.provider, direct.modelId);
|
|
99
|
+
const openrouterModelId = resolveOpenRouterModelId(provider, modelId, direct);
|
|
89
100
|
return {
|
|
90
101
|
direct,
|
|
91
102
|
openrouter: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelIdentity.js","sourceRoot":"","sources":["../src/modelIdentity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modelIdentity.js","sourceRoot":"","sources":["../src/modelIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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|
+
import type { ModelInvocation, ModelsRegistryJson } from "./types.js";
|
|
2
|
+
export interface ModelVendorRef {
|
|
3
|
+
provider: string;
|
|
4
|
+
modelId: string;
|
|
5
|
+
invocation?: ModelInvocation;
|
|
6
|
+
}
|
|
7
|
+
export interface ResolveModelIdentityOptions {
|
|
8
|
+
/** When true, return the OpenRouter presentation (`openrouter` provider + OR slug). */
|
|
9
|
+
asOpenRouter?: boolean;
|
|
10
|
+
registry?: ModelsRegistryJson;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Resolve a bare model id or OpenRouter slug to vendor + model using the bundled
|
|
14
|
+
* models registry, with catalog alias fallback when no registry row matches.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveModelIdentity(input: string, options?: ResolveModelIdentityOptions): ModelVendorRef | null;
|
|
17
|
+
//# sourceMappingURL=resolveModelIdentity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveModelIdentity.d.ts","sourceRoot":"","sources":["../src/resolveModelIdentity.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,eAAe,EAEf,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED,MAAM,WAAW,2BAA2B;IAC1C,uFAAuF;IACvF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B;AAkDD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,2BAAgC,GACxC,cAAc,GAAG,IAAI,CAyEvB"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { loadBundledModelsCatalog } from "./loader/loadBundledModelsCatalog.js";
|
|
2
|
+
import { loadBundledModelsRegistry } from "./loadModelsRegistry.js";
|
|
3
|
+
import { buildModelInvocation, buildRegistryKey, matchOpenRouterCatalog, } from "./modelIdentity.js";
|
|
4
|
+
import { buildModelsCatalogIndex } from "./modelsCatalog.js";
|
|
5
|
+
function normalizeKey(value) {
|
|
6
|
+
return value.trim().toLowerCase();
|
|
7
|
+
}
|
|
8
|
+
function toVendorRef(endpoint, invocation) {
|
|
9
|
+
return {
|
|
10
|
+
provider: endpoint.provider,
|
|
11
|
+
modelId: endpoint.modelId,
|
|
12
|
+
...(invocation ? { invocation } : {}),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function findRegistryEntry(registry, input) {
|
|
16
|
+
const normalized = normalizeKey(input);
|
|
17
|
+
const orKey = `or:${normalized.replace(/\//g, ":")}`;
|
|
18
|
+
const orHit = registry.models[orKey];
|
|
19
|
+
if (orHit) {
|
|
20
|
+
return { vendor: orHit.vendor, invocation: orHit.invocation };
|
|
21
|
+
}
|
|
22
|
+
for (const entry of Object.values(registry.models)) {
|
|
23
|
+
const vendorId = normalizeKey(entry.vendor.modelId);
|
|
24
|
+
const vendorKey = normalizeKey(`${entry.vendor.provider}/${entry.vendor.modelId}`);
|
|
25
|
+
const orId = entry.invocation.openrouter?.modelId
|
|
26
|
+
? normalizeKey(entry.invocation.openrouter.modelId)
|
|
27
|
+
: null;
|
|
28
|
+
if (vendorId === normalized ||
|
|
29
|
+
vendorKey === normalized ||
|
|
30
|
+
orId === normalized) {
|
|
31
|
+
return { vendor: entry.vendor, invocation: entry.invocation };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Resolve a bare model id or OpenRouter slug to vendor + model using the bundled
|
|
38
|
+
* models registry, with catalog alias fallback when no registry row matches.
|
|
39
|
+
*/
|
|
40
|
+
export function resolveModelIdentity(input, options = {}) {
|
|
41
|
+
const trimmed = input.trim();
|
|
42
|
+
if (!trimmed) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
const registry = options.registry ?? loadBundledModelsRegistry();
|
|
46
|
+
const hit = findRegistryEntry(registry, trimmed);
|
|
47
|
+
if (hit) {
|
|
48
|
+
if (options.asOpenRouter && hit.invocation.openrouter) {
|
|
49
|
+
return toVendorRef(hit.invocation.openrouter, hit.invocation);
|
|
50
|
+
}
|
|
51
|
+
return toVendorRef(hit.vendor, hit.invocation);
|
|
52
|
+
}
|
|
53
|
+
const catalog = loadBundledModelsCatalog();
|
|
54
|
+
const catalogIndex = buildModelsCatalogIndex(catalog);
|
|
55
|
+
if (trimmed.includes("/")) {
|
|
56
|
+
const slash = trimmed.indexOf("/");
|
|
57
|
+
const prefix = trimmed.slice(0, slash);
|
|
58
|
+
const catalogMatch = matchOpenRouterCatalog(prefix, trimmed, catalogIndex);
|
|
59
|
+
if (catalogMatch.matched) {
|
|
60
|
+
const invocation = buildModelInvocation(prefix, trimmed);
|
|
61
|
+
return options.asOpenRouter && invocation.openrouter
|
|
62
|
+
? toVendorRef(invocation.openrouter, invocation)
|
|
63
|
+
: toVendorRef(invocation.direct, invocation);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
for (const provider of [
|
|
68
|
+
"openai",
|
|
69
|
+
"anthropic",
|
|
70
|
+
"google",
|
|
71
|
+
"deepseek",
|
|
72
|
+
"xai",
|
|
73
|
+
"together",
|
|
74
|
+
"mistral",
|
|
75
|
+
"groq",
|
|
76
|
+
"meta-llama",
|
|
77
|
+
"qwen",
|
|
78
|
+
"cohere",
|
|
79
|
+
"perplexity",
|
|
80
|
+
]) {
|
|
81
|
+
const catalogMatch = matchOpenRouterCatalog(provider, trimmed, catalogIndex);
|
|
82
|
+
if (catalogMatch.matched) {
|
|
83
|
+
const invocation = buildModelInvocation(provider, trimmed);
|
|
84
|
+
return options.asOpenRouter && invocation.openrouter
|
|
85
|
+
? toVendorRef(invocation.openrouter, invocation)
|
|
86
|
+
: toVendorRef(invocation.direct, invocation);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (trimmed.includes("/")) {
|
|
91
|
+
const slash = trimmed.indexOf("/");
|
|
92
|
+
const providerHint = trimmed.slice(0, slash);
|
|
93
|
+
const invocation = buildModelInvocation(providerHint, trimmed);
|
|
94
|
+
const registryKey = buildRegistryKey(invocation.direct.provider, invocation.direct.modelId);
|
|
95
|
+
if (registry.models[registryKey]) {
|
|
96
|
+
const entry = registry.models[registryKey];
|
|
97
|
+
return options.asOpenRouter && entry.invocation.openrouter
|
|
98
|
+
? toVendorRef(entry.invocation.openrouter, entry.invocation)
|
|
99
|
+
: toVendorRef(entry.vendor, entry.invocation);
|
|
100
|
+
}
|
|
101
|
+
return options.asOpenRouter && invocation.openrouter
|
|
102
|
+
? toVendorRef(invocation.openrouter, invocation)
|
|
103
|
+
: toVendorRef(invocation.direct, invocation);
|
|
104
|
+
}
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=resolveModelIdentity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveModelIdentity.js","sourceRoot":"","sources":["../src/resolveModelIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAmB7D,SAAS,YAAY,CAAC,KAAa;IACjC,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AACpC,CAAC;AAED,SAAS,WAAW,CAClB,QAAiC,EACjC,UAA4B;IAE5B,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,GAAG,CA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