@x12i/ai-tools 2.0.1 → 2.0.3
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/dist/{AiModelsCatalogClient-B5FMI9gj.d.cts → AiModelsCatalogClient-C9ZJHhv3.d.ts} +4 -1
- package/dist/{AiModelsCatalogClient-CPPNI6Ry.d.ts → AiModelsCatalogClient-DgBdVFk-.d.cts} +4 -1
- package/dist/aliases/index.d.cts +3 -3
- package/dist/aliases/index.d.ts +3 -3
- package/dist/catalog/index.cjs +6 -5
- package/dist/catalog/index.cjs.map +1 -1
- package/dist/catalog/index.d.cts +4 -4
- package/dist/catalog/index.d.ts +4 -4
- package/dist/catalog/index.js +5 -4
- package/dist/{chunk-EYHMQVAL.js → chunk-54GKLIDW.js} +22 -10
- package/dist/chunk-54GKLIDW.js.map +1 -0
- package/dist/{chunk-XAWBTX3N.cjs → chunk-75ZVXZAV.cjs} +7 -7
- package/dist/{chunk-XAWBTX3N.cjs.map → chunk-75ZVXZAV.cjs.map} +1 -1
- package/dist/{chunk-YQDSN6R6.cjs → chunk-76FHWQH3.cjs} +3 -3
- package/dist/{chunk-YQDSN6R6.cjs.map → chunk-76FHWQH3.cjs.map} +1 -1
- package/dist/{chunk-EDMCKHO6.cjs → chunk-BCX5CLJJ.cjs} +15 -2
- package/dist/chunk-BCX5CLJJ.cjs.map +1 -0
- package/dist/{chunk-OPN6BGNH.js → chunk-D6OIUYNC.js} +117 -5
- package/dist/{chunk-OPN6BGNH.js.map → chunk-D6OIUYNC.js.map} +1 -1
- package/dist/{chunk-WOHMHXRZ.cjs → chunk-DDRWORUU.cjs} +30 -276
- package/dist/chunk-DDRWORUU.cjs.map +1 -0
- package/dist/{chunk-5XAAMBDO.cjs → chunk-HBNYVRLZ.cjs} +123 -11
- package/dist/chunk-HBNYVRLZ.cjs.map +1 -0
- package/dist/chunk-HEB73GKJ.js +263 -0
- package/dist/chunk-HEB73GKJ.js.map +1 -0
- package/dist/{chunk-VJHLO2R3.js → chunk-KSJSLKYI.js} +2 -2
- package/dist/{chunk-SIH4GPV4.js → chunk-MOLWV5LV.js} +2 -2
- package/dist/{chunk-CTM35DMA.js → chunk-PN4FF6YF.js} +10 -253
- package/dist/chunk-PN4FF6YF.js.map +1 -0
- package/dist/{chunk-DXZOL3VN.cjs → chunk-RSHI4OOY.cjs} +46 -34
- package/dist/chunk-RSHI4OOY.cjs.map +1 -0
- package/dist/{chunk-B3V2EHRY.js → chunk-SLSKQRMI.js} +15 -2
- package/dist/{chunk-B3V2EHRY.js.map → chunk-SLSKQRMI.js.map} +1 -1
- package/dist/{chunk-XOKUDUUI.cjs → chunk-TMA6QSNH.cjs} +3 -3
- package/dist/{chunk-XOKUDUUI.cjs.map → chunk-TMA6QSNH.cjs.map} +1 -1
- package/dist/{chunk-6BQBKROR.js → chunk-VBROBIVI.js} +3 -3
- package/dist/{chunk-6BQBKROR.js.map → chunk-VBROBIVI.js.map} +1 -1
- package/dist/chunk-WSUFQR3D.cjs +266 -0
- package/dist/chunk-WSUFQR3D.cjs.map +1 -0
- package/dist/{chunk-PRCICORG.cjs → chunk-X42KFOUO.cjs} +6 -6
- package/dist/{chunk-PRCICORG.cjs.map → chunk-X42KFOUO.cjs.map} +1 -1
- package/dist/{chunk-AB5GNXJ4.js → chunk-ZPUZ7DBO.js} +2 -2
- package/dist/cli/index.cjs +16 -15
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +7 -6
- package/dist/cli/index.js.map +1 -1
- package/dist/cost/index.cjs +4 -3
- package/dist/cost/index.cjs.map +1 -1
- package/dist/cost/index.d.cts +4 -4
- package/dist/cost/index.d.ts +4 -4
- package/dist/cost/index.js +3 -2
- package/dist/index.cjs +12 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +11 -8
- package/dist/{modelCache-CJftI-Ko.d.cts → modelCache-sL3dBfRM.d.cts} +1 -1
- package/dist/{modelCache-BzRn6t_C.d.ts → modelCache-xzoTUue2.d.ts} +1 -1
- package/dist/{modelNameResolver-5XkBMctP.d.ts → modelNameResolver-2WroQlqt.d.ts} +2 -1
- package/dist/{modelNameResolver-C5CSTGFF.d.cts → modelNameResolver-Bxlehrbp.d.cts} +2 -1
- package/dist/models/index.cjs +7 -6
- package/dist/models/index.cjs.map +1 -1
- package/dist/models/index.d.cts +3 -3
- package/dist/models/index.d.ts +3 -3
- package/dist/models/index.js +6 -5
- package/dist/{resolveUsageModel-BFwf80Hz.d.ts → resolveUsageModel-DrFuiuIW.d.ts} +2 -2
- package/dist/{resolveUsageModel-C_YmGR1M.d.cts → resolveUsageModel-xKZ2QpHy.d.cts} +2 -2
- package/dist/sync/index.cjs +7 -5
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +3 -3
- package/dist/sync/index.d.ts +3 -3
- package/dist/sync/index.js +6 -4
- package/dist/{types-BrzJWsTU.d.ts → types-BZYGjN2O.d.cts} +21 -2
- package/dist/{types-BrzJWsTU.d.cts → types-BZYGjN2O.d.ts} +21 -2
- package/package.json +2 -2
- package/dist/chunk-5XAAMBDO.cjs.map +0 -1
- package/dist/chunk-CTM35DMA.js.map +0 -1
- package/dist/chunk-DXZOL3VN.cjs.map +0 -1
- package/dist/chunk-EDMCKHO6.cjs.map +0 -1
- package/dist/chunk-EYHMQVAL.js.map +0 -1
- package/dist/chunk-WOHMHXRZ.cjs.map +0 -1
- /package/dist/{chunk-VJHLO2R3.js.map → chunk-KSJSLKYI.js.map} +0 -0
- /package/dist/{chunk-SIH4GPV4.js.map → chunk-MOLWV5LV.js.map} +0 -0
- /package/dist/{chunk-AB5GNXJ4.js.map → chunk-ZPUZ7DBO.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as LoadCatalogOptions, b as LoadedCatalogs } from './AiModelsCatalogClient-
|
|
1
|
+
import { L as LoadCatalogOptions, b as LoadedCatalogs } from './AiModelsCatalogClient-DgBdVFk-.cjs';
|
|
2
2
|
|
|
3
3
|
/** Remote catalog URLs (primary). */
|
|
4
4
|
declare const DEFAULT_DIRECT_CATALOG_URL = "https://open-assets.x12i.com/models-catalog.json";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as LoadCatalogOptions, b as LoadedCatalogs } from './AiModelsCatalogClient-
|
|
1
|
+
import { L as LoadCatalogOptions, b as LoadedCatalogs } from './AiModelsCatalogClient-C9ZJHhv3.js';
|
|
2
2
|
|
|
3
3
|
/** Remote catalog URLs (primary). */
|
|
4
4
|
declare const DEFAULT_DIRECT_CATALOG_URL = "https://open-assets.x12i.com/models-catalog.json";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as OpenRouterModelsQuery, a as AiModelRecord, l as ModelResolverOptions, h as ModelResolutionInput, j as ModelResolutionResult, k as ModelResolutionSuccess, d as AliasRegistry, t as ResolvedModel } from './types-
|
|
1
|
+
import { n as OpenRouterModelsQuery, a as AiModelRecord, l as ModelResolverOptions, h as ModelResolutionInput, j as ModelResolutionResult, k as ModelResolutionSuccess, d as AliasRegistry, t as ResolvedModel } from './types-BZYGjN2O.js';
|
|
2
2
|
|
|
3
3
|
type OpenRouterSyncProviderOptions = {
|
|
4
4
|
/** Optional — public GET /models needs no key. */
|
|
@@ -41,6 +41,7 @@ declare class ModelNameResolver {
|
|
|
41
41
|
private shorthandMap;
|
|
42
42
|
private partialMatch;
|
|
43
43
|
private computeRoutedViaOpenRouter;
|
|
44
|
+
private toOpenRouterSlug;
|
|
44
45
|
private success;
|
|
45
46
|
}
|
|
46
47
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as OpenRouterModelsQuery, a as AiModelRecord, l as ModelResolverOptions, h as ModelResolutionInput, j as ModelResolutionResult, k as ModelResolutionSuccess, d as AliasRegistry, t as ResolvedModel } from './types-
|
|
1
|
+
import { n as OpenRouterModelsQuery, a as AiModelRecord, l as ModelResolverOptions, h as ModelResolutionInput, j as ModelResolutionResult, k as ModelResolutionSuccess, d as AliasRegistry, t as ResolvedModel } from './types-BZYGjN2O.cjs';
|
|
2
2
|
|
|
3
3
|
type OpenRouterSyncProviderOptions = {
|
|
4
4
|
/** Optional — public GET /models needs no key. */
|
|
@@ -41,6 +41,7 @@ declare class ModelNameResolver {
|
|
|
41
41
|
private shorthandMap;
|
|
42
42
|
private partialMatch;
|
|
43
43
|
private computeRoutedViaOpenRouter;
|
|
44
|
+
private toOpenRouterSlug;
|
|
44
45
|
private success;
|
|
45
46
|
}
|
|
46
47
|
|
package/dist/models/index.cjs
CHANGED
|
@@ -4,20 +4,21 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk76FHWQH3cjs = require('../chunk-76FHWQH3.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
12
|
-
require('../chunk-
|
|
11
|
+
var _chunkTMA6QSNHcjs = require('../chunk-TMA6QSNH.cjs');
|
|
12
|
+
require('../chunk-HBNYVRLZ.cjs');
|
|
13
|
+
require('../chunk-WSUFQR3D.cjs');
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
|
|
19
|
-
var
|
|
20
|
-
require('../chunk-
|
|
20
|
+
var _chunkRSHI4OOYcjs = require('../chunk-RSHI4OOY.cjs');
|
|
21
|
+
require('../chunk-BCX5CLJJ.cjs');
|
|
21
22
|
require('../chunk-PADNCGZB.cjs');
|
|
22
23
|
require('../chunk-GS7T56RP.cjs');
|
|
23
24
|
|
|
@@ -32,5 +33,5 @@ require('../chunk-GS7T56RP.cjs');
|
|
|
32
33
|
|
|
33
34
|
|
|
34
35
|
|
|
35
|
-
exports.AiModelsService =
|
|
36
|
+
exports.AiModelsService = _chunk76FHWQH3cjs.AiModelsService; exports.REASONING_SUPPORTED_PARAMETERS = _chunkRSHI4OOYcjs.REASONING_SUPPORTED_PARAMETERS; exports.computeSupportsReasoning = _chunkRSHI4OOYcjs.computeSupportsReasoning; exports.countModels = _chunk76FHWQH3cjs.countModels; exports.extractProviderId = _chunkTMA6QSNHcjs.extractProviderId; exports.filterModels = _chunk76FHWQH3cjs.filterModels; exports.getModelInfo = _chunk76FHWQH3cjs.getModelInfo; exports.hasReasoningPricing = _chunkRSHI4OOYcjs.hasReasoningPricing; exports.isReasoningModel = _chunkRSHI4OOYcjs.isReasoningModel; exports.normalizeOpenRouterModel = _chunkTMA6QSNHcjs.normalizeOpenRouterModel; exports.supportsReasoningParameter = _chunkRSHI4OOYcjs.supportsReasoningParameter;
|
|
36
37
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/ami/Documents/prometheus/x12i/ai-tools/dist/models/index.cjs"],"names":[],"mappings":"AAAA,0GAA8B;AAC9B;AACE;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,gvBAAC","file":"/Users/ami/Documents/prometheus/x12i/ai-tools/dist/models/index.cjs"}
|
|
1
|
+
{"version":3,"sources":["/Users/ami/Documents/prometheus/x12i/ai-tools/dist/models/index.cjs"],"names":[],"mappings":"AAAA,0GAA8B;AAC9B;AACE;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,gvBAAC","file":"/Users/ami/Documents/prometheus/x12i/ai-tools/dist/models/index.cjs"}
|
package/dist/models/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as AiModelRecord, M as ModelListFilters, g as ModelListResult, j as ModelResolutionResult, m as OpenRouterModelApi } from '../types-
|
|
2
|
-
export { A as AiModelPricing, O as OpenRouterArchitectureApi, n as OpenRouterModelsQuery, o as OpenRouterModelsResponse, p as OpenRouterOutputModality, q as OpenRouterPricingApi, s as OpenRouterTopProviderApi } from '../types-
|
|
3
|
-
import { a as AiModelsCatalogClientOptions } from '../AiModelsCatalogClient-
|
|
1
|
+
import { a as AiModelRecord, M as ModelListFilters, g as ModelListResult, j as ModelResolutionResult, m as OpenRouterModelApi } from '../types-BZYGjN2O.cjs';
|
|
2
|
+
export { A as AiModelPricing, O as OpenRouterArchitectureApi, n as OpenRouterModelsQuery, o as OpenRouterModelsResponse, p as OpenRouterOutputModality, q as OpenRouterPricingApi, s as OpenRouterTopProviderApi } from '../types-BZYGjN2O.cjs';
|
|
3
|
+
import { a as AiModelsCatalogClientOptions } from '../AiModelsCatalogClient-DgBdVFk-.cjs';
|
|
4
4
|
|
|
5
5
|
type AiModelsServiceOptions = AiModelsCatalogClientOptions;
|
|
6
6
|
/**
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as AiModelRecord, M as ModelListFilters, g as ModelListResult, j as ModelResolutionResult, m as OpenRouterModelApi } from '../types-
|
|
2
|
-
export { A as AiModelPricing, O as OpenRouterArchitectureApi, n as OpenRouterModelsQuery, o as OpenRouterModelsResponse, p as OpenRouterOutputModality, q as OpenRouterPricingApi, s as OpenRouterTopProviderApi } from '../types-
|
|
3
|
-
import { a as AiModelsCatalogClientOptions } from '../AiModelsCatalogClient-
|
|
1
|
+
import { a as AiModelRecord, M as ModelListFilters, g as ModelListResult, j as ModelResolutionResult, m as OpenRouterModelApi } from '../types-BZYGjN2O.js';
|
|
2
|
+
export { A as AiModelPricing, O as OpenRouterArchitectureApi, n as OpenRouterModelsQuery, o as OpenRouterModelsResponse, p as OpenRouterOutputModality, q as OpenRouterPricingApi, s as OpenRouterTopProviderApi } from '../types-BZYGjN2O.js';
|
|
3
|
+
import { a as AiModelsCatalogClientOptions } from '../AiModelsCatalogClient-C9ZJHhv3.js';
|
|
4
4
|
|
|
5
5
|
type AiModelsServiceOptions = AiModelsCatalogClientOptions;
|
|
6
6
|
/**
|
package/dist/models/index.js
CHANGED
|
@@ -4,20 +4,21 @@ import {
|
|
|
4
4
|
countModels,
|
|
5
5
|
filterModels,
|
|
6
6
|
getModelInfo
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-KSJSLKYI.js";
|
|
8
8
|
import {
|
|
9
9
|
extractProviderId,
|
|
10
10
|
normalizeOpenRouterModel
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
} from "../chunk-MOLWV5LV.js";
|
|
12
|
+
import "../chunk-D6OIUYNC.js";
|
|
13
|
+
import "../chunk-HEB73GKJ.js";
|
|
13
14
|
import {
|
|
14
15
|
REASONING_SUPPORTED_PARAMETERS,
|
|
15
16
|
computeSupportsReasoning,
|
|
16
17
|
hasReasoningPricing,
|
|
17
18
|
isReasoningModel,
|
|
18
19
|
supportsReasoningParameter
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
20
|
+
} from "../chunk-54GKLIDW.js";
|
|
21
|
+
import "../chunk-SLSKQRMI.js";
|
|
21
22
|
import "../chunk-2PTCWPHV.js";
|
|
22
23
|
export {
|
|
23
24
|
AiModelsService,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AiModelPricing, d as AliasRegistry, l as ModelResolverOptions } from './types-
|
|
2
|
-
import { A as AiModelsCatalogClient } from './AiModelsCatalogClient-
|
|
1
|
+
import { A as AiModelPricing, d as AliasRegistry, l as ModelResolverOptions } from './types-BZYGjN2O.js';
|
|
2
|
+
import { A as AiModelsCatalogClient } from './AiModelsCatalogClient-C9ZJHhv3.js';
|
|
3
3
|
|
|
4
4
|
type AiUsageInput = {
|
|
5
5
|
tokens: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AiModelPricing, d as AliasRegistry, l as ModelResolverOptions } from './types-
|
|
2
|
-
import { A as AiModelsCatalogClient } from './AiModelsCatalogClient-
|
|
1
|
+
import { A as AiModelPricing, d as AliasRegistry, l as ModelResolverOptions } from './types-BZYGjN2O.cjs';
|
|
2
|
+
import { A as AiModelsCatalogClient } from './AiModelsCatalogClient-DgBdVFk-.cjs';
|
|
3
3
|
|
|
4
4
|
type AiUsageInput = {
|
|
5
5
|
tokens: {
|
package/dist/sync/index.cjs
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
7
|
-
require('../chunk-
|
|
6
|
+
var _chunkX42KFOUOcjs = require('../chunk-X42KFOUO.cjs');
|
|
7
|
+
require('../chunk-TMA6QSNH.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkRSHI4OOYcjs = require('../chunk-RSHI4OOY.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -16,7 +16,8 @@ var _chunkDXZOL3VNcjs = require('../chunk-DXZOL3VN.cjs');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
|
|
20
|
+
var _chunkBCX5CLJJcjs = require('../chunk-BCX5CLJJ.cjs');
|
|
20
21
|
require('../chunk-PADNCGZB.cjs');
|
|
21
22
|
require('../chunk-GS7T56RP.cjs');
|
|
22
23
|
|
|
@@ -32,5 +33,6 @@ require('../chunk-GS7T56RP.cjs');
|
|
|
32
33
|
|
|
33
34
|
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
|
|
37
|
+
exports.ModelNameResolver = _chunkRSHI4OOYcjs.ModelNameResolver; exports.OpenRouterSyncProvider = _chunkX42KFOUOcjs.OpenRouterSyncProvider; exports.buildCatalogIndexes = _chunkRSHI4OOYcjs.buildCatalogIndexes; exports.createModelNameResolver = _chunkX42KFOUOcjs.createModelNameResolver; exports.isEffectiveOpenRouterTransport = _chunkBCX5CLJJcjs.isEffectiveOpenRouterTransport; exports.isRoutedViaOpenRouter = _chunkX42KFOUOcjs.isRoutedViaOpenRouter; exports.loadOpenRouterRoutingEnv = _chunkBCX5CLJJcjs.loadOpenRouterRoutingEnv; exports.normalizeProvider = _chunkBCX5CLJJcjs.normalizeProvider; exports.normalizeString = _chunkBCX5CLJJcjs.normalizeString; exports.providerIdToEnvKeyPrefix = _chunkBCX5CLJJcjs.providerIdToEnvKeyPrefix; exports.resolveModel = _chunkX42KFOUOcjs.resolveModel; exports.shouldDefaultRouteViaOpenRouter = _chunkBCX5CLJJcjs.shouldDefaultRouteViaOpenRouter; exports.vendorApiKeyEnvName = _chunkBCX5CLJJcjs.vendorApiKeyEnvName;
|
|
36
38
|
//# sourceMappingURL=index.cjs.map
|
package/dist/sync/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/ami/Documents/prometheus/x12i/ai-tools/dist/sync/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,
|
|
1
|
+
{"version":3,"sources":["/Users/ami/Documents/prometheus/x12i/ai-tools/dist/sync/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,s7BAAC","file":"/Users/ami/Documents/prometheus/x12i/ai-tools/dist/sync/index.cjs"}
|
package/dist/sync/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { M as ModelNameResolver, O as OpenRouterSyncProvider, a as OpenRouterSyncProviderOptions, c as createModelNameResolver, i as isRoutedViaOpenRouter, r as resolveModel } from '../modelNameResolver-
|
|
2
|
-
import { a as AiModelRecord, C as CatalogIndexes } from '../types-
|
|
3
|
-
export { h as ModelResolutionInput, j as ModelResolutionResult, k as ModelResolutionSuccess, l as ModelResolverOptions, r as OpenRouterRoutingConfig, R as ResolutionStrategy, t as ResolvedModel, v as
|
|
1
|
+
export { M as ModelNameResolver, O as OpenRouterSyncProvider, a as OpenRouterSyncProviderOptions, c as createModelNameResolver, i as isRoutedViaOpenRouter, r as resolveModel } from '../modelNameResolver-Bxlehrbp.cjs';
|
|
2
|
+
import { a as AiModelRecord, C as CatalogIndexes } from '../types-BZYGjN2O.cjs';
|
|
3
|
+
export { h as ModelResolutionInput, j as ModelResolutionResult, k as ModelResolutionSuccess, l as ModelResolverOptions, r as OpenRouterRoutingConfig, R as ResolutionStrategy, t as ResolvedModel, v as isEffectiveOpenRouterTransport, w as loadOpenRouterRoutingEnv, x as providerIdToEnvKeyPrefix, y as shouldDefaultRouteViaOpenRouter, z as vendorApiKeyEnvName } from '../types-BZYGjN2O.cjs';
|
|
4
4
|
|
|
5
5
|
declare function buildCatalogIndexes(catalog: Map<string, AiModelRecord>): CatalogIndexes;
|
|
6
6
|
|
package/dist/sync/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { M as ModelNameResolver, O as OpenRouterSyncProvider, a as OpenRouterSyncProviderOptions, c as createModelNameResolver, i as isRoutedViaOpenRouter, r as resolveModel } from '../modelNameResolver-
|
|
2
|
-
import { a as AiModelRecord, C as CatalogIndexes } from '../types-
|
|
3
|
-
export { h as ModelResolutionInput, j as ModelResolutionResult, k as ModelResolutionSuccess, l as ModelResolverOptions, r as OpenRouterRoutingConfig, R as ResolutionStrategy, t as ResolvedModel, v as
|
|
1
|
+
export { M as ModelNameResolver, O as OpenRouterSyncProvider, a as OpenRouterSyncProviderOptions, c as createModelNameResolver, i as isRoutedViaOpenRouter, r as resolveModel } from '../modelNameResolver-2WroQlqt.js';
|
|
2
|
+
import { a as AiModelRecord, C as CatalogIndexes } from '../types-BZYGjN2O.js';
|
|
3
|
+
export { h as ModelResolutionInput, j as ModelResolutionResult, k as ModelResolutionSuccess, l as ModelResolverOptions, r as OpenRouterRoutingConfig, R as ResolutionStrategy, t as ResolvedModel, v as isEffectiveOpenRouterTransport, w as loadOpenRouterRoutingEnv, x as providerIdToEnvKeyPrefix, y as shouldDefaultRouteViaOpenRouter, z as vendorApiKeyEnvName } from '../types-BZYGjN2O.js';
|
|
4
4
|
|
|
5
5
|
declare function buildCatalogIndexes(catalog: Map<string, AiModelRecord>): CatalogIndexes;
|
|
6
6
|
|
package/dist/sync/index.js
CHANGED
|
@@ -3,26 +3,28 @@ import {
|
|
|
3
3
|
createModelNameResolver,
|
|
4
4
|
isRoutedViaOpenRouter,
|
|
5
5
|
resolveModel
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-VBROBIVI.js";
|
|
7
|
+
import "../chunk-MOLWV5LV.js";
|
|
8
8
|
import {
|
|
9
9
|
ModelNameResolver,
|
|
10
10
|
buildCatalogIndexes
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-54GKLIDW.js";
|
|
12
12
|
import {
|
|
13
|
+
isEffectiveOpenRouterTransport,
|
|
13
14
|
loadOpenRouterRoutingEnv,
|
|
14
15
|
normalizeProvider,
|
|
15
16
|
normalizeString,
|
|
16
17
|
providerIdToEnvKeyPrefix,
|
|
17
18
|
shouldDefaultRouteViaOpenRouter,
|
|
18
19
|
vendorApiKeyEnvName
|
|
19
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-SLSKQRMI.js";
|
|
20
21
|
import "../chunk-2PTCWPHV.js";
|
|
21
22
|
export {
|
|
22
23
|
ModelNameResolver,
|
|
23
24
|
OpenRouterSyncProvider,
|
|
24
25
|
buildCatalogIndexes,
|
|
25
26
|
createModelNameResolver,
|
|
27
|
+
isEffectiveOpenRouterTransport,
|
|
26
28
|
isRoutedViaOpenRouter,
|
|
27
29
|
loadOpenRouterRoutingEnv,
|
|
28
30
|
normalizeProvider,
|
|
@@ -220,6 +220,16 @@ declare function loadOpenRouterRoutingEnv(env?: Record<string, string | undefine
|
|
|
220
220
|
* 2. OPENROUTER_API_KEY is set AND the vendor's `{VENDOR}_API_KEY` is missing.
|
|
221
221
|
*/
|
|
222
222
|
declare function shouldDefaultRouteViaOpenRouter(providerId: string | undefined, config: OpenRouterRoutingConfig): boolean;
|
|
223
|
+
type EffectiveOpenRouterTransportInput = {
|
|
224
|
+
provider?: string;
|
|
225
|
+
modelId?: string;
|
|
226
|
+
routeViaOpenRouter?: boolean;
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Whether the effective runtime transport is OpenRouter.
|
|
230
|
+
* Honors explicit gateway override, then env defaults from {@link loadOpenRouterRoutingEnv}.
|
|
231
|
+
*/
|
|
232
|
+
declare function isEffectiveOpenRouterTransport(config: OpenRouterRoutingConfig, input?: EffectiveOpenRouterTransportInput): boolean;
|
|
223
233
|
|
|
224
234
|
type ModelResolutionInput = {
|
|
225
235
|
/** Provider hint (openrouter, openai, anthropic, …). May be omitted. */
|
|
@@ -227,7 +237,7 @@ type ModelResolutionInput = {
|
|
|
227
237
|
/** Model id, alias, shorthand, or partial name. Required. */
|
|
228
238
|
model: string;
|
|
229
239
|
};
|
|
230
|
-
type ResolutionStrategy = "alias-registry" | "alias-as-provider-correction" | "exact-match" | "catalog-alias-match" | "canonical-slug-match" | "provider-prefix-injection" | "cross-provider-correction" | "version-suffix-strip" | "date-suffix-strip" | "shorthand-expansion" | "partial-name-match" | "local-provider-passthrough";
|
|
240
|
+
type ResolutionStrategy = "alias-registry" | "alias-as-provider-correction" | "exact-match" | "catalog-alias-match" | "canonical-slug-match" | "provider-prefix-injection" | "cross-provider-correction" | "version-suffix-strip" | "date-suffix-strip" | "shorthand-expansion" | "partial-name-match" | "local-provider-passthrough" | "ai-profiles-profile" | "ai-profiles-shortcut" | "ai-profiles-model-id";
|
|
231
241
|
type ModelResolutionSuccess = {
|
|
232
242
|
found: true;
|
|
233
243
|
modelId: string;
|
|
@@ -237,6 +247,9 @@ type ModelResolutionSuccess = {
|
|
|
237
247
|
resolvedVia: ResolutionStrategy[];
|
|
238
248
|
resolvedReason: string;
|
|
239
249
|
normalisedInput: string;
|
|
250
|
+
/** Set when resolution went through @x12i/ai-profiles. */
|
|
251
|
+
profile?: string;
|
|
252
|
+
choice?: string;
|
|
240
253
|
};
|
|
241
254
|
type ModelResolutionNotFound = {
|
|
242
255
|
found: false;
|
|
@@ -262,6 +275,12 @@ type ModelResolverOptions = {
|
|
|
262
275
|
additionalLocalProviders?: string[];
|
|
263
276
|
/** Env-based OpenRouter vs direct routing. Defaults to loadOpenRouterRoutingEnv(). */
|
|
264
277
|
routingEnv?: OpenRouterRoutingConfig;
|
|
278
|
+
/**
|
|
279
|
+
* Explicit transport override from gateway/router.
|
|
280
|
+
* When true, treat as OpenRouter regardless of vendor API keys.
|
|
281
|
+
* When false, treat as direct regardless of env defaults.
|
|
282
|
+
*/
|
|
283
|
+
routeViaOpenRouter?: boolean;
|
|
265
284
|
};
|
|
266
285
|
type CatalogIndexes = {
|
|
267
286
|
aliasIndex: Map<string, string>;
|
|
@@ -274,4 +293,4 @@ type ResolvedModel = {
|
|
|
274
293
|
routedViaOpenRouter: boolean;
|
|
275
294
|
};
|
|
276
295
|
|
|
277
|
-
export { type AiModelPricing as A, type CatalogIndexes as C, type ModelListFilters as M, type OpenRouterArchitectureApi as O, type ResolutionStrategy as R, type AiModelRecord as a, type AliasEntry as b, type AliasFileSchema as c, AliasRegistry as d, type AliasRegistryOptions as e, type AliasValidationReport as f, type ModelListResult as g, type ModelResolutionInput as h, type ModelResolutionNotFound as i, type ModelResolutionResult as j, type ModelResolutionSuccess as k, type ModelResolverOptions as l, type OpenRouterModelApi as m, type OpenRouterModelsQuery as n, type OpenRouterModelsResponse as o, type OpenRouterOutputModality as p, type OpenRouterPricingApi as q, type OpenRouterRoutingConfig as r, type OpenRouterTopProviderApi as s, type ResolvedModel as t, type ResolvedModelRef as u,
|
|
296
|
+
export { type AiModelPricing as A, type CatalogIndexes as C, type ModelListFilters as M, type OpenRouterArchitectureApi as O, type ResolutionStrategy as R, type AiModelRecord as a, type AliasEntry as b, type AliasFileSchema as c, AliasRegistry as d, type AliasRegistryOptions as e, type AliasValidationReport as f, type ModelListResult as g, type ModelResolutionInput as h, type ModelResolutionNotFound as i, type ModelResolutionResult as j, type ModelResolutionSuccess as k, type ModelResolverOptions as l, type OpenRouterModelApi as m, type OpenRouterModelsQuery as n, type OpenRouterModelsResponse as o, type OpenRouterOutputModality as p, type OpenRouterPricingApi as q, type OpenRouterRoutingConfig as r, type OpenRouterTopProviderApi as s, type ResolvedModel as t, type ResolvedModelRef as u, isEffectiveOpenRouterTransport as v, loadOpenRouterRoutingEnv as w, providerIdToEnvKeyPrefix as x, shouldDefaultRouteViaOpenRouter as y, vendorApiKeyEnvName as z };
|
|
@@ -220,6 +220,16 @@ declare function loadOpenRouterRoutingEnv(env?: Record<string, string | undefine
|
|
|
220
220
|
* 2. OPENROUTER_API_KEY is set AND the vendor's `{VENDOR}_API_KEY` is missing.
|
|
221
221
|
*/
|
|
222
222
|
declare function shouldDefaultRouteViaOpenRouter(providerId: string | undefined, config: OpenRouterRoutingConfig): boolean;
|
|
223
|
+
type EffectiveOpenRouterTransportInput = {
|
|
224
|
+
provider?: string;
|
|
225
|
+
modelId?: string;
|
|
226
|
+
routeViaOpenRouter?: boolean;
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Whether the effective runtime transport is OpenRouter.
|
|
230
|
+
* Honors explicit gateway override, then env defaults from {@link loadOpenRouterRoutingEnv}.
|
|
231
|
+
*/
|
|
232
|
+
declare function isEffectiveOpenRouterTransport(config: OpenRouterRoutingConfig, input?: EffectiveOpenRouterTransportInput): boolean;
|
|
223
233
|
|
|
224
234
|
type ModelResolutionInput = {
|
|
225
235
|
/** Provider hint (openrouter, openai, anthropic, …). May be omitted. */
|
|
@@ -227,7 +237,7 @@ type ModelResolutionInput = {
|
|
|
227
237
|
/** Model id, alias, shorthand, or partial name. Required. */
|
|
228
238
|
model: string;
|
|
229
239
|
};
|
|
230
|
-
type ResolutionStrategy = "alias-registry" | "alias-as-provider-correction" | "exact-match" | "catalog-alias-match" | "canonical-slug-match" | "provider-prefix-injection" | "cross-provider-correction" | "version-suffix-strip" | "date-suffix-strip" | "shorthand-expansion" | "partial-name-match" | "local-provider-passthrough";
|
|
240
|
+
type ResolutionStrategy = "alias-registry" | "alias-as-provider-correction" | "exact-match" | "catalog-alias-match" | "canonical-slug-match" | "provider-prefix-injection" | "cross-provider-correction" | "version-suffix-strip" | "date-suffix-strip" | "shorthand-expansion" | "partial-name-match" | "local-provider-passthrough" | "ai-profiles-profile" | "ai-profiles-shortcut" | "ai-profiles-model-id";
|
|
231
241
|
type ModelResolutionSuccess = {
|
|
232
242
|
found: true;
|
|
233
243
|
modelId: string;
|
|
@@ -237,6 +247,9 @@ type ModelResolutionSuccess = {
|
|
|
237
247
|
resolvedVia: ResolutionStrategy[];
|
|
238
248
|
resolvedReason: string;
|
|
239
249
|
normalisedInput: string;
|
|
250
|
+
/** Set when resolution went through @x12i/ai-profiles. */
|
|
251
|
+
profile?: string;
|
|
252
|
+
choice?: string;
|
|
240
253
|
};
|
|
241
254
|
type ModelResolutionNotFound = {
|
|
242
255
|
found: false;
|
|
@@ -262,6 +275,12 @@ type ModelResolverOptions = {
|
|
|
262
275
|
additionalLocalProviders?: string[];
|
|
263
276
|
/** Env-based OpenRouter vs direct routing. Defaults to loadOpenRouterRoutingEnv(). */
|
|
264
277
|
routingEnv?: OpenRouterRoutingConfig;
|
|
278
|
+
/**
|
|
279
|
+
* Explicit transport override from gateway/router.
|
|
280
|
+
* When true, treat as OpenRouter regardless of vendor API keys.
|
|
281
|
+
* When false, treat as direct regardless of env defaults.
|
|
282
|
+
*/
|
|
283
|
+
routeViaOpenRouter?: boolean;
|
|
265
284
|
};
|
|
266
285
|
type CatalogIndexes = {
|
|
267
286
|
aliasIndex: Map<string, string>;
|
|
@@ -274,4 +293,4 @@ type ResolvedModel = {
|
|
|
274
293
|
routedViaOpenRouter: boolean;
|
|
275
294
|
};
|
|
276
295
|
|
|
277
|
-
export { type AiModelPricing as A, type CatalogIndexes as C, type ModelListFilters as M, type OpenRouterArchitectureApi as O, type ResolutionStrategy as R, type AiModelRecord as a, type AliasEntry as b, type AliasFileSchema as c, AliasRegistry as d, type AliasRegistryOptions as e, type AliasValidationReport as f, type ModelListResult as g, type ModelResolutionInput as h, type ModelResolutionNotFound as i, type ModelResolutionResult as j, type ModelResolutionSuccess as k, type ModelResolverOptions as l, type OpenRouterModelApi as m, type OpenRouterModelsQuery as n, type OpenRouterModelsResponse as o, type OpenRouterOutputModality as p, type OpenRouterPricingApi as q, type OpenRouterRoutingConfig as r, type OpenRouterTopProviderApi as s, type ResolvedModel as t, type ResolvedModelRef as u,
|
|
296
|
+
export { type AiModelPricing as A, type CatalogIndexes as C, type ModelListFilters as M, type OpenRouterArchitectureApi as O, type ResolutionStrategy as R, type AiModelRecord as a, type AliasEntry as b, type AliasFileSchema as c, AliasRegistry as d, type AliasRegistryOptions as e, type AliasValidationReport as f, type ModelListResult as g, type ModelResolutionInput as h, type ModelResolutionNotFound as i, type ModelResolutionResult as j, type ModelResolutionSuccess as k, type ModelResolverOptions as l, type OpenRouterModelApi as m, type OpenRouterModelsQuery as n, type OpenRouterModelsResponse as o, type OpenRouterOutputModality as p, type OpenRouterPricingApi as q, type OpenRouterRoutingConfig as r, type OpenRouterTopProviderApi as s, type ResolvedModel as t, type ResolvedModelRef as u, isEffectiveOpenRouterTransport as v, loadOpenRouterRoutingEnv as w, providerIdToEnvKeyPrefix as x, shouldDefaultRouteViaOpenRouter as y, vendorApiKeyEnvName as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@x12i/ai-tools",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "AI model catalogs (open-assets JSON), cost calculation, and LLM utilities",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@x12i/ai-profiles": "^1.2.
|
|
88
|
+
"@x12i/ai-profiles": "^1.2.1",
|
|
89
89
|
"@x12i/env": "^4.0.1",
|
|
90
90
|
"commander": "^12.1.0",
|
|
91
91
|
"dotenv": "^16.4.7",
|