@omnicross/core 0.1.6 → 0.1.7
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/ApiConverter.cjs +2 -2
- package/dist/ApiConverter.js +1 -1
- package/dist/auth/GeminiCodeAssistProjectResolver.cjs +4 -3
- package/dist/auth/GeminiCodeAssistProjectResolver.js +3 -2
- package/dist/{chunk-3Z5BQZFM.cjs → chunk-235MXAGX.cjs} +3 -1
- package/dist/{chunk-DLXZEZWO.cjs → chunk-2E42SAW3.cjs} +42 -4
- package/dist/{chunk-7AK7B36B.cjs → chunk-2Z4XM3H5.cjs} +6 -6
- package/dist/{chunk-OEWZUX4G.js → chunk-32O35CIF.js} +9 -20
- package/dist/chunk-3SCOLIPT.cjs +63 -0
- package/dist/{chunk-SYQF7OIR.js → chunk-3WD4HTR2.js} +2 -0
- package/dist/{chunk-SQYVORNP.cjs → chunk-4BB343BI.cjs} +527 -267
- package/dist/{chunk-AT7B7SOZ.js → chunk-5NJLQ6T6.js} +21 -10
- package/dist/chunk-5RSZYQJH.cjs +62 -0
- package/dist/{chunk-IFXJ2BG7.js → chunk-7C7DET6S.js} +51 -6
- package/dist/{chunk-UDCC7EMR.js → chunk-E3COOKUP.js} +307 -47
- package/dist/chunk-FU7EAR73.js +62 -0
- package/dist/{chunk-UX7VWA46.js → chunk-FXR6N3SR.js} +39 -1
- package/dist/{chunk-WYTEQ4Q5.cjs → chunk-GDIXXKF2.cjs} +21 -10
- package/dist/{chunk-WB6PH56J.js → chunk-GFIZ6LQI.js} +12 -8
- package/dist/chunk-GL6XM527.js +61 -0
- package/dist/{chunk-EJLH6NFT.cjs → chunk-J3QQ6JS5.cjs} +12 -8
- package/dist/{chunk-VRFBB5DB.js → chunk-MYYR3HZL.js} +4 -4
- package/dist/{chunk-YJVHCHQX.js → chunk-N7OOJI5V.js} +46 -2
- package/dist/chunk-NKVZ6Z3Y.cjs +61 -0
- package/dist/{chunk-SNYBEXLB.cjs → chunk-OJGQKHN5.cjs} +3 -1
- package/dist/chunk-OTZC4TNH.cjs +79 -0
- package/dist/{chunk-6VUQPOV3.cjs → chunk-OVQBNVSV.cjs} +10 -21
- package/dist/{chunk-4VLRHHFE.cjs → chunk-OXHNSZ53.cjs} +9 -11
- package/dist/{chunk-6CL5HTPQ.js → chunk-PEGTIPB3.js} +8 -10
- package/dist/chunk-PO3XB56Z.js +79 -0
- package/dist/{chunk-SIZQQD6T.js → chunk-RJ5ZGNI3.js} +42 -5
- package/dist/{chunk-KCVJWJST.cjs → chunk-RJUONLUQ.cjs} +47 -10
- package/dist/{chunk-BPKCU575.js → chunk-SOO562NM.js} +3 -1
- package/dist/{chunk-UNWKG6EI.cjs → chunk-XPIOJQS2.cjs} +51 -6
- package/dist/chunk-XXFYLL7R.js +63 -0
- package/dist/{chunk-YK57NMIF.cjs → chunk-YWL7YZWS.cjs} +47 -3
- package/dist/completion/CompletionService.cjs +23 -19
- package/dist/completion/CompletionService.d.cts +1 -0
- package/dist/completion/CompletionService.d.ts +1 -0
- package/dist/completion/CompletionService.js +22 -18
- package/dist/completion.cjs +23 -19
- package/dist/completion.d.cts +1 -0
- package/dist/completion.d.ts +1 -0
- package/dist/completion.js +22 -18
- package/dist/index.cjs +26 -22
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +26 -22
- package/dist/outbound-api/auditCapture.cjs +2 -2
- package/dist/outbound-api/auditCapture.d.cts +3 -4
- package/dist/outbound-api/auditCapture.d.ts +3 -4
- package/dist/outbound-api/auditCapture.js +1 -1
- package/dist/outbound-api/routeResolver.d.cts +3 -2
- package/dist/outbound-api/routeResolver.d.ts +3 -2
- package/dist/outbound-api/subscriptionRegistryPort.d.cts +1 -0
- package/dist/outbound-api/subscriptionRegistryPort.d.ts +1 -0
- package/dist/outbound-api/types.d.cts +2 -1
- package/dist/outbound-api/types.d.ts +2 -1
- package/dist/outbound-api.cjs +23 -19
- package/dist/outbound-api.d.cts +7 -5
- package/dist/outbound-api.d.ts +7 -5
- package/dist/outbound-api.js +22 -18
- package/dist/pipeline/AccountAllowanceScheduling.d.cts +2 -1
- package/dist/pipeline/AccountAllowanceScheduling.d.ts +2 -1
- package/dist/pipeline/AccountRouteActivity.cjs +10 -0
- package/dist/pipeline/AccountRouteActivity.d.cts +61 -0
- package/dist/pipeline/AccountRouteActivity.d.ts +61 -0
- package/dist/pipeline/AccountRouteActivity.js +10 -0
- package/dist/pipeline/ServerOverloadCounter.cjs +16 -0
- package/dist/pipeline/ServerOverloadCounter.d.cts +77 -0
- package/dist/pipeline/ServerOverloadCounter.d.ts +77 -0
- package/dist/pipeline/ServerOverloadCounter.js +16 -0
- package/dist/pipeline/SubscriptionAccountHealth.cjs +4 -2
- package/dist/pipeline/SubscriptionAccountHealth.d.cts +32 -3
- package/dist/pipeline/SubscriptionAccountHealth.d.ts +32 -3
- package/dist/pipeline/SubscriptionAccountHealth.js +3 -1
- package/dist/pipeline/upstreamFetch.cjs +4 -3
- package/dist/pipeline/upstreamFetch.d.cts +35 -6
- package/dist/pipeline/upstreamFetch.d.ts +35 -6
- package/dist/pipeline/upstreamFetch.js +3 -2
- package/dist/pipeline/upstreamTrace.cjs +4 -2
- package/dist/pipeline/upstreamTrace.d.cts +22 -8
- package/dist/pipeline/upstreamTrace.d.ts +22 -8
- package/dist/pipeline/upstreamTrace.js +3 -1
- package/dist/ports.d.cts +1 -1
- package/dist/ports.d.ts +1 -1
- package/dist/provider-proxy/ProviderProxy.cjs +23 -19
- package/dist/provider-proxy/ProviderProxy.d.cts +1 -0
- package/dist/provider-proxy/ProviderProxy.d.ts +1 -0
- package/dist/provider-proxy/ProviderProxy.js +22 -18
- package/dist/provider-proxy/identity/codexCliHeaders.cjs +10 -0
- package/dist/provider-proxy/identity/codexCliHeaders.d.cts +45 -0
- package/dist/provider-proxy/identity/codexCliHeaders.d.ts +45 -0
- package/dist/provider-proxy/identity/codexCliHeaders.js +10 -0
- package/dist/provider-proxy/ingress/providerProxyShared.cjs +23 -19
- package/dist/provider-proxy/ingress/providerProxyShared.d.cts +11 -1
- package/dist/provider-proxy/ingress/providerProxyShared.d.ts +11 -1
- package/dist/provider-proxy/ingress/providerProxyShared.js +22 -18
- package/dist/provider-proxy/matchText.cjs +2 -2
- package/dist/provider-proxy/matchText.d.cts +1 -3
- package/dist/provider-proxy/matchText.d.ts +1 -3
- package/dist/provider-proxy/matchText.js +1 -1
- package/dist/provider-proxy/types.d.cts +5 -0
- package/dist/provider-proxy/types.d.ts +5 -0
- package/dist/provider-proxy.cjs +23 -19
- package/dist/provider-proxy.d.cts +1 -0
- package/dist/provider-proxy.d.ts +1 -0
- package/dist/provider-proxy.js +22 -18
- package/dist/{routeResolver-CHTv_Bs5.d.ts → routeResolver-BxOfunbm.d.ts} +1 -1
- package/dist/{routeResolver-kepxnfcC.d.cts → routeResolver-D5OzD0iM.d.cts} +1 -1
- package/dist/transformer/transformers/AnthropicTransformer.cjs +3 -2
- package/dist/transformer/transformers/AnthropicTransformer.js +2 -1
- package/dist/transformer/transformers/OpenAIResponseTransformer.cjs +3 -2
- package/dist/transformer/transformers/OpenAIResponseTransformer.js +2 -1
- package/dist/transformer/transformers.cjs +7 -6
- package/dist/transformer/transformers.js +6 -5
- package/dist/transformer.cjs +9 -8
- package/dist/transformer.js +8 -7
- package/dist/{types-hsoKrVQS.d.ts → types-CqZD77rS.d.ts} +39 -0
- package/dist/{types-H3wGZSOo.d.cts → types-gjJ5lJ5n.d.cts} +39 -0
- package/dist/usage/pricing-engine.cjs +2 -2
- package/dist/usage/pricing-engine.d.cts +20 -0
- package/dist/usage/pricing-engine.d.ts +20 -0
- package/dist/usage/pricing-engine.js +1 -1
- package/dist/usage/usage-recorder.cjs +2 -2
- package/dist/usage/usage-recorder.d.cts +5 -1
- package/dist/usage/usage-recorder.d.ts +5 -1
- package/dist/usage/usage-recorder.js +1 -1
- package/dist/usage.cjs +3 -3
- package/dist/usage.js +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import http from 'node:http';
|
|
2
2
|
import { ThinkLevel } from '@omnicross/contracts/completion-types';
|
|
3
|
+
import { UsageCacheKeySource } from '@omnicross/contracts/usage-stats-types';
|
|
3
4
|
import { SubscriptionProviderId, OpenCodeGoTokenConfig, OpenCodeGoScenario, OpenCodeGoModelEntry } from '@omnicross/contracts/subscription-types';
|
|
4
5
|
import { UsageEngineOrigin, UsageTokens } from '@omnicross/contracts/usage-types';
|
|
5
6
|
import { ApiKeyPoolService } from '../completion/ApiKeyPoolService.cjs';
|
|
@@ -458,6 +459,10 @@ interface UsageRecordImportInput {
|
|
|
458
459
|
rawUsage?: unknown;
|
|
459
460
|
runId?: string | null;
|
|
460
461
|
eventId?: string | null;
|
|
462
|
+
/** Safe prompt-cache-key provenance; raw key material is never recorded. */
|
|
463
|
+
cacheKeySource?: UsageCacheKeySource;
|
|
464
|
+
/** Whether the gateway, rather than the client, attached the cache key. */
|
|
465
|
+
cacheKeyInjected?: boolean;
|
|
461
466
|
/**
|
|
462
467
|
* OPTIONAL per-request audit correlation key (request-audit-log) — the outbound
|
|
463
468
|
* relay taps set this to the request's `http.ServerResponse` so the recorder can
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import http from 'node:http';
|
|
2
2
|
import { ThinkLevel } from '@omnicross/contracts/completion-types';
|
|
3
|
+
import { UsageCacheKeySource } from '@omnicross/contracts/usage-stats-types';
|
|
3
4
|
import { SubscriptionProviderId, OpenCodeGoTokenConfig, OpenCodeGoScenario, OpenCodeGoModelEntry } from '@omnicross/contracts/subscription-types';
|
|
4
5
|
import { UsageEngineOrigin, UsageTokens } from '@omnicross/contracts/usage-types';
|
|
5
6
|
import { ApiKeyPoolService } from '../completion/ApiKeyPoolService.js';
|
|
@@ -458,6 +459,10 @@ interface UsageRecordImportInput {
|
|
|
458
459
|
rawUsage?: unknown;
|
|
459
460
|
runId?: string | null;
|
|
460
461
|
eventId?: string | null;
|
|
462
|
+
/** Safe prompt-cache-key provenance; raw key material is never recorded. */
|
|
463
|
+
cacheKeySource?: UsageCacheKeySource;
|
|
464
|
+
/** Whether the gateway, rather than the client, attached the cache key. */
|
|
465
|
+
cacheKeyInjected?: boolean;
|
|
461
466
|
/**
|
|
462
467
|
* OPTIONAL per-request audit correlation key (request-audit-log) — the outbound
|
|
463
468
|
* relay taps set this to the request's `http.ServerResponse` so the recorder can
|
package/dist/provider-proxy.cjs
CHANGED
|
@@ -5,34 +5,37 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
require('./chunk-EJLH6NFT.cjs');
|
|
8
|
+
var _chunk4BB343BIcjs = require('./chunk-4BB343BI.cjs');
|
|
10
9
|
require('./chunk-HQP3K7PU.cjs');
|
|
11
10
|
require('./chunk-FZ46M34D.cjs');
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
14
|
-
require('./chunk-3OPYJG76.cjs');
|
|
15
|
-
require('./chunk-7AK7B36B.cjs');
|
|
11
|
+
require('./chunk-2Z4XM3H5.cjs');
|
|
12
|
+
require('./chunk-OXHNSZ53.cjs');
|
|
16
13
|
require('./chunk-V4TXMEJS.cjs');
|
|
17
|
-
require('./chunk-
|
|
14
|
+
require('./chunk-OVQBNVSV.cjs');
|
|
15
|
+
require('./chunk-5RSZYQJH.cjs');
|
|
18
16
|
require('./chunk-OF3BECU2.cjs');
|
|
19
|
-
require('./chunk-4VLRHHFE.cjs');
|
|
20
17
|
require('./chunk-EYZYXJTJ.cjs');
|
|
21
|
-
require('./chunk-
|
|
22
|
-
require('./chunk-
|
|
23
|
-
require('./chunk-
|
|
18
|
+
require('./chunk-2E42SAW3.cjs');
|
|
19
|
+
require('./chunk-OJGQKHN5.cjs');
|
|
20
|
+
require('./chunk-IIRPUVPH.cjs');
|
|
21
|
+
require('./chunk-GBHYAGX3.cjs');
|
|
22
|
+
require('./chunk-3OPYJG76.cjs');
|
|
23
|
+
require('./chunk-3SCOLIPT.cjs');
|
|
24
24
|
require('./chunk-RPII3E6Z.cjs');
|
|
25
25
|
require('./chunk-6RPZADX3.cjs');
|
|
26
|
+
require('./chunk-J3QQ6JS5.cjs');
|
|
27
|
+
require('./chunk-UIBD2YY5.cjs');
|
|
28
|
+
require('./chunk-R3HK6R4B.cjs');
|
|
29
|
+
require('./chunk-QXD4MV2X.cjs');
|
|
26
30
|
require('./chunk-NYUNU75A.cjs');
|
|
27
|
-
require('./chunk-
|
|
31
|
+
require('./chunk-OTZC4TNH.cjs');
|
|
32
|
+
require('./chunk-YWL7YZWS.cjs');
|
|
28
33
|
require('./chunk-YNJNTCSQ.cjs');
|
|
29
34
|
require('./chunk-SVNDB62D.cjs');
|
|
30
|
-
require('./chunk-UIBD2YY5.cjs');
|
|
31
35
|
require('./chunk-6QQG7YG3.cjs');
|
|
32
36
|
require('./chunk-25GXJCEZ.cjs');
|
|
33
37
|
require('./chunk-MUHWHQVM.cjs');
|
|
34
38
|
require('./chunk-Q27JY5RG.cjs');
|
|
35
|
-
require('./chunk-QXD4MV2X.cjs');
|
|
36
39
|
require('./chunk-APYG5QD7.cjs');
|
|
37
40
|
require('./chunk-L74VDN4A.cjs');
|
|
38
41
|
require('./chunk-4YINUUKQ.cjs');
|
|
@@ -40,16 +43,17 @@ require('./chunk-4VZX5F4T.cjs');
|
|
|
40
43
|
require('./chunk-QBZJ7P2T.cjs');
|
|
41
44
|
require('./chunk-4IH4EL7M.cjs');
|
|
42
45
|
require('./chunk-A2YMUCBT.cjs');
|
|
43
|
-
require('./chunk-
|
|
46
|
+
require('./chunk-XPIOJQS2.cjs');
|
|
44
47
|
require('./chunk-FCR77GYM.cjs');
|
|
45
48
|
require('./chunk-AEOZIDEB.cjs');
|
|
46
49
|
require('./chunk-XSVNC2UD.cjs');
|
|
47
|
-
require('./chunk-
|
|
50
|
+
require('./chunk-GDIXXKF2.cjs');
|
|
48
51
|
require('./chunk-OKMJLEXX.cjs');
|
|
49
52
|
require('./chunk-KBM2W6UY.cjs');
|
|
50
|
-
require('./chunk-
|
|
51
|
-
require('./chunk-
|
|
53
|
+
require('./chunk-RJUONLUQ.cjs');
|
|
54
|
+
require('./chunk-235MXAGX.cjs');
|
|
52
55
|
require('./chunk-HVBBDBS3.cjs');
|
|
56
|
+
require('./chunk-NKVZ6Z3Y.cjs');
|
|
53
57
|
require('./chunk-NZYN7C3P.cjs');
|
|
54
58
|
require('./chunk-JMJBSACD.cjs');
|
|
55
59
|
require('./chunk-GMMT7RVN.cjs');
|
|
@@ -61,4 +65,4 @@ require('./chunk-UNEFIWXI.cjs');
|
|
|
61
65
|
|
|
62
66
|
|
|
63
67
|
|
|
64
|
-
exports.DEFAULT_ROUTE_IDLE_MS =
|
|
68
|
+
exports.DEFAULT_ROUTE_IDLE_MS = _chunk4BB343BIcjs.DEFAULT_ROUTE_IDLE_MS; exports.ProviderProxy = _chunk4BB343BIcjs.ProviderProxy; exports.ProviderProxyRouteMap = _chunk4BB343BIcjs.ProviderProxyRouteMap; exports.__resetProviderProxyForTests = _chunk4BB343BIcjs.__resetProviderProxyForTests; exports.extractRouteToken = _chunk4BB343BIcjs.extractRouteToken; exports.getProviderProxy = _chunk4BB343BIcjs.getProviderProxy;
|
|
@@ -4,6 +4,7 @@ import { ProviderProxyDeps } from './provider-proxy/types.cjs';
|
|
|
4
4
|
export { AnthropicIngressHandler, AnthropicIngressHandlerFactory, AnthropicRouteHandlerParams, AnthropicSdkHints, ExtendedContextHint, IngressFormat, ProxyAttribution, RetryCallback, RouteAuthMode, RouteContext, StreamEventCallback, SubscriptionDispatchProfile, SubscriptionRequestSummary, TargetProviderFormat } from './provider-proxy/types.cjs';
|
|
5
5
|
import 'node:http';
|
|
6
6
|
import '@omnicross/contracts/completion-types';
|
|
7
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
7
8
|
import '@omnicross/contracts/subscription-types';
|
|
8
9
|
import '@omnicross/contracts/usage-types';
|
|
9
10
|
import './completion/ApiKeyPoolService.cjs';
|
package/dist/provider-proxy.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ProviderProxyDeps } from './provider-proxy/types.js';
|
|
|
4
4
|
export { AnthropicIngressHandler, AnthropicIngressHandlerFactory, AnthropicRouteHandlerParams, AnthropicSdkHints, ExtendedContextHint, IngressFormat, ProxyAttribution, RetryCallback, RouteAuthMode, RouteContext, StreamEventCallback, SubscriptionDispatchProfile, SubscriptionRequestSummary, TargetProviderFormat } from './provider-proxy/types.js';
|
|
5
5
|
import 'node:http';
|
|
6
6
|
import '@omnicross/contracts/completion-types';
|
|
7
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
7
8
|
import '@omnicross/contracts/subscription-types';
|
|
8
9
|
import '@omnicross/contracts/usage-types';
|
|
9
10
|
import './completion/ApiKeyPoolService.js';
|
package/dist/provider-proxy.js
CHANGED
|
@@ -5,34 +5,37 @@ import {
|
|
|
5
5
|
__resetProviderProxyForTests,
|
|
6
6
|
extractRouteToken,
|
|
7
7
|
getProviderProxy
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-WB6PH56J.js";
|
|
8
|
+
} from "./chunk-E3COOKUP.js";
|
|
10
9
|
import "./chunk-VVEHS2LI.js";
|
|
11
10
|
import "./chunk-46RLHI7D.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-DK4A7DLE.js";
|
|
15
|
-
import "./chunk-VRFBB5DB.js";
|
|
11
|
+
import "./chunk-MYYR3HZL.js";
|
|
12
|
+
import "./chunk-PEGTIPB3.js";
|
|
16
13
|
import "./chunk-LVUCAWMK.js";
|
|
17
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-32O35CIF.js";
|
|
15
|
+
import "./chunk-FU7EAR73.js";
|
|
18
16
|
import "./chunk-LB6EBS6Y.js";
|
|
19
|
-
import "./chunk-6CL5HTPQ.js";
|
|
20
17
|
import "./chunk-7VU7V2E4.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-FXR6N3SR.js";
|
|
19
|
+
import "./chunk-SOO562NM.js";
|
|
20
|
+
import "./chunk-WNKWAEUR.js";
|
|
21
|
+
import "./chunk-MZNPGW5Q.js";
|
|
22
|
+
import "./chunk-DK4A7DLE.js";
|
|
23
|
+
import "./chunk-XXFYLL7R.js";
|
|
24
24
|
import "./chunk-XTEI64OU.js";
|
|
25
25
|
import "./chunk-XX6NQJMA.js";
|
|
26
|
+
import "./chunk-GFIZ6LQI.js";
|
|
27
|
+
import "./chunk-OE6TDIWW.js";
|
|
28
|
+
import "./chunk-DRWHTIIZ.js";
|
|
29
|
+
import "./chunk-JWC6APFQ.js";
|
|
26
30
|
import "./chunk-5ERIZW3D.js";
|
|
27
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-PO3XB56Z.js";
|
|
32
|
+
import "./chunk-N7OOJI5V.js";
|
|
28
33
|
import "./chunk-23S5OPIO.js";
|
|
29
34
|
import "./chunk-AVYJ4YBN.js";
|
|
30
|
-
import "./chunk-OE6TDIWW.js";
|
|
31
35
|
import "./chunk-OPRS4IQZ.js";
|
|
32
36
|
import "./chunk-2JYRIADS.js";
|
|
33
37
|
import "./chunk-DE2SRBFZ.js";
|
|
34
38
|
import "./chunk-ZY6KU6P3.js";
|
|
35
|
-
import "./chunk-JWC6APFQ.js";
|
|
36
39
|
import "./chunk-WLYIIEAF.js";
|
|
37
40
|
import "./chunk-TKJMZBAH.js";
|
|
38
41
|
import "./chunk-3QFXFCHG.js";
|
|
@@ -40,16 +43,17 @@ import "./chunk-EBLFCNPY.js";
|
|
|
40
43
|
import "./chunk-AQ5TNQB7.js";
|
|
41
44
|
import "./chunk-XEKD23J5.js";
|
|
42
45
|
import "./chunk-H5JUT3KV.js";
|
|
43
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-7C7DET6S.js";
|
|
44
47
|
import "./chunk-K5NM7VAH.js";
|
|
45
48
|
import "./chunk-WNY4WMRF.js";
|
|
46
49
|
import "./chunk-OZFM4X3S.js";
|
|
47
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-5NJLQ6T6.js";
|
|
48
51
|
import "./chunk-N5T4M4GU.js";
|
|
49
52
|
import "./chunk-TOVPMMHM.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-RJ5ZGNI3.js";
|
|
54
|
+
import "./chunk-3WD4HTR2.js";
|
|
52
55
|
import "./chunk-MKF46GNZ.js";
|
|
56
|
+
import "./chunk-GL6XM527.js";
|
|
53
57
|
import "./chunk-CDHS2QDC.js";
|
|
54
58
|
import "./chunk-Y7FO65VT.js";
|
|
55
59
|
import "./chunk-FMOBD2OQ.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProviderConfigSource } from './ports/provider-config-source.js';
|
|
2
2
|
import { IngressFormat, RouteContext } from './provider-proxy/types.js';
|
|
3
|
-
import { s as OutboundEndpoint, Q as ModelRef, c as EndpointRoutingConfig, R as RequestRole } from './types-
|
|
3
|
+
import { s as OutboundEndpoint, Q as ModelRef, c as EndpointRoutingConfig, R as RequestRole } from './types-CqZD77rS.js';
|
|
4
4
|
import { SubscriptionProviderId } from '@omnicross/contracts/subscription-types';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProviderConfigSource } from './ports/provider-config-source.cjs';
|
|
2
2
|
import { IngressFormat, RouteContext } from './provider-proxy/types.cjs';
|
|
3
|
-
import { s as OutboundEndpoint, Q as ModelRef, c as EndpointRoutingConfig, R as RequestRole } from './types-
|
|
3
|
+
import { s as OutboundEndpoint, Q as ModelRef, c as EndpointRoutingConfig, R as RequestRole } from './types-gjJ5lJ5n.cjs';
|
|
4
4
|
import { SubscriptionProviderId } from '@omnicross/contracts/subscription-types';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkOXHNSZ53cjs = require('../../chunk-OXHNSZ53.cjs');
|
|
4
|
+
require('../../chunk-5RSZYQJH.cjs');
|
|
4
5
|
|
|
5
6
|
|
|
6
|
-
exports.AnthropicTransformer =
|
|
7
|
+
exports.AnthropicTransformer = _chunkOXHNSZ53cjs.AnthropicTransformer;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkOVQBNVSVcjs = require('../../chunk-OVQBNVSV.cjs');
|
|
4
|
+
require('../../chunk-5RSZYQJH.cjs');
|
|
4
5
|
|
|
5
6
|
|
|
6
|
-
exports.OpenAIResponseTransformer =
|
|
7
|
+
exports.OpenAIResponseTransformer = _chunkOVQBNVSVcjs.OpenAIResponseTransformer;
|
|
@@ -3,19 +3,20 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk2Z4XM3H5cjs = require('../chunk-2Z4XM3H5.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkOXHNSZ53cjs = require('../chunk-OXHNSZ53.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkV4TXMEJScjs = require('../chunk-V4TXMEJS.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkOVQBNVSVcjs = require('../chunk-OVQBNVSV.cjs');
|
|
16
|
+
require('../chunk-5RSZYQJH.cjs');
|
|
16
17
|
|
|
17
18
|
|
|
18
|
-
var
|
|
19
|
+
var _chunkOF3BECU2cjs = require('../chunk-OF3BECU2.cjs');
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
var _chunkOKMJLEXXcjs = require('../chunk-OKMJLEXX.cjs');
|
|
@@ -30,4 +31,4 @@ require('../chunk-KBM2W6UY.cjs');
|
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
|
|
33
|
-
exports.AnthropicTransformer =
|
|
34
|
+
exports.AnthropicTransformer = _chunkOXHNSZ53cjs.AnthropicTransformer; exports.BUILTIN_TRANSFORMER_NAMES = _chunk2Z4XM3H5cjs.BUILTIN_TRANSFORMER_NAMES; exports.BuiltinTransformers = _chunk2Z4XM3H5cjs.BuiltinTransformers; exports.GeminiCodeAssistTransformer = _chunkOKMJLEXXcjs.GeminiCodeAssistTransformer; exports.GeminiTransformer = _chunkV4TXMEJScjs.GeminiTransformer; exports.OpenAIResponseTransformer = _chunkOVQBNVSVcjs.OpenAIResponseTransformer; exports.OpenAITransformer = _chunkOF3BECU2cjs.OpenAITransformer; exports.getBuiltinTransformers = _chunk2Z4XM3H5cjs.getBuiltinTransformers; exports.registerBuiltinTransformers = _chunk2Z4XM3H5cjs.registerBuiltinTransformers;
|
|
@@ -3,19 +3,20 @@ import {
|
|
|
3
3
|
BuiltinTransformers,
|
|
4
4
|
getBuiltinTransformers,
|
|
5
5
|
registerBuiltinTransformers
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-MYYR3HZL.js";
|
|
7
|
+
import {
|
|
8
|
+
AnthropicTransformer
|
|
9
|
+
} from "../chunk-PEGTIPB3.js";
|
|
7
10
|
import {
|
|
8
11
|
GeminiTransformer
|
|
9
12
|
} from "../chunk-LVUCAWMK.js";
|
|
10
13
|
import {
|
|
11
14
|
OpenAIResponseTransformer
|
|
12
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-32O35CIF.js";
|
|
16
|
+
import "../chunk-FU7EAR73.js";
|
|
13
17
|
import {
|
|
14
18
|
OpenAITransformer
|
|
15
19
|
} from "../chunk-LB6EBS6Y.js";
|
|
16
|
-
import {
|
|
17
|
-
AnthropicTransformer
|
|
18
|
-
} from "../chunk-6CL5HTPQ.js";
|
|
19
20
|
import {
|
|
20
21
|
GeminiCodeAssistTransformer
|
|
21
22
|
} from "../chunk-N5T4M4GU.js";
|
package/dist/transformer.cjs
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-FZ46M34D.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
var _chunk2Z4XM3H5cjs = require('./chunk-2Z4XM3H5.cjs');
|
|
5
|
+
require('./chunk-OXHNSZ53.cjs');
|
|
6
|
+
require('./chunk-V4TXMEJS.cjs');
|
|
7
|
+
require('./chunk-OVQBNVSV.cjs');
|
|
8
|
+
require('./chunk-5RSZYQJH.cjs');
|
|
9
|
+
require('./chunk-OF3BECU2.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
4
12
|
var _chunkIIRPUVPHcjs = require('./chunk-IIRPUVPH.cjs');
|
|
5
13
|
require('./chunk-GBHYAGX3.cjs');
|
|
6
14
|
|
|
7
15
|
|
|
8
16
|
var _chunk3OPYJG76cjs = require('./chunk-3OPYJG76.cjs');
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var _chunk7AK7B36Bcjs = require('./chunk-7AK7B36B.cjs');
|
|
12
|
-
require('./chunk-V4TXMEJS.cjs');
|
|
13
|
-
require('./chunk-6VUQPOV3.cjs');
|
|
14
|
-
require('./chunk-OF3BECU2.cjs');
|
|
15
|
-
require('./chunk-4VLRHHFE.cjs');
|
|
16
17
|
require('./chunk-OKMJLEXX.cjs');
|
|
17
18
|
require('./chunk-KBM2W6UY.cjs');
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
|
|
22
|
-
exports.TransformerChainExecutor = _chunkIIRPUVPHcjs.TransformerChainExecutor; exports.TransformerService = _chunk3OPYJG76cjs.TransformerService; exports.registerBuiltinTransformers =
|
|
23
|
+
exports.TransformerChainExecutor = _chunkIIRPUVPHcjs.TransformerChainExecutor; exports.TransformerService = _chunk3OPYJG76cjs.TransformerService; exports.registerBuiltinTransformers = _chunk2Z4XM3H5cjs.registerBuiltinTransformers;
|
package/dist/transformer.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import "./chunk-46RLHI7D.js";
|
|
2
|
+
import {
|
|
3
|
+
registerBuiltinTransformers
|
|
4
|
+
} from "./chunk-MYYR3HZL.js";
|
|
5
|
+
import "./chunk-PEGTIPB3.js";
|
|
6
|
+
import "./chunk-LVUCAWMK.js";
|
|
7
|
+
import "./chunk-32O35CIF.js";
|
|
8
|
+
import "./chunk-FU7EAR73.js";
|
|
9
|
+
import "./chunk-LB6EBS6Y.js";
|
|
2
10
|
import {
|
|
3
11
|
TransformerChainExecutor
|
|
4
12
|
} from "./chunk-WNKWAEUR.js";
|
|
@@ -6,13 +14,6 @@ import "./chunk-MZNPGW5Q.js";
|
|
|
6
14
|
import {
|
|
7
15
|
TransformerService
|
|
8
16
|
} from "./chunk-DK4A7DLE.js";
|
|
9
|
-
import {
|
|
10
|
-
registerBuiltinTransformers
|
|
11
|
-
} from "./chunk-VRFBB5DB.js";
|
|
12
|
-
import "./chunk-LVUCAWMK.js";
|
|
13
|
-
import "./chunk-OEWZUX4G.js";
|
|
14
|
-
import "./chunk-LB6EBS6Y.js";
|
|
15
|
-
import "./chunk-6CL5HTPQ.js";
|
|
16
17
|
import "./chunk-N5T4M4GU.js";
|
|
17
18
|
import "./chunk-TOVPMMHM.js";
|
|
18
19
|
export {
|
|
@@ -654,6 +654,13 @@ interface OutboundApiKeyInfo {
|
|
|
654
654
|
id: string;
|
|
655
655
|
name: string;
|
|
656
656
|
keyPrefix: string;
|
|
657
|
+
/**
|
|
658
|
+
* Whether the operator "view key" affordance is available for this key — true
|
|
659
|
+
* only when a reversibly-encrypted `keySecret` was persisted at creation.
|
|
660
|
+
* Legacy hash-only rows (and any DB without a `SecretBox`) read as absent ⇒
|
|
661
|
+
* not revealable. Optional so a pre-upgrade daemon response type-checks.
|
|
662
|
+
*/
|
|
663
|
+
revealable?: boolean;
|
|
657
664
|
enabled: boolean;
|
|
658
665
|
createdAt: number;
|
|
659
666
|
lastUsedAt: number | null;
|
|
@@ -751,6 +758,15 @@ interface OutboundKeyDbRow {
|
|
|
751
758
|
name: string;
|
|
752
759
|
keyHash: string;
|
|
753
760
|
keyPrefix: string;
|
|
761
|
+
/**
|
|
762
|
+
* OPTIONAL reversibly-encrypted plaintext of the secret (an `enc:v1:…`
|
|
763
|
+
* envelope produced by the daemon's `SecretBox`). Absent on legacy rows
|
|
764
|
+
* (created before revealable storage) AND on any DB constructed without a
|
|
765
|
+
* `SecretBox` — in both cases the key is NOT revealable. The hash above
|
|
766
|
+
* remains the auth lookup index; this field only powers the operator
|
|
767
|
+
* "view key" affordance.
|
|
768
|
+
*/
|
|
769
|
+
keySecret?: string;
|
|
754
770
|
enabled: boolean;
|
|
755
771
|
createdAt: number;
|
|
756
772
|
lastUsedAt: number | null;
|
|
@@ -803,6 +819,14 @@ interface OutboundKeyDb {
|
|
|
803
819
|
kind?: 'client' | 'integration';
|
|
804
820
|
allowedEndpoints?: OutboundEndpoint[];
|
|
805
821
|
loopbackOnly?: boolean;
|
|
822
|
+
/**
|
|
823
|
+
* The generated plaintext secret. When the DB holds a `SecretBox` it
|
|
824
|
+
* persists a reversibly-encrypted copy as `keySecret` (enabling the
|
|
825
|
+
* "view key" affordance); when no box is wired the plaintext is dropped
|
|
826
|
+
* (byte-identical to the legacy hash-only storage). The hash above — NOT
|
|
827
|
+
* this field — remains the auth lookup index.
|
|
828
|
+
*/
|
|
829
|
+
plaintext?: string;
|
|
806
830
|
}): Promise<OutboundKeyDbRow>;
|
|
807
831
|
outboundApiKeysRevoke(id: string): Promise<boolean>;
|
|
808
832
|
outboundApiKeysTouchLastUsed(id: string): Promise<boolean>;
|
|
@@ -830,6 +854,21 @@ interface OutboundKeyDb {
|
|
|
830
854
|
* idempotent).
|
|
831
855
|
*/
|
|
832
856
|
outboundApiKeysMarkActivated(id: string, activatedAt: number): Promise<boolean>;
|
|
857
|
+
/**
|
|
858
|
+
* Reveal the stored plaintext for a key (the operator "view key" affordance),
|
|
859
|
+
* or `null` when the key is missing OR was persisted without a `keySecret`
|
|
860
|
+
* (legacy hash-only rows / a DB constructed without a `SecretBox`). The
|
|
861
|
+
* daemon-owned DB decrypts its stored envelope; core never handles the
|
|
862
|
+
* master key.
|
|
863
|
+
*/
|
|
864
|
+
outboundApiKeysReveal(id: string): Promise<string | null>;
|
|
865
|
+
/**
|
|
866
|
+
* Permanently remove a key row (hard delete), returning whether a row was
|
|
867
|
+
* removed. Unlike {@link outboundApiKeysRevoke} (a soft revoke that keeps the
|
|
868
|
+
* row for history), this purges the row entirely — intended for cleaning up
|
|
869
|
+
* already-revoked keys. Irreversible; the caller confirms.
|
|
870
|
+
*/
|
|
871
|
+
outboundApiKeysDelete(id: string): Promise<boolean>;
|
|
833
872
|
}
|
|
834
873
|
/**
|
|
835
874
|
* App-session-scoped dependencies the outbound server needs. The resident
|
|
@@ -654,6 +654,13 @@ interface OutboundApiKeyInfo {
|
|
|
654
654
|
id: string;
|
|
655
655
|
name: string;
|
|
656
656
|
keyPrefix: string;
|
|
657
|
+
/**
|
|
658
|
+
* Whether the operator "view key" affordance is available for this key — true
|
|
659
|
+
* only when a reversibly-encrypted `keySecret` was persisted at creation.
|
|
660
|
+
* Legacy hash-only rows (and any DB without a `SecretBox`) read as absent ⇒
|
|
661
|
+
* not revealable. Optional so a pre-upgrade daemon response type-checks.
|
|
662
|
+
*/
|
|
663
|
+
revealable?: boolean;
|
|
657
664
|
enabled: boolean;
|
|
658
665
|
createdAt: number;
|
|
659
666
|
lastUsedAt: number | null;
|
|
@@ -751,6 +758,15 @@ interface OutboundKeyDbRow {
|
|
|
751
758
|
name: string;
|
|
752
759
|
keyHash: string;
|
|
753
760
|
keyPrefix: string;
|
|
761
|
+
/**
|
|
762
|
+
* OPTIONAL reversibly-encrypted plaintext of the secret (an `enc:v1:…`
|
|
763
|
+
* envelope produced by the daemon's `SecretBox`). Absent on legacy rows
|
|
764
|
+
* (created before revealable storage) AND on any DB constructed without a
|
|
765
|
+
* `SecretBox` — in both cases the key is NOT revealable. The hash above
|
|
766
|
+
* remains the auth lookup index; this field only powers the operator
|
|
767
|
+
* "view key" affordance.
|
|
768
|
+
*/
|
|
769
|
+
keySecret?: string;
|
|
754
770
|
enabled: boolean;
|
|
755
771
|
createdAt: number;
|
|
756
772
|
lastUsedAt: number | null;
|
|
@@ -803,6 +819,14 @@ interface OutboundKeyDb {
|
|
|
803
819
|
kind?: 'client' | 'integration';
|
|
804
820
|
allowedEndpoints?: OutboundEndpoint[];
|
|
805
821
|
loopbackOnly?: boolean;
|
|
822
|
+
/**
|
|
823
|
+
* The generated plaintext secret. When the DB holds a `SecretBox` it
|
|
824
|
+
* persists a reversibly-encrypted copy as `keySecret` (enabling the
|
|
825
|
+
* "view key" affordance); when no box is wired the plaintext is dropped
|
|
826
|
+
* (byte-identical to the legacy hash-only storage). The hash above — NOT
|
|
827
|
+
* this field — remains the auth lookup index.
|
|
828
|
+
*/
|
|
829
|
+
plaintext?: string;
|
|
806
830
|
}): Promise<OutboundKeyDbRow>;
|
|
807
831
|
outboundApiKeysRevoke(id: string): Promise<boolean>;
|
|
808
832
|
outboundApiKeysTouchLastUsed(id: string): Promise<boolean>;
|
|
@@ -830,6 +854,21 @@ interface OutboundKeyDb {
|
|
|
830
854
|
* idempotent).
|
|
831
855
|
*/
|
|
832
856
|
outboundApiKeysMarkActivated(id: string, activatedAt: number): Promise<boolean>;
|
|
857
|
+
/**
|
|
858
|
+
* Reveal the stored plaintext for a key (the operator "view key" affordance),
|
|
859
|
+
* or `null` when the key is missing OR was persisted without a `keySecret`
|
|
860
|
+
* (legacy hash-only rows / a DB constructed without a `SecretBox`). The
|
|
861
|
+
* daemon-owned DB decrypts its stored envelope; core never handles the
|
|
862
|
+
* master key.
|
|
863
|
+
*/
|
|
864
|
+
outboundApiKeysReveal(id: string): Promise<string | null>;
|
|
865
|
+
/**
|
|
866
|
+
* Permanently remove a key row (hard delete), returning whether a row was
|
|
867
|
+
* removed. Unlike {@link outboundApiKeysRevoke} (a soft revoke that keeps the
|
|
868
|
+
* row for history), this purges the row entirely — intended for cleaning up
|
|
869
|
+
* already-revoked keys. Irreversible; the caller confirms.
|
|
870
|
+
*/
|
|
871
|
+
outboundApiKeysDelete(id: string): Promise<boolean>;
|
|
833
872
|
}
|
|
834
873
|
/**
|
|
835
874
|
* App-session-scoped dependencies the outbound server needs. The resident
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2E42SAW3cjs = require('../chunk-2E42SAW3.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
exports.PricingEngine =
|
|
6
|
+
exports.PricingEngine = _chunk2E42SAW3cjs.PricingEngine;
|
|
@@ -50,6 +50,15 @@ declare class PricingEngine {
|
|
|
50
50
|
* non-wildcard entry per model wins.
|
|
51
51
|
*/
|
|
52
52
|
private cacheByModel;
|
|
53
|
+
/**
|
|
54
|
+
* Last-resort fuzzy index: `[normalizedModelId, entry]` pairs over the same
|
|
55
|
+
* non-wildcard, non-openrouter rows as `cacheByModel`. Used when even the
|
|
56
|
+
* model-name fallback misses — e.g. usage recorded under a bare model id
|
|
57
|
+
* (`glm-5.2`) while the catalog only knows prefixed slugs
|
|
58
|
+
* (`cloudflare/@cf/zai-org/glm-5.2`). This is an ESTIMATE: the matched row
|
|
59
|
+
* may be an aggregate-route price rather than the direct-vendor rate.
|
|
60
|
+
*/
|
|
61
|
+
private fuzzyEntries;
|
|
53
62
|
private cacheLoaded;
|
|
54
63
|
/** Coalesce manual and background refreshes to prevent a catalog stampede. */
|
|
55
64
|
private refreshInFlight;
|
|
@@ -65,8 +74,19 @@ declare class PricingEngine {
|
|
|
65
74
|
* 2. wildcard provider ('*', modelId)
|
|
66
75
|
* 3. model name alone (any provider) — tolerates a runtime-alias vs
|
|
67
76
|
* canonical provider-id mismatch for the same model.
|
|
77
|
+
* 4. normalized fuzzy match (last resort) — matches a bare id like
|
|
78
|
+
* `glm-5.2` against prefixed catalog slugs like
|
|
79
|
+
* `cloudflare/@cf/zai-org/glm-5.2`. ESTIMATE only: the matched row may
|
|
80
|
+
* be an aggregate-route price, not the direct-vendor rate.
|
|
68
81
|
*/
|
|
69
82
|
getEntry(providerId: string, modelId: string): Promise<PricingEntry | null>;
|
|
83
|
+
/**
|
|
84
|
+
* Normalized substring match over the catalog's non-openrouter rows. Lowercases
|
|
85
|
+
* and strips all non-alphanumerics, then matches bidirectionally, preferring
|
|
86
|
+
* the shortest catalog key (tightest match) to reduce over-matching version
|
|
87
|
+
* variants. Returns null when nothing matches.
|
|
88
|
+
*/
|
|
89
|
+
private fuzzyMatch;
|
|
70
90
|
/**
|
|
71
91
|
* Compute the cost (and cache savings) for a single response.
|
|
72
92
|
*
|
|
@@ -50,6 +50,15 @@ declare class PricingEngine {
|
|
|
50
50
|
* non-wildcard entry per model wins.
|
|
51
51
|
*/
|
|
52
52
|
private cacheByModel;
|
|
53
|
+
/**
|
|
54
|
+
* Last-resort fuzzy index: `[normalizedModelId, entry]` pairs over the same
|
|
55
|
+
* non-wildcard, non-openrouter rows as `cacheByModel`. Used when even the
|
|
56
|
+
* model-name fallback misses — e.g. usage recorded under a bare model id
|
|
57
|
+
* (`glm-5.2`) while the catalog only knows prefixed slugs
|
|
58
|
+
* (`cloudflare/@cf/zai-org/glm-5.2`). This is an ESTIMATE: the matched row
|
|
59
|
+
* may be an aggregate-route price rather than the direct-vendor rate.
|
|
60
|
+
*/
|
|
61
|
+
private fuzzyEntries;
|
|
53
62
|
private cacheLoaded;
|
|
54
63
|
/** Coalesce manual and background refreshes to prevent a catalog stampede. */
|
|
55
64
|
private refreshInFlight;
|
|
@@ -65,8 +74,19 @@ declare class PricingEngine {
|
|
|
65
74
|
* 2. wildcard provider ('*', modelId)
|
|
66
75
|
* 3. model name alone (any provider) — tolerates a runtime-alias vs
|
|
67
76
|
* canonical provider-id mismatch for the same model.
|
|
77
|
+
* 4. normalized fuzzy match (last resort) — matches a bare id like
|
|
78
|
+
* `glm-5.2` against prefixed catalog slugs like
|
|
79
|
+
* `cloudflare/@cf/zai-org/glm-5.2`. ESTIMATE only: the matched row may
|
|
80
|
+
* be an aggregate-route price, not the direct-vendor rate.
|
|
68
81
|
*/
|
|
69
82
|
getEntry(providerId: string, modelId: string): Promise<PricingEntry | null>;
|
|
83
|
+
/**
|
|
84
|
+
* Normalized substring match over the catalog's non-openrouter rows. Lowercases
|
|
85
|
+
* and strips all non-alphanumerics, then matches bidirectionally, preferring
|
|
86
|
+
* the shortest catalog key (tightest match) to reduce over-matching version
|
|
87
|
+
* variants. Returns null when nothing matches.
|
|
88
|
+
*/
|
|
89
|
+
private fuzzyMatch;
|
|
70
90
|
/**
|
|
71
91
|
* Compute the cost (and cache savings) for a single response.
|
|
72
92
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkOJGQKHN5cjs = require('../chunk-OJGQKHN5.cjs');
|
|
4
4
|
require('../chunk-XSVNC2UD.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.UsageRecorder =
|
|
7
|
+
exports.UsageRecorder = _chunkOJGQKHN5cjs.UsageRecorder;
|