@omnicross/core 0.1.7 → 0.1.8
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/{ProviderProxy-C-xqrkKi.d.ts → ProviderProxy--ROec6VI.d.ts} +22 -3
- package/dist/{ProviderProxy-CnMQYN59.d.cts → ProviderProxy-QdwNV6l1.d.cts} +22 -3
- package/dist/{chunk-4BB343BI.cjs → chunk-26K6T2YS.cjs} +1209 -472
- package/dist/{chunk-OJGQKHN5.cjs → chunk-EPN67EGP.cjs} +3 -0
- package/dist/{chunk-E3COOKUP.js → chunk-QYC54PMG.js} +924 -187
- package/dist/{chunk-SOO562NM.js → chunk-UAPBLNN2.js} +3 -0
- package/dist/completion/ApiKeyPoolService.cjs +32 -1
- package/dist/completion/ApiKeyPoolService.d.cts +17 -1
- package/dist/completion/ApiKeyPoolService.d.ts +17 -1
- package/dist/completion/ApiKeyPoolService.js +31 -0
- package/dist/completion/CompletionService.cjs +3 -3
- package/dist/completion/CompletionService.js +2 -2
- package/dist/completion.cjs +3 -3
- package/dist/completion.js +2 -2
- package/dist/index.cjs +59 -3
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +58 -2
- package/dist/outbound-api/routeResolver.d.cts +3 -3
- package/dist/outbound-api/routeResolver.d.ts +3 -3
- package/dist/outbound-api/types.d.cts +2 -2
- package/dist/outbound-api/types.d.ts +2 -2
- package/dist/outbound-api.cjs +3 -3
- package/dist/outbound-api.d.cts +4 -4
- package/dist/outbound-api.d.ts +4 -4
- package/dist/outbound-api.js +2 -2
- package/dist/pipeline/AccountAllowanceScheduling.d.cts +2 -2
- package/dist/pipeline/AccountAllowanceScheduling.d.ts +2 -2
- package/dist/ports.d.cts +2 -2
- package/dist/ports.d.ts +2 -2
- package/dist/provider-proxy/ProviderProxy.cjs +3 -3
- package/dist/provider-proxy/ProviderProxy.d.cts +1 -1
- package/dist/provider-proxy/ProviderProxy.d.ts +1 -1
- package/dist/provider-proxy/ProviderProxy.js +2 -2
- package/dist/provider-proxy/ingress/providerProxyShared.cjs +3 -3
- package/dist/provider-proxy/ingress/providerProxyShared.js +2 -2
- package/dist/provider-proxy/types.d.cts +15 -1
- package/dist/provider-proxy/types.d.ts +15 -1
- package/dist/provider-proxy.cjs +59 -3
- package/dist/provider-proxy.d.cts +254 -8
- package/dist/provider-proxy.d.ts +254 -8
- package/dist/provider-proxy.js +60 -4
- package/dist/{routeResolver-BxOfunbm.d.ts → routeResolver-C0mkkZaM.d.ts} +1 -1
- package/dist/{routeResolver-D5OzD0iM.d.cts → routeResolver-CVFE8KKe.d.cts} +1 -1
- package/dist/{types-CqZD77rS.d.ts → types-BB8pxk_3.d.ts} +1 -1
- package/dist/{types-gjJ5lJ5n.d.cts → types-C2MwkLah.d.cts} +1 -1
- package/dist/usage/usage-recorder.cjs +2 -2
- package/dist/usage/usage-recorder.d.cts +6 -0
- package/dist/usage/usage-recorder.d.ts +6 -0
- package/dist/usage/usage-recorder.js +1 -1
- package/dist/usage.cjs +2 -2
- package/dist/usage.js +1 -1
- package/package.json +1 -1
|
@@ -78,6 +78,9 @@ var UsageRecorder = class {
|
|
|
78
78
|
costSavedByCacheUsd,
|
|
79
79
|
rawUsage: input.rawUsage != null ? safeStringify(input.rawUsage) : null,
|
|
80
80
|
runId: input.runId ?? null,
|
|
81
|
+
routeLeaseId: input.routeLeaseId ?? null,
|
|
82
|
+
routeLeaseConsumer: input.routeLeaseConsumer ?? null,
|
|
83
|
+
routeLeaseStageId: input.routeLeaseStageId ?? null,
|
|
81
84
|
eventId: input.eventId ?? null,
|
|
82
85
|
...input.cacheKeySource !== void 0 ? { cacheKeySource: input.cacheKeySource } : {},
|
|
83
86
|
...input.cacheKeyInjected !== void 0 ? { cacheKeyInjected: input.cacheKeyInjected } : {}
|
|
@@ -172,6 +172,37 @@ var ApiKeyPoolService = (_class = class {
|
|
|
172
172
|
const keys = await this.getAllKeys(providerId);
|
|
173
173
|
return keys.length > 0;
|
|
174
174
|
}
|
|
175
|
+
/** Secret-free strict preflight for a named provider key. */
|
|
176
|
+
async hasUsableKey(providerId, keyId) {
|
|
177
|
+
const keys = await this.getAvailableKeys(providerId);
|
|
178
|
+
return keys.some((key) => key.id === keyId);
|
|
179
|
+
}
|
|
180
|
+
/** Secret-free existence/availability split for strict Route Lease targets. */
|
|
181
|
+
async getKeyAvailability(providerId, keyId) {
|
|
182
|
+
const all = await this.getAllKeys(providerId);
|
|
183
|
+
if (!all.some((key) => key.id === keyId)) return "not-found";
|
|
184
|
+
return (await this.getAvailableKeys(providerId)).some((key) => key.id === keyId) ? "usable" : "unavailable";
|
|
185
|
+
}
|
|
186
|
+
/** Secret-free preflight for at least one enabled, non-cooling pool key. */
|
|
187
|
+
async hasUsableKeys(providerId) {
|
|
188
|
+
return (await this.getAvailableKeys(providerId)).length > 0;
|
|
189
|
+
}
|
|
190
|
+
/** Preserve pool exhaustion and its earliest safe retry horizon for Route Lease. */
|
|
191
|
+
async getPoolAvailability(providerId) {
|
|
192
|
+
const all = await this.getAllKeys(providerId);
|
|
193
|
+
if (all.length === 0) return { outcome: "empty" };
|
|
194
|
+
if ((await this.getAvailableKeys(providerId)).length > 0) return { outcome: "usable" };
|
|
195
|
+
const now = Date.now();
|
|
196
|
+
const coolingUntil = all.filter((key) => key.enabled).map((key) => _nullishCoalesce(_optionalChain([this, 'access', _ => _.cooldowns, 'access', _2 => _2.get, 'call', _3 => _3(key.id), 'optionalAccess', _4 => _4.until]), () => ( 0))).filter((until) => until > now);
|
|
197
|
+
if (coolingUntil.length > 0) {
|
|
198
|
+
const earliest = Math.min(...coolingUntil);
|
|
199
|
+
return {
|
|
200
|
+
outcome: "exhausted",
|
|
201
|
+
retryAfterSeconds: Math.max(1, Math.min(3600, Math.ceil((earliest - now) / 1e3)))
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
return { outcome: "unavailable" };
|
|
205
|
+
}
|
|
175
206
|
/**
|
|
176
207
|
* Get the live (in-memory) rate-limit cooldown health for a provider's keys.
|
|
177
208
|
*
|
|
@@ -240,7 +271,7 @@ var ApiKeyPoolService = (_class = class {
|
|
|
240
271
|
*/
|
|
241
272
|
applyCooldown(keyId, providerId, statusCode) {
|
|
242
273
|
const current = this.cooldowns.get(keyId);
|
|
243
|
-
const errors = (_nullishCoalesce(_optionalChain([current, 'optionalAccess',
|
|
274
|
+
const errors = (_nullishCoalesce(_optionalChain([current, 'optionalAccess', _5 => _5.errors]), () => ( 0))) + 1;
|
|
244
275
|
const cooldownMs = Math.min(
|
|
245
276
|
this.DEFAULT_COOLDOWN_MS * Math.pow(this.COOLDOWN_MULTIPLIER, errors - 1),
|
|
246
277
|
this.MAX_COOLDOWN_MS
|
|
@@ -20,6 +20,14 @@ interface KeyHealthEntry {
|
|
|
20
20
|
}
|
|
21
21
|
/** Provider-scoped map of keyId → live cooldown health (cooling keys only). */
|
|
22
22
|
type KeyHealthMap = Record<string, KeyHealthEntry>;
|
|
23
|
+
type ProviderKeyPoolAvailability = {
|
|
24
|
+
readonly outcome: 'usable';
|
|
25
|
+
} | {
|
|
26
|
+
readonly outcome: 'empty' | 'unavailable';
|
|
27
|
+
} | {
|
|
28
|
+
readonly outcome: 'exhausted';
|
|
29
|
+
readonly retryAfterSeconds: number;
|
|
30
|
+
};
|
|
23
31
|
/** Function type for loading API keys from the database */
|
|
24
32
|
type ApiKeysLoader = (providerId: string) => Promise<ApiKeyEntry[]>;
|
|
25
33
|
/** Function type for disabling a key in the database (on auth failure) */
|
|
@@ -111,6 +119,14 @@ declare class ApiKeyPoolService {
|
|
|
111
119
|
* Check if a provider has any keys in the pool.
|
|
112
120
|
*/
|
|
113
121
|
hasKeys(providerId: string): Promise<boolean>;
|
|
122
|
+
/** Secret-free strict preflight for a named provider key. */
|
|
123
|
+
hasUsableKey(providerId: string, keyId: string): Promise<boolean>;
|
|
124
|
+
/** Secret-free existence/availability split for strict Route Lease targets. */
|
|
125
|
+
getKeyAvailability(providerId: string, keyId: string): Promise<'usable' | 'unavailable' | 'not-found'>;
|
|
126
|
+
/** Secret-free preflight for at least one enabled, non-cooling pool key. */
|
|
127
|
+
hasUsableKeys(providerId: string): Promise<boolean>;
|
|
128
|
+
/** Preserve pool exhaustion and its earliest safe retry horizon for Route Lease. */
|
|
129
|
+
getPoolAvailability(providerId: string): Promise<ProviderKeyPoolAvailability>;
|
|
114
130
|
/**
|
|
115
131
|
* Get the live (in-memory) rate-limit cooldown health for a provider's keys.
|
|
116
132
|
*
|
|
@@ -153,4 +169,4 @@ declare class ApiKeyPoolService {
|
|
|
153
169
|
private cleanupExpiredCooldowns;
|
|
154
170
|
}
|
|
155
171
|
|
|
156
|
-
export { type ApiKeyAutoDisabler, type ApiKeyDisabler, ApiKeyPoolService, type ApiKeyResolver, type ApiKeysLoader, type KeyHealthEntry, type KeyHealthMap };
|
|
172
|
+
export { type ApiKeyAutoDisabler, type ApiKeyDisabler, ApiKeyPoolService, type ApiKeyResolver, type ApiKeysLoader, type KeyHealthEntry, type KeyHealthMap, type ProviderKeyPoolAvailability };
|
|
@@ -20,6 +20,14 @@ interface KeyHealthEntry {
|
|
|
20
20
|
}
|
|
21
21
|
/** Provider-scoped map of keyId → live cooldown health (cooling keys only). */
|
|
22
22
|
type KeyHealthMap = Record<string, KeyHealthEntry>;
|
|
23
|
+
type ProviderKeyPoolAvailability = {
|
|
24
|
+
readonly outcome: 'usable';
|
|
25
|
+
} | {
|
|
26
|
+
readonly outcome: 'empty' | 'unavailable';
|
|
27
|
+
} | {
|
|
28
|
+
readonly outcome: 'exhausted';
|
|
29
|
+
readonly retryAfterSeconds: number;
|
|
30
|
+
};
|
|
23
31
|
/** Function type for loading API keys from the database */
|
|
24
32
|
type ApiKeysLoader = (providerId: string) => Promise<ApiKeyEntry[]>;
|
|
25
33
|
/** Function type for disabling a key in the database (on auth failure) */
|
|
@@ -111,6 +119,14 @@ declare class ApiKeyPoolService {
|
|
|
111
119
|
* Check if a provider has any keys in the pool.
|
|
112
120
|
*/
|
|
113
121
|
hasKeys(providerId: string): Promise<boolean>;
|
|
122
|
+
/** Secret-free strict preflight for a named provider key. */
|
|
123
|
+
hasUsableKey(providerId: string, keyId: string): Promise<boolean>;
|
|
124
|
+
/** Secret-free existence/availability split for strict Route Lease targets. */
|
|
125
|
+
getKeyAvailability(providerId: string, keyId: string): Promise<'usable' | 'unavailable' | 'not-found'>;
|
|
126
|
+
/** Secret-free preflight for at least one enabled, non-cooling pool key. */
|
|
127
|
+
hasUsableKeys(providerId: string): Promise<boolean>;
|
|
128
|
+
/** Preserve pool exhaustion and its earliest safe retry horizon for Route Lease. */
|
|
129
|
+
getPoolAvailability(providerId: string): Promise<ProviderKeyPoolAvailability>;
|
|
114
130
|
/**
|
|
115
131
|
* Get the live (in-memory) rate-limit cooldown health for a provider's keys.
|
|
116
132
|
*
|
|
@@ -153,4 +169,4 @@ declare class ApiKeyPoolService {
|
|
|
153
169
|
private cleanupExpiredCooldowns;
|
|
154
170
|
}
|
|
155
171
|
|
|
156
|
-
export { type ApiKeyAutoDisabler, type ApiKeyDisabler, ApiKeyPoolService, type ApiKeyResolver, type ApiKeysLoader, type KeyHealthEntry, type KeyHealthMap };
|
|
172
|
+
export { type ApiKeyAutoDisabler, type ApiKeyDisabler, ApiKeyPoolService, type ApiKeyResolver, type ApiKeysLoader, type KeyHealthEntry, type KeyHealthMap, type ProviderKeyPoolAvailability };
|
|
@@ -172,6 +172,37 @@ var ApiKeyPoolService = class {
|
|
|
172
172
|
const keys = await this.getAllKeys(providerId);
|
|
173
173
|
return keys.length > 0;
|
|
174
174
|
}
|
|
175
|
+
/** Secret-free strict preflight for a named provider key. */
|
|
176
|
+
async hasUsableKey(providerId, keyId) {
|
|
177
|
+
const keys = await this.getAvailableKeys(providerId);
|
|
178
|
+
return keys.some((key) => key.id === keyId);
|
|
179
|
+
}
|
|
180
|
+
/** Secret-free existence/availability split for strict Route Lease targets. */
|
|
181
|
+
async getKeyAvailability(providerId, keyId) {
|
|
182
|
+
const all = await this.getAllKeys(providerId);
|
|
183
|
+
if (!all.some((key) => key.id === keyId)) return "not-found";
|
|
184
|
+
return (await this.getAvailableKeys(providerId)).some((key) => key.id === keyId) ? "usable" : "unavailable";
|
|
185
|
+
}
|
|
186
|
+
/** Secret-free preflight for at least one enabled, non-cooling pool key. */
|
|
187
|
+
async hasUsableKeys(providerId) {
|
|
188
|
+
return (await this.getAvailableKeys(providerId)).length > 0;
|
|
189
|
+
}
|
|
190
|
+
/** Preserve pool exhaustion and its earliest safe retry horizon for Route Lease. */
|
|
191
|
+
async getPoolAvailability(providerId) {
|
|
192
|
+
const all = await this.getAllKeys(providerId);
|
|
193
|
+
if (all.length === 0) return { outcome: "empty" };
|
|
194
|
+
if ((await this.getAvailableKeys(providerId)).length > 0) return { outcome: "usable" };
|
|
195
|
+
const now = Date.now();
|
|
196
|
+
const coolingUntil = all.filter((key) => key.enabled).map((key) => this.cooldowns.get(key.id)?.until ?? 0).filter((until) => until > now);
|
|
197
|
+
if (coolingUntil.length > 0) {
|
|
198
|
+
const earliest = Math.min(...coolingUntil);
|
|
199
|
+
return {
|
|
200
|
+
outcome: "exhausted",
|
|
201
|
+
retryAfterSeconds: Math.max(1, Math.min(3600, Math.ceil((earliest - now) / 1e3)))
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
return { outcome: "unavailable" };
|
|
205
|
+
}
|
|
175
206
|
/**
|
|
176
207
|
* Get the live (in-memory) rate-limit cooldown health for a provider's keys.
|
|
177
208
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk26K6T2YScjs = require('../chunk-26K6T2YS.cjs');
|
|
4
4
|
require('../chunk-HQP3K7PU.cjs');
|
|
5
5
|
require('../chunk-FZ46M34D.cjs');
|
|
6
6
|
require('../chunk-2Z4XM3H5.cjs');
|
|
@@ -11,7 +11,7 @@ require('../chunk-5RSZYQJH.cjs');
|
|
|
11
11
|
require('../chunk-OF3BECU2.cjs');
|
|
12
12
|
require('../chunk-EYZYXJTJ.cjs');
|
|
13
13
|
require('../chunk-2E42SAW3.cjs');
|
|
14
|
-
require('../chunk-
|
|
14
|
+
require('../chunk-EPN67EGP.cjs');
|
|
15
15
|
require('../chunk-IIRPUVPH.cjs');
|
|
16
16
|
require('../chunk-GBHYAGX3.cjs');
|
|
17
17
|
require('../chunk-3OPYJG76.cjs');
|
|
@@ -55,4 +55,4 @@ require('../chunk-GMMT7RVN.cjs');
|
|
|
55
55
|
require('../chunk-UNEFIWXI.cjs');
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
exports.CompletionService =
|
|
58
|
+
exports.CompletionService = _chunk26K6T2YScjs.CompletionService;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CompletionService
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-QYC54PMG.js";
|
|
4
4
|
import "../chunk-VVEHS2LI.js";
|
|
5
5
|
import "../chunk-46RLHI7D.js";
|
|
6
6
|
import "../chunk-MYYR3HZL.js";
|
|
@@ -11,7 +11,7 @@ import "../chunk-FU7EAR73.js";
|
|
|
11
11
|
import "../chunk-LB6EBS6Y.js";
|
|
12
12
|
import "../chunk-7VU7V2E4.js";
|
|
13
13
|
import "../chunk-FXR6N3SR.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-UAPBLNN2.js";
|
|
15
15
|
import "../chunk-WNKWAEUR.js";
|
|
16
16
|
import "../chunk-MZNPGW5Q.js";
|
|
17
17
|
import "../chunk-DK4A7DLE.js";
|
package/dist/completion.cjs
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk26K6T2YScjs = require('./chunk-26K6T2YS.cjs');
|
|
13
13
|
require('./chunk-HQP3K7PU.cjs');
|
|
14
14
|
require('./chunk-FZ46M34D.cjs');
|
|
15
15
|
require('./chunk-2Z4XM3H5.cjs');
|
|
@@ -20,7 +20,7 @@ require('./chunk-5RSZYQJH.cjs');
|
|
|
20
20
|
require('./chunk-OF3BECU2.cjs');
|
|
21
21
|
require('./chunk-EYZYXJTJ.cjs');
|
|
22
22
|
require('./chunk-2E42SAW3.cjs');
|
|
23
|
-
require('./chunk-
|
|
23
|
+
require('./chunk-EPN67EGP.cjs');
|
|
24
24
|
require('./chunk-IIRPUVPH.cjs');
|
|
25
25
|
require('./chunk-GBHYAGX3.cjs');
|
|
26
26
|
require('./chunk-3OPYJG76.cjs');
|
|
@@ -110,4 +110,4 @@ require('./chunk-UNEFIWXI.cjs');
|
|
|
110
110
|
|
|
111
111
|
|
|
112
112
|
|
|
113
|
-
exports.BuiltinToolExecutor = _chunkNZYN7C3Pcjs.BuiltinToolExecutor; exports.CompletionService =
|
|
113
|
+
exports.BuiltinToolExecutor = _chunkNZYN7C3Pcjs.BuiltinToolExecutor; exports.CompletionService = _chunk26K6T2YScjs.CompletionService; exports.NATIVE_SEARCH_TOOL_NAMES = _chunkGMMT7RVNcjs.NATIVE_SEARCH_TOOL_NAMES; exports.addOpenRouterProviderToRequest = _chunk26K6T2YScjs.addOpenRouterProviderToRequest; exports.applyAugmentation = _chunkJMJBSACDcjs.applyAugmentation; exports.attachStreamEventBuffer = _chunk26K6T2YScjs.attach; exports.buildAnthropicApiUrl = _chunkA2YMUCBTcjs.buildAnthropicApiUrl; exports.buildAzureOpenAIApiUrl = _chunkA2YMUCBTcjs.buildAzureOpenAIApiUrl; exports.buildGeminiApiUrl = _chunkA2YMUCBTcjs.buildGeminiApiUrl; exports.buildNativeSearchAugmentation = _chunkJMJBSACDcjs.buildNativeSearchAugmentation; exports.buildOpenAIApiUrl = _chunkA2YMUCBTcjs.buildOpenAIApiUrl; exports.buildOpenAIResponseApiUrl = _chunkA2YMUCBTcjs.buildOpenAIResponseApiUrl; exports.buildProviderApiUrl = _chunkA2YMUCBTcjs.buildProviderApiUrl; exports.convertMessageToAnthropic = _chunk26K6T2YScjs.convertMessageToAnthropic; exports.convertMessageToGemini = _chunk26K6T2YScjs.convertMessageToGemini; exports.convertMessageToOpenAI = _chunk26K6T2YScjs.convertMessageToOpenAI; exports.detectNativeSearch = _chunkJMJBSACDcjs.detectNativeSearch; exports.emitStreamEvent = _chunk26K6T2YScjs.emit; exports.getBuiltinSearchTools = _chunkNZYN7C3Pcjs.getBuiltinSearchTools; exports.getOpenRouterProviderConfig = _chunk26K6T2YScjs.getOpenRouterProviderConfig; exports.getProviderHeaders = _chunkQ27JY5RGcjs.getProviderHeaders; exports.normalizeAzureEndpoint = _chunkA2YMUCBTcjs.normalizeAzureEndpoint; exports.registerStreamEventBuffer = _chunk26K6T2YScjs.register; exports.releaseStreamEventBuffer = _chunk26K6T2YScjs.release; exports.resolveApiFormat = _chunkA2YMUCBTcjs.resolveApiFormat; exports.resolveProviderEndpoint = _chunkA2YMUCBTcjs.resolveProviderEndpoint;
|
package/dist/completion.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
getOpenRouterProviderConfig,
|
|
10
10
|
register,
|
|
11
11
|
release
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QYC54PMG.js";
|
|
13
13
|
import "./chunk-VVEHS2LI.js";
|
|
14
14
|
import "./chunk-46RLHI7D.js";
|
|
15
15
|
import "./chunk-MYYR3HZL.js";
|
|
@@ -20,7 +20,7 @@ import "./chunk-FU7EAR73.js";
|
|
|
20
20
|
import "./chunk-LB6EBS6Y.js";
|
|
21
21
|
import "./chunk-7VU7V2E4.js";
|
|
22
22
|
import "./chunk-FXR6N3SR.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-UAPBLNN2.js";
|
|
24
24
|
import "./chunk-WNKWAEUR.js";
|
|
25
25
|
import "./chunk-MZNPGW5Q.js";
|
|
26
26
|
import "./chunk-DK4A7DLE.js";
|
package/dist/index.cjs
CHANGED
|
@@ -79,7 +79,35 @@
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
var _chunk26K6T2YScjs = require('./chunk-26K6T2YS.cjs');
|
|
83
111
|
|
|
84
112
|
|
|
85
113
|
|
|
@@ -99,7 +127,7 @@ require('./chunk-EYZYXJTJ.cjs');
|
|
|
99
127
|
var _chunk2E42SAW3cjs = require('./chunk-2E42SAW3.cjs');
|
|
100
128
|
|
|
101
129
|
|
|
102
|
-
var
|
|
130
|
+
var _chunkEPN67EGPcjs = require('./chunk-EPN67EGP.cjs');
|
|
103
131
|
|
|
104
132
|
|
|
105
133
|
var _chunkIIRPUVPHcjs = require('./chunk-IIRPUVPH.cjs');
|
|
@@ -353,4 +381,32 @@ var _chunkUNEFIWXIcjs = require('./chunk-UNEFIWXI.cjs');
|
|
|
353
381
|
|
|
354
382
|
|
|
355
383
|
|
|
356
|
-
exports.AUDIT_REDACTED = _chunkFCR77GYMcjs.AUDIT_REDACTED; exports.BoundAccountSelectionError = _chunk25GXJCEZcjs.BoundAccountSelectionError; exports.BuiltinToolExecutor = _chunkNZYN7C3Pcjs.BuiltinToolExecutor; exports.CompletionService = _chunk4BB343BIcjs.CompletionService; exports.ConcurrencyQueueFullError = _chunk4BB343BIcjs.ConcurrencyQueueFullError; exports.ConcurrencyWaitCancelledError = _chunk4BB343BIcjs.ConcurrencyWaitCancelledError; exports.ConcurrencyWaitTimeoutError = _chunk4BB343BIcjs.ConcurrencyWaitTimeoutError; exports.DEFAULT_ACCOUNT_PROBE = _chunk4BB343BIcjs.DEFAULT_ACCOUNT_PROBE; exports.DEFAULT_ALLOWANCE_SCHEDULING = _chunk4BB343BIcjs.DEFAULT_ALLOWANCE_SCHEDULING; exports.DEFAULT_CONCURRENCY_QUEUE = _chunk4BB343BIcjs.DEFAULT_CONCURRENCY_QUEUE; exports.DEFAULT_FINGERPRINT = _chunk4BB343BIcjs.DEFAULT_FINGERPRINT; exports.DEFAULT_OUTBOUND_PORT = _chunk4BB343BIcjs.DEFAULT_OUTBOUND_PORT; exports.DEFAULT_ROUTE_IDLE_MS = _chunk4BB343BIcjs.DEFAULT_ROUTE_IDLE_MS; exports.DEFAULT_USER_MESSAGE_QUEUE = _chunk4BB343BIcjs.DEFAULT_USER_MESSAGE_QUEUE; exports.ENDPOINT_MODEL_KINDS = _chunk4IH4EL7Mcjs.ENDPOINT_MODEL_KINDS; exports.KeySpendTracker = _chunk4BB343BIcjs.KeySpendTracker; exports.KeyedMutex = _chunk4BB343BIcjs.KeyedMutex; exports.NATIVE_SEARCH_TOOL_NAMES = _chunkGMMT7RVNcjs.NATIVE_SEARCH_TOOL_NAMES; exports.OPENROUTER_APP_HEADERS = _chunkUNEFIWXIcjs.OPENROUTER_APP_HEADERS; exports.OUTBOUND_API_SERVER_CONFIG_KEY = _chunk4BB343BIcjs.OUTBOUND_API_SERVER_CONFIG_KEY; exports.OutboundApiServer = _chunk4BB343BIcjs.OutboundApiServer; exports.OutboundConcurrencyGate = _chunk4BB343BIcjs.OutboundConcurrencyGate; exports.OutboundRateLimiter = _chunk4BB343BIcjs.OutboundRateLimiter; exports.PricingEngine = _chunk2E42SAW3cjs.PricingEngine; exports.ProviderProxy = _chunk4BB343BIcjs.ProviderProxy; exports.ProviderProxyRouteMap = _chunk4BB343BIcjs.ProviderProxyRouteMap; exports.SUBSCRIPTION_PROVIDER_IDS = _chunk4VZX5F4Tcjs.SUBSCRIPTION_PROVIDER_IDS; exports.SerialQueueTimeoutError = _chunk4BB343BIcjs.SerialQueueTimeoutError; exports.TransformerChainExecutor = _chunkIIRPUVPHcjs.TransformerChainExecutor; exports.TransformerService = _chunk3OPYJG76cjs.TransformerService; exports.UsageRecorder = _chunkOJGQKHN5cjs.UsageRecorder; exports.UserMessageSerialQueue = _chunk4BB343BIcjs.UserMessageSerialQueue; exports.__resetOutboundApiServerForTests = _chunk4BB343BIcjs.__resetOutboundApiServerForTests; exports.__resetProviderProxyForTests = _chunk4BB343BIcjs.__resetProviderProxyForTests; exports.addOpenRouterProviderToRequest = _chunk4BB343BIcjs.addOpenRouterProviderToRequest; exports.applyAugmentation = _chunkJMJBSACDcjs.applyAugmentation; exports.attachStreamEventBuffer = _chunk4BB343BIcjs.attach; exports.beginAuditCapture = _chunkXPIOJQS2cjs.beginAuditCapture; exports.beginBillingCapture = _chunkAPYG5QD7cjs.beginBillingCapture; exports.boundAccountSelectionMessage = _chunk25GXJCEZcjs.boundAccountSelectionMessage; exports.buildAnthropicApiUrl = _chunkA2YMUCBTcjs.buildAnthropicApiUrl; exports.buildAzureOpenAIApiUrl = _chunkA2YMUCBTcjs.buildAzureOpenAIApiUrl; exports.buildGeminiApiUrl = _chunkA2YMUCBTcjs.buildGeminiApiUrl; exports.buildNativeSearchAugmentation = _chunkJMJBSACDcjs.buildNativeSearchAugmentation; exports.buildOpenAIApiUrl = _chunkA2YMUCBTcjs.buildOpenAIApiUrl; exports.buildOpenAIResponseApiUrl = _chunkA2YMUCBTcjs.buildOpenAIResponseApiUrl; exports.buildProviderApiUrl = _chunkA2YMUCBTcjs.buildProviderApiUrl; exports.candidateBackgroundModelIds = _chunk4BB343BIcjs.candidateBackgroundModelIds; exports.candidateGatewayBindings = _chunk4BB343BIcjs.candidateGatewayBindings; exports.checkKeyQuota = _chunk4BB343BIcjs.checkKeyQuota; exports.classifyModelPrefix = _chunk4VZX5F4Tcjs.classifyModelPrefix; exports.computeKeyExpiry = _chunk4BB343BIcjs.computeKeyExpiry; exports.computeVoucherGrant = _chunk4BB343BIcjs.computeVoucherGrant; exports.convertAnthropicRequestToOpenAI = _chunkGDIXXKF2cjs.convertAnthropicRequestToOpenAI; exports.convertAnthropicStreamToOpenAI = _chunkGDIXXKF2cjs.convertAnthropicStreamToOpenAI; exports.convertAnthropicToOpenAI = _chunkGDIXXKF2cjs.convertAnthropicToOpenAI; exports.convertAnthropicToOpenAIWithThinking = _chunkGDIXXKF2cjs.convertAnthropicToOpenAIWithThinking; exports.convertMessageToAnthropic = _chunk4BB343BIcjs.convertMessageToAnthropic; exports.convertMessageToGemini = _chunk4BB343BIcjs.convertMessageToGemini; exports.convertMessageToOpenAI = _chunk4BB343BIcjs.convertMessageToOpenAI; exports.convertOpenAIResponseToAnthropic = _chunkGDIXXKF2cjs.convertOpenAIResponseToAnthropic; exports.convertOpenAIStreamToAnthropic = _chunkGDIXXKF2cjs.convertOpenAIStreamToAnthropic; exports.convertOpenAIToAnthropic = _chunkGDIXXKF2cjs.convertOpenAIToAnthropic; exports.convertOpenAIToAnthropicWithThinking = _chunkGDIXXKF2cjs.convertOpenAIToAnthropicWithThinking; exports.createIntegrationKey = _chunk4BB343BIcjs.createIntegrationKey; exports.createNamedKey = _chunk4BB343BIcjs.createNamedKey; exports.createSSEParser = _chunkHQP3K7PUcjs.createSSEParser; exports.defaultServerConfig = _chunk4BB343BIcjs.defaultServerConfig; exports.detectModelKind = _chunk4VZX5F4Tcjs.detectModelKind; exports.detectNativeSearch = _chunkJMJBSACDcjs.detectNativeSearch; exports.detectRequestRole = _chunk4VZX5F4Tcjs.detectRequestRole; exports.emitStreamEvent = _chunk4BB343BIcjs.emit; exports.endpointSupportsSubscription = _chunk4VZX5F4Tcjs.endpointSupportsSubscription; exports.endpointToIngressFormat = _chunk4VZX5F4Tcjs.endpointToIngressFormat; exports.extractRouteToken = _chunk4BB343BIcjs.extractRouteToken; exports.formatUrls = _chunk4BB343BIcjs.formatUrls; exports.gatewayBindingToEndpointConfig = _chunk4BB343BIcjs.gatewayBindingToEndpointConfig; exports.generateVoucherCode = _chunk4BB343BIcjs.generateVoucherCode; exports.getBuiltinSearchTools = _chunkNZYN7C3Pcjs.getBuiltinSearchTools; exports.getOpenRouterAppIdentity = _chunkUNEFIWXIcjs.getOpenRouterAppIdentity; exports.getOpenRouterProviderConfig = _chunk4BB343BIcjs.getOpenRouterProviderConfig; exports.getOutboundApiServer = _chunk4BB343BIcjs.getOutboundApiServer; exports.getProviderHeaders = _chunkQ27JY5RGcjs.getProviderHeaders; exports.getProviderProxy = _chunk4BB343BIcjs.getProviderProxy; exports.handleVoucherRedeem = _chunk4BB343BIcjs.handleVoucherRedeem; exports.hasImageContent = _chunkGDIXXKF2cjs.hasImageContent; exports.hasThinkingEnabled = _chunkGDIXXKF2cjs.hasThinkingEnabled; exports.hashKey = _chunk4BB343BIcjs.hashKey; exports.hashVoucherCode = _chunk4BB343BIcjs.hashVoucherCode; exports.isBoundAccountSelectionError = _chunk25GXJCEZcjs.isBoundAccountSelectionError; exports.isConcurrencyRejection = _chunk4BB343BIcjs.isConcurrencyRejection; exports.isKindMappedEndpoint = _chunk4VZX5F4Tcjs.isKindMappedEndpoint; exports.isOpenRouterProvider = _chunkUNEFIWXIcjs.isOpenRouterProvider; exports.isRedeemRequest = _chunk4BB343BIcjs.isRedeemRequest; exports.isSerialQueueTimeout = _chunk4BB343BIcjs.isSerialQueueTimeout; exports.isSubscriptionProviderId = _chunk4VZX5F4Tcjs.isSubscriptionProviderId; exports.isUserMessageRequest = _chunk4BB343BIcjs.isUserMessageRequest; exports.legacyEndpointsToBindings = _chunk4BB343BIcjs.legacyEndpointsToBindings; exports.loadServerConfig = _chunk4BB343BIcjs.loadServerConfig; exports.mergeServerConfig = _chunk4BB343BIcjs.mergeServerConfig; exports.modelKindsForEndpoint = _chunk4VZX5F4Tcjs.modelKindsForEndpoint; exports.newVoucherId = _chunk4BB343BIcjs.newVoucherId; exports.normalizeAccountProbe = _chunk4BB343BIcjs.normalizeAccountProbe; exports.normalizeAllowanceScheduling = _chunk4BB343BIcjs.normalizeAllowanceScheduling; exports.normalizeAudit = _chunk4BB343BIcjs.normalizeAudit; exports.normalizeAzureEndpoint = _chunkA2YMUCBTcjs.normalizeAzureEndpoint; exports.normalizeBilling = _chunk4BB343BIcjs.normalizeBilling; exports.normalizeFingerprint = _chunk4BB343BIcjs.normalizeFingerprint; exports.normalizeGatewayBindings = _chunk4BB343BIcjs.normalizeGatewayBindings; exports.normalizePrefixTargets = _chunk4BB343BIcjs.normalizePrefixTargets; exports.normalizeProxyConfig = _chunk4BB343BIcjs.normalizeProxyConfig; exports.normalizeProxySegment = _chunk4BB343BIcjs.normalizeProxySegment; exports.normalizeQueueSegments = _chunk4BB343BIcjs.normalizeQueueSegments; exports.normalizeServerConfig = _chunk4BB343BIcjs.normalizeServerConfig; exports.normalizeVoucher = _chunk4BB343BIcjs.normalizeVoucher; exports.normalizeWebhookDestination = _chunk4BB343BIcjs.normalizeWebhookDestination; exports.normalizeWebhookSegment = _chunk4BB343BIcjs.normalizeWebhookSegment; exports.parseModelRef = _chunk4VZX5F4Tcjs.parseModelRef; exports.pickModelRefFromList = _chunk4VZX5F4Tcjs.pickModelRefFromList; exports.randomBase62 = _chunk4BB343BIcjs.randomBase62; exports.redactAuditText = _chunkFCR77GYMcjs.redactAuditText; exports.registerBuiltinTransformers = _chunk2Z4XM3H5cjs.registerBuiltinTransformers; exports.registerStreamEventBuffer = _chunk4BB343BIcjs.register; exports.releaseStreamEventBuffer = _chunk4BB343BIcjs.release; exports.resolveApiFormat = _chunkA2YMUCBTcjs.resolveApiFormat; exports.resolveGatewayBinding = _chunk4BB343BIcjs.resolveGatewayBinding; exports.resolvePrefixTarget = _chunk4VZX5F4Tcjs.resolvePrefixTarget; exports.resolveProviderEndpoint = _chunkA2YMUCBTcjs.resolveProviderEndpoint; exports.resolveRoute = _chunk4VZX5F4Tcjs.resolveRoute; exports.saveServerConfig = _chunk4BB343BIcjs.saveServerConfig; exports.serializeError = _chunkSVNDB62Dcjs.serializeError; exports.setOpenRouterAppIdentity = _chunkUNEFIWXIcjs.setOpenRouterAppIdentity; exports.startOfLocalDay = _chunk4BB343BIcjs.startOfLocalDay; exports.startOfLocalWeek = _chunk4BB343BIcjs.startOfLocalWeek; exports.streamSSEResponse = _chunkHQP3K7PUcjs.streamSSEResponse; exports.toVoucherInfo = _chunk4BB343BIcjs.toVoucherInfo; exports.validateEndpointModelConfig = _chunk4VZX5F4Tcjs.validateEndpointModelConfig; exports.verifyKey = _chunk4BB343BIcjs.verifyKey; exports.verifyPresentedKey = _chunk4BB343BIcjs.verifyPresentedKey; exports.voucherCodePrefix = _chunk4BB343BIcjs.voucherCodePrefix;
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
exports.AUDIT_REDACTED = _chunkFCR77GYMcjs.AUDIT_REDACTED; exports.BoundAccountSelectionError = _chunk25GXJCEZcjs.BoundAccountSelectionError; exports.BuiltinToolExecutor = _chunkNZYN7C3Pcjs.BuiltinToolExecutor; exports.CompletionService = _chunk26K6T2YScjs.CompletionService; exports.ConcurrencyQueueFullError = _chunk26K6T2YScjs.ConcurrencyQueueFullError; exports.ConcurrencyWaitCancelledError = _chunk26K6T2YScjs.ConcurrencyWaitCancelledError; exports.ConcurrencyWaitTimeoutError = _chunk26K6T2YScjs.ConcurrencyWaitTimeoutError; exports.DEFAULT_ACCOUNT_PROBE = _chunk26K6T2YScjs.DEFAULT_ACCOUNT_PROBE; exports.DEFAULT_ALLOWANCE_SCHEDULING = _chunk26K6T2YScjs.DEFAULT_ALLOWANCE_SCHEDULING; exports.DEFAULT_CONCURRENCY_QUEUE = _chunk26K6T2YScjs.DEFAULT_CONCURRENCY_QUEUE; exports.DEFAULT_FINGERPRINT = _chunk26K6T2YScjs.DEFAULT_FINGERPRINT; exports.DEFAULT_OUTBOUND_PORT = _chunk26K6T2YScjs.DEFAULT_OUTBOUND_PORT; exports.DEFAULT_ROUTE_IDLE_MS = _chunk26K6T2YScjs.DEFAULT_ROUTE_IDLE_MS; exports.DEFAULT_USER_MESSAGE_QUEUE = _chunk26K6T2YScjs.DEFAULT_USER_MESSAGE_QUEUE; exports.ENDPOINT_MODEL_KINDS = _chunk4IH4EL7Mcjs.ENDPOINT_MODEL_KINDS; exports.KeySpendTracker = _chunk26K6T2YScjs.KeySpendTracker; exports.KeyedMutex = _chunk26K6T2YScjs.KeyedMutex; exports.NATIVE_SEARCH_TOOL_NAMES = _chunkGMMT7RVNcjs.NATIVE_SEARCH_TOOL_NAMES; exports.OPENROUTER_APP_HEADERS = _chunkUNEFIWXIcjs.OPENROUTER_APP_HEADERS; exports.OUTBOUND_API_SERVER_CONFIG_KEY = _chunk26K6T2YScjs.OUTBOUND_API_SERVER_CONFIG_KEY; exports.OutboundApiServer = _chunk26K6T2YScjs.OutboundApiServer; exports.OutboundConcurrencyGate = _chunk26K6T2YScjs.OutboundConcurrencyGate; exports.OutboundRateLimiter = _chunk26K6T2YScjs.OutboundRateLimiter; exports.PricingEngine = _chunk2E42SAW3cjs.PricingEngine; exports.ProviderProxy = _chunk26K6T2YScjs.ProviderProxy; exports.ProviderProxyRouteMap = _chunk26K6T2YScjs.ProviderProxyRouteMap; exports.ROUTE_LEASE_API_VERSION = _chunk26K6T2YScjs.ROUTE_LEASE_API_VERSION; exports.ROUTE_LEASE_CAPABILITIES = _chunk26K6T2YScjs.ROUTE_LEASE_CAPABILITIES; exports.ROUTE_LEASE_CAPABILITIES_SCHEMA = _chunk26K6T2YScjs.ROUTE_LEASE_CAPABILITIES_SCHEMA; exports.ROUTE_LEASE_CODEX_TOKEN_ENV = _chunk26K6T2YScjs.ROUTE_LEASE_CODEX_TOKEN_ENV; exports.ROUTE_LEASE_DEFAULT_TTL_SECONDS = _chunk26K6T2YScjs.ROUTE_LEASE_DEFAULT_TTL_SECONDS; exports.ROUTE_LEASE_MAX_CONSUMER_BYTES = _chunk26K6T2YScjs.ROUTE_LEASE_MAX_CONSUMER_BYTES; exports.ROUTE_LEASE_MAX_EXECUTION_ID_BYTES = _chunk26K6T2YScjs.ROUTE_LEASE_MAX_EXECUTION_ID_BYTES; exports.ROUTE_LEASE_MAX_IDEMPOTENCY_BYTES = _chunk26K6T2YScjs.ROUTE_LEASE_MAX_IDEMPOTENCY_BYTES; exports.ROUTE_LEASE_MAX_MODEL_BYTES = _chunk26K6T2YScjs.ROUTE_LEASE_MAX_MODEL_BYTES; exports.ROUTE_LEASE_MAX_SESSION_ID_BYTES = _chunk26K6T2YScjs.ROUTE_LEASE_MAX_SESSION_ID_BYTES; exports.ROUTE_LEASE_MAX_TTL_SECONDS = _chunk26K6T2YScjs.ROUTE_LEASE_MAX_TTL_SECONDS; exports.ROUTE_LEASE_REQUEST_SCHEMA = _chunk26K6T2YScjs.ROUTE_LEASE_REQUEST_SCHEMA; exports.ROUTE_LEASE_RESULT_SCHEMA = _chunk26K6T2YScjs.ROUTE_LEASE_RESULT_SCHEMA; exports.ROUTE_LEASE_RUNTIMES = _chunk26K6T2YScjs.ROUTE_LEASE_RUNTIMES; exports.ROUTE_LEASE_RUNTIME_TABLE = _chunk26K6T2YScjs.ROUTE_LEASE_RUNTIME_TABLE; exports.ROUTE_LEASE_SESSION_HASH_DOMAIN = _chunk26K6T2YScjs.ROUTE_LEASE_SESSION_HASH_DOMAIN; exports.RouteLeaseError = _chunk26K6T2YScjs.RouteLeaseError; exports.RouteLeaseManager = _chunk26K6T2YScjs.RouteLeaseManager; exports.RouteLeaseTargetResolver = _chunk26K6T2YScjs.RouteLeaseTargetResolver; exports.SUBSCRIPTION_PROVIDER_IDS = _chunk4VZX5F4Tcjs.SUBSCRIPTION_PROVIDER_IDS; exports.SYSTEM_ROUTE_LEASE_CLOCK = _chunk26K6T2YScjs.SYSTEM_ROUTE_LEASE_CLOCK; exports.SerialQueueTimeoutError = _chunk26K6T2YScjs.SerialQueueTimeoutError; exports.TransformerChainExecutor = _chunkIIRPUVPHcjs.TransformerChainExecutor; exports.TransformerService = _chunk3OPYJG76cjs.TransformerService; exports.UsageRecorder = _chunkEPN67EGPcjs.UsageRecorder; exports.UserMessageSerialQueue = _chunk26K6T2YScjs.UserMessageSerialQueue; exports.__resetOutboundApiServerForTests = _chunk26K6T2YScjs.__resetOutboundApiServerForTests; exports.__resetProviderProxyForTests = _chunk26K6T2YScjs.__resetProviderProxyForTests; exports.addOpenRouterProviderToRequest = _chunk26K6T2YScjs.addOpenRouterProviderToRequest; exports.applyAugmentation = _chunkJMJBSACDcjs.applyAugmentation; exports.attachStreamEventBuffer = _chunk26K6T2YScjs.attach; exports.beginAuditCapture = _chunkXPIOJQS2cjs.beginAuditCapture; exports.beginBillingCapture = _chunkAPYG5QD7cjs.beginBillingCapture; exports.boundAccountSelectionMessage = _chunk25GXJCEZcjs.boundAccountSelectionMessage; exports.buildAnthropicApiUrl = _chunkA2YMUCBTcjs.buildAnthropicApiUrl; exports.buildAzureOpenAIApiUrl = _chunkA2YMUCBTcjs.buildAzureOpenAIApiUrl; exports.buildGeminiApiUrl = _chunkA2YMUCBTcjs.buildGeminiApiUrl; exports.buildNativeSearchAugmentation = _chunkJMJBSACDcjs.buildNativeSearchAugmentation; exports.buildOpenAIApiUrl = _chunkA2YMUCBTcjs.buildOpenAIApiUrl; exports.buildOpenAIResponseApiUrl = _chunkA2YMUCBTcjs.buildOpenAIResponseApiUrl; exports.buildProviderApiUrl = _chunkA2YMUCBTcjs.buildProviderApiUrl; exports.candidateBackgroundModelIds = _chunk26K6T2YScjs.candidateBackgroundModelIds; exports.candidateGatewayBindings = _chunk26K6T2YScjs.candidateGatewayBindings; exports.canonicalizeRouteLeasePayload = _chunk26K6T2YScjs.canonicalizeRouteLeasePayload; exports.checkKeyQuota = _chunk26K6T2YScjs.checkKeyQuota; exports.classifyModelPrefix = _chunk4VZX5F4Tcjs.classifyModelPrefix; exports.computeKeyExpiry = _chunk26K6T2YScjs.computeKeyExpiry; exports.computeVoucherGrant = _chunk26K6T2YScjs.computeVoucherGrant; exports.convertAnthropicRequestToOpenAI = _chunkGDIXXKF2cjs.convertAnthropicRequestToOpenAI; exports.convertAnthropicStreamToOpenAI = _chunkGDIXXKF2cjs.convertAnthropicStreamToOpenAI; exports.convertAnthropicToOpenAI = _chunkGDIXXKF2cjs.convertAnthropicToOpenAI; exports.convertAnthropicToOpenAIWithThinking = _chunkGDIXXKF2cjs.convertAnthropicToOpenAIWithThinking; exports.convertMessageToAnthropic = _chunk26K6T2YScjs.convertMessageToAnthropic; exports.convertMessageToGemini = _chunk26K6T2YScjs.convertMessageToGemini; exports.convertMessageToOpenAI = _chunk26K6T2YScjs.convertMessageToOpenAI; exports.convertOpenAIResponseToAnthropic = _chunkGDIXXKF2cjs.convertOpenAIResponseToAnthropic; exports.convertOpenAIStreamToAnthropic = _chunkGDIXXKF2cjs.convertOpenAIStreamToAnthropic; exports.convertOpenAIToAnthropic = _chunkGDIXXKF2cjs.convertOpenAIToAnthropic; exports.convertOpenAIToAnthropicWithThinking = _chunkGDIXXKF2cjs.convertOpenAIToAnthropicWithThinking; exports.createIntegrationKey = _chunk26K6T2YScjs.createIntegrationKey; exports.createNamedKey = _chunk26K6T2YScjs.createNamedKey; exports.createSSEParser = _chunkHQP3K7PUcjs.createSSEParser; exports.defaultServerConfig = _chunk26K6T2YScjs.defaultServerConfig; exports.detectModelKind = _chunk4VZX5F4Tcjs.detectModelKind; exports.detectNativeSearch = _chunkJMJBSACDcjs.detectNativeSearch; exports.detectRequestRole = _chunk4VZX5F4Tcjs.detectRequestRole; exports.emitStreamEvent = _chunk26K6T2YScjs.emit; exports.endpointSupportsSubscription = _chunk4VZX5F4Tcjs.endpointSupportsSubscription; exports.endpointToIngressFormat = _chunk4VZX5F4Tcjs.endpointToIngressFormat; exports.extractRouteToken = _chunk26K6T2YScjs.extractRouteToken; exports.formatUrls = _chunk26K6T2YScjs.formatUrls; exports.gatewayBindingToEndpointConfig = _chunk26K6T2YScjs.gatewayBindingToEndpointConfig; exports.generateVoucherCode = _chunk26K6T2YScjs.generateVoucherCode; exports.getBuiltinSearchTools = _chunkNZYN7C3Pcjs.getBuiltinSearchTools; exports.getOpenRouterAppIdentity = _chunkUNEFIWXIcjs.getOpenRouterAppIdentity; exports.getOpenRouterProviderConfig = _chunk26K6T2YScjs.getOpenRouterProviderConfig; exports.getOutboundApiServer = _chunk26K6T2YScjs.getOutboundApiServer; exports.getProviderHeaders = _chunkQ27JY5RGcjs.getProviderHeaders; exports.getProviderProxy = _chunk26K6T2YScjs.getProviderProxy; exports.handleVoucherRedeem = _chunk26K6T2YScjs.handleVoucherRedeem; exports.hasImageContent = _chunkGDIXXKF2cjs.hasImageContent; exports.hasThinkingEnabled = _chunkGDIXXKF2cjs.hasThinkingEnabled; exports.hashKey = _chunk26K6T2YScjs.hashKey; exports.hashRouteLeasePayload = _chunk26K6T2YScjs.hashRouteLeasePayload; exports.hashRouteLeaseSessionId = _chunk26K6T2YScjs.hashRouteLeaseSessionId; exports.hashVoucherCode = _chunk26K6T2YScjs.hashVoucherCode; exports.isBoundAccountSelectionError = _chunk25GXJCEZcjs.isBoundAccountSelectionError; exports.isConcurrencyRejection = _chunk26K6T2YScjs.isConcurrencyRejection; exports.isKindMappedEndpoint = _chunk4VZX5F4Tcjs.isKindMappedEndpoint; exports.isLoopbackAddress = _chunk26K6T2YScjs.isLoopbackAddress; exports.isOpenRouterProvider = _chunkUNEFIWXIcjs.isOpenRouterProvider; exports.isRedeemRequest = _chunk26K6T2YScjs.isRedeemRequest; exports.isSerialQueueTimeout = _chunk26K6T2YScjs.isSerialQueueTimeout; exports.isSubscriptionProviderId = _chunk4VZX5F4Tcjs.isSubscriptionProviderId; exports.isUserMessageRequest = _chunk26K6T2YScjs.isUserMessageRequest; exports.legacyEndpointsToBindings = _chunk26K6T2YScjs.legacyEndpointsToBindings; exports.loadServerConfig = _chunk26K6T2YScjs.loadServerConfig; exports.mergeServerConfig = _chunk26K6T2YScjs.mergeServerConfig; exports.modelKindsForEndpoint = _chunk4VZX5F4Tcjs.modelKindsForEndpoint; exports.newVoucherId = _chunk26K6T2YScjs.newVoucherId; exports.normalizeAccountProbe = _chunk26K6T2YScjs.normalizeAccountProbe; exports.normalizeAllowanceScheduling = _chunk26K6T2YScjs.normalizeAllowanceScheduling; exports.normalizeAudit = _chunk26K6T2YScjs.normalizeAudit; exports.normalizeAzureEndpoint = _chunkA2YMUCBTcjs.normalizeAzureEndpoint; exports.normalizeBilling = _chunk26K6T2YScjs.normalizeBilling; exports.normalizeFingerprint = _chunk26K6T2YScjs.normalizeFingerprint; exports.normalizeGatewayBindings = _chunk26K6T2YScjs.normalizeGatewayBindings; exports.normalizePrefixTargets = _chunk26K6T2YScjs.normalizePrefixTargets; exports.normalizeProxyConfig = _chunk26K6T2YScjs.normalizeProxyConfig; exports.normalizeProxySegment = _chunk26K6T2YScjs.normalizeProxySegment; exports.normalizeQueueSegments = _chunk26K6T2YScjs.normalizeQueueSegments; exports.normalizeRouteLeaseIdempotencyKey = _chunk26K6T2YScjs.normalizeRouteLeaseIdempotencyKey; exports.normalizeRouteLeaseTtl = _chunk26K6T2YScjs.normalizeRouteLeaseTtl; exports.normalizeServerConfig = _chunk26K6T2YScjs.normalizeServerConfig; exports.normalizeVoucher = _chunk26K6T2YScjs.normalizeVoucher; exports.normalizeWebhookDestination = _chunk26K6T2YScjs.normalizeWebhookDestination; exports.normalizeWebhookSegment = _chunk26K6T2YScjs.normalizeWebhookSegment; exports.parseModelRef = _chunk4VZX5F4Tcjs.parseModelRef; exports.parseRouteLeaseCreate = _chunk26K6T2YScjs.parseRouteLeaseCreate; exports.pickModelRefFromList = _chunk4VZX5F4Tcjs.pickModelRefFromList; exports.randomBase62 = _chunk26K6T2YScjs.randomBase62; exports.redactAuditText = _chunkFCR77GYMcjs.redactAuditText; exports.registerBuiltinTransformers = _chunk2Z4XM3H5cjs.registerBuiltinTransformers; exports.registerStreamEventBuffer = _chunk26K6T2YScjs.register; exports.releaseStreamEventBuffer = _chunk26K6T2YScjs.release; exports.resolveApiFormat = _chunkA2YMUCBTcjs.resolveApiFormat; exports.resolveGatewayBinding = _chunk26K6T2YScjs.resolveGatewayBinding; exports.resolvePrefixTarget = _chunk4VZX5F4Tcjs.resolvePrefixTarget; exports.resolveProviderEndpoint = _chunkA2YMUCBTcjs.resolveProviderEndpoint; exports.resolveRoute = _chunk4VZX5F4Tcjs.resolveRoute; exports.routeLeaseRuntime = _chunk26K6T2YScjs.routeLeaseRuntime; exports.saveServerConfig = _chunk26K6T2YScjs.saveServerConfig; exports.serializeError = _chunkSVNDB62Dcjs.serializeError; exports.setOpenRouterAppIdentity = _chunkUNEFIWXIcjs.setOpenRouterAppIdentity; exports.startOfLocalDay = _chunk26K6T2YScjs.startOfLocalDay; exports.startOfLocalWeek = _chunk26K6T2YScjs.startOfLocalWeek; exports.streamSSEResponse = _chunkHQP3K7PUcjs.streamSSEResponse; exports.toVoucherInfo = _chunk26K6T2YScjs.toVoucherInfo; exports.validateEndpointModelConfig = _chunk4VZX5F4Tcjs.validateEndpointModelConfig; exports.verifyKey = _chunk26K6T2YScjs.verifyKey; exports.verifyPresentedKey = _chunk26K6T2YScjs.verifyPresentedKey; exports.voucherCodePrefix = _chunk26K6T2YScjs.voucherCodePrefix;
|
package/dist/index.d.cts
CHANGED
|
@@ -8,8 +8,8 @@ export { AutomaticPricingSource, PricingStore } from './ports/pricing-store.cjs'
|
|
|
8
8
|
export { ProviderConfigSource } from './ports/provider-config-source.cjs';
|
|
9
9
|
export { UsageEventStore } from './ports/usage-event-store.cjs';
|
|
10
10
|
export { WebSearchBackend } from './ports/web-search-backend.cjs';
|
|
11
|
-
export { AnthropicIngressHandler, AnthropicIngressHandlerFactory, AnthropicRouteHandlerParams, AnthropicSdkHints, ExtendedContextHint, IngressFormat, ProviderProxyDeps, ProxyAttribution, RetryCallback, RouteAuthMode, RouteContext, StreamEventCallback, SubscriptionDispatchProfile, SubscriptionRequestSummary, TargetProviderFormat, UsageRecorderImport, UsageRecorderImport as UsageSink } from './provider-proxy/types.cjs';
|
|
12
|
-
export { A as AccountProbeConfig, a as AllowanceSchedulingConfig, C as ChatDispatchMode, b as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, c as EndpointRoutingConfig, F as FingerprintConfig, G as GatewayBinding, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, g as GatewayBindingTarget, h as GatewayModelMapping, K as KeySpendReader, i as KeySpendSeeder, j as KeySpendTracker, k as KindMappedEndpoint, M as MessagesModelKind, l as ModelKind, m as ModelPrefixTargets, n as OutboundApiDeps, o as OutboundApiKeyCreated, p as OutboundApiKeyInfo, q as OutboundApiServerConfig, r as OutboundApiServerStatus, O as OutboundCredentialStore, s as OutboundEndpoint, t as OutboundFormatUrls, u as OutboundKeyActivationMode, O as OutboundKeyDb, v as OutboundKeyDbRow, w as OutboundKeyPolicy, x as OutboundProxyConfig, R as RequestRole, y as ResponsesModelKind, U as UserMessageQueueConfig, V as VoucherCreateInput, z as VoucherDb, B as computeVoucherGrant, D as generateVoucherCode, H as hashVoucherCode, I as newVoucherId, J as startOfLocalDay, L as startOfLocalWeek, N as toVoucherInfo, P as voucherCodePrefix } from './types-
|
|
11
|
+
export { AnthropicIngressHandler, AnthropicIngressHandlerFactory, AnthropicRouteHandlerParams, AnthropicSdkHints, ExtendedContextHint, IngressFormat, ProviderProxyDeps, ProxyAttribution, RetryCallback, RouteAuthMode, RouteContext, RouteLeaseUsageAttribution, StreamEventCallback, SubscriptionDispatchProfile, SubscriptionRequestSummary, TargetProviderFormat, UsageRecorderImport, UsageRecorderImport as UsageSink } from './provider-proxy/types.cjs';
|
|
12
|
+
export { A as AccountProbeConfig, a as AllowanceSchedulingConfig, C as ChatDispatchMode, b as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, c as EndpointRoutingConfig, F as FingerprintConfig, G as GatewayBinding, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, g as GatewayBindingTarget, h as GatewayModelMapping, K as KeySpendReader, i as KeySpendSeeder, j as KeySpendTracker, k as KindMappedEndpoint, M as MessagesModelKind, l as ModelKind, m as ModelPrefixTargets, n as OutboundApiDeps, o as OutboundApiKeyCreated, p as OutboundApiKeyInfo, q as OutboundApiServerConfig, r as OutboundApiServerStatus, O as OutboundCredentialStore, s as OutboundEndpoint, t as OutboundFormatUrls, u as OutboundKeyActivationMode, O as OutboundKeyDb, v as OutboundKeyDbRow, w as OutboundKeyPolicy, x as OutboundProxyConfig, R as RequestRole, y as ResponsesModelKind, U as UserMessageQueueConfig, V as VoucherCreateInput, z as VoucherDb, B as computeVoucherGrant, D as generateVoucherCode, H as hashVoucherCode, I as newVoucherId, J as startOfLocalDay, L as startOfLocalWeek, N as toVoucherInfo, P as voucherCodePrefix } from './types-C2MwkLah.cjs';
|
|
13
13
|
export { CostCalculation, PricingEngine, PricingEngineOptions } from './usage/pricing-engine.cjs';
|
|
14
14
|
export { UsageRecordInput, UsageRecorder, UsageRecorderOptions } from './usage/usage-recorder.cjs';
|
|
15
15
|
export { A as ApiFormat, C as CompletionOptions, a as CompletionResult, N as NATIVE_SEARCH_TOOL_NAMES, b as NativeSearchAugmentation, c as NativeSearchDetectionResult, d as NativeSearchProvider, e as NativeSearchUserConfig, S as StreamCallbacks } from './types-BScIHmPr.cjs';
|
|
@@ -17,7 +17,7 @@ export { C as CompletionService, V as VisionFallbackProvider } from './Completio
|
|
|
17
17
|
export { SimpleChatGeminiMessage, SimpleChatGeminiPart, StreamEvent, StreamEventType, StreamSender, addOpenRouterProviderToRequest, attachStreamEventBuffer, convertMessageToAnthropic, convertMessageToGemini, convertMessageToOpenAI, emitStreamEvent, getOpenRouterProviderConfig, getProviderHeaders, registerStreamEventBuffer, releaseStreamEventBuffer } from './completion.cjs';
|
|
18
18
|
export { buildAnthropicApiUrl, buildAzureOpenAIApiUrl, buildGeminiApiUrl, buildOpenAIApiUrl, buildOpenAIResponseApiUrl, buildProviderApiUrl, normalizeAzureEndpoint, resolveApiFormat, resolveProviderEndpoint } from './completion/url-builder.cjs';
|
|
19
19
|
export { applyAugmentation, buildNativeSearchAugmentation, detectNativeSearch } from './completion/NativeSearchInjector.cjs';
|
|
20
|
-
export { __resetProviderProxyForTests, extractRouteToken, getProviderProxy } from './provider-proxy.cjs';
|
|
20
|
+
export { NormalizedRouteLeaseCreate, NormalizedRouteLeaseRequest, ROUTE_LEASE_API_VERSION, ROUTE_LEASE_CAPABILITIES, ROUTE_LEASE_CAPABILITIES_SCHEMA, ROUTE_LEASE_CODEX_TOKEN_ENV, ROUTE_LEASE_DEFAULT_TTL_SECONDS, ROUTE_LEASE_MAX_CONSUMER_BYTES, ROUTE_LEASE_MAX_EXECUTION_ID_BYTES, ROUTE_LEASE_MAX_IDEMPOTENCY_BYTES, ROUTE_LEASE_MAX_MODEL_BYTES, ROUTE_LEASE_MAX_SESSION_ID_BYTES, ROUTE_LEASE_MAX_TTL_SECONDS, ROUTE_LEASE_REQUEST_SCHEMA, ROUTE_LEASE_RESULT_SCHEMA, ROUTE_LEASE_RUNTIMES, ROUTE_LEASE_RUNTIME_TABLE, ROUTE_LEASE_SESSION_HASH_DOMAIN, RouteLeaseCapabilities, RouteLeaseClock, RouteLeaseCreateOutcome, RouteLeaseCreateResult, RouteLeaseDescriptorPort, RouteLeaseError, RouteLeaseErrorCode, RouteLeaseExecutionMetadata, RouteLeaseExecutionRequest, RouteLeaseLogger, RouteLeaseManager, RouteLeaseManagerOptions, RouteLeaseMetadata, RouteLeaseProviderKeyPreflight, RouteLeaseReleaseResult, RouteLeaseRenewResult, RouteLeaseRequest, RouteLeaseRoutePort, RouteLeaseRuntime, RouteLeaseStatus, RouteLeaseSubscriptionPreflight, RouteLeaseTargetResolver, RouteLeaseTargetResolverOptions, RouteLeaseTargetResolverPort, RouteLeaseUpstream, RuntimeLaunchDescriptor, SYSTEM_ROUTE_LEASE_CLOCK, __resetProviderProxyForTests, canonicalizeRouteLeasePayload, extractRouteToken, getProviderProxy, hashRouteLeasePayload, hashRouteLeaseSessionId, normalizeRouteLeaseIdempotencyKey, normalizeRouteLeaseTtl, parseRouteLeaseCreate, routeLeaseRuntime } from './provider-proxy.cjs';
|
|
21
21
|
export { ApiServerSettingsStore, ApplyConfigInput, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_ALLOWANCE_SCHEDULING, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE, GateAcquireOptions, GateAcquisition, GateSlot, GateStatusEntry, GatewayBindingResolution, KeyVerification, KeyedMutex, ModelPrefixKind, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiServer, OutboundConcurrencyGate, OutboundRateLimiter, ResolveGatewayBindingInput, SerialAcquireOptions, SerialQueueStatusEntry, SerialQueueTimeoutError, SerialSlot, UserMessageSerialQueue, VerifiedKey, __resetOutboundApiServerForTests, candidateBackgroundModelIds, candidateGatewayBindings, classifyModelPrefix, createIntegrationKey, createNamedKey, defaultServerConfig, detectModelKind, detectRequestRole, endpointToIngressFormat, formatUrls, gatewayBindingToEndpointConfig, getOutboundApiServer, handleVoucherRedeem, hashKey, isConcurrencyRejection, isKindMappedEndpoint, isRedeemRequest, isSerialQueueTimeout, isUserMessageRequest, legacyEndpointsToBindings, loadServerConfig, mergeServerConfig, modelKindsForEndpoint, normalizeAccountProbe, normalizeAllowanceScheduling, normalizeAudit, normalizeBilling, normalizeFingerprint, normalizeGatewayBindings, normalizePrefixTargets, normalizeProxyConfig, normalizeProxySegment, normalizeQueueSegments, normalizeServerConfig, normalizeVoucher, normalizeWebhookDestination, normalizeWebhookSegment, randomBase62, resolveGatewayBinding, resolvePrefixTarget, saveServerConfig, validateEndpointModelConfig, verifyKey, verifyPresentedKey } from './outbound-api.cjs';
|
|
22
22
|
export { convertAnthropicRequestToOpenAI, convertAnthropicStreamToOpenAI, convertAnthropicToOpenAI, convertAnthropicToOpenAIWithThinking, convertOpenAIResponseToAnthropic, convertOpenAIStreamToAnthropic, convertOpenAIToAnthropic, convertOpenAIToAnthropicWithThinking, hasImageContent, hasThinkingEnabled } from './ApiConverter.cjs';
|
|
23
23
|
export { ChainExecutionOptions, TransformerChainExecutor } from './transformer/TransformerChainExecutor.cjs';
|
|
@@ -28,9 +28,9 @@ export { AUDIT_REDACTED, redactAuditText } from './outbound-api/auditRedact.cjs'
|
|
|
28
28
|
export { AuditCaptureContext, beginAuditCapture } from './outbound-api/auditCapture.cjs';
|
|
29
29
|
export { BillingCaptureContext, beginBillingCapture } from './outbound-api/billingCapture.cjs';
|
|
30
30
|
export { BoundAccountFallbackPolicy, BoundAccountSelectionError, BoundAccountSelectionFailureReason, boundAccountSelectionMessage, isBoundAccountSelectionError } from './pipeline/BoundAccountSelectionError.cjs';
|
|
31
|
-
export { D as DEFAULT_ROUTE_IDLE_MS, P as ProviderProxy, a as ProviderProxyRouteMap } from './ProviderProxy-
|
|
31
|
+
export { D as DEFAULT_ROUTE_IDLE_MS, P as ProviderProxy, a as ProviderProxyRouteMap, R as RouteEvictionReason, b as RouteRegistrationOptions, i as isLoopbackAddress } from './ProviderProxy-QdwNV6l1.cjs';
|
|
32
32
|
export { K as KeyCostLimits, a as KeyExpiryInput, b as KeyExpiryResult, c as KeySpend, Q as QuotaDecision, d as checkKeyQuota, e as computeKeyExpiry } from './keyPolicy-zdWTu3CQ.cjs';
|
|
33
|
-
export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-
|
|
33
|
+
export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-CVFE8KKe.cjs';
|
|
34
34
|
import '@omnicross/contracts/message-blocks';
|
|
35
35
|
import '@omnicross/contracts/completion-types';
|
|
36
36
|
import '@omnicross/contracts/mcp-types';
|
package/dist/index.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ export { AutomaticPricingSource, PricingStore } from './ports/pricing-store.js';
|
|
|
8
8
|
export { ProviderConfigSource } from './ports/provider-config-source.js';
|
|
9
9
|
export { UsageEventStore } from './ports/usage-event-store.js';
|
|
10
10
|
export { WebSearchBackend } from './ports/web-search-backend.js';
|
|
11
|
-
export { AnthropicIngressHandler, AnthropicIngressHandlerFactory, AnthropicRouteHandlerParams, AnthropicSdkHints, ExtendedContextHint, IngressFormat, ProviderProxyDeps, ProxyAttribution, RetryCallback, RouteAuthMode, RouteContext, StreamEventCallback, SubscriptionDispatchProfile, SubscriptionRequestSummary, TargetProviderFormat, UsageRecorderImport, UsageRecorderImport as UsageSink } from './provider-proxy/types.js';
|
|
12
|
-
export { A as AccountProbeConfig, a as AllowanceSchedulingConfig, C as ChatDispatchMode, b as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, c as EndpointRoutingConfig, F as FingerprintConfig, G as GatewayBinding, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, g as GatewayBindingTarget, h as GatewayModelMapping, K as KeySpendReader, i as KeySpendSeeder, j as KeySpendTracker, k as KindMappedEndpoint, M as MessagesModelKind, l as ModelKind, m as ModelPrefixTargets, n as OutboundApiDeps, o as OutboundApiKeyCreated, p as OutboundApiKeyInfo, q as OutboundApiServerConfig, r as OutboundApiServerStatus, O as OutboundCredentialStore, s as OutboundEndpoint, t as OutboundFormatUrls, u as OutboundKeyActivationMode, O as OutboundKeyDb, v as OutboundKeyDbRow, w as OutboundKeyPolicy, x as OutboundProxyConfig, R as RequestRole, y as ResponsesModelKind, U as UserMessageQueueConfig, V as VoucherCreateInput, z as VoucherDb, B as computeVoucherGrant, D as generateVoucherCode, H as hashVoucherCode, I as newVoucherId, J as startOfLocalDay, L as startOfLocalWeek, N as toVoucherInfo, P as voucherCodePrefix } from './types-
|
|
11
|
+
export { AnthropicIngressHandler, AnthropicIngressHandlerFactory, AnthropicRouteHandlerParams, AnthropicSdkHints, ExtendedContextHint, IngressFormat, ProviderProxyDeps, ProxyAttribution, RetryCallback, RouteAuthMode, RouteContext, RouteLeaseUsageAttribution, StreamEventCallback, SubscriptionDispatchProfile, SubscriptionRequestSummary, TargetProviderFormat, UsageRecorderImport, UsageRecorderImport as UsageSink } from './provider-proxy/types.js';
|
|
12
|
+
export { A as AccountProbeConfig, a as AllowanceSchedulingConfig, C as ChatDispatchMode, b as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, c as EndpointRoutingConfig, F as FingerprintConfig, G as GatewayBinding, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, g as GatewayBindingTarget, h as GatewayModelMapping, K as KeySpendReader, i as KeySpendSeeder, j as KeySpendTracker, k as KindMappedEndpoint, M as MessagesModelKind, l as ModelKind, m as ModelPrefixTargets, n as OutboundApiDeps, o as OutboundApiKeyCreated, p as OutboundApiKeyInfo, q as OutboundApiServerConfig, r as OutboundApiServerStatus, O as OutboundCredentialStore, s as OutboundEndpoint, t as OutboundFormatUrls, u as OutboundKeyActivationMode, O as OutboundKeyDb, v as OutboundKeyDbRow, w as OutboundKeyPolicy, x as OutboundProxyConfig, R as RequestRole, y as ResponsesModelKind, U as UserMessageQueueConfig, V as VoucherCreateInput, z as VoucherDb, B as computeVoucherGrant, D as generateVoucherCode, H as hashVoucherCode, I as newVoucherId, J as startOfLocalDay, L as startOfLocalWeek, N as toVoucherInfo, P as voucherCodePrefix } from './types-BB8pxk_3.js';
|
|
13
13
|
export { CostCalculation, PricingEngine, PricingEngineOptions } from './usage/pricing-engine.js';
|
|
14
14
|
export { UsageRecordInput, UsageRecorder, UsageRecorderOptions } from './usage/usage-recorder.js';
|
|
15
15
|
export { A as ApiFormat, C as CompletionOptions, a as CompletionResult, N as NATIVE_SEARCH_TOOL_NAMES, b as NativeSearchAugmentation, c as NativeSearchDetectionResult, d as NativeSearchProvider, e as NativeSearchUserConfig, S as StreamCallbacks } from './types-BScIHmPr.js';
|
|
@@ -17,7 +17,7 @@ export { C as CompletionService, V as VisionFallbackProvider } from './Completio
|
|
|
17
17
|
export { SimpleChatGeminiMessage, SimpleChatGeminiPart, StreamEvent, StreamEventType, StreamSender, addOpenRouterProviderToRequest, attachStreamEventBuffer, convertMessageToAnthropic, convertMessageToGemini, convertMessageToOpenAI, emitStreamEvent, getOpenRouterProviderConfig, getProviderHeaders, registerStreamEventBuffer, releaseStreamEventBuffer } from './completion.js';
|
|
18
18
|
export { buildAnthropicApiUrl, buildAzureOpenAIApiUrl, buildGeminiApiUrl, buildOpenAIApiUrl, buildOpenAIResponseApiUrl, buildProviderApiUrl, normalizeAzureEndpoint, resolveApiFormat, resolveProviderEndpoint } from './completion/url-builder.js';
|
|
19
19
|
export { applyAugmentation, buildNativeSearchAugmentation, detectNativeSearch } from './completion/NativeSearchInjector.js';
|
|
20
|
-
export { __resetProviderProxyForTests, extractRouteToken, getProviderProxy } from './provider-proxy.js';
|
|
20
|
+
export { NormalizedRouteLeaseCreate, NormalizedRouteLeaseRequest, ROUTE_LEASE_API_VERSION, ROUTE_LEASE_CAPABILITIES, ROUTE_LEASE_CAPABILITIES_SCHEMA, ROUTE_LEASE_CODEX_TOKEN_ENV, ROUTE_LEASE_DEFAULT_TTL_SECONDS, ROUTE_LEASE_MAX_CONSUMER_BYTES, ROUTE_LEASE_MAX_EXECUTION_ID_BYTES, ROUTE_LEASE_MAX_IDEMPOTENCY_BYTES, ROUTE_LEASE_MAX_MODEL_BYTES, ROUTE_LEASE_MAX_SESSION_ID_BYTES, ROUTE_LEASE_MAX_TTL_SECONDS, ROUTE_LEASE_REQUEST_SCHEMA, ROUTE_LEASE_RESULT_SCHEMA, ROUTE_LEASE_RUNTIMES, ROUTE_LEASE_RUNTIME_TABLE, ROUTE_LEASE_SESSION_HASH_DOMAIN, RouteLeaseCapabilities, RouteLeaseClock, RouteLeaseCreateOutcome, RouteLeaseCreateResult, RouteLeaseDescriptorPort, RouteLeaseError, RouteLeaseErrorCode, RouteLeaseExecutionMetadata, RouteLeaseExecutionRequest, RouteLeaseLogger, RouteLeaseManager, RouteLeaseManagerOptions, RouteLeaseMetadata, RouteLeaseProviderKeyPreflight, RouteLeaseReleaseResult, RouteLeaseRenewResult, RouteLeaseRequest, RouteLeaseRoutePort, RouteLeaseRuntime, RouteLeaseStatus, RouteLeaseSubscriptionPreflight, RouteLeaseTargetResolver, RouteLeaseTargetResolverOptions, RouteLeaseTargetResolverPort, RouteLeaseUpstream, RuntimeLaunchDescriptor, SYSTEM_ROUTE_LEASE_CLOCK, __resetProviderProxyForTests, canonicalizeRouteLeasePayload, extractRouteToken, getProviderProxy, hashRouteLeasePayload, hashRouteLeaseSessionId, normalizeRouteLeaseIdempotencyKey, normalizeRouteLeaseTtl, parseRouteLeaseCreate, routeLeaseRuntime } from './provider-proxy.js';
|
|
21
21
|
export { ApiServerSettingsStore, ApplyConfigInput, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_ALLOWANCE_SCHEDULING, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE, GateAcquireOptions, GateAcquisition, GateSlot, GateStatusEntry, GatewayBindingResolution, KeyVerification, KeyedMutex, ModelPrefixKind, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiServer, OutboundConcurrencyGate, OutboundRateLimiter, ResolveGatewayBindingInput, SerialAcquireOptions, SerialQueueStatusEntry, SerialQueueTimeoutError, SerialSlot, UserMessageSerialQueue, VerifiedKey, __resetOutboundApiServerForTests, candidateBackgroundModelIds, candidateGatewayBindings, classifyModelPrefix, createIntegrationKey, createNamedKey, defaultServerConfig, detectModelKind, detectRequestRole, endpointToIngressFormat, formatUrls, gatewayBindingToEndpointConfig, getOutboundApiServer, handleVoucherRedeem, hashKey, isConcurrencyRejection, isKindMappedEndpoint, isRedeemRequest, isSerialQueueTimeout, isUserMessageRequest, legacyEndpointsToBindings, loadServerConfig, mergeServerConfig, modelKindsForEndpoint, normalizeAccountProbe, normalizeAllowanceScheduling, normalizeAudit, normalizeBilling, normalizeFingerprint, normalizeGatewayBindings, normalizePrefixTargets, normalizeProxyConfig, normalizeProxySegment, normalizeQueueSegments, normalizeServerConfig, normalizeVoucher, normalizeWebhookDestination, normalizeWebhookSegment, randomBase62, resolveGatewayBinding, resolvePrefixTarget, saveServerConfig, validateEndpointModelConfig, verifyKey, verifyPresentedKey } from './outbound-api.js';
|
|
22
22
|
export { convertAnthropicRequestToOpenAI, convertAnthropicStreamToOpenAI, convertAnthropicToOpenAI, convertAnthropicToOpenAIWithThinking, convertOpenAIResponseToAnthropic, convertOpenAIStreamToAnthropic, convertOpenAIToAnthropic, convertOpenAIToAnthropicWithThinking, hasImageContent, hasThinkingEnabled } from './ApiConverter.js';
|
|
23
23
|
export { ChainExecutionOptions, TransformerChainExecutor } from './transformer/TransformerChainExecutor.js';
|
|
@@ -28,9 +28,9 @@ export { AUDIT_REDACTED, redactAuditText } from './outbound-api/auditRedact.js';
|
|
|
28
28
|
export { AuditCaptureContext, beginAuditCapture } from './outbound-api/auditCapture.js';
|
|
29
29
|
export { BillingCaptureContext, beginBillingCapture } from './outbound-api/billingCapture.js';
|
|
30
30
|
export { BoundAccountFallbackPolicy, BoundAccountSelectionError, BoundAccountSelectionFailureReason, boundAccountSelectionMessage, isBoundAccountSelectionError } from './pipeline/BoundAccountSelectionError.js';
|
|
31
|
-
export { D as DEFAULT_ROUTE_IDLE_MS, P as ProviderProxy, a as ProviderProxyRouteMap } from './ProviderProxy
|
|
31
|
+
export { D as DEFAULT_ROUTE_IDLE_MS, P as ProviderProxy, a as ProviderProxyRouteMap, R as RouteEvictionReason, b as RouteRegistrationOptions, i as isLoopbackAddress } from './ProviderProxy--ROec6VI.js';
|
|
32
32
|
export { K as KeyCostLimits, a as KeyExpiryInput, b as KeyExpiryResult, c as KeySpend, Q as QuotaDecision, d as checkKeyQuota, e as computeKeyExpiry } from './keyPolicy-zdWTu3CQ.js';
|
|
33
|
-
export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-
|
|
33
|
+
export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-C0mkkZaM.js';
|
|
34
34
|
import '@omnicross/contracts/message-blocks';
|
|
35
35
|
import '@omnicross/contracts/completion-types';
|
|
36
36
|
import '@omnicross/contracts/mcp-types';
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,26 @@ import {
|
|
|
18
18
|
OutboundRateLimiter,
|
|
19
19
|
ProviderProxy,
|
|
20
20
|
ProviderProxyRouteMap,
|
|
21
|
+
ROUTE_LEASE_API_VERSION,
|
|
22
|
+
ROUTE_LEASE_CAPABILITIES,
|
|
23
|
+
ROUTE_LEASE_CAPABILITIES_SCHEMA,
|
|
24
|
+
ROUTE_LEASE_CODEX_TOKEN_ENV,
|
|
25
|
+
ROUTE_LEASE_DEFAULT_TTL_SECONDS,
|
|
26
|
+
ROUTE_LEASE_MAX_CONSUMER_BYTES,
|
|
27
|
+
ROUTE_LEASE_MAX_EXECUTION_ID_BYTES,
|
|
28
|
+
ROUTE_LEASE_MAX_IDEMPOTENCY_BYTES,
|
|
29
|
+
ROUTE_LEASE_MAX_MODEL_BYTES,
|
|
30
|
+
ROUTE_LEASE_MAX_SESSION_ID_BYTES,
|
|
31
|
+
ROUTE_LEASE_MAX_TTL_SECONDS,
|
|
32
|
+
ROUTE_LEASE_REQUEST_SCHEMA,
|
|
33
|
+
ROUTE_LEASE_RESULT_SCHEMA,
|
|
34
|
+
ROUTE_LEASE_RUNTIMES,
|
|
35
|
+
ROUTE_LEASE_RUNTIME_TABLE,
|
|
36
|
+
ROUTE_LEASE_SESSION_HASH_DOMAIN,
|
|
37
|
+
RouteLeaseError,
|
|
38
|
+
RouteLeaseManager,
|
|
39
|
+
RouteLeaseTargetResolver,
|
|
40
|
+
SYSTEM_ROUTE_LEASE_CLOCK,
|
|
21
41
|
SerialQueueTimeoutError,
|
|
22
42
|
UserMessageSerialQueue,
|
|
23
43
|
__resetOutboundApiServerForTests,
|
|
@@ -26,6 +46,7 @@ import {
|
|
|
26
46
|
attach,
|
|
27
47
|
candidateBackgroundModelIds,
|
|
28
48
|
candidateGatewayBindings,
|
|
49
|
+
canonicalizeRouteLeasePayload,
|
|
29
50
|
checkKeyQuota,
|
|
30
51
|
computeKeyExpiry,
|
|
31
52
|
computeVoucherGrant,
|
|
@@ -45,8 +66,11 @@ import {
|
|
|
45
66
|
getProviderProxy,
|
|
46
67
|
handleVoucherRedeem,
|
|
47
68
|
hashKey,
|
|
69
|
+
hashRouteLeasePayload,
|
|
70
|
+
hashRouteLeaseSessionId,
|
|
48
71
|
hashVoucherCode,
|
|
49
72
|
isConcurrencyRejection,
|
|
73
|
+
isLoopbackAddress,
|
|
50
74
|
isRedeemRequest,
|
|
51
75
|
isSerialQueueTimeout,
|
|
52
76
|
isUserMessageRequest,
|
|
@@ -64,14 +88,18 @@ import {
|
|
|
64
88
|
normalizeProxyConfig,
|
|
65
89
|
normalizeProxySegment,
|
|
66
90
|
normalizeQueueSegments,
|
|
91
|
+
normalizeRouteLeaseIdempotencyKey,
|
|
92
|
+
normalizeRouteLeaseTtl,
|
|
67
93
|
normalizeServerConfig,
|
|
68
94
|
normalizeVoucher,
|
|
69
95
|
normalizeWebhookDestination,
|
|
70
96
|
normalizeWebhookSegment,
|
|
97
|
+
parseRouteLeaseCreate,
|
|
71
98
|
randomBase62,
|
|
72
99
|
register,
|
|
73
100
|
release,
|
|
74
101
|
resolveGatewayBinding,
|
|
102
|
+
routeLeaseRuntime,
|
|
75
103
|
saveServerConfig,
|
|
76
104
|
startOfLocalDay,
|
|
77
105
|
startOfLocalWeek,
|
|
@@ -79,7 +107,7 @@ import {
|
|
|
79
107
|
verifyKey,
|
|
80
108
|
verifyPresentedKey,
|
|
81
109
|
voucherCodePrefix
|
|
82
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-QYC54PMG.js";
|
|
83
111
|
import {
|
|
84
112
|
createSSEParser,
|
|
85
113
|
streamSSEResponse
|
|
@@ -99,7 +127,7 @@ import {
|
|
|
99
127
|
} from "./chunk-FXR6N3SR.js";
|
|
100
128
|
import {
|
|
101
129
|
UsageRecorder
|
|
102
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-UAPBLNN2.js";
|
|
103
131
|
import {
|
|
104
132
|
TransformerChainExecutor
|
|
105
133
|
} from "./chunk-WNKWAEUR.js";
|
|
@@ -239,7 +267,27 @@ export {
|
|
|
239
267
|
PricingEngine,
|
|
240
268
|
ProviderProxy,
|
|
241
269
|
ProviderProxyRouteMap,
|
|
270
|
+
ROUTE_LEASE_API_VERSION,
|
|
271
|
+
ROUTE_LEASE_CAPABILITIES,
|
|
272
|
+
ROUTE_LEASE_CAPABILITIES_SCHEMA,
|
|
273
|
+
ROUTE_LEASE_CODEX_TOKEN_ENV,
|
|
274
|
+
ROUTE_LEASE_DEFAULT_TTL_SECONDS,
|
|
275
|
+
ROUTE_LEASE_MAX_CONSUMER_BYTES,
|
|
276
|
+
ROUTE_LEASE_MAX_EXECUTION_ID_BYTES,
|
|
277
|
+
ROUTE_LEASE_MAX_IDEMPOTENCY_BYTES,
|
|
278
|
+
ROUTE_LEASE_MAX_MODEL_BYTES,
|
|
279
|
+
ROUTE_LEASE_MAX_SESSION_ID_BYTES,
|
|
280
|
+
ROUTE_LEASE_MAX_TTL_SECONDS,
|
|
281
|
+
ROUTE_LEASE_REQUEST_SCHEMA,
|
|
282
|
+
ROUTE_LEASE_RESULT_SCHEMA,
|
|
283
|
+
ROUTE_LEASE_RUNTIMES,
|
|
284
|
+
ROUTE_LEASE_RUNTIME_TABLE,
|
|
285
|
+
ROUTE_LEASE_SESSION_HASH_DOMAIN,
|
|
286
|
+
RouteLeaseError,
|
|
287
|
+
RouteLeaseManager,
|
|
288
|
+
RouteLeaseTargetResolver,
|
|
242
289
|
SUBSCRIPTION_PROVIDER_IDS,
|
|
290
|
+
SYSTEM_ROUTE_LEASE_CLOCK,
|
|
243
291
|
SerialQueueTimeoutError,
|
|
244
292
|
TransformerChainExecutor,
|
|
245
293
|
TransformerService,
|
|
@@ -262,6 +310,7 @@ export {
|
|
|
262
310
|
buildProviderApiUrl,
|
|
263
311
|
candidateBackgroundModelIds,
|
|
264
312
|
candidateGatewayBindings,
|
|
313
|
+
canonicalizeRouteLeasePayload,
|
|
265
314
|
checkKeyQuota,
|
|
266
315
|
classifyModelPrefix,
|
|
267
316
|
computeKeyExpiry,
|
|
@@ -301,10 +350,13 @@ export {
|
|
|
301
350
|
hasImageContent,
|
|
302
351
|
hasThinkingEnabled,
|
|
303
352
|
hashKey,
|
|
353
|
+
hashRouteLeasePayload,
|
|
354
|
+
hashRouteLeaseSessionId,
|
|
304
355
|
hashVoucherCode,
|
|
305
356
|
isBoundAccountSelectionError,
|
|
306
357
|
isConcurrencyRejection,
|
|
307
358
|
isKindMappedEndpoint,
|
|
359
|
+
isLoopbackAddress,
|
|
308
360
|
isOpenRouterProvider,
|
|
309
361
|
isRedeemRequest,
|
|
310
362
|
isSerialQueueTimeout,
|
|
@@ -326,11 +378,14 @@ export {
|
|
|
326
378
|
normalizeProxyConfig,
|
|
327
379
|
normalizeProxySegment,
|
|
328
380
|
normalizeQueueSegments,
|
|
381
|
+
normalizeRouteLeaseIdempotencyKey,
|
|
382
|
+
normalizeRouteLeaseTtl,
|
|
329
383
|
normalizeServerConfig,
|
|
330
384
|
normalizeVoucher,
|
|
331
385
|
normalizeWebhookDestination,
|
|
332
386
|
normalizeWebhookSegment,
|
|
333
387
|
parseModelRef,
|
|
388
|
+
parseRouteLeaseCreate,
|
|
334
389
|
pickModelRefFromList,
|
|
335
390
|
randomBase62,
|
|
336
391
|
redactAuditText,
|
|
@@ -342,6 +397,7 @@ export {
|
|
|
342
397
|
resolvePrefixTarget,
|
|
343
398
|
resolveProviderEndpoint,
|
|
344
399
|
resolveRoute,
|
|
400
|
+
routeLeaseRuntime,
|
|
345
401
|
saveServerConfig,
|
|
346
402
|
serializeError,
|
|
347
403
|
setOpenRouterAppIdentity,
|