@x12i/ai-profiles 2.2.0 → 3.0.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 +73 -66
- package/dist/buildResolvedProfile.d.ts +1 -3
- package/dist/buildResolvedProfile.d.ts.map +1 -1
- package/dist/buildResolvedProfile.js +1 -8
- package/dist/buildResolvedProfile.js.map +1 -1
- package/dist/computeRegistryStatistics.d.ts +0 -1
- package/dist/computeRegistryStatistics.d.ts.map +1 -1
- package/dist/computeRegistryStatistics.js +0 -9
- package/dist/computeRegistryStatistics.js.map +1 -1
- package/dist/constants.d.ts +0 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +0 -2
- package/dist/constants.js.map +1 -1
- package/dist/data/models-profiles.json +37 -113
- package/dist/data/models-profiles.schema.json +0 -1
- package/dist/ensureConcreteModel.d.ts +27 -0
- package/dist/ensureConcreteModel.d.ts.map +1 -0
- package/dist/ensureConcreteModel.js +38 -0
- package/dist/ensureConcreteModel.js.map +1 -0
- package/dist/formatRegistryStatistics.d.ts.map +1 -1
- package/dist/formatRegistryStatistics.js +0 -2
- package/dist/formatRegistryStatistics.js.map +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/isKnownProfileChoice.d.ts +1 -1
- package/dist/isKnownProfileChoice.js +1 -1
- package/dist/isReasoningModel.d.ts +18 -0
- package/dist/isReasoningModel.d.ts.map +1 -0
- package/dist/isReasoningModel.js +18 -0
- package/dist/isReasoningModel.js.map +1 -0
- package/dist/listAIProfiles.d.ts +1 -1
- package/dist/listAIProfiles.d.ts.map +1 -1
- package/dist/listAIProfiles.js +1 -2
- package/dist/listAIProfiles.js.map +1 -1
- package/dist/loader/combineRegistry.d.ts +2 -2
- package/dist/loader/combineRegistry.d.ts.map +1 -1
- package/dist/loader/combineRegistry.js +2 -3
- package/dist/loader/combineRegistry.js.map +1 -1
- package/dist/loader/loadBundledRegistry.d.ts.map +1 -1
- package/dist/loader/loadBundledRegistry.js +2 -4
- package/dist/loader/loadBundledRegistry.js.map +1 -1
- package/dist/loader/loadRemoteRegistry.d.ts.map +1 -1
- package/dist/loader/loadRemoteRegistry.js +4 -8
- package/dist/loader/loadRemoteRegistry.js.map +1 -1
- package/dist/modelInputFallback.d.ts +1 -0
- package/dist/modelInputFallback.d.ts.map +1 -1
- package/dist/modelInputFallback.js +1 -1
- package/dist/modelInputFallback.js.map +1 -1
- package/dist/normalizeKey.d.ts +1 -1
- package/dist/normalizeKey.js +1 -1
- package/dist/profileChoiceKey.d.ts +3 -33
- package/dist/profileChoiceKey.d.ts.map +1 -1
- package/dist/profileChoiceKey.js +6 -73
- package/dist/profileChoiceKey.js.map +1 -1
- package/dist/profileDiscovery.d.ts +1 -1
- package/dist/profileDiscovery.d.ts.map +1 -1
- package/dist/profileDiscovery.js +1 -2
- package/dist/profileDiscovery.js.map +1 -1
- package/dist/profileRegistryV3.d.ts.map +1 -1
- package/dist/profileRegistryV3.js +0 -3
- package/dist/profileRegistryV3.js.map +1 -1
- package/dist/resolveAIProfile.d.ts +1 -1
- package/dist/resolveAIProfile.d.ts.map +1 -1
- package/dist/resolveAIProfile.js +2 -7
- package/dist/resolveAIProfile.js.map +1 -1
- package/dist/resolveAIProfileWithCostAlternatives.d.ts.map +1 -1
- package/dist/resolveAIProfileWithCostAlternatives.js +0 -5
- package/dist/resolveAIProfileWithCostAlternatives.js.map +1 -1
- package/dist/resolveBundledAIProfile.d.ts +1 -4
- package/dist/resolveBundledAIProfile.d.ts.map +1 -1
- package/dist/resolveBundledAIProfile.js +1 -4
- package/dist/resolveBundledAIProfile.js.map +1 -1
- package/dist/resolveBundledCatalogModel.d.ts +13 -2
- package/dist/resolveBundledCatalogModel.d.ts.map +1 -1
- package/dist/resolveBundledCatalogModel.js +59 -22
- package/dist/resolveBundledCatalogModel.js.map +1 -1
- package/dist/resolveBundledInput.d.ts +4 -7
- package/dist/resolveBundledInput.d.ts.map +1 -1
- package/dist/resolveBundledInput.js +6 -13
- package/dist/resolveBundledInput.js.map +1 -1
- package/dist/resolveProfileInputCore.d.ts.map +1 -1
- package/dist/resolveProfileInputCore.js +3 -8
- package/dist/resolveProfileInputCore.js.map +1 -1
- package/dist/types.d.ts +1 -34
- package/dist/types.d.ts.map +1 -1
- package/dist/validation/profileIntentPolicy.d.ts +1 -1
- package/dist/validation/profileIntentPolicy.d.ts.map +1 -1
- package/dist/validation/profileIntentPolicy.js +1 -1
- package/dist/validation/profileIntentPolicy.js.map +1 -1
- package/dist/validation/validateModelsProfilesJson.d.ts +1 -2
- package/dist/validation/validateModelsProfilesJson.d.ts.map +1 -1
- package/dist/validation/validateModelsProfilesJson.js +1 -50
- package/dist/validation/validateModelsProfilesJson.js.map +1 -1
- package/package.json +1 -1
package/dist/resolveAIProfile.js
CHANGED
|
@@ -9,7 +9,7 @@ import { resolveCostTierCap } from "./costTiers.js";
|
|
|
9
9
|
import { assertOpenRouterCatalogCoverage, assertProfileCatalogLane, } from "./profileCatalogLane.js";
|
|
10
10
|
import { attachSecondaryToResolved } from "./resolveSecondaryModel.js";
|
|
11
11
|
/**
|
|
12
|
-
* Resolve an explicit `profile/choice` key
|
|
12
|
+
* Resolve an explicit `profile/choice` key to a concrete model.
|
|
13
13
|
*
|
|
14
14
|
* For discovery (tags, search, profile-level intent), use {@link listAIProfiles},
|
|
15
15
|
* {@link resolveAIProfileByTags}, or {@link resolveAIProfileWithCostAlternatives}.
|
|
@@ -32,16 +32,13 @@ export async function resolveAIProfile(input, options) {
|
|
|
32
32
|
const loaderWarnings = [...warnings, ...catalogResult.warnings];
|
|
33
33
|
const match = matchStrictProfileInput(registry, input);
|
|
34
34
|
if (!match) {
|
|
35
|
-
throw new AIProfilesError("UNKNOWN_PROFILE_CHOICE", `Unknown profile/choice key: ${input}. Use "profile/choice" (e.g. "cheap/default")
|
|
35
|
+
throw new AIProfilesError("UNKNOWN_PROFILE_CHOICE", `Unknown profile/choice key: ${input}. Use "profile/choice" (e.g. "cheap/default").`, { input });
|
|
36
36
|
}
|
|
37
37
|
if (match.kind === "invalidChoice") {
|
|
38
38
|
throw new AIProfilesError("UNKNOWN_CHOICE", `Unknown choice '${match.choice}' for AI profile '${match.profile}'`, { input, profile: match.profile, choice: match.choice });
|
|
39
39
|
}
|
|
40
40
|
const profileKey = match.profile;
|
|
41
41
|
const requestedChoiceKey = match.choice;
|
|
42
|
-
const matchedShortcut = match.kind === "shortcut"
|
|
43
|
-
? registry.shortcuts[match.shortcutKey]
|
|
44
|
-
: undefined;
|
|
45
42
|
const profile = registry.profiles[profileKey];
|
|
46
43
|
if (!profile) {
|
|
47
44
|
throw new AIProfilesError("UNKNOWN_PROFILE", `Unknown AI profile: ${profileKey}`, { input, profile: profileKey });
|
|
@@ -151,11 +148,9 @@ export async function resolveAIProfile(input, options) {
|
|
|
151
148
|
}
|
|
152
149
|
const resolved = buildResolvedProfile({
|
|
153
150
|
input,
|
|
154
|
-
shortcutKey: match.kind === "shortcut" ? match.shortcutKey : undefined,
|
|
155
151
|
profile,
|
|
156
152
|
choice,
|
|
157
153
|
choiceKey: finalChoiceKey,
|
|
158
|
-
shortcut: matchedShortcut,
|
|
159
154
|
registry,
|
|
160
155
|
loaderWarnings,
|
|
161
156
|
useOpenRouter: options.useOpenRouter,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveAIProfile.js","sourceRoot":"","sources":["../src/resolveAIProfile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,kCAAkC,EAAE,MAAM,oCAAoC,CAAC;AACxF,OAAO,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EACL,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,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Aa,CAAC,OAAO;aAC/B,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,MAAM,IAAI,eAAe,CAAC,uBAAuB,EAAE,OAAO,EAAE;gBAC1D,KAAK;gBACL,OAAO,EAAE,UAAU;gBACnB,MAAM,EAAE,cAAc;gBACtB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,OAAO,EAAE,MAAM,CAAC,OAAO;aACxB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,oBAAoB,CAAC;QACpC,KAAK;QACL,OAAO;QACP,MAAM;QACN,SAAS,EAAE,cAAc;QACzB,QAAQ;QACR,cAAc;QACd,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,OAAO,EAAE,aAAa,CAAC,OAAO;QAC9B,cAAc,EAAE,gBAAgB,CAAC,YAAY,CAAC;KAC/C,CAAC,CAAC;IAEH,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC7B,OAAO,yBAAyB,CAC9B,QAAQ,EACR,QAAQ,EACR,aAAa,CAAC,OAAO,EACrB,OAAO,CAAC,aAAa,CACtB,CAAC;IACJ,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveAIProfileWithCostAlternatives.d.ts","sourceRoot":"","sources":["../src/resolveAIProfileWithCostAlternatives.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,YAAY,EACZ,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,0CAA0C;IACzD,OAAO,EAAE,iBAAiB,CAAC;IAC3B,sBAAsB,EAAE,KAAK,CAAC;QAC5B,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;QACnC,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;CACJ;AAQD;;GAEG;AACH,wBAAsB,oCAAoC,CACxD,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,uBAAuB,GAAG;IACjC,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,GACA,OAAO,CAAC,0CAA0C,CAAC,
|
|
1
|
+
{"version":3,"file":"resolveAIProfileWithCostAlternatives.d.ts","sourceRoot":"","sources":["../src/resolveAIProfileWithCostAlternatives.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,YAAY,EACZ,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,0CAA0C;IACzD,OAAO,EAAE,iBAAiB,CAAC;IAC3B,sBAAsB,EAAE,KAAK,CAAC;QAC5B,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;QACnC,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;CACJ;AAQD;;GAEG;AACH,wBAAsB,oCAAoC,CACxD,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,uBAAuB,GAAG;IACjC,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,GACA,OAAO,CAAC,0CAA0C,CAAC,CAkJrD"}
|
|
@@ -38,9 +38,6 @@ export async function resolveAIProfileWithCostAlternatives(input, options) {
|
|
|
38
38
|
}
|
|
39
39
|
const profileKey = match.profile;
|
|
40
40
|
const requestedChoiceKey = match.choice;
|
|
41
|
-
const matchedShortcut = match.kind === "shortcut"
|
|
42
|
-
? registry.shortcuts[match.shortcutKey]
|
|
43
|
-
: undefined;
|
|
44
41
|
const profile = registry.profiles[profileKey];
|
|
45
42
|
if (!profile) {
|
|
46
43
|
throw new AIProfilesError("UNKNOWN_PROFILE", `Unknown AI profile: ${profileKey}`, { input, profile: profileKey });
|
|
@@ -91,11 +88,9 @@ export async function resolveAIProfileWithCostAlternatives(input, options) {
|
|
|
91
88
|
}
|
|
92
89
|
const resolved = buildResolvedProfile({
|
|
93
90
|
input,
|
|
94
|
-
shortcutKey: match.kind === "shortcut" ? match.shortcutKey : undefined,
|
|
95
91
|
profile,
|
|
96
92
|
choice: picked.choice,
|
|
97
93
|
choiceKey: picked.choiceKey,
|
|
98
|
-
shortcut: matchedShortcut,
|
|
99
94
|
registry,
|
|
100
95
|
loaderWarnings,
|
|
101
96
|
useOpenRouter: options.useOpenRouter,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveAIProfileWithCostAlternatives.js","sourceRoot":"","sources":["../src/resolveAIProfileWithCostAlternatives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,kCAAkC,EAAE,MAAM,oCAAoC,CAAC;AACxF,OAAO,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EACL,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EACL,+BAA+B,EAC/B,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAgBvE,SAAS,cAAc,CAAC,KAAsB;IAC5C,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,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C,kBAAkB,IAAI,KAAK,CAAC;IAE/D,MAAM,sBAAsB,GAAG,KAAK;SACjC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,kBAAkB,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,CAAC,QAAQ,CAAC;SAC/D,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACZ,MAAM,GAAG,GAAG,kBAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAChD,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,mBAAmB,EAAE,CAAC;QACzE,CAAC;QACD,IAAI,CAAC;YACH,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;QAC7D,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAC7C,CAAC"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { type ResolveProfileInputCoreOptions } from "./resolveProfileInputCore.js";
|
|
2
2
|
import type { ResolvedAIProfile } from "./types.js";
|
|
3
3
|
/**
|
|
4
|
-
* Sync bundled profile
|
|
4
|
+
* Sync bundled `profile/choice` resolution — same rules as
|
|
5
5
|
* `resolveAIProfile(input, { source: "bundled", catalogLane })`, without network.
|
|
6
|
-
*
|
|
7
|
-
* Accepts `profile/choice`, shortcuts, bare profiles (`cheap` → `defaultChoice`),
|
|
8
|
-
* and profile aliases.
|
|
9
6
|
*/
|
|
10
7
|
export declare function resolveBundledAIProfile(input: string, options: ResolveProfileInputCoreOptions): ResolvedAIProfile;
|
|
11
8
|
//# sourceMappingURL=resolveBundledAIProfile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveBundledAIProfile.d.ts","sourceRoot":"","sources":["../src/resolveBundledAIProfile.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,8BAA8B,EACpC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD
|
|
1
|
+
{"version":3,"file":"resolveBundledAIProfile.d.ts","sourceRoot":"","sources":["../src/resolveBundledAIProfile.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,8BAA8B,EACpC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,8BAA8B,GACtC,iBAAiB,CAInB"}
|
|
@@ -2,11 +2,8 @@ import { getBundledRegistry } from "./bundledRegistry.js";
|
|
|
2
2
|
import { loadBundledModelsCatalog } from "./loader/loadBundledModelsCatalog.js";
|
|
3
3
|
import { resolveProfileInputCore, } from "./resolveProfileInputCore.js";
|
|
4
4
|
/**
|
|
5
|
-
* Sync bundled profile
|
|
5
|
+
* Sync bundled `profile/choice` resolution — same rules as
|
|
6
6
|
* `resolveAIProfile(input, { source: "bundled", catalogLane })`, without network.
|
|
7
|
-
*
|
|
8
|
-
* Accepts `profile/choice`, shortcuts, bare profiles (`cheap` → `defaultChoice`),
|
|
9
|
-
* and profile aliases.
|
|
10
7
|
*/
|
|
11
8
|
export function resolveBundledAIProfile(input, options) {
|
|
12
9
|
const registry = getBundledRegistry();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveBundledAIProfile.js","sourceRoot":"","sources":["../src/resolveBundledAIProfile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EACL,uBAAuB,GAExB,MAAM,8BAA8B,CAAC;AAGtC
|
|
1
|
+
{"version":3,"file":"resolveBundledAIProfile.js","sourceRoot":"","sources":["../src/resolveBundledAIProfile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EACL,uBAAuB,GAExB,MAAM,8BAA8B,CAAC;AAGtC;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CACrC,KAAa,EACb,OAAuC;IAEvC,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;IACtC,MAAM,OAAO,GAAG,wBAAwB,EAAE,CAAC;IAC3C,OAAO,uBAAuB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ResolvedAIProfile } from "./types.js";
|
|
1
|
+
import type { AIProvider, ResolvedAIProfile } from "./types.js";
|
|
2
2
|
export interface ResolveBundledCatalogModelOptions {
|
|
3
3
|
useOpenRouter?: boolean;
|
|
4
4
|
}
|
|
@@ -6,9 +6,20 @@ export type BundledCatalogModelInput = string | {
|
|
|
6
6
|
provider: string;
|
|
7
7
|
modelId: string;
|
|
8
8
|
};
|
|
9
|
+
export type CatalogMatchConfidence = "exact" | "high" | "low" | "parsed";
|
|
10
|
+
export interface BundledCatalogModelMatch {
|
|
11
|
+
provider: AIProvider;
|
|
12
|
+
modelId: string;
|
|
13
|
+
routing: "openrouter" | "direct";
|
|
14
|
+
matchConfidence: CatalogMatchConfidence;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Best-effort catalog resolution: exact, high, low confidence, then parsed vendor/model fallback.
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveBundledCatalogModelBestEffort(input: BundledCatalogModelInput, options?: ResolveBundledCatalogModelOptions): BundledCatalogModelMatch;
|
|
9
20
|
/**
|
|
10
21
|
* Sync bundled catalog resolution for concrete model slugs and gateway wire ids.
|
|
11
|
-
* Use {@link resolveBundledAIProfile} for profile/choice inputs.
|
|
22
|
+
* Use {@link resolveBundledAIProfile} for `profile/choice` inputs.
|
|
12
23
|
*/
|
|
13
24
|
export declare function resolveBundledCatalogModel(input: BundledCatalogModelInput, options?: ResolveBundledCatalogModelOptions): ResolvedAIProfile;
|
|
14
25
|
//# sourceMappingURL=resolveBundledCatalogModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveBundledCatalogModel.d.ts","sourceRoot":"","sources":["../src/resolveBundledCatalogModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolveBundledCatalogModel.d.ts","sourceRoot":"","sources":["../src/resolveBundledCatalogModel.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEhE,MAAM,WAAW,iCAAiC;IAChD,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,MAAM,wBAAwB,GAChC,MAAM,GACN;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1C,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEzE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,YAAY,GAAG,QAAQ,CAAC;IACjC,eAAe,EAAE,sBAAsB,CAAC;CACzC;AAqED;;GAEG;AACH,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,wBAAwB,EAC/B,OAAO,GAAE,iCAAsC,GAC9C,wBAAwB,CAuC1B;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,wBAAwB,EAC/B,OAAO,GAAE,iCAAsC,GAC9C,iBAAiB,CAiCnB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { getBundledRegistry } from "./bundledRegistry.js";
|
|
2
2
|
import { loadBundledModelsCatalog } from "./loader/loadBundledModelsCatalog.js";
|
|
3
3
|
import { AIProfilesError } from "./errors.js";
|
|
4
|
-
import { formatGatewayWireId,
|
|
5
|
-
import { buildResolvedModelInput, resolveModelFromInput, } from "./modelInputFallback.js";
|
|
4
|
+
import { formatGatewayWireId, isGatewayProvider, normalizeGatewayWireId, } from "./gatewayWireId.js";
|
|
5
|
+
import { buildResolvedModelInput, modelLikeFallbackInvocation, resolveModelFromInput, } from "./modelInputFallback.js";
|
|
6
|
+
import { resolveUseOpenRouter } from "./resolveModelRouting.js";
|
|
6
7
|
function catalogLookupKey(input) {
|
|
7
8
|
if (typeof input === "string") {
|
|
8
9
|
const gateway = normalizeGatewayWireId(input);
|
|
@@ -10,9 +11,10 @@ function catalogLookupKey(input) {
|
|
|
10
11
|
return {
|
|
11
12
|
lookupInput: gateway.modelId,
|
|
12
13
|
displayInput: formatGatewayWireId(gateway.provider, gateway.modelId),
|
|
14
|
+
gatewayWire: gateway,
|
|
13
15
|
};
|
|
14
16
|
}
|
|
15
|
-
return { lookupInput: input, displayInput: input };
|
|
17
|
+
return { lookupInput: input, displayInput: input, gatewayWire: null };
|
|
16
18
|
}
|
|
17
19
|
const provider = input.provider.trim();
|
|
18
20
|
const modelId = input.modelId.trim();
|
|
@@ -20,6 +22,7 @@ function catalogLookupKey(input) {
|
|
|
20
22
|
return {
|
|
21
23
|
lookupInput: modelId,
|
|
22
24
|
displayInput: formatGatewayWireId(provider, modelId),
|
|
25
|
+
gatewayWire: { provider, modelId },
|
|
23
26
|
};
|
|
24
27
|
}
|
|
25
28
|
const combined = modelId.includes("/") && !modelId.startsWith(`${provider}/`)
|
|
@@ -27,11 +30,57 @@ function catalogLookupKey(input) {
|
|
|
27
30
|
: modelId.includes("/")
|
|
28
31
|
? modelId
|
|
29
32
|
: `${provider}/${modelId}`;
|
|
30
|
-
return { lookupInput: combined, displayInput: combined };
|
|
33
|
+
return { lookupInput: combined, displayInput: combined, gatewayWire: null };
|
|
34
|
+
}
|
|
35
|
+
function endpointFromMatch(match, useOpenRouter) {
|
|
36
|
+
const endpoint = useOpenRouter && match.invocation.openrouter
|
|
37
|
+
? match.invocation.openrouter
|
|
38
|
+
: match.invocation.direct;
|
|
39
|
+
return {
|
|
40
|
+
provider: endpoint.provider,
|
|
41
|
+
modelId: endpoint.modelId,
|
|
42
|
+
routing: endpoint.provider === "openrouter" ? "openrouter" : "direct",
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function applyGatewayPresentation(routed, gatewayWire, useOpenRouter) {
|
|
46
|
+
if (!gatewayWire || !useOpenRouter) {
|
|
47
|
+
return routed;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
...routed,
|
|
51
|
+
provider: gatewayWire.provider,
|
|
52
|
+
modelId: gatewayWire.modelId,
|
|
53
|
+
routing: "openrouter",
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Best-effort catalog resolution: exact, high, low confidence, then parsed vendor/model fallback.
|
|
58
|
+
*/
|
|
59
|
+
export function resolveBundledCatalogModelBestEffort(input, options = {}) {
|
|
60
|
+
const catalog = loadBundledModelsCatalog();
|
|
61
|
+
const useOpenRouter = resolveUseOpenRouter(options.useOpenRouter);
|
|
62
|
+
const { lookupInput, displayInput, gatewayWire } = catalogLookupKey(input);
|
|
63
|
+
const match = resolveModelFromInput(lookupInput, catalog);
|
|
64
|
+
if (match) {
|
|
65
|
+
const routed = endpointFromMatch(match, useOpenRouter);
|
|
66
|
+
return applyGatewayPresentation({
|
|
67
|
+
...routed,
|
|
68
|
+
matchConfidence: match.confidence,
|
|
69
|
+
}, gatewayWire, useOpenRouter);
|
|
70
|
+
}
|
|
71
|
+
const parsed = modelLikeFallbackInvocation(lookupInput);
|
|
72
|
+
if (parsed) {
|
|
73
|
+
const routed = endpointFromMatch({ invocation: parsed, confidence: "low", score: 0, matchedBy: lookupInput }, useOpenRouter);
|
|
74
|
+
return applyGatewayPresentation({
|
|
75
|
+
...routed,
|
|
76
|
+
matchConfidence: "parsed",
|
|
77
|
+
}, gatewayWire, useOpenRouter);
|
|
78
|
+
}
|
|
79
|
+
throw new AIProfilesError("UNKNOWN_MODEL", `Unknown catalog model: ${displayInput}`, { input: displayInput });
|
|
31
80
|
}
|
|
32
81
|
/**
|
|
33
82
|
* Sync bundled catalog resolution for concrete model slugs and gateway wire ids.
|
|
34
|
-
* Use {@link resolveBundledAIProfile} for profile/choice inputs.
|
|
83
|
+
* Use {@link resolveBundledAIProfile} for `profile/choice` inputs.
|
|
35
84
|
*/
|
|
36
85
|
export function resolveBundledCatalogModel(input, options = {}) {
|
|
37
86
|
const registry = getBundledRegistry();
|
|
@@ -47,25 +96,13 @@ export function resolveBundledCatalogModel(input, options = {}) {
|
|
|
47
96
|
registry,
|
|
48
97
|
useOpenRouter: options.useOpenRouter,
|
|
49
98
|
});
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if (useOpenRouter) {
|
|
53
|
-
return {
|
|
54
|
-
...resolved,
|
|
55
|
-
provider: gatewayInvokeProvider(input.provider),
|
|
56
|
-
modelId: input.modelId.trim(),
|
|
57
|
-
routing: "openrouter",
|
|
58
|
-
backend: "openrouter",
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
const gateway = typeof input === "string" ? normalizeGatewayWireId(input) : null;
|
|
63
|
-
if (gateway && (options.useOpenRouter ?? true)) {
|
|
99
|
+
const routed = resolveBundledCatalogModelBestEffort(input, options);
|
|
100
|
+
if (routed.routing === "openrouter" && routed.provider === "openrouter") {
|
|
64
101
|
return {
|
|
65
102
|
...resolved,
|
|
66
|
-
provider:
|
|
67
|
-
modelId:
|
|
68
|
-
routing:
|
|
103
|
+
provider: routed.provider,
|
|
104
|
+
modelId: routed.modelId,
|
|
105
|
+
routing: routed.routing,
|
|
69
106
|
backend: "openrouter",
|
|
70
107
|
};
|
|
71
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveBundledCatalogModel.js","sourceRoot":"","sources":["../src/resolveBundledCatalogModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,mBAAmB,
|
|
1
|
+
{"version":3,"file":"resolveBundledCatalogModel.js","sourceRoot":"","sources":["../src/resolveBundledCatalogModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,mBAAmB,EAEnB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,uBAAuB,EACvB,2BAA2B,EAC3B,qBAAqB,GAEtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAoBhE,SAAS,gBAAgB,CACvB,KAA+B;IAE/B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,OAAO,GAAG,sBAAsB,CAAC,KAAK,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AC,OAAO,KAAK,YAAY,IAAI,MAAM,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;QACxE,OAAO;YACL,GAAG,QAAQ;YACX,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,OAAO,EAAE,YAAY;SACtB,CAAC;IACJ,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -5,14 +5,11 @@ export type ResolveBundledInput = BundledCatalogModelInput;
|
|
|
5
5
|
export interface ResolveBundledInputOptions extends ResolveProfileInputCoreOptions, ResolveBundledCatalogModelOptions {
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* Unified sync bundled resolver
|
|
8
|
+
* Unified sync bundled resolver.
|
|
9
9
|
*
|
|
10
|
-
* **Resolution order
|
|
11
|
-
* 1. **
|
|
12
|
-
*
|
|
13
|
-
* (requires `options.catalogLane`).
|
|
14
|
-
* 2. **Concrete model** — vendor slugs (`google/gemini-2.5-flash-lite`), gateway wire ids
|
|
15
|
-
* (`openrouter/openai/gpt-5.5`), or `{ provider, modelId }` → bundled catalog.
|
|
10
|
+
* **Resolution order:**
|
|
11
|
+
* 1. **Profile + choice** — known `profile/choice` in registry → bundled registry (requires `catalogLane`).
|
|
12
|
+
* 2. **Concrete model** — vendor slug, gateway wire id, or `{ provider, modelId }` → bundled catalog.
|
|
16
13
|
*/
|
|
17
14
|
export declare function resolveBundledInput(input: ResolveBundledInput, options: ResolveBundledInputOptions): ResolvedAIProfile;
|
|
18
15
|
//# sourceMappingURL=resolveBundledInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveBundledInput.d.ts","sourceRoot":"","sources":["../src/resolveBundledInput.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolveBundledInput.d.ts","sourceRoot":"","sources":["../src/resolveBundledInput.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,iCAAiC,EACvC,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,MAAM,mBAAmB,GAAG,wBAAwB,CAAC;AAE3D,MAAM,WAAW,0BACf,SAAQ,8BAA8B,EACpC,iCAAiC;CAAG;AAExC;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,mBAAmB,EAC1B,OAAO,EAAE,0BAA0B,GAClC,iBAAiB,CAUnB"}
|
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
import { AIProfilesError } from "./errors.js";
|
|
2
|
-
import { isKnownProfileInputForRegistry } from "./profileChoiceKey.js";
|
|
3
1
|
import { getBundledRegistry } from "./bundledRegistry.js";
|
|
2
|
+
import { matchStrictProfileInput } from "./profileChoiceKey.js";
|
|
4
3
|
import { resolveBundledAIProfile } from "./resolveBundledAIProfile.js";
|
|
5
4
|
import { resolveBundledCatalogModel, } from "./resolveBundledCatalogModel.js";
|
|
6
5
|
/**
|
|
7
|
-
* Unified sync bundled resolver
|
|
6
|
+
* Unified sync bundled resolver.
|
|
8
7
|
*
|
|
9
|
-
* **Resolution order
|
|
10
|
-
* 1. **
|
|
11
|
-
*
|
|
12
|
-
* (requires `options.catalogLane`).
|
|
13
|
-
* 2. **Concrete model** — vendor slugs (`google/gemini-2.5-flash-lite`), gateway wire ids
|
|
14
|
-
* (`openrouter/openai/gpt-5.5`), or `{ provider, modelId }` → bundled catalog.
|
|
8
|
+
* **Resolution order:**
|
|
9
|
+
* 1. **Profile + choice** — known `profile/choice` in registry → bundled registry (requires `catalogLane`).
|
|
10
|
+
* 2. **Concrete model** — vendor slug, gateway wire id, or `{ provider, modelId }` → bundled catalog.
|
|
15
11
|
*/
|
|
16
12
|
export function resolveBundledInput(input, options) {
|
|
17
13
|
if (typeof input === "string") {
|
|
18
14
|
const registry = getBundledRegistry();
|
|
19
|
-
if (
|
|
20
|
-
if (!options.catalogLane) {
|
|
21
|
-
throw new AIProfilesError("MISSING_CATALOG_LANE", "Profile input requires options.catalogLane (e.g. \"text\", \"image\")", { input });
|
|
22
|
-
}
|
|
15
|
+
if (matchStrictProfileInput(registry, input)) {
|
|
23
16
|
return resolveBundledAIProfile(input, options);
|
|
24
17
|
}
|
|
25
18
|
return resolveBundledCatalogModel(input, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveBundledInput.js","sourceRoot":"","sources":["../src/resolveBundledInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"resolveBundledInput.js","sourceRoot":"","sources":["../src/resolveBundledInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EACL,0BAA0B,GAG3B,MAAM,iCAAiC,CAAC;AAUzC;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAA0B,EAC1B,OAAmC;IAEnC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;QACtC,IAAI,uBAAuB,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;YAC7C,OAAO,uBAAuB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACjD,CAAC;QACD,OAAO,0BAA0B,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IAED,OAAO,0BAA0B,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveProfileInputCore.d.ts","sourceRoot":"","sources":["../src/resolveProfileInputCore.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAC/C,uBAAuB,EACvB,QAAQ,GAAG,SAAS,GAAG,kBAAkB,CAC1C,CAAC;AAEF,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,8BAA8B,EACvC,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,iBAAiB,EAC1B,cAAc,GAAE,gBAAgB,EAAO,GACtC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"resolveProfileInputCore.d.ts","sourceRoot":"","sources":["../src/resolveProfileInputCore.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAC/C,uBAAuB,EACvB,QAAQ,GAAG,SAAS,GAAG,kBAAkB,CAC1C,CAAC;AAEF,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,8BAA8B,EACvC,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,iBAAiB,EAC1B,cAAc,GAAE,gBAAgB,EAAO,GACtC,iBAAiB,CAuKnB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { buildResolvedProfile } from "./buildResolvedProfile.js";
|
|
2
2
|
import { AIProfilesError } from "./errors.js";
|
|
3
|
-
import { formatProfileChoiceKey,
|
|
3
|
+
import { formatProfileChoiceKey, matchStrictProfileInput, } from "./profileChoiceKey.js";
|
|
4
4
|
import { pickProfileChoiceWithConstraints } from "./modalityPolicy.js";
|
|
5
5
|
import { normalizeCostCap } from "./costPolicy.js";
|
|
6
6
|
import { resolveCostTierCap } from "./costTiers.js";
|
|
@@ -9,18 +9,15 @@ export function resolveProfileInputCore(input, options, registry, catalog, loade
|
|
|
9
9
|
if (!options.catalogLane) {
|
|
10
10
|
throw new AIProfilesError("MISSING_CATALOG_LANE", "Profile resolution requires options.catalogLane (e.g. \"text\", \"image\")", { input });
|
|
11
11
|
}
|
|
12
|
-
const match =
|
|
12
|
+
const match = matchStrictProfileInput(registry, input);
|
|
13
13
|
if (!match) {
|
|
14
|
-
throw new AIProfilesError("UNKNOWN_PROFILE_CHOICE", `Unknown profile/choice key: ${input}. Use "profile/choice" (e.g. "cheap/default")
|
|
14
|
+
throw new AIProfilesError("UNKNOWN_PROFILE_CHOICE", `Unknown profile/choice key: ${input}. Use "profile/choice" (e.g. "cheap/default").`, { input });
|
|
15
15
|
}
|
|
16
16
|
if (match.kind === "invalidChoice") {
|
|
17
17
|
throw new AIProfilesError("UNKNOWN_CHOICE", `Unknown choice '${match.choice}' for AI profile '${match.profile}'`, { input, profile: match.profile, choice: match.choice });
|
|
18
18
|
}
|
|
19
19
|
const profileKey = match.profile;
|
|
20
20
|
const requestedChoiceKey = match.choice;
|
|
21
|
-
const matchedShortcut = match.kind === "profileChoice" && match.shortcutKey
|
|
22
|
-
? registry.shortcuts[match.shortcutKey]
|
|
23
|
-
: undefined;
|
|
24
21
|
const profile = registry.profiles[profileKey];
|
|
25
22
|
if (!profile) {
|
|
26
23
|
throw new AIProfilesError("UNKNOWN_PROFILE", `Unknown AI profile: ${profileKey}`, { input, profile: profileKey });
|
|
@@ -130,11 +127,9 @@ export function resolveProfileInputCore(input, options, registry, catalog, loade
|
|
|
130
127
|
}
|
|
131
128
|
return buildResolvedProfile({
|
|
132
129
|
input,
|
|
133
|
-
shortcutKey: match.kind === "profileChoice" ? match.shortcutKey : undefined,
|
|
134
130
|
profile,
|
|
135
131
|
choice,
|
|
136
132
|
choiceKey: finalChoiceKey,
|
|
137
|
-
shortcut: matchedShortcut,
|
|
138
133
|
registry,
|
|
139
134
|
loaderWarnings,
|
|
140
135
|
useOpenRouter: options.useOpenRouter,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveProfileInputCore.js","sourceRoot":"","sources":["../src/resolveProfileInputCore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,sBAAsB,EACtB,
|
|
1
|
+
{"version":3,"file":"resolveProfileInputCore.js","sourceRoot":"","sources":["../src/resolveProfileInputCore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EACL,+BAA+B,EAC/B,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AAcjC,MAAM,UAAU,uBAAuB,CACrC,KAAa,EACb,OAAuC,EACvC,QAA4B,EAC5B,OAA0B,EAC1B,iBAAqC,EAAE;IAEvC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;QACzB,MAAM,IAAI,eAAe,CACvB,sBAAsB,EACtB,4EAA4E,EAC5E,EAAE,KAAK,EAAE,CACV,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAG,uBAAuB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IACvD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,eAAe,CACvB,wBAAwB,EACxB,+BAA+B,KAAK,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C,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,MAAM,IAAI,eAAe,CAAC,uBAAuB,EAAE,OAAO,EAAE;gBAC1D,KAAK;gBACL,OAAO,EAAE,UAAU;gBACnB,MAAM,EAAE,cAAc;gBACtB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,OAAO,EAAE,MAAM,CAAC,OAAO;aACxB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,oBAAoB,CAAC;QAC1B,KAAK;QACL,OAAO;QACP,MAAM;QACN,SAAS,EAAE,cAAc;QACzB,QAAQ;QACR,cAAc;QACd,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,OAAO;QACP,cAAc,EAAE,gBAAgB,CAAC,YAAY,CAAC;KAC/C,CAAC,CAAC;AACL,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -214,8 +214,6 @@ export interface AIProfileDefinition {
|
|
|
214
214
|
description: string;
|
|
215
215
|
/** Grouping for filtering (`cost`, `speed`, `standard`, `reasoning`, `output`, `agentic`, `research`, `local`). */
|
|
216
216
|
category: string;
|
|
217
|
-
/** Discovery-only alternate names (not valid for {@link resolveAIProfile}). */
|
|
218
|
-
aliases?: string[];
|
|
219
217
|
/** Discovery tags (`flagship`, `economic`, `pro`, `expert`, …). */
|
|
220
218
|
tags?: AIProfileTag[];
|
|
221
219
|
/** OpenRouter catalog lane (Text, Image, Embeddings, …). Required on every profile. */
|
|
@@ -238,12 +236,6 @@ export interface AIProfileDefinition {
|
|
|
238
236
|
runtime?: AIRuntimeDefaults;
|
|
239
237
|
metadata?: Record<string, unknown>;
|
|
240
238
|
}
|
|
241
|
-
export interface AIProfileShortcut {
|
|
242
|
-
profile: string;
|
|
243
|
-
/** Required — shortcuts are named `profile/choice` bindings. */
|
|
244
|
-
choice: string;
|
|
245
|
-
description?: string;
|
|
246
|
-
}
|
|
247
239
|
export type ModelsProfilesSchemaId = "x12i.ai-profiles.models-profiles" | "x12i.ai-profiles.model-registry.v2" | "x12i.ai-profiles.model-registry.v3";
|
|
248
240
|
export interface ModelsProfilesJson {
|
|
249
241
|
schema: ModelsProfilesSchemaId;
|
|
@@ -267,13 +259,6 @@ export interface ModelsProfilesJson {
|
|
|
267
259
|
pricingUnit: "1M_tokens";
|
|
268
260
|
profiles: Record<string, AIProfileDefinition>;
|
|
269
261
|
}
|
|
270
|
-
export interface ProfilesShortcutsJson {
|
|
271
|
-
schema: "x12i.ai-profiles.shortcuts";
|
|
272
|
-
/** Optional label in source JSON; not used for compatibility or selection logic. */
|
|
273
|
-
version?: string;
|
|
274
|
-
generatedAt?: string;
|
|
275
|
-
shortcuts: Record<string, AIProfileShortcut>;
|
|
276
|
-
}
|
|
277
262
|
export type RegistrySourceMode = "auto" | "remote" | "bundled";
|
|
278
263
|
export interface AIProfilesRegistry {
|
|
279
264
|
/** Copied from models-profiles when present; informational only. */
|
|
@@ -282,7 +267,6 @@ export interface AIProfilesRegistry {
|
|
|
282
267
|
currency: "USD";
|
|
283
268
|
pricingUnit: "1M_tokens";
|
|
284
269
|
profiles: Record<string, AIProfileDefinition>;
|
|
285
|
-
shortcuts: Record<string, AIProfileShortcut>;
|
|
286
270
|
source: "remote" | "bundled";
|
|
287
271
|
loadedAt: string;
|
|
288
272
|
}
|
|
@@ -293,8 +277,6 @@ export interface AIProfileSummary {
|
|
|
293
277
|
category: string;
|
|
294
278
|
defaultChoice: string;
|
|
295
279
|
choices: string[];
|
|
296
|
-
/** Discovery-only aliases (use {@link listAIProfileChoices} for strict keys). */
|
|
297
|
-
aliases: string[];
|
|
298
280
|
tags: AIProfileTag[];
|
|
299
281
|
catalogLane: ProfileCatalogLane;
|
|
300
282
|
defaultProvider: AIProvider;
|
|
@@ -303,12 +285,6 @@ export interface AIProfileSummary {
|
|
|
303
285
|
/** Echo of registry `version` when present; not used by this package. */
|
|
304
286
|
registryVersion?: string;
|
|
305
287
|
}
|
|
306
|
-
export interface AIShortcutSummary {
|
|
307
|
-
key: string;
|
|
308
|
-
profile: string;
|
|
309
|
-
choice: string;
|
|
310
|
-
description?: string;
|
|
311
|
-
}
|
|
312
288
|
export interface AIProfileWarning {
|
|
313
289
|
code: "USING_BUNDLED_FALLBACK" | "PROFILE_DEPRECATED" | "CHOICE_DEPRECATED" | "PRICING_MISSING" | "MODEL_PREDICTED" | "PRICING_FROM_CATALOG" | "REMOTE_REFRESH_FAILED_USING_CACHE" | "OPENROUTER_UNAVAILABLE" | "CPU_LOCAL_PROFILE" | "MODEL_INPUT_FALLBACK_GUESS" | "SECONDARY_SAME_AS_PRIMARY";
|
|
314
290
|
message: string;
|
|
@@ -515,11 +491,6 @@ export interface ResolvedAIProfile {
|
|
|
515
491
|
registryVersion?: string;
|
|
516
492
|
loadedAt: string;
|
|
517
493
|
expiresAt: string;
|
|
518
|
-
shortcut?: {
|
|
519
|
-
key: string;
|
|
520
|
-
profile: string;
|
|
521
|
-
choice?: string;
|
|
522
|
-
};
|
|
523
494
|
/** Direct and OpenRouter call shapes for the resolved choice. */
|
|
524
495
|
invocation: ModelInvocation;
|
|
525
496
|
warnings?: AIProfileWarning[];
|
|
@@ -588,7 +559,7 @@ export interface ListAIProfilesOptions {
|
|
|
588
559
|
/** Match profiles that include any tag (default) or all listed tags. */
|
|
589
560
|
tags?: AIProfileTag[];
|
|
590
561
|
tagMatch?: ProfileTagMatchMode;
|
|
591
|
-
/** Free-text search across profile keys,
|
|
562
|
+
/** Free-text search across profile keys, tags, descriptions, and choices. */
|
|
592
563
|
search?: string;
|
|
593
564
|
/** Only profiles for this OpenRouter catalog lane (e.g. `text`, `image`). */
|
|
594
565
|
catalogLane?: ProfileCatalogLane;
|
|
@@ -702,7 +673,6 @@ export interface AIRegistryStatistics {
|
|
|
702
673
|
profiles: {
|
|
703
674
|
total: number;
|
|
704
675
|
choices: number;
|
|
705
|
-
aliases: number;
|
|
706
676
|
uniqueProviders: number;
|
|
707
677
|
providers: AIProvider[];
|
|
708
678
|
uniqueModelKeys: number;
|
|
@@ -712,9 +682,6 @@ export interface AIRegistryStatistics {
|
|
|
712
682
|
categories: string[];
|
|
713
683
|
averageChoicesPerProfile: number;
|
|
714
684
|
};
|
|
715
|
-
shortcuts: {
|
|
716
|
-
total: number;
|
|
717
|
-
};
|
|
718
685
|
catalog?: {
|
|
719
686
|
totalModels: number;
|
|
720
687
|
uniqueDirectProviders: number;
|