@omnicross/core 0.1.5 → 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/{CompletionService-DdWaAxq0.d.ts → CompletionService-C3BX0Ovy.d.ts} +4 -3
- package/dist/{CompletionService-D3a47vdU.d.cts → CompletionService-kNA17cfI.d.cts} +4 -3
- package/dist/auth/GeminiCodeAssistProjectResolver.cjs +8 -6
- package/dist/auth/GeminiCodeAssistProjectResolver.js +6 -4
- package/dist/{chunk-3Z5BQZFM.cjs → chunk-235MXAGX.cjs} +3 -1
- package/dist/{chunk-HRRYG2AX.js → chunk-23S5OPIO.js} +10 -1
- package/dist/chunk-25GXJCEZ.cjs +40 -0
- package/dist/chunk-2E42SAW3.cjs +323 -0
- package/dist/chunk-2JYRIADS.js +40 -0
- package/dist/chunk-2Z4XM3H5.cjs +44 -0
- package/dist/{chunk-BODMAL6G.js → chunk-32O35CIF.js} +271 -91
- package/dist/chunk-3SCOLIPT.cjs +63 -0
- package/dist/{chunk-SYQF7OIR.js → chunk-3WD4HTR2.js} +2 -0
- package/dist/{chunk-CGKLE6IW.cjs → chunk-4BB343BI.cjs} +1489 -520
- package/dist/{chunk-VACWOIRE.cjs → chunk-4VZX5F4T.cjs} +39 -15
- package/dist/{chunk-5ZQBEOMD.js → chunk-5NJLQ6T6.js} +46 -12
- package/dist/chunk-5RSZYQJH.cjs +62 -0
- package/dist/chunk-6QQG7YG3.cjs +153 -0
- package/dist/{chunk-IFXJ2BG7.js → chunk-7C7DET6S.js} +51 -6
- package/dist/{chunk-IK3KE3AU.js → chunk-DE2SRBFZ.js} +1 -1
- package/dist/{chunk-FH2P4OCD.js → chunk-E3COOKUP.js} +1240 -271
- package/dist/{chunk-UHGVBFU3.js → chunk-EBLFCNPY.js} +38 -14
- package/dist/chunk-FU7EAR73.js +62 -0
- package/dist/chunk-FXR6N3SR.js +323 -0
- package/dist/{chunk-SUEGJ75D.cjs → chunk-GDIXXKF2.cjs} +46 -12
- package/dist/chunk-GFIZ6LQI.js +170 -0
- package/dist/chunk-GL6XM527.js +61 -0
- package/dist/chunk-HVBBDBS3.cjs +350 -0
- package/dist/{chunk-46ZIFWYG.cjs → chunk-IIRPUVPH.cjs} +7 -1
- package/dist/chunk-J3QQ6JS5.cjs +170 -0
- package/dist/{chunk-JWVTXXPX.cjs → chunk-KBM2W6UY.cjs} +8 -4
- package/dist/chunk-LB6EBS6Y.js +69 -0
- package/dist/{chunk-IWQAX3CS.js → chunk-LVUCAWMK.js} +1 -1
- package/dist/chunk-MKF46GNZ.js +350 -0
- package/dist/{chunk-HYN75H6G.cjs → chunk-MUHWHQVM.cjs} +1 -1
- package/dist/chunk-MYYR3HZL.js +44 -0
- package/dist/{chunk-MFZ5437A.js → chunk-N5T4M4GU.js} +1 -1
- package/dist/{chunk-5ENKBSWO.js → chunk-N7OOJI5V.js} +88 -8
- package/dist/chunk-NKVZ6Z3Y.cjs +61 -0
- package/dist/chunk-OF3BECU2.cjs +69 -0
- package/dist/{chunk-SNYBEXLB.cjs → chunk-OJGQKHN5.cjs} +3 -1
- package/dist/{chunk-DDMRUL76.cjs → chunk-OKMJLEXX.cjs} +5 -5
- package/dist/chunk-OPRS4IQZ.js +153 -0
- package/dist/chunk-OTZC4TNH.cjs +79 -0
- package/dist/{chunk-3Q6Z6JTO.cjs → chunk-OVQBNVSV.cjs} +287 -107
- package/dist/{chunk-4XMYPW46.cjs → chunk-OXHNSZ53.cjs} +84 -44
- package/dist/{chunk-C6OV7GCC.js → chunk-PEGTIPB3.js} +52 -12
- package/dist/chunk-PO3XB56Z.js +79 -0
- package/dist/{chunk-D3TDKWRP.js → chunk-RJ5ZGNI3.js} +54 -5
- package/dist/{chunk-PG7PS2NN.cjs → chunk-RJUONLUQ.cjs} +59 -10
- package/dist/{chunk-BPKCU575.js → chunk-SOO562NM.js} +3 -1
- package/dist/{chunk-6QZGDLL4.js → chunk-TOVPMMHM.js} +5 -1
- package/dist/{chunk-K52THW2C.cjs → chunk-V4TXMEJS.cjs} +5 -5
- package/dist/{chunk-G2UTNSGU.js → chunk-WNKWAEUR.js} +7 -1
- package/dist/{chunk-UNWKG6EI.cjs → chunk-XPIOJQS2.cjs} +51 -6
- package/dist/chunk-XXFYLL7R.js +63 -0
- package/dist/{chunk-KFI44N2R.cjs → chunk-YNJNTCSQ.cjs} +10 -1
- package/dist/{chunk-VQY5W4YW.cjs → chunk-YWL7YZWS.cjs} +90 -10
- package/dist/completion/ApiKeyPoolService.cjs +12 -0
- package/dist/completion/ApiKeyPoolService.d.cts +6 -0
- package/dist/completion/ApiKeyPoolService.d.ts +6 -0
- package/dist/completion/ApiKeyPoolService.js +12 -0
- package/dist/completion/CompletionService.cjs +30 -24
- package/dist/completion/CompletionService.d.cts +3 -1
- package/dist/completion/CompletionService.d.ts +3 -1
- package/dist/completion/CompletionService.js +29 -23
- package/dist/completion.cjs +32 -26
- package/dist/completion.d.cts +3 -1
- package/dist/completion.d.ts +3 -1
- package/dist/completion.js +31 -25
- package/dist/index.cjs +56 -29
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +61 -34
- package/dist/{keyPolicy-Cp0FntZl.d.cts → keyPolicy-zdWTu3CQ.d.cts} +1 -1
- package/dist/{keyPolicy-Cp0FntZl.d.ts → keyPolicy-zdWTu3CQ.d.ts} +1 -1
- 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/quotaWarn.d.cts +1 -1
- package/dist/outbound-api/quotaWarn.d.ts +1 -1
- package/dist/outbound-api/routeResolver.cjs +2 -2
- package/dist/outbound-api/routeResolver.d.cts +5 -3
- package/dist/outbound-api/routeResolver.d.ts +5 -3
- package/dist/outbound-api/routeResolver.js +1 -1
- package/dist/outbound-api/subscriptionRegistryPort.d.cts +2 -0
- package/dist/outbound-api/subscriptionRegistryPort.d.ts +2 -0
- package/dist/outbound-api/types.d.cts +4 -2
- package/dist/outbound-api/types.d.ts +4 -2
- package/dist/outbound-api.cjs +52 -25
- package/dist/outbound-api.d.cts +131 -87
- package/dist/outbound-api.d.ts +131 -87
- package/dist/outbound-api.js +55 -28
- package/dist/pipeline/AccountAllowanceScheduling.cjs +15 -0
- package/dist/pipeline/AccountAllowanceScheduling.d.cts +91 -0
- package/dist/pipeline/AccountAllowanceScheduling.d.ts +91 -0
- package/dist/pipeline/AccountAllowanceScheduling.js +15 -0
- package/dist/pipeline/AccountAllowanceStore.cjs +20 -0
- package/dist/pipeline/AccountAllowanceStore.d.cts +77 -0
- package/dist/pipeline/AccountAllowanceStore.d.ts +77 -0
- package/dist/pipeline/AccountAllowanceStore.js +20 -0
- 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/AuthSource.d.cts +11 -2
- package/dist/pipeline/AuthSource.d.ts +11 -2
- package/dist/pipeline/BoundAccountSelectionError.cjs +10 -0
- package/dist/pipeline/BoundAccountSelectionError.d.cts +28 -0
- package/dist/pipeline/BoundAccountSelectionError.d.ts +28 -0
- package/dist/pipeline/BoundAccountSelectionError.js +10 -0
- package/dist/pipeline/LlmConfigProviderAuth.d.cts +1 -0
- package/dist/pipeline/LlmConfigProviderAuth.d.ts +1 -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 +6 -2
- package/dist/pipeline/SubscriptionAccountHealth.d.cts +65 -8
- package/dist/pipeline/SubscriptionAccountHealth.d.ts +65 -8
- package/dist/pipeline/SubscriptionAccountHealth.js +5 -1
- package/dist/pipeline/SubscriptionAuthSource.cjs +5 -2
- package/dist/pipeline/SubscriptionAuthSource.d.cts +1 -0
- package/dist/pipeline/SubscriptionAuthSource.d.ts +1 -0
- package/dist/pipeline/SubscriptionAuthSource.js +4 -1
- package/dist/pipeline/SubscriptionAuthStrategy.d.cts +8 -3
- package/dist/pipeline/SubscriptionAuthStrategy.d.ts +8 -3
- package/dist/pipeline/executeProviderCall.cjs +2 -2
- package/dist/pipeline/executeProviderCall.d.cts +8 -3
- package/dist/pipeline/executeProviderCall.d.ts +8 -3
- package/dist/pipeline/executeProviderCall.js +1 -1
- package/dist/pipeline/resolveProviderChain.d.cts +2 -3
- package/dist/pipeline/resolveProviderChain.d.ts +2 -3
- package/dist/pipeline/resolveSubscriptionChain.d.cts +1 -0
- package/dist/pipeline/resolveSubscriptionChain.d.ts +1 -0
- package/dist/pipeline/upstreamFetch.cjs +5 -3
- package/dist/pipeline/upstreamFetch.d.cts +35 -6
- package/dist/pipeline/upstreamFetch.d.ts +35 -6
- package/dist/pipeline/upstreamFetch.js +4 -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/pricing-store.d.cts +4 -3
- package/dist/ports/pricing-store.d.ts +4 -3
- package/dist/ports.d.cts +4 -3
- package/dist/ports.d.ts +4 -3
- package/dist/provider-proxy/ProviderProxy.cjs +30 -24
- package/dist/provider-proxy/ProviderProxy.d.cts +2 -0
- package/dist/provider-proxy/ProviderProxy.d.ts +2 -0
- package/dist/provider-proxy/ProviderProxy.js +29 -23
- 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 +32 -24
- package/dist/provider-proxy/ingress/providerProxyShared.d.cts +44 -5
- package/dist/provider-proxy/ingress/providerProxyShared.d.ts +44 -5
- package/dist/provider-proxy/ingress/providerProxyShared.js +31 -23
- package/dist/provider-proxy/matchText.cjs +4 -2
- package/dist/provider-proxy/matchText.d.cts +39 -6
- package/dist/provider-proxy/matchText.d.ts +39 -6
- package/dist/provider-proxy/matchText.js +3 -1
- package/dist/provider-proxy/types.d.cts +35 -2
- package/dist/provider-proxy/types.d.ts +35 -2
- package/dist/provider-proxy.cjs +30 -24
- package/dist/provider-proxy.d.cts +2 -0
- package/dist/provider-proxy.d.ts +2 -0
- package/dist/provider-proxy.js +29 -23
- package/dist/{routeResolver-C4T7yClx.d.ts → routeResolver-BxOfunbm.d.ts} +1 -1
- package/dist/{routeResolver-CB3tvJKy.d.cts → routeResolver-D5OzD0iM.d.cts} +1 -1
- package/dist/transformer/TransformerChainExecutor.cjs +2 -2
- package/dist/transformer/TransformerChainExecutor.js +1 -1
- package/dist/transformer/transformers/AnthropicTransformer.cjs +3 -2
- package/dist/transformer/transformers/AnthropicTransformer.js +2 -1
- package/dist/transformer/transformers/GeminiCodeAssistTransformer.cjs +3 -3
- package/dist/transformer/transformers/GeminiCodeAssistTransformer.js +2 -2
- package/dist/transformer/transformers/GeminiTransformer.cjs +3 -3
- package/dist/transformer/transformers/GeminiTransformer.js +2 -2
- package/dist/transformer/transformers/OpenAIResponseTransformer.cjs +3 -2
- package/dist/transformer/transformers/OpenAIResponseTransformer.d.cts +1 -1
- package/dist/transformer/transformers/OpenAIResponseTransformer.d.ts +1 -1
- package/dist/transformer/transformers/OpenAIResponseTransformer.js +2 -1
- package/dist/transformer/transformers/OpenAITransformer.cjs +6 -0
- package/dist/transformer/transformers/OpenAITransformer.d.cts +68 -0
- package/dist/transformer/transformers/OpenAITransformer.d.ts +68 -0
- package/dist/transformer/transformers/OpenAITransformer.js +6 -0
- package/dist/transformer/transformers.cjs +9 -14
- package/dist/transformer/transformers.d.cts +12 -48
- package/dist/transformer/transformers.d.ts +12 -48
- package/dist/transformer/transformers.js +11 -16
- package/dist/transformer/types.d.cts +17 -0
- package/dist/transformer/types.d.ts +17 -0
- package/dist/transformer.cjs +12 -12
- package/dist/transformer.d.cts +1 -2
- package/dist/transformer.d.ts +1 -2
- package/dist/transformer.js +12 -12
- package/dist/{types-lgPYQuZS.d.ts → types-CqZD77rS.d.ts} +173 -7
- package/dist/{types-B8Arpxn0.d.cts → types-gjJ5lJ5n.d.cts} +173 -7
- package/dist/usage/pricing-engine.cjs +2 -2
- package/dist/usage/pricing-engine.d.cts +29 -1
- package/dist/usage/pricing-engine.d.ts +29 -1
- 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
- package/dist/chunk-7FEBOPJO.cjs +0 -50
- package/dist/chunk-DWKQZ2SK.cjs +0 -254
- package/dist/chunk-IAXWICZU.js +0 -69
- package/dist/chunk-IB3FDI4O.js +0 -50
- package/dist/chunk-OQWKZCXP.js +0 -242
- package/dist/chunk-QWBWGODS.cjs +0 -69
- package/dist/chunk-YMFAJFQT.cjs +0 -173
- package/dist/chunk-ZCIQ3L3R.cjs +0 -242
- package/dist/chunk-ZJZAOKI7.js +0 -254
- package/dist/chunk-ZLX3KGXX.js +0 -173
- package/dist/transformer/transformers/OpenCodeGoTransformer.cjs +0 -6
- package/dist/transformer/transformers/OpenCodeGoTransformer.d.cts +0 -51
- package/dist/transformer/transformers/OpenCodeGoTransformer.d.ts +0 -51
- package/dist/transformer/transformers/OpenCodeGoTransformer.js +0 -6
- package/dist/transformer/transformers/ReasoningTransformer.cjs +0 -6
- package/dist/transformer/transformers/ReasoningTransformer.d.cts +0 -47
- package/dist/transformer/transformers/ReasoningTransformer.d.ts +0 -47
- package/dist/transformer/transformers/ReasoningTransformer.js +0 -6
package/dist/index.d.cts
CHANGED
|
@@ -4,21 +4,21 @@ export { A as AnthropicTool, B as BuiltinToolExecutor, G as GeminiTools, M as Mc
|
|
|
4
4
|
import { LLMProvider } from '@omnicross/contracts/llm-config';
|
|
5
5
|
export { C as CorePaths, a as CoreUsageEvent, b as CoreUsageTokenCounts, U as UsageEventSink } from './usage-event-sink-BX7FE1NL.cjs';
|
|
6
6
|
export { L as Logger } from './logger-4GvQNzhE.cjs';
|
|
7
|
-
export { PricingStore } from './ports/pricing-store.cjs';
|
|
7
|
+
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
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, C as ChatDispatchMode,
|
|
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-gjJ5lJ5n.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';
|
|
16
|
-
export { C as CompletionService, V as VisionFallbackProvider } from './CompletionService-
|
|
16
|
+
export { C as CompletionService, V as VisionFallbackProvider } from './CompletionService-kNA17cfI.cjs';
|
|
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
20
|
export { __resetProviderProxyForTests, extractRouteToken, getProviderProxy } from './provider-proxy.cjs';
|
|
21
|
-
export { ApiServerSettingsStore, ApplyConfigInput, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE,
|
|
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';
|
|
24
24
|
export { TransformerService } from './transformer/TransformerService.cjs';
|
|
@@ -27,9 +27,10 @@ export { Annotation, ImageContent, MessageContent, ModelRoute, ModelTransformerC
|
|
|
27
27
|
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
|
+
export { BoundAccountFallbackPolicy, BoundAccountSelectionError, BoundAccountSelectionFailureReason, boundAccountSelectionMessage, isBoundAccountSelectionError } from './pipeline/BoundAccountSelectionError.cjs';
|
|
30
31
|
export { D as DEFAULT_ROUTE_IDLE_MS, P as ProviderProxy, a as ProviderProxyRouteMap } from './ProviderProxy-CnMQYN59.cjs';
|
|
31
|
-
export { K as KeyCostLimits, a as KeyExpiryInput, b as KeyExpiryResult, c as KeySpend, Q as QuotaDecision, d as checkKeyQuota, e as computeKeyExpiry } from './keyPolicy-
|
|
32
|
-
export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-
|
|
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-D5OzD0iM.cjs';
|
|
33
34
|
import '@omnicross/contracts/message-blocks';
|
|
34
35
|
import '@omnicross/contracts/completion-types';
|
|
35
36
|
import '@omnicross/contracts/mcp-types';
|
|
@@ -54,8 +55,7 @@ import './transformer/transformers/AnthropicTransformer.cjs';
|
|
|
54
55
|
import './transformer/transformers/GeminiCodeAssistTransformer.cjs';
|
|
55
56
|
import './transformer/transformers/GeminiTransformer.cjs';
|
|
56
57
|
import './transformer/transformers/OpenAIResponseTransformer.cjs';
|
|
57
|
-
import './transformer/transformers/
|
|
58
|
-
import './transformer/transformers/ReasoningTransformer.cjs';
|
|
58
|
+
import './transformer/transformers/OpenAITransformer.cjs';
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* OpenRouter-specific serving-core helpers.
|
package/dist/index.d.ts
CHANGED
|
@@ -4,21 +4,21 @@ export { A as AnthropicTool, B as BuiltinToolExecutor, G as GeminiTools, M as Mc
|
|
|
4
4
|
import { LLMProvider } from '@omnicross/contracts/llm-config';
|
|
5
5
|
export { C as CorePaths, a as CoreUsageEvent, b as CoreUsageTokenCounts, U as UsageEventSink } from './usage-event-sink-BX7FE1NL.js';
|
|
6
6
|
export { L as Logger } from './logger-4GvQNzhE.js';
|
|
7
|
-
export { PricingStore } from './ports/pricing-store.js';
|
|
7
|
+
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
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, C as ChatDispatchMode,
|
|
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-CqZD77rS.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';
|
|
16
|
-
export { C as CompletionService, V as VisionFallbackProvider } from './CompletionService-
|
|
16
|
+
export { C as CompletionService, V as VisionFallbackProvider } from './CompletionService-C3BX0Ovy.js';
|
|
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
20
|
export { __resetProviderProxyForTests, extractRouteToken, getProviderProxy } from './provider-proxy.js';
|
|
21
|
-
export { ApiServerSettingsStore, ApplyConfigInput, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE,
|
|
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';
|
|
24
24
|
export { TransformerService } from './transformer/TransformerService.js';
|
|
@@ -27,9 +27,10 @@ export { Annotation, ImageContent, MessageContent, ModelRoute, ModelTransformerC
|
|
|
27
27
|
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
|
+
export { BoundAccountFallbackPolicy, BoundAccountSelectionError, BoundAccountSelectionFailureReason, boundAccountSelectionMessage, isBoundAccountSelectionError } from './pipeline/BoundAccountSelectionError.js';
|
|
30
31
|
export { D as DEFAULT_ROUTE_IDLE_MS, P as ProviderProxy, a as ProviderProxyRouteMap } from './ProviderProxy-C-xqrkKi.js';
|
|
31
|
-
export { K as KeyCostLimits, a as KeyExpiryInput, b as KeyExpiryResult, c as KeySpend, Q as QuotaDecision, d as checkKeyQuota, e as computeKeyExpiry } from './keyPolicy-
|
|
32
|
-
export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-
|
|
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-BxOfunbm.js';
|
|
33
34
|
import '@omnicross/contracts/message-blocks';
|
|
34
35
|
import '@omnicross/contracts/completion-types';
|
|
35
36
|
import '@omnicross/contracts/mcp-types';
|
|
@@ -54,8 +55,7 @@ import './transformer/transformers/AnthropicTransformer.js';
|
|
|
54
55
|
import './transformer/transformers/GeminiCodeAssistTransformer.js';
|
|
55
56
|
import './transformer/transformers/GeminiTransformer.js';
|
|
56
57
|
import './transformer/transformers/OpenAIResponseTransformer.js';
|
|
57
|
-
import './transformer/transformers/
|
|
58
|
-
import './transformer/transformers/ReasoningTransformer.js';
|
|
58
|
+
import './transformer/transformers/OpenAITransformer.js';
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* OpenRouter-specific serving-core helpers.
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
ConcurrencyWaitCancelledError,
|
|
5
5
|
ConcurrencyWaitTimeoutError,
|
|
6
6
|
DEFAULT_ACCOUNT_PROBE,
|
|
7
|
+
DEFAULT_ALLOWANCE_SCHEDULING,
|
|
7
8
|
DEFAULT_CONCURRENCY_QUEUE,
|
|
8
9
|
DEFAULT_FINGERPRINT,
|
|
9
10
|
DEFAULT_OUTBOUND_PORT,
|
|
@@ -12,7 +13,6 @@ import {
|
|
|
12
13
|
KeySpendTracker,
|
|
13
14
|
KeyedMutex,
|
|
14
15
|
OUTBOUND_API_SERVER_CONFIG_KEY,
|
|
15
|
-
OutboundApiConfigError,
|
|
16
16
|
OutboundApiServer,
|
|
17
17
|
OutboundConcurrencyGate,
|
|
18
18
|
OutboundRateLimiter,
|
|
@@ -24,17 +24,21 @@ import {
|
|
|
24
24
|
__resetProviderProxyForTests,
|
|
25
25
|
addOpenRouterProviderToRequest,
|
|
26
26
|
attach,
|
|
27
|
+
candidateBackgroundModelIds,
|
|
28
|
+
candidateGatewayBindings,
|
|
27
29
|
checkKeyQuota,
|
|
28
30
|
computeKeyExpiry,
|
|
29
31
|
computeVoucherGrant,
|
|
30
32
|
convertMessageToAnthropic,
|
|
31
33
|
convertMessageToGemini,
|
|
32
34
|
convertMessageToOpenAI,
|
|
35
|
+
createIntegrationKey,
|
|
33
36
|
createNamedKey,
|
|
34
37
|
defaultServerConfig,
|
|
35
38
|
emit,
|
|
36
39
|
extractRouteToken,
|
|
37
40
|
formatUrls,
|
|
41
|
+
gatewayBindingToEndpointConfig,
|
|
38
42
|
generateVoucherCode,
|
|
39
43
|
getOpenRouterProviderConfig,
|
|
40
44
|
getOutboundApiServer,
|
|
@@ -46,13 +50,16 @@ import {
|
|
|
46
50
|
isRedeemRequest,
|
|
47
51
|
isSerialQueueTimeout,
|
|
48
52
|
isUserMessageRequest,
|
|
53
|
+
legacyEndpointsToBindings,
|
|
49
54
|
loadServerConfig,
|
|
50
55
|
mergeServerConfig,
|
|
51
56
|
newVoucherId,
|
|
52
57
|
normalizeAccountProbe,
|
|
58
|
+
normalizeAllowanceScheduling,
|
|
53
59
|
normalizeAudit,
|
|
54
60
|
normalizeBilling,
|
|
55
61
|
normalizeFingerprint,
|
|
62
|
+
normalizeGatewayBindings,
|
|
56
63
|
normalizePrefixTargets,
|
|
57
64
|
normalizeProxyConfig,
|
|
58
65
|
normalizeProxySegment,
|
|
@@ -64,6 +71,7 @@ import {
|
|
|
64
71
|
randomBase62,
|
|
65
72
|
register,
|
|
66
73
|
release,
|
|
74
|
+
resolveGatewayBinding,
|
|
67
75
|
saveServerConfig,
|
|
68
76
|
startOfLocalDay,
|
|
69
77
|
startOfLocalWeek,
|
|
@@ -71,50 +79,58 @@ import {
|
|
|
71
79
|
verifyKey,
|
|
72
80
|
verifyPresentedKey,
|
|
73
81
|
voucherCodePrefix
|
|
74
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-E3COOKUP.js";
|
|
75
83
|
import {
|
|
76
84
|
createSSEParser,
|
|
77
85
|
streamSSEResponse
|
|
78
86
|
} from "./chunk-VVEHS2LI.js";
|
|
79
87
|
import "./chunk-46RLHI7D.js";
|
|
80
|
-
import {
|
|
81
|
-
TransformerChainExecutor
|
|
82
|
-
} from "./chunk-G2UTNSGU.js";
|
|
83
|
-
import {
|
|
84
|
-
TransformerService
|
|
85
|
-
} from "./chunk-DK4A7DLE.js";
|
|
86
88
|
import {
|
|
87
89
|
registerBuiltinTransformers
|
|
88
|
-
} from "./chunk-
|
|
89
|
-
import "./chunk-
|
|
90
|
-
import "./chunk-
|
|
91
|
-
import "./chunk-
|
|
92
|
-
import "./chunk-
|
|
93
|
-
import "./chunk-
|
|
90
|
+
} from "./chunk-MYYR3HZL.js";
|
|
91
|
+
import "./chunk-PEGTIPB3.js";
|
|
92
|
+
import "./chunk-LVUCAWMK.js";
|
|
93
|
+
import "./chunk-32O35CIF.js";
|
|
94
|
+
import "./chunk-FU7EAR73.js";
|
|
95
|
+
import "./chunk-LB6EBS6Y.js";
|
|
94
96
|
import "./chunk-7VU7V2E4.js";
|
|
95
97
|
import {
|
|
96
98
|
PricingEngine
|
|
97
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-FXR6N3SR.js";
|
|
98
100
|
import {
|
|
99
101
|
UsageRecorder
|
|
100
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-SOO562NM.js";
|
|
103
|
+
import {
|
|
104
|
+
TransformerChainExecutor
|
|
105
|
+
} from "./chunk-WNKWAEUR.js";
|
|
101
106
|
import "./chunk-MZNPGW5Q.js";
|
|
107
|
+
import {
|
|
108
|
+
TransformerService
|
|
109
|
+
} from "./chunk-DK4A7DLE.js";
|
|
110
|
+
import "./chunk-XXFYLL7R.js";
|
|
102
111
|
import "./chunk-XTEI64OU.js";
|
|
103
112
|
import "./chunk-XX6NQJMA.js";
|
|
104
|
-
import "./chunk-
|
|
113
|
+
import "./chunk-GFIZ6LQI.js";
|
|
105
114
|
import "./chunk-OE6TDIWW.js";
|
|
106
115
|
import "./chunk-DRWHTIIZ.js";
|
|
107
|
-
import "./chunk-IK3KE3AU.js";
|
|
108
|
-
import {
|
|
109
|
-
getProviderHeaders
|
|
110
|
-
} from "./chunk-ZY6KU6P3.js";
|
|
111
116
|
import "./chunk-JWC6APFQ.js";
|
|
112
117
|
import "./chunk-5ERIZW3D.js";
|
|
113
|
-
import "./chunk-
|
|
114
|
-
import "./chunk-
|
|
118
|
+
import "./chunk-PO3XB56Z.js";
|
|
119
|
+
import "./chunk-N7OOJI5V.js";
|
|
120
|
+
import "./chunk-23S5OPIO.js";
|
|
115
121
|
import {
|
|
116
122
|
serializeError
|
|
117
123
|
} from "./chunk-AVYJ4YBN.js";
|
|
124
|
+
import "./chunk-OPRS4IQZ.js";
|
|
125
|
+
import {
|
|
126
|
+
BoundAccountSelectionError,
|
|
127
|
+
boundAccountSelectionMessage,
|
|
128
|
+
isBoundAccountSelectionError
|
|
129
|
+
} from "./chunk-2JYRIADS.js";
|
|
130
|
+
import "./chunk-DE2SRBFZ.js";
|
|
131
|
+
import {
|
|
132
|
+
getProviderHeaders
|
|
133
|
+
} from "./chunk-ZY6KU6P3.js";
|
|
118
134
|
import {
|
|
119
135
|
beginBillingCapture
|
|
120
136
|
} from "./chunk-WLYIIEAF.js";
|
|
@@ -134,9 +150,8 @@ import {
|
|
|
134
150
|
pickModelRefFromList,
|
|
135
151
|
resolvePrefixTarget,
|
|
136
152
|
resolveRoute,
|
|
137
|
-
validateEndpointModelConfig
|
|
138
|
-
|
|
139
|
-
} from "./chunk-UHGVBFU3.js";
|
|
153
|
+
validateEndpointModelConfig
|
|
154
|
+
} from "./chunk-EBLFCNPY.js";
|
|
140
155
|
import "./chunk-AQ5TNQB7.js";
|
|
141
156
|
import {
|
|
142
157
|
ENDPOINT_MODEL_KINDS
|
|
@@ -154,7 +169,7 @@ import {
|
|
|
154
169
|
} from "./chunk-H5JUT3KV.js";
|
|
155
170
|
import {
|
|
156
171
|
beginAuditCapture
|
|
157
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-7C7DET6S.js";
|
|
158
173
|
import {
|
|
159
174
|
AUDIT_REDACTED,
|
|
160
175
|
redactAuditText
|
|
@@ -172,11 +187,13 @@ import {
|
|
|
172
187
|
convertOpenAIToAnthropicWithThinking,
|
|
173
188
|
hasImageContent,
|
|
174
189
|
hasThinkingEnabled
|
|
175
|
-
} from "./chunk-
|
|
176
|
-
import "./chunk-
|
|
177
|
-
import "./chunk-
|
|
178
|
-
import "./chunk-
|
|
179
|
-
import "./chunk-
|
|
190
|
+
} from "./chunk-5NJLQ6T6.js";
|
|
191
|
+
import "./chunk-N5T4M4GU.js";
|
|
192
|
+
import "./chunk-TOVPMMHM.js";
|
|
193
|
+
import "./chunk-RJ5ZGNI3.js";
|
|
194
|
+
import "./chunk-3WD4HTR2.js";
|
|
195
|
+
import "./chunk-MKF46GNZ.js";
|
|
196
|
+
import "./chunk-GL6XM527.js";
|
|
180
197
|
import {
|
|
181
198
|
BuiltinToolExecutor,
|
|
182
199
|
getBuiltinSearchTools
|
|
@@ -197,12 +214,14 @@ import {
|
|
|
197
214
|
} from "./chunk-HUZZZ3JL.js";
|
|
198
215
|
export {
|
|
199
216
|
AUDIT_REDACTED,
|
|
217
|
+
BoundAccountSelectionError,
|
|
200
218
|
BuiltinToolExecutor,
|
|
201
219
|
CompletionService,
|
|
202
220
|
ConcurrencyQueueFullError,
|
|
203
221
|
ConcurrencyWaitCancelledError,
|
|
204
222
|
ConcurrencyWaitTimeoutError,
|
|
205
223
|
DEFAULT_ACCOUNT_PROBE,
|
|
224
|
+
DEFAULT_ALLOWANCE_SCHEDULING,
|
|
206
225
|
DEFAULT_CONCURRENCY_QUEUE,
|
|
207
226
|
DEFAULT_FINGERPRINT,
|
|
208
227
|
DEFAULT_OUTBOUND_PORT,
|
|
@@ -214,7 +233,6 @@ export {
|
|
|
214
233
|
NATIVE_SEARCH_TOOL_NAMES,
|
|
215
234
|
OPENROUTER_APP_HEADERS,
|
|
216
235
|
OUTBOUND_API_SERVER_CONFIG_KEY,
|
|
217
|
-
OutboundApiConfigError,
|
|
218
236
|
OutboundApiServer,
|
|
219
237
|
OutboundConcurrencyGate,
|
|
220
238
|
OutboundRateLimiter,
|
|
@@ -234,6 +252,7 @@ export {
|
|
|
234
252
|
attach as attachStreamEventBuffer,
|
|
235
253
|
beginAuditCapture,
|
|
236
254
|
beginBillingCapture,
|
|
255
|
+
boundAccountSelectionMessage,
|
|
237
256
|
buildAnthropicApiUrl,
|
|
238
257
|
buildAzureOpenAIApiUrl,
|
|
239
258
|
buildGeminiApiUrl,
|
|
@@ -241,6 +260,8 @@ export {
|
|
|
241
260
|
buildOpenAIApiUrl,
|
|
242
261
|
buildOpenAIResponseApiUrl,
|
|
243
262
|
buildProviderApiUrl,
|
|
263
|
+
candidateBackgroundModelIds,
|
|
264
|
+
candidateGatewayBindings,
|
|
244
265
|
checkKeyQuota,
|
|
245
266
|
classifyModelPrefix,
|
|
246
267
|
computeKeyExpiry,
|
|
@@ -256,6 +277,7 @@ export {
|
|
|
256
277
|
convertOpenAIStreamToAnthropic,
|
|
257
278
|
convertOpenAIToAnthropic,
|
|
258
279
|
convertOpenAIToAnthropicWithThinking,
|
|
280
|
+
createIntegrationKey,
|
|
259
281
|
createNamedKey,
|
|
260
282
|
createSSEParser,
|
|
261
283
|
defaultServerConfig,
|
|
@@ -267,6 +289,7 @@ export {
|
|
|
267
289
|
endpointToIngressFormat,
|
|
268
290
|
extractRouteToken,
|
|
269
291
|
formatUrls,
|
|
292
|
+
gatewayBindingToEndpointConfig,
|
|
270
293
|
generateVoucherCode,
|
|
271
294
|
getBuiltinSearchTools,
|
|
272
295
|
getOpenRouterAppIdentity,
|
|
@@ -279,6 +302,7 @@ export {
|
|
|
279
302
|
hasThinkingEnabled,
|
|
280
303
|
hashKey,
|
|
281
304
|
hashVoucherCode,
|
|
305
|
+
isBoundAccountSelectionError,
|
|
282
306
|
isConcurrencyRejection,
|
|
283
307
|
isKindMappedEndpoint,
|
|
284
308
|
isOpenRouterProvider,
|
|
@@ -286,15 +310,18 @@ export {
|
|
|
286
310
|
isSerialQueueTimeout,
|
|
287
311
|
isSubscriptionProviderId,
|
|
288
312
|
isUserMessageRequest,
|
|
313
|
+
legacyEndpointsToBindings,
|
|
289
314
|
loadServerConfig,
|
|
290
315
|
mergeServerConfig,
|
|
291
316
|
modelKindsForEndpoint,
|
|
292
317
|
newVoucherId,
|
|
293
318
|
normalizeAccountProbe,
|
|
319
|
+
normalizeAllowanceScheduling,
|
|
294
320
|
normalizeAudit,
|
|
295
321
|
normalizeAzureEndpoint,
|
|
296
322
|
normalizeBilling,
|
|
297
323
|
normalizeFingerprint,
|
|
324
|
+
normalizeGatewayBindings,
|
|
298
325
|
normalizePrefixTargets,
|
|
299
326
|
normalizeProxyConfig,
|
|
300
327
|
normalizeProxySegment,
|
|
@@ -311,6 +338,7 @@ export {
|
|
|
311
338
|
register as registerStreamEventBuffer,
|
|
312
339
|
release as releaseStreamEventBuffer,
|
|
313
340
|
resolveApiFormat,
|
|
341
|
+
resolveGatewayBinding,
|
|
314
342
|
resolvePrefixTarget,
|
|
315
343
|
resolveProviderEndpoint,
|
|
316
344
|
resolveRoute,
|
|
@@ -322,7 +350,6 @@ export {
|
|
|
322
350
|
streamSSEResponse,
|
|
323
351
|
toVoucherInfo,
|
|
324
352
|
validateEndpointModelConfig,
|
|
325
|
-
validateServerModelConfig,
|
|
326
353
|
verifyKey,
|
|
327
354
|
verifyPresentedKey,
|
|
328
355
|
voucherCodePrefix
|
|
@@ -71,7 +71,7 @@ type QuotaDecision = {
|
|
|
71
71
|
* Decide whether the key's accumulated spend already meets/exceeds any
|
|
72
72
|
* configured cost limit (design D4). `allowed:false` when a scope's PRIOR spend
|
|
73
73
|
* is `>= limit` (the triggering request's own cost is unknown pre-flight →
|
|
74
|
-
* bounded one-request overage
|
|
74
|
+
* bounded one-request overage). An unconfigured scope is never
|
|
75
75
|
* gated; a `limits`-less key always passes.
|
|
76
76
|
*/
|
|
77
77
|
declare function checkKeyQuota(limits: KeyCostLimits | undefined, spend: KeySpend): QuotaDecision;
|
|
@@ -71,7 +71,7 @@ type QuotaDecision = {
|
|
|
71
71
|
* Decide whether the key's accumulated spend already meets/exceeds any
|
|
72
72
|
* configured cost limit (design D4). `allowed:false` when a scope's PRIOR spend
|
|
73
73
|
* is `>= limit` (the triggering request's own cost is unknown pre-flight →
|
|
74
|
-
* bounded one-request overage
|
|
74
|
+
* bounded one-request overage). An unconfigured scope is never
|
|
75
75
|
* gated; a `limits`-less key always passes.
|
|
76
76
|
*/
|
|
77
77
|
declare function checkKeyQuota(limits: KeyCostLimits | undefined, spend: KeySpend): QuotaDecision;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkXPIOJQS2cjs = require('../chunk-XPIOJQS2.cjs');
|
|
4
4
|
require('../chunk-FCR77GYM.cjs');
|
|
5
5
|
require('../chunk-AEOZIDEB.cjs');
|
|
6
6
|
require('../chunk-XSVNC2UD.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.beginAuditCapture =
|
|
9
|
+
exports.beginAuditCapture = _chunkXPIOJQS2cjs.beginAuditCapture;
|
|
@@ -15,10 +15,9 @@ import http from 'node:http';
|
|
|
15
15
|
* elapsed ms, and the fields the handler fills in (keyId / model / provider /
|
|
16
16
|
* error / bodies) — then hands it to the fire-and-forget `recordAudit`;
|
|
17
17
|
* - when `captureBodies` is ALSO on, wraps `res.write`/`res.end` to accumulate
|
|
18
|
-
* the response body
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* which defeated debugging. See `upstreamTrace.ts` for the upstream leg.
|
|
18
|
+
* the response body, including a streaming `text/event-stream`. The default
|
|
19
|
+
* `maxBodyBytes:-1` captures the full body; a non-negative limit retains only
|
|
20
|
+
* a bounded UTF-8 prefix.
|
|
22
21
|
*
|
|
23
22
|
* Request HEADERS are NEVER read into a record (Authorization / x-api-key live
|
|
24
23
|
* there). Every stored body passes through {@link redactAuditText}. The assembly
|
|
@@ -15,10 +15,9 @@ import http from 'node:http';
|
|
|
15
15
|
* elapsed ms, and the fields the handler fills in (keyId / model / provider /
|
|
16
16
|
* error / bodies) — then hands it to the fire-and-forget `recordAudit`;
|
|
17
17
|
* - when `captureBodies` is ALSO on, wraps `res.write`/`res.end` to accumulate
|
|
18
|
-
* the response body
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* which defeated debugging. See `upstreamTrace.ts` for the upstream leg.
|
|
18
|
+
* the response body, including a streaming `text/event-stream`. The default
|
|
19
|
+
* `maxBodyBytes:-1` captures the full body; a non-negative limit retains only
|
|
20
|
+
* a bounded UTF-8 prefix.
|
|
22
21
|
*
|
|
23
22
|
* Request HEADERS are NEVER read into a record (Authorization / x-api-key live
|
|
24
23
|
* there). Every stored body passes through {@link redactAuditText}. The assembly
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk4VZX5F4Tcjs = require('../chunk-4VZX5F4T.cjs');
|
|
7
7
|
require('../chunk-QBZJ7P2T.cjs');
|
|
8
8
|
require('../chunk-4IH4EL7M.cjs');
|
|
9
9
|
|
|
@@ -11,4 +11,4 @@ require('../chunk-4IH4EL7M.cjs');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
exports.isSubscriptionProviderId =
|
|
14
|
+
exports.isSubscriptionProviderId = _chunk4VZX5F4Tcjs.isSubscriptionProviderId; exports.parseModelRef = _chunk4VZX5F4Tcjs.parseModelRef; exports.pickModelRefFromList = _chunk4VZX5F4Tcjs.pickModelRefFromList; exports.resolveRoute = _chunk4VZX5F4Tcjs.resolveRoute;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import '../ports/provider-config-source.cjs';
|
|
2
2
|
import '../provider-proxy/types.cjs';
|
|
3
|
-
import '../types-
|
|
4
|
-
export { R as RouteResolveError, b as RouteResolveResult, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from '../routeResolver-
|
|
3
|
+
import '../types-gjJ5lJ5n.cjs';
|
|
4
|
+
export { R as RouteResolveError, b as RouteResolveResult, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from '../routeResolver-D5OzD0iM.cjs';
|
|
5
5
|
import '@omnicross/contracts/llm-config';
|
|
6
6
|
import '../transformer/types.cjs';
|
|
7
7
|
import '../transformer/TransformerService.cjs';
|
|
8
8
|
import 'node:http';
|
|
9
9
|
import '@omnicross/contracts/completion-types';
|
|
10
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
10
11
|
import '@omnicross/contracts/subscription-types';
|
|
11
12
|
import '@omnicross/contracts/usage-types';
|
|
12
13
|
import '../completion/ApiKeyPoolService.cjs';
|
|
13
14
|
import '../logger-4GvQNzhE.cjs';
|
|
14
15
|
import '../pipeline/AuthSource.cjs';
|
|
16
|
+
import '../pipeline/BoundAccountSelectionError.cjs';
|
|
15
17
|
import '../pipeline/SubscriptionAuthSource.cjs';
|
|
16
18
|
import '../pipeline/SubscriptionAuthStrategy.cjs';
|
|
17
19
|
import '../ports/web-search-backend.cjs';
|
|
@@ -23,4 +25,4 @@ import '@omnicross/contracts/health-logging-types';
|
|
|
23
25
|
import '@omnicross/contracts/voucher-types';
|
|
24
26
|
import '@omnicross/contracts/webhook-types';
|
|
25
27
|
import '../ProviderProxy-CnMQYN59.cjs';
|
|
26
|
-
import '../keyPolicy-
|
|
28
|
+
import '../keyPolicy-zdWTu3CQ.cjs';
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import '../ports/provider-config-source.js';
|
|
2
2
|
import '../provider-proxy/types.js';
|
|
3
|
-
import '../types-
|
|
4
|
-
export { R as RouteResolveError, b as RouteResolveResult, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from '../routeResolver-
|
|
3
|
+
import '../types-CqZD77rS.js';
|
|
4
|
+
export { R as RouteResolveError, b as RouteResolveResult, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from '../routeResolver-BxOfunbm.js';
|
|
5
5
|
import '@omnicross/contracts/llm-config';
|
|
6
6
|
import '../transformer/types.js';
|
|
7
7
|
import '../transformer/TransformerService.js';
|
|
8
8
|
import 'node:http';
|
|
9
9
|
import '@omnicross/contracts/completion-types';
|
|
10
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
10
11
|
import '@omnicross/contracts/subscription-types';
|
|
11
12
|
import '@omnicross/contracts/usage-types';
|
|
12
13
|
import '../completion/ApiKeyPoolService.js';
|
|
13
14
|
import '../logger-4GvQNzhE.js';
|
|
14
15
|
import '../pipeline/AuthSource.js';
|
|
16
|
+
import '../pipeline/BoundAccountSelectionError.js';
|
|
15
17
|
import '../pipeline/SubscriptionAuthSource.js';
|
|
16
18
|
import '../pipeline/SubscriptionAuthStrategy.js';
|
|
17
19
|
import '../ports/web-search-backend.js';
|
|
@@ -23,4 +25,4 @@ import '@omnicross/contracts/health-logging-types';
|
|
|
23
25
|
import '@omnicross/contracts/voucher-types';
|
|
24
26
|
import '@omnicross/contracts/webhook-types';
|
|
25
27
|
import '../ProviderProxy-C-xqrkKi.js';
|
|
26
|
-
import '../keyPolicy-
|
|
28
|
+
import '../keyPolicy-zdWTu3CQ.js';
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { SubscriptionDispatchProfile } from '../provider-proxy/types.cjs';
|
|
2
2
|
import 'node:http';
|
|
3
3
|
import '@omnicross/contracts/completion-types';
|
|
4
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
4
5
|
import '@omnicross/contracts/subscription-types';
|
|
5
6
|
import '@omnicross/contracts/usage-types';
|
|
6
7
|
import '../completion/ApiKeyPoolService.cjs';
|
|
7
8
|
import '@omnicross/contracts/llm-config';
|
|
8
9
|
import '../logger-4GvQNzhE.cjs';
|
|
9
10
|
import '../pipeline/AuthSource.cjs';
|
|
11
|
+
import '../pipeline/BoundAccountSelectionError.cjs';
|
|
10
12
|
import '../pipeline/SubscriptionAuthSource.cjs';
|
|
11
13
|
import '../pipeline/SubscriptionAuthStrategy.cjs';
|
|
12
14
|
import '../ports/provider-config-source.cjs';
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { SubscriptionDispatchProfile } from '../provider-proxy/types.js';
|
|
2
2
|
import 'node:http';
|
|
3
3
|
import '@omnicross/contracts/completion-types';
|
|
4
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
4
5
|
import '@omnicross/contracts/subscription-types';
|
|
5
6
|
import '@omnicross/contracts/usage-types';
|
|
6
7
|
import '../completion/ApiKeyPoolService.js';
|
|
7
8
|
import '@omnicross/contracts/llm-config';
|
|
8
9
|
import '../logger-4GvQNzhE.js';
|
|
9
10
|
import '../pipeline/AuthSource.js';
|
|
11
|
+
import '../pipeline/BoundAccountSelectionError.js';
|
|
10
12
|
import '../pipeline/SubscriptionAuthSource.js';
|
|
11
13
|
import '../pipeline/SubscriptionAuthStrategy.js';
|
|
12
14
|
import '../ports/provider-config-source.js';
|
|
@@ -8,12 +8,14 @@ import '../logger-4GvQNzhE.cjs';
|
|
|
8
8
|
import '../ports/provider-config-source.cjs';
|
|
9
9
|
import '../ProviderProxy-CnMQYN59.cjs';
|
|
10
10
|
import '../provider-proxy/types.cjs';
|
|
11
|
-
|
|
11
|
+
import '../pipeline/BoundAccountSelectionError.cjs';
|
|
12
|
+
export { S as AccountHealthConfig, 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 KindMappedEndpoint, M as MessagesModelKind, l as ModelKind, m as ModelPrefixTargets, Q as ModelRef, n as OutboundApiDeps, o as OutboundApiKeyCreated, p as OutboundApiKeyInfo, q as OutboundApiServerConfig, r as OutboundApiServerStatus, s as OutboundEndpoint, t as OutboundFormatUrls, u as OutboundKeyActivationMode, O as OutboundKeyDb, v as OutboundKeyDbRow, T as OutboundKeyModelRestrictionMode, w as OutboundKeyPolicy, x as OutboundProxyConfig, R as RequestRole, y as ResponsesModelKind, U as UserMessageQueueConfig } from '../types-gjJ5lJ5n.cjs';
|
|
12
13
|
import '@omnicross/contracts/llm-config';
|
|
13
14
|
import '../transformer/types.cjs';
|
|
14
15
|
import '../transformer/TransformerService.cjs';
|
|
15
16
|
import 'node:http';
|
|
16
17
|
import '@omnicross/contracts/completion-types';
|
|
18
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
17
19
|
import '@omnicross/contracts/subscription-types';
|
|
18
20
|
import '@omnicross/contracts/usage-types';
|
|
19
21
|
import '../completion/ApiKeyPoolService.cjs';
|
|
@@ -22,4 +24,4 @@ import '../pipeline/SubscriptionAuthSource.cjs';
|
|
|
22
24
|
import '../pipeline/SubscriptionAuthStrategy.cjs';
|
|
23
25
|
import '../ports/web-search-backend.cjs';
|
|
24
26
|
import '@omnicross/contracts/websearch-types';
|
|
25
|
-
import '../keyPolicy-
|
|
27
|
+
import '../keyPolicy-zdWTu3CQ.cjs';
|