@omnicross/core 0.4.5 → 0.4.6

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.
Files changed (79) hide show
  1. package/dist/{CompletionService-BniP7j88.d.cts → CompletionService-BJu4AWVc.d.cts} +1 -1
  2. package/dist/{CompletionService-BqrKPwfA.d.ts → CompletionService-C4W2gBi_.d.ts} +1 -1
  3. package/dist/{ProviderProxy-Ckr6oTrE.d.ts → ProviderProxy-DxsNi3cO.d.ts} +1 -1
  4. package/dist/{ProviderProxy-Bz_nkOwq.d.cts → ProviderProxy-OuQPYW2I.d.cts} +1 -1
  5. package/dist/{chunk-24W3DVGI.js → chunk-5XG6FR5F.js} +1 -1
  6. package/dist/{chunk-WYUXJKMK.js → chunk-DRUT7H5H.js} +1 -1
  7. package/dist/{chunk-NCCEWVWY.cjs → chunk-DV7656NN.cjs} +571 -364
  8. package/dist/{chunk-57Y2EA2G.cjs → chunk-JGRNVH7C.cjs} +1 -1
  9. package/dist/{chunk-2DMOOZ4F.cjs → chunk-LWBXQXZ3.cjs} +1 -1
  10. package/dist/{chunk-7PIUVCKK.js → chunk-MZCJL3QU.js} +1 -1
  11. package/dist/{chunk-LVQOCIES.cjs → chunk-QLVRJ5FS.cjs} +2 -2
  12. package/dist/{chunk-L4L77G3X.js → chunk-TU4BB776.js} +221 -14
  13. package/dist/{chunk-ZMERU7D3.js → chunk-VXHN5IDL.js} +1 -1
  14. package/dist/{chunk-QWNUOR7F.cjs → chunk-ZTN2PVKO.cjs} +1 -1
  15. package/dist/completion/CompletionService.cjs +6 -6
  16. package/dist/completion/CompletionService.d.cts +2 -2
  17. package/dist/completion/CompletionService.d.ts +2 -2
  18. package/dist/completion/CompletionService.js +5 -5
  19. package/dist/completion.cjs +6 -6
  20. package/dist/completion.d.cts +2 -2
  21. package/dist/completion.d.ts +2 -2
  22. package/dist/completion.js +5 -5
  23. package/dist/image-generation.d.cts +4 -4
  24. package/dist/image-generation.d.ts +4 -4
  25. package/dist/index.cjs +6 -6
  26. package/dist/index.d.cts +6 -6
  27. package/dist/index.d.ts +6 -6
  28. package/dist/index.js +5 -5
  29. package/dist/openai-operation.d.cts +1 -1
  30. package/dist/openai-operation.d.ts +1 -1
  31. package/dist/outbound-api/routeResolver.cjs +2 -2
  32. package/dist/outbound-api/routeResolver.d.cts +5 -5
  33. package/dist/outbound-api/routeResolver.d.ts +5 -5
  34. package/dist/outbound-api/routeResolver.js +1 -1
  35. package/dist/outbound-api/subscriptionRegistryPort.d.cts +9 -1
  36. package/dist/outbound-api/subscriptionRegistryPort.d.ts +9 -1
  37. package/dist/outbound-api/types.d.cts +4 -4
  38. package/dist/outbound-api/types.d.ts +4 -4
  39. package/dist/outbound-api.cjs +6 -6
  40. package/dist/outbound-api.d.cts +6 -6
  41. package/dist/outbound-api.d.ts +6 -6
  42. package/dist/outbound-api.js +5 -5
  43. package/dist/pipeline/AccountAllowanceScheduling.d.cts +4 -4
  44. package/dist/pipeline/AccountAllowanceScheduling.d.ts +4 -4
  45. package/dist/pipeline/SubscriptionAuthSource.d.cts +11 -0
  46. package/dist/pipeline/SubscriptionAuthSource.d.ts +11 -0
  47. package/dist/ports.d.cts +4 -4
  48. package/dist/ports.d.ts +4 -4
  49. package/dist/provider-proxy/ProviderProxy.cjs +6 -6
  50. package/dist/provider-proxy/ProviderProxy.d.cts +2 -2
  51. package/dist/provider-proxy/ProviderProxy.d.ts +2 -2
  52. package/dist/provider-proxy/ProviderProxy.js +5 -5
  53. package/dist/provider-proxy/identity/openCodeGoHeaders.cjs +2 -2
  54. package/dist/provider-proxy/identity/openCodeGoHeaders.js +1 -1
  55. package/dist/provider-proxy/ingress/providerProxyShared.cjs +12 -6
  56. package/dist/provider-proxy/ingress/providerProxyShared.d.cts +36 -2
  57. package/dist/provider-proxy/ingress/providerProxyShared.d.ts +36 -2
  58. package/dist/provider-proxy/ingress/providerProxyShared.js +11 -5
  59. package/dist/provider-proxy/types.d.cts +1 -1
  60. package/dist/provider-proxy/types.d.ts +1 -1
  61. package/dist/provider-proxy.cjs +6 -6
  62. package/dist/provider-proxy.d.cts +6 -6
  63. package/dist/provider-proxy.d.ts +6 -6
  64. package/dist/provider-proxy.js +5 -5
  65. package/dist/{routeResolver-BdNJvTZP.d.cts → routeResolver-BQYMEXer.d.cts} +2 -2
  66. package/dist/{routeResolver-zVoCx9r3.d.ts → routeResolver-DTfyzaFb.d.ts} +2 -2
  67. package/dist/transformer/transformers/OpenAITransformer.cjs +2 -2
  68. package/dist/transformer/transformers/OpenAITransformer.js +1 -1
  69. package/dist/transformer/transformers.cjs +3 -3
  70. package/dist/transformer/transformers.js +2 -2
  71. package/dist/transformer.cjs +3 -3
  72. package/dist/transformer.js +2 -2
  73. package/dist/{types-Dt1bgHPg.d.cts → types-BpSkj2JA.d.cts} +3 -3
  74. package/dist/{types-BVwJQ9ZS.d.cts → types-BsZ1s_a_.d.cts} +1 -1
  75. package/dist/{types-By9Tg6-I.d.ts → types-Di8VH1c9.d.ts} +12 -0
  76. package/dist/{types-BSIJdsyl.d.cts → types-Dpr5IAaP.d.cts} +12 -0
  77. package/dist/{types-IRPv4i1Y.d.ts → types-EReErShW.d.ts} +3 -3
  78. package/dist/{types-VAHRysdP.d.ts → types-USaixzVP.d.ts} +1 -1
  79. package/package.json +2 -2
@@ -1,11 +1,11 @@
1
1
  import { VoucherConfig } from '@omnicross/contracts/voucher-types';
2
- import { c as EndpointRoutingConfig, G as GatewayBinding, U as UserMessageQueueConfig, b as ConcurrencyQueueConfig, $ as AnthropicConfigSegment, S as SearchServerConfig, q as OutboundApiDeps, u as OutboundApiServerStatus, w as OutboundFormatUrls, A as AccountProbeConfig, a as AllowanceSchedulingConfig, F as FingerprintConfig, t as OutboundApiServerConfig, p as ModelPrefixTargets, H as OutboundProxyConfig, k as ImagesServerConfig, v as OutboundEndpoint, R as RequestRole, a0 as GatewayMappingEffort, _ as ModelRef, n as KindMappedEndpoint, o as ModelKind, B as OutboundPermission, g as GatewayBindingTarget, O as OutboundKeyDb, r as OutboundApiKeyCreated } from './types-Dt1bgHPg.cjs';
3
- export { C as ChatDispatchMode, D as DEFAULT_IMAGE_MODEL_ROUTES, E as ENDPOINT_MODEL_KINDS, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, h as GatewayModelMapping, I as IMAGE_PROVIDER_IDS, i as ImageProviderId, j as ImagesCodexAdapterConfig, K as KeySpendReader, l as KeySpendSeeder, m as KeySpendTracker, M as MessagesModelKind, s as OutboundApiKeyInfo, x as OutboundKeyActivationMode, y as OutboundKeyDbRow, z as OutboundKeyPolicy, J as ResponsesModelKind, V as VoucherCreateInput, L as VoucherDb, N as computeVoucherGrant, P as generateVoucherCode, Q as hashVoucherCode, T as newVoucherId, W as startOfLocalDay, X as startOfLocalWeek, Y as toVoucherInfo, Z as voucherCodePrefix } from './types-Dt1bgHPg.cjs';
2
+ import { c as EndpointRoutingConfig, G as GatewayBinding, U as UserMessageQueueConfig, b as ConcurrencyQueueConfig, $ as AnthropicConfigSegment, S as SearchServerConfig, q as OutboundApiDeps, u as OutboundApiServerStatus, w as OutboundFormatUrls, A as AccountProbeConfig, a as AllowanceSchedulingConfig, F as FingerprintConfig, t as OutboundApiServerConfig, p as ModelPrefixTargets, H as OutboundProxyConfig, k as ImagesServerConfig, v as OutboundEndpoint, R as RequestRole, a0 as GatewayMappingEffort, _ as ModelRef, n as KindMappedEndpoint, o as ModelKind, B as OutboundPermission, g as GatewayBindingTarget, O as OutboundKeyDb, r as OutboundApiKeyCreated } from './types-BpSkj2JA.cjs';
3
+ export { C as ChatDispatchMode, D as DEFAULT_IMAGE_MODEL_ROUTES, E as ENDPOINT_MODEL_KINDS, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, h as GatewayModelMapping, I as IMAGE_PROVIDER_IDS, i as ImageProviderId, j as ImagesCodexAdapterConfig, K as KeySpendReader, l as KeySpendSeeder, m as KeySpendTracker, M as MessagesModelKind, s as OutboundApiKeyInfo, x as OutboundKeyActivationMode, y as OutboundKeyDbRow, z as OutboundKeyPolicy, J as ResponsesModelKind, V as VoucherCreateInput, L as VoucherDb, N as computeVoucherGrant, P as generateVoucherCode, Q as hashVoucherCode, T as newVoucherId, W as startOfLocalDay, X as startOfLocalWeek, Y as toVoucherInfo, Z as voucherCodePrefix } from './types-BpSkj2JA.cjs';
4
4
  import { ProxyConfig } from '@omnicross/contracts/account-tokens-types';
5
5
  import { AuditConfig } from '@omnicross/contracts/audit-types';
6
6
  import { BillingConfig } from '@omnicross/contracts/billing-types';
7
7
  import { WebhookDestination, WebhookConfig } from '@omnicross/contracts/webhook-types';
8
- import { e as ImageApiLimits } from './types-BVwJQ9ZS.cjs';
8
+ import { e as ImageApiLimits } from './types-BsZ1s_a_.cjs';
9
9
  import { S as SearchApiProviderConfigs } from './types-CbCZqLGg.cjs';
10
10
  import http from 'node:http';
11
11
  import { c as SearchFrontendMode } from './frontends-Doz0RaWu.cjs';
@@ -15,8 +15,8 @@ export { AuditCaptureContext, beginAuditCapture } from './outbound-api/auditCapt
15
15
  export { BillingCaptureContext, beginBillingCapture } from './outbound-api/billingCapture.cjs';
16
16
  import { K as KeyCostLimits, M as ModelRestriction } from './keyPolicy-zdWTu3CQ.cjs';
17
17
  export { a as KeyExpiryInput, b as KeyExpiryResult, c as KeySpend, Q as QuotaDecision, d as checkKeyQuota, e as computeKeyExpiry } from './keyPolicy-zdWTu3CQ.cjs';
18
- import { D as IngressFormat } from './types-BSIJdsyl.cjs';
19
- export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-BdNJvTZP.cjs';
18
+ import { D as IngressFormat } from './types-Dpr5IAaP.cjs';
19
+ export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-BQYMEXer.cjs';
20
20
  export { BoundAccountFallbackPolicy, BoundAccountSelectionError, BoundAccountSelectionFailureReason, boundAccountSelectionMessage, isBoundAccountSelectionError } from './pipeline/BoundAccountSelectionError.cjs';
21
21
  import '@omnicross/contracts/completion-types';
22
22
  import '@omnicross/contracts/health-logging-types';
@@ -25,7 +25,7 @@ import './ports/provider-config-source.cjs';
25
25
  import '@omnicross/contracts/llm-config';
26
26
  import './transformer/types.cjs';
27
27
  import './transformer/TransformerService.cjs';
28
- import './ProviderProxy-Bz_nkOwq.cjs';
28
+ import './ProviderProxy-OuQPYW2I.cjs';
29
29
  import '@omnicross/contracts/image-generation-types';
30
30
  import 'node:fs/promises';
31
31
  import '@omnicross/contracts/search-types';
@@ -1,11 +1,11 @@
1
1
  import { VoucherConfig } from '@omnicross/contracts/voucher-types';
2
- import { c as EndpointRoutingConfig, G as GatewayBinding, U as UserMessageQueueConfig, b as ConcurrencyQueueConfig, $ as AnthropicConfigSegment, S as SearchServerConfig, q as OutboundApiDeps, u as OutboundApiServerStatus, w as OutboundFormatUrls, A as AccountProbeConfig, a as AllowanceSchedulingConfig, F as FingerprintConfig, t as OutboundApiServerConfig, p as ModelPrefixTargets, H as OutboundProxyConfig, k as ImagesServerConfig, v as OutboundEndpoint, R as RequestRole, a0 as GatewayMappingEffort, _ as ModelRef, n as KindMappedEndpoint, o as ModelKind, B as OutboundPermission, g as GatewayBindingTarget, O as OutboundKeyDb, r as OutboundApiKeyCreated } from './types-IRPv4i1Y.js';
3
- export { C as ChatDispatchMode, D as DEFAULT_IMAGE_MODEL_ROUTES, E as ENDPOINT_MODEL_KINDS, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, h as GatewayModelMapping, I as IMAGE_PROVIDER_IDS, i as ImageProviderId, j as ImagesCodexAdapterConfig, K as KeySpendReader, l as KeySpendSeeder, m as KeySpendTracker, M as MessagesModelKind, s as OutboundApiKeyInfo, x as OutboundKeyActivationMode, y as OutboundKeyDbRow, z as OutboundKeyPolicy, J as ResponsesModelKind, V as VoucherCreateInput, L as VoucherDb, N as computeVoucherGrant, P as generateVoucherCode, Q as hashVoucherCode, T as newVoucherId, W as startOfLocalDay, X as startOfLocalWeek, Y as toVoucherInfo, Z as voucherCodePrefix } from './types-IRPv4i1Y.js';
2
+ import { c as EndpointRoutingConfig, G as GatewayBinding, U as UserMessageQueueConfig, b as ConcurrencyQueueConfig, $ as AnthropicConfigSegment, S as SearchServerConfig, q as OutboundApiDeps, u as OutboundApiServerStatus, w as OutboundFormatUrls, A as AccountProbeConfig, a as AllowanceSchedulingConfig, F as FingerprintConfig, t as OutboundApiServerConfig, p as ModelPrefixTargets, H as OutboundProxyConfig, k as ImagesServerConfig, v as OutboundEndpoint, R as RequestRole, a0 as GatewayMappingEffort, _ as ModelRef, n as KindMappedEndpoint, o as ModelKind, B as OutboundPermission, g as GatewayBindingTarget, O as OutboundKeyDb, r as OutboundApiKeyCreated } from './types-EReErShW.js';
3
+ export { C as ChatDispatchMode, D as DEFAULT_IMAGE_MODEL_ROUTES, E as ENDPOINT_MODEL_KINDS, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, h as GatewayModelMapping, I as IMAGE_PROVIDER_IDS, i as ImageProviderId, j as ImagesCodexAdapterConfig, K as KeySpendReader, l as KeySpendSeeder, m as KeySpendTracker, M as MessagesModelKind, s as OutboundApiKeyInfo, x as OutboundKeyActivationMode, y as OutboundKeyDbRow, z as OutboundKeyPolicy, J as ResponsesModelKind, V as VoucherCreateInput, L as VoucherDb, N as computeVoucherGrant, P as generateVoucherCode, Q as hashVoucherCode, T as newVoucherId, W as startOfLocalDay, X as startOfLocalWeek, Y as toVoucherInfo, Z as voucherCodePrefix } from './types-EReErShW.js';
4
4
  import { ProxyConfig } from '@omnicross/contracts/account-tokens-types';
5
5
  import { AuditConfig } from '@omnicross/contracts/audit-types';
6
6
  import { BillingConfig } from '@omnicross/contracts/billing-types';
7
7
  import { WebhookDestination, WebhookConfig } from '@omnicross/contracts/webhook-types';
8
- import { e as ImageApiLimits } from './types-VAHRysdP.js';
8
+ import { e as ImageApiLimits } from './types-USaixzVP.js';
9
9
  import { S as SearchApiProviderConfigs } from './types-CbCZqLGg.js';
10
10
  import http from 'node:http';
11
11
  import { c as SearchFrontendMode } from './frontends-Doz0RaWu.js';
@@ -15,8 +15,8 @@ export { AuditCaptureContext, beginAuditCapture } from './outbound-api/auditCapt
15
15
  export { BillingCaptureContext, beginBillingCapture } from './outbound-api/billingCapture.js';
16
16
  import { K as KeyCostLimits, M as ModelRestriction } from './keyPolicy-zdWTu3CQ.js';
17
17
  export { a as KeyExpiryInput, b as KeyExpiryResult, c as KeySpend, Q as QuotaDecision, d as checkKeyQuota, e as computeKeyExpiry } from './keyPolicy-zdWTu3CQ.js';
18
- import { D as IngressFormat } from './types-By9Tg6-I.js';
19
- export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-zVoCx9r3.js';
18
+ import { D as IngressFormat } from './types-Di8VH1c9.js';
19
+ export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-DTfyzaFb.js';
20
20
  export { BoundAccountFallbackPolicy, BoundAccountSelectionError, BoundAccountSelectionFailureReason, boundAccountSelectionMessage, isBoundAccountSelectionError } from './pipeline/BoundAccountSelectionError.js';
21
21
  import '@omnicross/contracts/completion-types';
22
22
  import '@omnicross/contracts/health-logging-types';
@@ -25,7 +25,7 @@ import './ports/provider-config-source.js';
25
25
  import '@omnicross/contracts/llm-config';
26
26
  import './transformer/types.js';
27
27
  import './transformer/TransformerService.js';
28
- import './ProviderProxy-Ckr6oTrE.js';
28
+ import './ProviderProxy-DxsNi3cO.js';
29
29
  import '@omnicross/contracts/image-generation-types';
30
30
  import 'node:fs/promises';
31
31
  import '@omnicross/contracts/search-types';
@@ -78,11 +78,11 @@ import {
78
78
  verifyKey,
79
79
  verifyPresentedKey,
80
80
  voucherCodePrefix
81
- } from "./chunk-L4L77G3X.js";
81
+ } from "./chunk-TU4BB776.js";
82
82
  import "./chunk-WTQMX2Q6.js";
83
- import "./chunk-24W3DVGI.js";
83
+ import "./chunk-5XG6FR5F.js";
84
84
  import "./chunk-V53ZEFXC.js";
85
- import "./chunk-7PIUVCKK.js";
85
+ import "./chunk-MZCJL3QU.js";
86
86
  import "./chunk-TKZ3DZS5.js";
87
87
  import "./chunk-FU7EAR73.js";
88
88
  import "./chunk-IDPMD4B7.js";
@@ -102,7 +102,7 @@ import "./chunk-VVEHS2LI.js";
102
102
  import "./chunk-4LSZ7NFM.js";
103
103
  import "./chunk-XTEI64OU.js";
104
104
  import "./chunk-XX6NQJMA.js";
105
- import "./chunk-WYUXJKMK.js";
105
+ import "./chunk-DRUT7H5H.js";
106
106
  import "./chunk-ONTTXSRL.js";
107
107
  import "./chunk-OE6TDIWW.js";
108
108
  import "./chunk-DRWHTIIZ.js";
@@ -150,7 +150,7 @@ import {
150
150
  resolvePrefixTarget,
151
151
  resolveRoute,
152
152
  validateEndpointModelConfig
153
- } from "./chunk-ZMERU7D3.js";
153
+ } from "./chunk-VXHN5IDL.js";
154
154
  import "./chunk-AQ5TNQB7.js";
155
155
  import {
156
156
  DEFAULT_IMAGE_MODEL_ROUTES,
@@ -1,9 +1,9 @@
1
1
  import { SubscriptionProviderId } from '@omnicross/contracts/subscription-types';
2
- import { a as AllowanceSchedulingConfig } from '../types-Dt1bgHPg.cjs';
2
+ import { a as AllowanceSchedulingConfig } from '../types-BpSkj2JA.cjs';
3
3
  import { AccountAllowanceStore } from './AccountAllowanceStore.cjs';
4
- import '../types-BVwJQ9ZS.cjs';
4
+ import '../types-BsZ1s_a_.cjs';
5
5
  import '@omnicross/contracts/image-generation-types';
6
- import '../types-BSIJdsyl.cjs';
6
+ import '../types-Dpr5IAaP.cjs';
7
7
  import 'node:http';
8
8
  import '@omnicross/contracts/completion-types';
9
9
  import '@omnicross/contracts/usage-stats-types';
@@ -30,7 +30,7 @@ import '@omnicross/contracts/billing-types';
30
30
  import '@omnicross/contracts/health-logging-types';
31
31
  import '@omnicross/contracts/voucher-types';
32
32
  import '@omnicross/contracts/webhook-types';
33
- import '../ProviderProxy-Bz_nkOwq.cjs';
33
+ import '../ProviderProxy-OuQPYW2I.cjs';
34
34
  import '../types-CbCZqLGg.cjs';
35
35
  import '../keyPolicy-zdWTu3CQ.cjs';
36
36
  import '@omnicross/contracts/account-allowance-types';
@@ -1,9 +1,9 @@
1
1
  import { SubscriptionProviderId } from '@omnicross/contracts/subscription-types';
2
- import { a as AllowanceSchedulingConfig } from '../types-IRPv4i1Y.js';
2
+ import { a as AllowanceSchedulingConfig } from '../types-EReErShW.js';
3
3
  import { AccountAllowanceStore } from './AccountAllowanceStore.js';
4
- import '../types-VAHRysdP.js';
4
+ import '../types-USaixzVP.js';
5
5
  import '@omnicross/contracts/image-generation-types';
6
- import '../types-By9Tg6-I.js';
6
+ import '../types-Di8VH1c9.js';
7
7
  import 'node:http';
8
8
  import '@omnicross/contracts/completion-types';
9
9
  import '@omnicross/contracts/usage-stats-types';
@@ -30,7 +30,7 @@ import '@omnicross/contracts/billing-types';
30
30
  import '@omnicross/contracts/health-logging-types';
31
31
  import '@omnicross/contracts/voucher-types';
32
32
  import '@omnicross/contracts/webhook-types';
33
- import '../ProviderProxy-Ckr6oTrE.js';
33
+ import '../ProviderProxy-DxsNi3cO.js';
34
34
  import '../types-CbCZqLGg.js';
35
35
  import '../keyPolicy-zdWTu3CQ.js';
36
36
  import '@omnicross/contracts/account-allowance-types';
@@ -89,6 +89,17 @@ interface SubscriptionAuthProfile {
89
89
  * byte-identity).
90
90
  */
91
91
  readonly resolveProviderTransformerNames?: (model: string, config?: unknown) => readonly string[];
92
+ /**
93
+ * OPTIONAL chat-bridge-only chain-name resolver (openai-chat-bridge OQ1
94
+ * closure). The OpenAI-chat ingress consults it INSTEAD of
95
+ * `resolveProviderTransformerNames`/`providerTransformerNames` because a chat
96
+ * caller's wire is Unified: an anthropic-shape upstream needs the
97
+ * `['anthropic']` ENCODER, whereas the messages path's same-shape `[]` means
98
+ * "the caller already speaks Anthropic" — different answers for the same
99
+ * shape. Only opencodego sets it; absent ⇒ the chat ingress keeps the static
100
+ * `providerTransformerNames` (claude/kimi/grok route-to chains).
101
+ */
102
+ readonly chatBridgeTransformerNames?: (model: string, config?: unknown) => readonly string[];
92
103
  /**
93
104
  * Pass-through (claude) vs transformer (codex / opencodego / gemini). The
94
105
  * built-in `/v1/messages` subscription path (RT2.1) reads this for its
@@ -89,6 +89,17 @@ interface SubscriptionAuthProfile {
89
89
  * byte-identity).
90
90
  */
91
91
  readonly resolveProviderTransformerNames?: (model: string, config?: unknown) => readonly string[];
92
+ /**
93
+ * OPTIONAL chat-bridge-only chain-name resolver (openai-chat-bridge OQ1
94
+ * closure). The OpenAI-chat ingress consults it INSTEAD of
95
+ * `resolveProviderTransformerNames`/`providerTransformerNames` because a chat
96
+ * caller's wire is Unified: an anthropic-shape upstream needs the
97
+ * `['anthropic']` ENCODER, whereas the messages path's same-shape `[]` means
98
+ * "the caller already speaks Anthropic" — different answers for the same
99
+ * shape. Only opencodego sets it; absent ⇒ the chat ingress keeps the static
100
+ * `providerTransformerNames` (claude/kimi/grok route-to chains).
101
+ */
102
+ readonly chatBridgeTransformerNames?: (model: string, config?: unknown) => readonly string[];
92
103
  /**
93
104
  * Pass-through (claude) vs transformer (codex / opencodego / gemini). The
94
105
  * built-in `/v1/messages` subscription path (RT2.1) reads this for its
package/dist/ports.d.cts CHANGED
@@ -4,8 +4,8 @@ export { AutomaticPricingSource, PricingStore } from './ports/pricing-store.cjs'
4
4
  export { ProviderConfigSource } from './ports/provider-config-source.cjs';
5
5
  export { UsageEventStore } from './ports/usage-event-store.cjs';
6
6
  export { WebSearchBackend } from './ports/web-search-backend.cjs';
7
- export { U as UsageSink } from './types-BSIJdsyl.cjs';
8
- export { O as OutboundCredentialStore } from './types-Dt1bgHPg.cjs';
7
+ export { U as UsageSink } from './types-Dpr5IAaP.cjs';
8
+ export { O as OutboundCredentialStore } from './types-BpSkj2JA.cjs';
9
9
  import '@omnicross/contracts/pricing-types';
10
10
  import '@omnicross/contracts/llm-config';
11
11
  import './transformer/types.cjs';
@@ -25,7 +25,7 @@ import './frontends-Doz0RaWu.cjs';
25
25
  import '@omnicross/contracts/search-types';
26
26
  import './runtime-t8AZacFF.cjs';
27
27
  import '@omnicross/contracts/image-generation-types';
28
- import './types-BVwJQ9ZS.cjs';
28
+ import './types-BsZ1s_a_.cjs';
29
29
  import 'node:fs/promises';
30
30
  import '@omnicross/contracts/account-tokens-types';
31
31
  import '@omnicross/contracts/audit-types';
@@ -33,6 +33,6 @@ import '@omnicross/contracts/billing-types';
33
33
  import '@omnicross/contracts/health-logging-types';
34
34
  import '@omnicross/contracts/voucher-types';
35
35
  import '@omnicross/contracts/webhook-types';
36
- import './ProviderProxy-Bz_nkOwq.cjs';
36
+ import './ProviderProxy-OuQPYW2I.cjs';
37
37
  import './types-CbCZqLGg.cjs';
38
38
  import './keyPolicy-zdWTu3CQ.cjs';
package/dist/ports.d.ts CHANGED
@@ -4,8 +4,8 @@ export { AutomaticPricingSource, PricingStore } from './ports/pricing-store.js';
4
4
  export { ProviderConfigSource } from './ports/provider-config-source.js';
5
5
  export { UsageEventStore } from './ports/usage-event-store.js';
6
6
  export { WebSearchBackend } from './ports/web-search-backend.js';
7
- export { U as UsageSink } from './types-By9Tg6-I.js';
8
- export { O as OutboundCredentialStore } from './types-IRPv4i1Y.js';
7
+ export { U as UsageSink } from './types-Di8VH1c9.js';
8
+ export { O as OutboundCredentialStore } from './types-EReErShW.js';
9
9
  import '@omnicross/contracts/pricing-types';
10
10
  import '@omnicross/contracts/llm-config';
11
11
  import './transformer/types.js';
@@ -25,7 +25,7 @@ import './frontends-Doz0RaWu.js';
25
25
  import '@omnicross/contracts/search-types';
26
26
  import './runtime-t8AZacFF.js';
27
27
  import '@omnicross/contracts/image-generation-types';
28
- import './types-VAHRysdP.js';
28
+ import './types-USaixzVP.js';
29
29
  import 'node:fs/promises';
30
30
  import '@omnicross/contracts/account-tokens-types';
31
31
  import '@omnicross/contracts/audit-types';
@@ -33,6 +33,6 @@ import '@omnicross/contracts/billing-types';
33
33
  import '@omnicross/contracts/health-logging-types';
34
34
  import '@omnicross/contracts/voucher-types';
35
35
  import '@omnicross/contracts/webhook-types';
36
- import './ProviderProxy-Ckr6oTrE.js';
36
+ import './ProviderProxy-DxsNi3cO.js';
37
37
  import './types-CbCZqLGg.js';
38
38
  import './keyPolicy-zdWTu3CQ.js';
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkNCCEWVWYcjs = require('../chunk-NCCEWVWY.cjs');
4
+ var _chunkDV7656NNcjs = require('../chunk-DV7656NN.cjs');
5
5
  require('../chunk-QVOB2DNX.cjs');
6
- require('../chunk-LVQOCIES.cjs');
6
+ require('../chunk-QLVRJ5FS.cjs');
7
7
  require('../chunk-NOITAVHA.cjs');
8
- require('../chunk-QWNUOR7F.cjs');
8
+ require('../chunk-ZTN2PVKO.cjs');
9
9
  require('../chunk-47E3I5PF.cjs');
10
10
  require('../chunk-5RSZYQJH.cjs');
11
11
  require('../chunk-VGBJPHHD.cjs');
@@ -25,7 +25,7 @@ require('../chunk-HQP3K7PU.cjs');
25
25
  require('../chunk-SQU2FGXI.cjs');
26
26
  require('../chunk-RPII3E6Z.cjs');
27
27
  require('../chunk-6RPZADX3.cjs');
28
- require('../chunk-2DMOOZ4F.cjs');
28
+ require('../chunk-LWBXQXZ3.cjs');
29
29
  require('../chunk-UKQHBK4Q.cjs');
30
30
  require('../chunk-UIBD2YY5.cjs');
31
31
  require('../chunk-R3HK6R4B.cjs');
@@ -47,7 +47,7 @@ require('../chunk-APYG5QD7.cjs');
47
47
  require('../chunk-L74VDN4A.cjs');
48
48
  require('../chunk-XSVNC2UD.cjs');
49
49
  require('../chunk-4YINUUKQ.cjs');
50
- require('../chunk-57Y2EA2G.cjs');
50
+ require('../chunk-JGRNVH7C.cjs');
51
51
  require('../chunk-QBZJ7P2T.cjs');
52
52
  require('../chunk-LL3MZ7O5.cjs');
53
53
  require('../chunk-JMJBSACD.cjs');
@@ -70,4 +70,4 @@ require('../chunk-2RCCLQYV.cjs');
70
70
 
71
71
 
72
72
 
73
- exports.ProviderProxy = _chunkNCCEWVWYcjs.ProviderProxy; exports.isLoopbackAddress = _chunkNCCEWVWYcjs.isLoopbackAddress;
73
+ exports.ProviderProxy = _chunkDV7656NNcjs.ProviderProxy; exports.isLoopbackAddress = _chunkDV7656NNcjs.isLoopbackAddress;
@@ -1,5 +1,5 @@
1
- export { P as ProviderProxy, i as isLoopbackAddress } from '../ProviderProxy-Bz_nkOwq.cjs';
2
- import '../types-BSIJdsyl.cjs';
1
+ export { P as ProviderProxy, i as isLoopbackAddress } from '../ProviderProxy-OuQPYW2I.cjs';
2
+ import '../types-Dpr5IAaP.cjs';
3
3
  import 'node:http';
4
4
  import '@omnicross/contracts/completion-types';
5
5
  import '@omnicross/contracts/usage-stats-types';
@@ -1,5 +1,5 @@
1
- export { P as ProviderProxy, i as isLoopbackAddress } from '../ProviderProxy-Ckr6oTrE.js';
2
- import '../types-By9Tg6-I.js';
1
+ export { P as ProviderProxy, i as isLoopbackAddress } from '../ProviderProxy-DxsNi3cO.js';
2
+ import '../types-Di8VH1c9.js';
3
3
  import 'node:http';
4
4
  import '@omnicross/contracts/completion-types';
5
5
  import '@omnicross/contracts/usage-stats-types';
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  ProviderProxy,
3
3
  isLoopbackAddress
4
- } from "../chunk-L4L77G3X.js";
4
+ } from "../chunk-TU4BB776.js";
5
5
  import "../chunk-WTQMX2Q6.js";
6
- import "../chunk-24W3DVGI.js";
6
+ import "../chunk-5XG6FR5F.js";
7
7
  import "../chunk-V53ZEFXC.js";
8
- import "../chunk-7PIUVCKK.js";
8
+ import "../chunk-MZCJL3QU.js";
9
9
  import "../chunk-TKZ3DZS5.js";
10
10
  import "../chunk-FU7EAR73.js";
11
11
  import "../chunk-IDPMD4B7.js";
@@ -25,7 +25,7 @@ import "../chunk-VVEHS2LI.js";
25
25
  import "../chunk-4LSZ7NFM.js";
26
26
  import "../chunk-XTEI64OU.js";
27
27
  import "../chunk-XX6NQJMA.js";
28
- import "../chunk-WYUXJKMK.js";
28
+ import "../chunk-DRUT7H5H.js";
29
29
  import "../chunk-ONTTXSRL.js";
30
30
  import "../chunk-OE6TDIWW.js";
31
31
  import "../chunk-DRWHTIIZ.js";
@@ -47,7 +47,7 @@ import "../chunk-WLYIIEAF.js";
47
47
  import "../chunk-TKJMZBAH.js";
48
48
  import "../chunk-OZFM4X3S.js";
49
49
  import "../chunk-3QFXFCHG.js";
50
- import "../chunk-ZMERU7D3.js";
50
+ import "../chunk-VXHN5IDL.js";
51
51
  import "../chunk-AQ5TNQB7.js";
52
52
  import "../chunk-6I4SAWCN.js";
53
53
  import "../chunk-Y7FO65VT.js";
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var _chunk2DMOOZ4Fcjs = require('../../chunk-2DMOOZ4F.cjs');
8
+ var _chunkLWBXQXZ3cjs = require('../../chunk-LWBXQXZ3.cjs');
9
9
  require('../../chunk-UKQHBK4Q.cjs');
10
10
 
11
11
 
@@ -14,4 +14,4 @@ require('../../chunk-UKQHBK4Q.cjs');
14
14
 
15
15
 
16
16
 
17
- exports.OPENCODE_SESSION_HEADER = _chunk2DMOOZ4Fcjs.OPENCODE_SESSION_HEADER; exports.__resetOpenCodeGoHeadersForTests = _chunk2DMOOZ4Fcjs.__resetOpenCodeGoHeadersForTests; exports.extractOpenCodeSessionHeader = _chunk2DMOOZ4Fcjs.extractOpenCodeSessionHeader; exports.getOpenCodeGoUserAgent = _chunk2DMOOZ4Fcjs.getOpenCodeGoUserAgent; exports.resolveOpenCodeSessionHeader = _chunk2DMOOZ4Fcjs.resolveOpenCodeSessionHeader; exports.setOpenCodeGoUserAgent = _chunk2DMOOZ4Fcjs.setOpenCodeGoUserAgent;
17
+ exports.OPENCODE_SESSION_HEADER = _chunkLWBXQXZ3cjs.OPENCODE_SESSION_HEADER; exports.__resetOpenCodeGoHeadersForTests = _chunkLWBXQXZ3cjs.__resetOpenCodeGoHeadersForTests; exports.extractOpenCodeSessionHeader = _chunkLWBXQXZ3cjs.extractOpenCodeSessionHeader; exports.getOpenCodeGoUserAgent = _chunkLWBXQXZ3cjs.getOpenCodeGoUserAgent; exports.resolveOpenCodeSessionHeader = _chunkLWBXQXZ3cjs.resolveOpenCodeSessionHeader; exports.setOpenCodeGoUserAgent = _chunkLWBXQXZ3cjs.setOpenCodeGoUserAgent;
@@ -5,7 +5,7 @@ import {
5
5
  getOpenCodeGoUserAgent,
6
6
  resolveOpenCodeSessionHeader,
7
7
  setOpenCodeGoUserAgent
8
- } from "../../chunk-WYUXJKMK.js";
8
+ } from "../../chunk-DRUT7H5H.js";
9
9
  import "../../chunk-ONTTXSRL.js";
10
10
  export {
11
11
  OPENCODE_SESSION_HEADER,
@@ -12,11 +12,14 @@
12
12
 
13
13
 
14
14
 
15
- var _chunkNCCEWVWYcjs = require('../../chunk-NCCEWVWY.cjs');
15
+
16
+
17
+
18
+ var _chunkDV7656NNcjs = require('../../chunk-DV7656NN.cjs');
16
19
  require('../../chunk-QVOB2DNX.cjs');
17
- require('../../chunk-LVQOCIES.cjs');
20
+ require('../../chunk-QLVRJ5FS.cjs');
18
21
  require('../../chunk-NOITAVHA.cjs');
19
- require('../../chunk-QWNUOR7F.cjs');
22
+ require('../../chunk-ZTN2PVKO.cjs');
20
23
  require('../../chunk-47E3I5PF.cjs');
21
24
  require('../../chunk-5RSZYQJH.cjs');
22
25
  require('../../chunk-VGBJPHHD.cjs');
@@ -36,7 +39,7 @@ require('../../chunk-HQP3K7PU.cjs');
36
39
  require('../../chunk-SQU2FGXI.cjs');
37
40
  require('../../chunk-RPII3E6Z.cjs');
38
41
  require('../../chunk-6RPZADX3.cjs');
39
- require('../../chunk-2DMOOZ4F.cjs');
42
+ require('../../chunk-LWBXQXZ3.cjs');
40
43
  require('../../chunk-UKQHBK4Q.cjs');
41
44
  require('../../chunk-UIBD2YY5.cjs');
42
45
  require('../../chunk-R3HK6R4B.cjs');
@@ -58,7 +61,7 @@ require('../../chunk-APYG5QD7.cjs');
58
61
  require('../../chunk-L74VDN4A.cjs');
59
62
  require('../../chunk-XSVNC2UD.cjs');
60
63
  require('../../chunk-4YINUUKQ.cjs');
61
- require('../../chunk-57Y2EA2G.cjs');
64
+ require('../../chunk-JGRNVH7C.cjs');
62
65
  require('../../chunk-QBZJ7P2T.cjs');
63
66
  require('../../chunk-LL3MZ7O5.cjs');
64
67
  require('../../chunk-JMJBSACD.cjs');
@@ -92,4 +95,7 @@ require('../../chunk-2RCCLQYV.cjs');
92
95
 
93
96
 
94
97
 
95
- exports.aggregateAnthropicSseToJsonBody = _chunkNCCEWVWYcjs.aggregateAnthropicSseToJsonBody; exports.buildByoRouteActivityMeta = _chunkNCCEWVWYcjs.buildByoRouteActivityMeta; exports.cancelDiscardedResponse = _chunkNCCEWVWYcjs.cancelDiscardedResponse; exports.getAnthropicEndpointTransformer = _chunkNCCEWVWYcjs.getAnthropicEndpointTransformer; exports.getGeminiEndpointTransformer = _chunkNCCEWVWYcjs.getGeminiEndpointTransformer; exports.getResponsesEndpointTransformer = _chunkNCCEWVWYcjs.getResponsesEndpointTransformer; exports.getSharedExecutor = _chunkNCCEWVWYcjs.getSharedExecutor; exports.projectUpstreamResponseHeaders = _chunkNCCEWVWYcjs.projectUpstreamResponseHeaders; exports.readBody = _chunkNCCEWVWYcjs.readBody; exports.relayResponse = _chunkNCCEWVWYcjs.relayResponse; exports.resolvePoolBoundKey = _chunkNCCEWVWYcjs.resolvePoolBoundKey; exports.writeBoundAccountError = _chunkNCCEWVWYcjs.writeBoundAccountError; exports.writeError = _chunkNCCEWVWYcjs.writeError;
98
+
99
+
100
+
101
+ exports.aggregateAnthropicSseToJsonBody = _chunkDV7656NNcjs.aggregateAnthropicSseToJsonBody; exports.aggregateOpenAIChatChunksToJsonBody = _chunkDV7656NNcjs.aggregateOpenAIChatChunksToJsonBody; exports.aggregateResponsesSseToJsonBody = _chunkDV7656NNcjs.aggregateResponsesSseToJsonBody; exports.buildByoRouteActivityMeta = _chunkDV7656NNcjs.buildByoRouteActivityMeta; exports.cancelDiscardedResponse = _chunkDV7656NNcjs.cancelDiscardedResponse; exports.getAnthropicEndpointTransformer = _chunkDV7656NNcjs.getAnthropicEndpointTransformer; exports.getGeminiEndpointTransformer = _chunkDV7656NNcjs.getGeminiEndpointTransformer; exports.getResponsesEndpointTransformer = _chunkDV7656NNcjs.getResponsesEndpointTransformer; exports.getSharedExecutor = _chunkDV7656NNcjs.getSharedExecutor; exports.projectUpstreamResponseHeaders = _chunkDV7656NNcjs.projectUpstreamResponseHeaders; exports.readBody = _chunkDV7656NNcjs.readBody; exports.relayResponse = _chunkDV7656NNcjs.relayResponse; exports.resolvePoolBoundKey = _chunkDV7656NNcjs.resolvePoolBoundKey; exports.sniffIsSseResponse = _chunkDV7656NNcjs.sniffIsSseResponse; exports.writeBoundAccountError = _chunkDV7656NNcjs.writeBoundAccountError; exports.writeError = _chunkDV7656NNcjs.writeError;
@@ -3,7 +3,7 @@ import { LLMProvider } from '@omnicross/contracts/llm-config';
3
3
  import { BoundAccountSelectionError } from '../../pipeline/BoundAccountSelectionError.cjs';
4
4
  import { TransformerChainExecutor } from '../../transformer/TransformerChainExecutor.cjs';
5
5
  import { Transformer } from '../../transformer/types.cjs';
6
- import { W as ProviderProxyDeps } from '../../types-BSIJdsyl.cjs';
6
+ import { W as ProviderProxyDeps } from '../../types-Dpr5IAaP.cjs';
7
7
  import '@omnicross/contracts/completion-types';
8
8
  import '@omnicross/contracts/usage-stats-types';
9
9
  import '@omnicross/contracts/subscription-types';
@@ -127,6 +127,40 @@ onSseEvent?: (event: Record<string, unknown>) => void, signal?: AbortSignal): Pr
127
127
  * Best-effort: a malformed event is skipped, never thrown.
128
128
  */
129
129
  declare function aggregateAnthropicSseToJsonBody(response: Response, rewriteModel?: string, signal?: AbortSignal): Promise<string>;
130
+ /**
131
+ * Collapse an OpenAI Responses SSE stream into the single `response` JSON a
132
+ * NON-streaming client expects. The Responses wire carries the complete final
133
+ * response object on its terminal event, so aggregation = keep the LAST
134
+ * `response.completed` / `response.failed` / `response.incomplete` payload
135
+ * (`response.failed`/`incomplete` surface the upstream's own error state —
136
+ * relayed verbatim, not rewritten into an error envelope). `rewriteModel`
137
+ * overrides `model` to mirror `relayResponse`'s non-stream branch.
138
+ *
139
+ * Serves the codex subscription contract on BOTH ingress paths: the backend
140
+ * rejects `stream:false` outright, so a non-streaming client is answered by
141
+ * forcing `stream:true` upstream and collapsing the SSE back. Best-effort like
142
+ * the Anthropic twin: a malformed event is skipped; no terminal event found →
143
+ * null (the caller surfaces its own 502).
144
+ */
145
+ declare function aggregateResponsesSseToJsonBody(response: Response, rewriteModel?: string, signal?: AbortSignal): Promise<string | null>;
146
+ /**
147
+ * Collapse an OpenAI Chat Completions SSE chunk stream into the single
148
+ * `chat.completion` JSON a NON-streaming client expects. Accumulates the FIRST
149
+ * `id`/`created`/`model`, every `delta` (content text, `reasoning_content`,
150
+ * `tool_calls` by index with concatenated argument fragments), the last non-null
151
+ * `finish_reason`, and the last `usage` (present on the final chunk when the
152
+ * caller asked for `stream_options.include_usage`, else omitted). Mirrors the
153
+ * Anthropic twin's best-effort contract; no terminal/finish found → null.
154
+ */
155
+ declare function aggregateOpenAIChatChunksToJsonBody(response: Response, rewriteModel?: string, signal?: AbortSignal): Promise<string | null>;
156
+ /**
157
+ * Whether a response body is an SSE stream. The header check is the cheap
158
+ * first pass; ChatGPT's codex backend OMITS Content-Type on its SSE streams
159
+ * (see OpenAIResponseTransformer's twin sniff), so a header-less body is
160
+ * decided by peeking the first chunk for an `event:`/`data:` frame start.
161
+ * The peek clones — the original body is left unread for the consumer.
162
+ */
163
+ declare function sniffIsSseResponse(response: Response): Promise<boolean>;
130
164
  /**
131
165
  * Write a JSON error response if the headers have not been sent.
132
166
  *
@@ -192,4 +226,4 @@ interface ByoRouteActivityMeta {
192
226
  }
193
227
  declare function buildByoRouteActivityMeta(deps: ProviderProxyDeps, providerId: string, sessionId: string | null | undefined): ByoRouteActivityMeta;
194
228
 
195
- export { type ByoRouteActivityMeta, type StreamUsageTap, aggregateAnthropicSseToJsonBody, buildByoRouteActivityMeta, cancelDiscardedResponse, getAnthropicEndpointTransformer, getGeminiEndpointTransformer, getResponsesEndpointTransformer, getSharedExecutor, projectUpstreamResponseHeaders, readBody, relayResponse, resolvePoolBoundKey, writeBoundAccountError, writeError };
229
+ export { type ByoRouteActivityMeta, type StreamUsageTap, aggregateAnthropicSseToJsonBody, aggregateOpenAIChatChunksToJsonBody, aggregateResponsesSseToJsonBody, buildByoRouteActivityMeta, cancelDiscardedResponse, getAnthropicEndpointTransformer, getGeminiEndpointTransformer, getResponsesEndpointTransformer, getSharedExecutor, projectUpstreamResponseHeaders, readBody, relayResponse, resolvePoolBoundKey, sniffIsSseResponse, writeBoundAccountError, writeError };
@@ -3,7 +3,7 @@ import { LLMProvider } from '@omnicross/contracts/llm-config';
3
3
  import { BoundAccountSelectionError } from '../../pipeline/BoundAccountSelectionError.js';
4
4
  import { TransformerChainExecutor } from '../../transformer/TransformerChainExecutor.js';
5
5
  import { Transformer } from '../../transformer/types.js';
6
- import { W as ProviderProxyDeps } from '../../types-By9Tg6-I.js';
6
+ import { W as ProviderProxyDeps } from '../../types-Di8VH1c9.js';
7
7
  import '@omnicross/contracts/completion-types';
8
8
  import '@omnicross/contracts/usage-stats-types';
9
9
  import '@omnicross/contracts/subscription-types';
@@ -127,6 +127,40 @@ onSseEvent?: (event: Record<string, unknown>) => void, signal?: AbortSignal): Pr
127
127
  * Best-effort: a malformed event is skipped, never thrown.
128
128
  */
129
129
  declare function aggregateAnthropicSseToJsonBody(response: Response, rewriteModel?: string, signal?: AbortSignal): Promise<string>;
130
+ /**
131
+ * Collapse an OpenAI Responses SSE stream into the single `response` JSON a
132
+ * NON-streaming client expects. The Responses wire carries the complete final
133
+ * response object on its terminal event, so aggregation = keep the LAST
134
+ * `response.completed` / `response.failed` / `response.incomplete` payload
135
+ * (`response.failed`/`incomplete` surface the upstream's own error state —
136
+ * relayed verbatim, not rewritten into an error envelope). `rewriteModel`
137
+ * overrides `model` to mirror `relayResponse`'s non-stream branch.
138
+ *
139
+ * Serves the codex subscription contract on BOTH ingress paths: the backend
140
+ * rejects `stream:false` outright, so a non-streaming client is answered by
141
+ * forcing `stream:true` upstream and collapsing the SSE back. Best-effort like
142
+ * the Anthropic twin: a malformed event is skipped; no terminal event found →
143
+ * null (the caller surfaces its own 502).
144
+ */
145
+ declare function aggregateResponsesSseToJsonBody(response: Response, rewriteModel?: string, signal?: AbortSignal): Promise<string | null>;
146
+ /**
147
+ * Collapse an OpenAI Chat Completions SSE chunk stream into the single
148
+ * `chat.completion` JSON a NON-streaming client expects. Accumulates the FIRST
149
+ * `id`/`created`/`model`, every `delta` (content text, `reasoning_content`,
150
+ * `tool_calls` by index with concatenated argument fragments), the last non-null
151
+ * `finish_reason`, and the last `usage` (present on the final chunk when the
152
+ * caller asked for `stream_options.include_usage`, else omitted). Mirrors the
153
+ * Anthropic twin's best-effort contract; no terminal/finish found → null.
154
+ */
155
+ declare function aggregateOpenAIChatChunksToJsonBody(response: Response, rewriteModel?: string, signal?: AbortSignal): Promise<string | null>;
156
+ /**
157
+ * Whether a response body is an SSE stream. The header check is the cheap
158
+ * first pass; ChatGPT's codex backend OMITS Content-Type on its SSE streams
159
+ * (see OpenAIResponseTransformer's twin sniff), so a header-less body is
160
+ * decided by peeking the first chunk for an `event:`/`data:` frame start.
161
+ * The peek clones — the original body is left unread for the consumer.
162
+ */
163
+ declare function sniffIsSseResponse(response: Response): Promise<boolean>;
130
164
  /**
131
165
  * Write a JSON error response if the headers have not been sent.
132
166
  *
@@ -192,4 +226,4 @@ interface ByoRouteActivityMeta {
192
226
  }
193
227
  declare function buildByoRouteActivityMeta(deps: ProviderProxyDeps, providerId: string, sessionId: string | null | undefined): ByoRouteActivityMeta;
194
228
 
195
- export { type ByoRouteActivityMeta, type StreamUsageTap, aggregateAnthropicSseToJsonBody, buildByoRouteActivityMeta, cancelDiscardedResponse, getAnthropicEndpointTransformer, getGeminiEndpointTransformer, getResponsesEndpointTransformer, getSharedExecutor, projectUpstreamResponseHeaders, readBody, relayResponse, resolvePoolBoundKey, writeBoundAccountError, writeError };
229
+ export { type ByoRouteActivityMeta, type StreamUsageTap, aggregateAnthropicSseToJsonBody, aggregateOpenAIChatChunksToJsonBody, aggregateResponsesSseToJsonBody, buildByoRouteActivityMeta, cancelDiscardedResponse, getAnthropicEndpointTransformer, getGeminiEndpointTransformer, getResponsesEndpointTransformer, getSharedExecutor, projectUpstreamResponseHeaders, readBody, relayResponse, resolvePoolBoundKey, sniffIsSseResponse, writeBoundAccountError, writeError };
@@ -1,5 +1,7 @@
1
1
  import {
2
2
  aggregateAnthropicSseToJsonBody,
3
+ aggregateOpenAIChatChunksToJsonBody,
4
+ aggregateResponsesSseToJsonBody,
3
5
  buildByoRouteActivityMeta,
4
6
  cancelDiscardedResponse,
5
7
  getAnthropicEndpointTransformer,
@@ -10,13 +12,14 @@ import {
10
12
  readBody,
11
13
  relayResponse,
12
14
  resolvePoolBoundKey,
15
+ sniffIsSseResponse,
13
16
  writeBoundAccountError,
14
17
  writeError
15
- } from "../../chunk-L4L77G3X.js";
18
+ } from "../../chunk-TU4BB776.js";
16
19
  import "../../chunk-WTQMX2Q6.js";
17
- import "../../chunk-24W3DVGI.js";
20
+ import "../../chunk-5XG6FR5F.js";
18
21
  import "../../chunk-V53ZEFXC.js";
19
- import "../../chunk-7PIUVCKK.js";
22
+ import "../../chunk-MZCJL3QU.js";
20
23
  import "../../chunk-TKZ3DZS5.js";
21
24
  import "../../chunk-FU7EAR73.js";
22
25
  import "../../chunk-IDPMD4B7.js";
@@ -36,7 +39,7 @@ import "../../chunk-VVEHS2LI.js";
36
39
  import "../../chunk-4LSZ7NFM.js";
37
40
  import "../../chunk-XTEI64OU.js";
38
41
  import "../../chunk-XX6NQJMA.js";
39
- import "../../chunk-WYUXJKMK.js";
42
+ import "../../chunk-DRUT7H5H.js";
40
43
  import "../../chunk-ONTTXSRL.js";
41
44
  import "../../chunk-OE6TDIWW.js";
42
45
  import "../../chunk-DRWHTIIZ.js";
@@ -58,7 +61,7 @@ import "../../chunk-WLYIIEAF.js";
58
61
  import "../../chunk-TKJMZBAH.js";
59
62
  import "../../chunk-OZFM4X3S.js";
60
63
  import "../../chunk-3QFXFCHG.js";
61
- import "../../chunk-ZMERU7D3.js";
64
+ import "../../chunk-VXHN5IDL.js";
62
65
  import "../../chunk-AQ5TNQB7.js";
63
66
  import "../../chunk-6I4SAWCN.js";
64
67
  import "../../chunk-Y7FO65VT.js";
@@ -80,6 +83,8 @@ import "../../chunk-4JOU54M5.js";
80
83
  import "../../chunk-4PFWFODB.js";
81
84
  export {
82
85
  aggregateAnthropicSseToJsonBody,
86
+ aggregateOpenAIChatChunksToJsonBody,
87
+ aggregateResponsesSseToJsonBody,
83
88
  buildByoRouteActivityMeta,
84
89
  cancelDiscardedResponse,
85
90
  getAnthropicEndpointTransformer,
@@ -90,6 +95,7 @@ export {
90
95
  readBody,
91
96
  relayResponse,
92
97
  resolvePoolBoundKey,
98
+ sniffIsSseResponse,
93
99
  writeBoundAccountError,
94
100
  writeError
95
101
  };
@@ -10,7 +10,7 @@ import '../pipeline/SubscriptionAuthSource.cjs';
10
10
  import '../pipeline/SubscriptionAuthStrategy.cjs';
11
11
  import '../ports/provider-config-source.cjs';
12
12
  import '../ports/web-search-backend.cjs';
13
- export { A as AnthropicIngressHandler, a as AnthropicIngressHandlerFactory, b as AnthropicRouteHandlerParams, c as AnthropicSdkHints, E as ExtendedContextHint, D as IngressFormat, W as ProviderProxyDeps, X as ProxyAttribution, aB as RetryCallback, aC as RouteAuthMode, aD as RouteContext, aE as RouteLeaseUsageAttribution, aF as StreamEventCallback, aG as SubscriptionDispatchProfile, aH as SubscriptionRequestSummary, aI as TargetProviderFormat, aS as UsageRecordImportInput, U as UsageRecorderImport } from '../types-BSIJdsyl.cjs';
13
+ export { A as AnthropicIngressHandler, a as AnthropicIngressHandlerFactory, b as AnthropicRouteHandlerParams, c as AnthropicSdkHints, E as ExtendedContextHint, D as IngressFormat, W as ProviderProxyDeps, X as ProxyAttribution, aB as RetryCallback, aC as RouteAuthMode, aD as RouteContext, aE as RouteLeaseUsageAttribution, aF as StreamEventCallback, aG as SubscriptionDispatchProfile, aH as SubscriptionRequestSummary, aI as TargetProviderFormat, aS as UsageRecordImportInput, U as UsageRecorderImport } from '../types-Dpr5IAaP.cjs';
14
14
  import '../frontends-Doz0RaWu.cjs';
15
15
  import '../runtime-t8AZacFF.cjs';
16
16
  import '@omnicross/contracts/llm-config';
@@ -10,7 +10,7 @@ import '../pipeline/SubscriptionAuthSource.js';
10
10
  import '../pipeline/SubscriptionAuthStrategy.js';
11
11
  import '../ports/provider-config-source.js';
12
12
  import '../ports/web-search-backend.js';
13
- export { A as AnthropicIngressHandler, a as AnthropicIngressHandlerFactory, b as AnthropicRouteHandlerParams, c as AnthropicSdkHints, E as ExtendedContextHint, D as IngressFormat, W as ProviderProxyDeps, X as ProxyAttribution, aB as RetryCallback, aC as RouteAuthMode, aD as RouteContext, aE as RouteLeaseUsageAttribution, aF as StreamEventCallback, aG as SubscriptionDispatchProfile, aH as SubscriptionRequestSummary, aI as TargetProviderFormat, aS as UsageRecordImportInput, U as UsageRecorderImport } from '../types-By9Tg6-I.js';
13
+ export { A as AnthropicIngressHandler, a as AnthropicIngressHandlerFactory, b as AnthropicRouteHandlerParams, c as AnthropicSdkHints, E as ExtendedContextHint, D as IngressFormat, W as ProviderProxyDeps, X as ProxyAttribution, aB as RetryCallback, aC as RouteAuthMode, aD as RouteContext, aE as RouteLeaseUsageAttribution, aF as StreamEventCallback, aG as SubscriptionDispatchProfile, aH as SubscriptionRequestSummary, aI as TargetProviderFormat, aS as UsageRecordImportInput, U as UsageRecorderImport } from '../types-Di8VH1c9.js';
14
14
  import '../frontends-Doz0RaWu.js';
15
15
  import '../runtime-t8AZacFF.js';
16
16
  import '@omnicross/contracts/llm-config';