@omnicross/core 0.1.4 → 0.1.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.
- 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 +7 -5
- package/dist/auth/GeminiCodeAssistProjectResolver.js +5 -3
- package/dist/{chunk-HRRYG2AX.js → chunk-23S5OPIO.js} +10 -1
- package/dist/chunk-25GXJCEZ.cjs +40 -0
- package/dist/chunk-2JYRIADS.js +40 -0
- package/dist/chunk-3Z5BQZFM.cjs +52 -0
- package/dist/{chunk-4VAVYUZS.cjs → chunk-4VLRHHFE.cjs} +82 -40
- package/dist/{chunk-VACWOIRE.cjs → chunk-4VZX5F4T.cjs} +39 -15
- package/dist/{chunk-FTQ7IQUC.js → chunk-6CL5HTPQ.js} +52 -10
- package/dist/chunk-6QQG7YG3.cjs +153 -0
- package/dist/{chunk-SU2GCLAC.cjs → chunk-6VUQPOV3.cjs} +359 -60
- package/dist/chunk-7AK7B36B.cjs +44 -0
- package/dist/{chunk-5ZQBEOMD.js → chunk-AT7B7SOZ.js} +25 -2
- package/dist/{chunk-IK3KE3AU.js → chunk-DE2SRBFZ.js} +1 -1
- package/dist/chunk-DLXZEZWO.cjs +285 -0
- package/dist/{chunk-UHGVBFU3.js → chunk-EBLFCNPY.js} +38 -14
- package/dist/chunk-EJLH6NFT.cjs +166 -0
- package/dist/chunk-HVBBDBS3.cjs +350 -0
- package/dist/{chunk-7Y47UCF2.js → chunk-IFXJ2BG7.js} +5 -38
- package/dist/{chunk-46ZIFWYG.cjs → chunk-IIRPUVPH.cjs} +7 -1
- package/dist/{chunk-YGXJGRFI.cjs → chunk-KBM2W6UY.cjs} +111 -24
- package/dist/{chunk-OCEUVQHW.cjs → chunk-KCVJWJST.cjs} +73 -3
- package/dist/chunk-LB6EBS6Y.js +69 -0
- package/dist/{chunk-C7PSERMH.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-Z7Y2NPHY.js → chunk-N5T4M4GU.js} +1 -1
- package/dist/{chunk-TIER4SUC.js → chunk-OEWZUX4G.js} +346 -47
- package/dist/chunk-OF3BECU2.cjs +69 -0
- package/dist/{chunk-RSJ3TWJQ.cjs → chunk-OKMJLEXX.cjs} +5 -5
- package/dist/chunk-OPRS4IQZ.js +153 -0
- package/dist/{chunk-XK5CIRMQ.js → chunk-SIZQQD6T.js} +72 -2
- package/dist/{chunk-DKPXN34V.cjs → chunk-SQYVORNP.cjs} +1334 -510
- package/dist/chunk-SYQF7OIR.js +52 -0
- package/dist/{chunk-S4WBV25P.js → chunk-TOVPMMHM.js} +111 -24
- package/dist/{chunk-QYTT6GE3.js → chunk-UDCC7EMR.js} +1093 -269
- package/dist/{chunk-E3UCVHLP.cjs → chunk-UNWKG6EI.cjs} +5 -38
- package/dist/{chunk-ZLX3KGXX.js → chunk-UX7VWA46.js} +135 -23
- package/dist/{chunk-7YN22L2H.cjs → chunk-V4TXMEJS.cjs} +5 -5
- package/dist/chunk-VRFBB5DB.js +44 -0
- package/dist/chunk-WB6PH56J.js +166 -0
- package/dist/{chunk-G2UTNSGU.js → chunk-WNKWAEUR.js} +7 -1
- package/dist/{chunk-SUEGJ75D.cjs → chunk-WYTEQ4Q5.cjs} +25 -2
- package/dist/{chunk-5ENKBSWO.js → chunk-YJVHCHQX.js} +42 -6
- package/dist/{chunk-VQY5W4YW.cjs → chunk-YK57NMIF.cjs} +44 -8
- package/dist/{chunk-KFI44N2R.cjs → chunk-YNJNTCSQ.cjs} +10 -1
- 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 +27 -24
- package/dist/completion/CompletionService.d.cts +2 -1
- package/dist/completion/CompletionService.d.ts +2 -1
- package/dist/completion/CompletionService.js +26 -23
- package/dist/completion.cjs +27 -24
- package/dist/completion.d.cts +2 -1
- package/dist/completion.d.ts +2 -1
- package/dist/completion.js +26 -23
- package/dist/index.cjs +53 -29
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +56 -32
- 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 +5 -3
- package/dist/outbound-api/auditCapture.d.ts +5 -3
- 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 +4 -3
- package/dist/outbound-api/routeResolver.d.ts +4 -3
- package/dist/outbound-api/routeResolver.js +1 -1
- package/dist/outbound-api/subscriptionRegistryPort.d.cts +1 -0
- package/dist/outbound-api/subscriptionRegistryPort.d.ts +1 -0
- package/dist/outbound-api/types.d.cts +3 -2
- package/dist/outbound-api/types.d.ts +3 -2
- package/dist/outbound-api.cjs +49 -25
- package/dist/outbound-api.d.cts +127 -85
- package/dist/outbound-api.d.ts +127 -85
- package/dist/outbound-api.js +52 -28
- package/dist/pipeline/AccountAllowanceScheduling.cjs +15 -0
- package/dist/pipeline/AccountAllowanceScheduling.d.cts +90 -0
- package/dist/pipeline/AccountAllowanceScheduling.d.ts +90 -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/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/SubscriptionAccountHealth.cjs +4 -2
- package/dist/pipeline/SubscriptionAccountHealth.d.cts +34 -6
- package/dist/pipeline/SubscriptionAccountHealth.d.ts +34 -6
- package/dist/pipeline/SubscriptionAccountHealth.js +3 -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 +4 -2
- package/dist/pipeline/upstreamFetch.d.cts +6 -0
- package/dist/pipeline/upstreamFetch.d.ts +6 -0
- package/dist/pipeline/upstreamFetch.js +3 -1
- package/dist/pipeline/upstreamTrace.cjs +14 -0
- package/dist/pipeline/upstreamTrace.d.cts +85 -0
- package/dist/pipeline/upstreamTrace.d.ts +85 -0
- package/dist/pipeline/upstreamTrace.js +14 -0
- 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 +27 -24
- package/dist/provider-proxy/ProviderProxy.d.cts +1 -0
- package/dist/provider-proxy/ProviderProxy.d.ts +1 -0
- package/dist/provider-proxy/ProviderProxy.js +26 -23
- package/dist/provider-proxy/ingress/providerProxyShared.cjs +31 -24
- package/dist/provider-proxy/ingress/providerProxyShared.d.cts +50 -5
- package/dist/provider-proxy/ingress/providerProxyShared.d.ts +50 -5
- package/dist/provider-proxy/ingress/providerProxyShared.js +30 -23
- package/dist/provider-proxy/matchText.cjs +4 -2
- package/dist/provider-proxy/matchText.d.cts +41 -6
- package/dist/provider-proxy/matchText.d.ts +41 -6
- package/dist/provider-proxy/matchText.js +3 -1
- package/dist/provider-proxy/types.d.cts +30 -2
- package/dist/provider-proxy/types.d.ts +30 -2
- package/dist/provider-proxy.cjs +27 -24
- package/dist/provider-proxy.d.cts +1 -0
- package/dist/provider-proxy.d.ts +1 -0
- package/dist/provider-proxy.js +26 -23
- package/dist/{routeResolver-C4T7yClx.d.ts → routeResolver-CHTv_Bs5.d.ts} +1 -1
- package/dist/{routeResolver-CB3tvJKy.d.cts → routeResolver-kepxnfcC.d.cts} +1 -1
- package/dist/transformer/TransformerChainExecutor.cjs +2 -2
- package/dist/transformer/TransformerChainExecutor.js +1 -1
- package/dist/transformer/transformers/AnthropicTransformer.cjs +2 -2
- package/dist/transformer/transformers/AnthropicTransformer.js +1 -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 +2 -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 +1 -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 +8 -14
- package/dist/transformer/transformers.d.cts +12 -48
- package/dist/transformer/transformers.d.ts +12 -48
- package/dist/transformer/transformers.js +11 -17
- package/dist/transformer/types.d.cts +17 -0
- package/dist/transformer/types.d.ts +17 -0
- package/dist/transformer.cjs +11 -12
- package/dist/transformer.d.cts +1 -2
- package/dist/transformer.d.ts +1 -2
- package/dist/transformer.js +11 -12
- package/dist/{types-B8Arpxn0.d.cts → types-H3wGZSOo.d.cts} +134 -7
- package/dist/{types-lgPYQuZS.d.ts → types-hsoKrVQS.d.ts} +134 -7
- package/dist/usage/pricing-engine.cjs +2 -2
- package/dist/usage/pricing-engine.d.cts +9 -1
- package/dist/usage/pricing-engine.d.ts +9 -1
- package/dist/usage/pricing-engine.js +1 -1
- package/dist/usage.cjs +2 -2
- package/dist/usage.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-C72S6TTV.cjs +0 -49
- package/dist/chunk-DWKQZ2SK.cjs +0 -254
- package/dist/chunk-IAXWICZU.js +0 -69
- package/dist/chunk-QWBWGODS.cjs +0 -69
- package/dist/chunk-RGTR7CIO.cjs +0 -235
- package/dist/chunk-VPBAUQ2M.js +0 -235
- package/dist/chunk-YMFAJFQT.cjs +0 -173
- package/dist/chunk-Z7LUNECE.js +0 -49
- package/dist/chunk-ZJZAOKI7.js +0 -254
- 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/provider-proxy.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import './completion/ApiKeyPoolService.js';
|
|
|
10
10
|
import '@omnicross/contracts/llm-config';
|
|
11
11
|
import './logger-4GvQNzhE.js';
|
|
12
12
|
import './pipeline/AuthSource.js';
|
|
13
|
+
import './pipeline/BoundAccountSelectionError.js';
|
|
13
14
|
import './pipeline/SubscriptionAuthSource.js';
|
|
14
15
|
import './pipeline/SubscriptionAuthStrategy.js';
|
|
15
16
|
import './ports/provider-config-source.js';
|
package/dist/provider-proxy.js
CHANGED
|
@@ -5,48 +5,51 @@ import {
|
|
|
5
5
|
__resetProviderProxyForTests,
|
|
6
6
|
extractRouteToken,
|
|
7
7
|
getProviderProxy
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UDCC7EMR.js";
|
|
9
|
+
import "./chunk-WB6PH56J.js";
|
|
9
10
|
import "./chunk-VVEHS2LI.js";
|
|
10
11
|
import "./chunk-46RLHI7D.js";
|
|
12
|
+
import "./chunk-WNKWAEUR.js";
|
|
13
|
+
import "./chunk-MZNPGW5Q.js";
|
|
11
14
|
import "./chunk-DK4A7DLE.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-Z7LUNECE.js";
|
|
15
|
+
import "./chunk-VRFBB5DB.js";
|
|
16
|
+
import "./chunk-LVUCAWMK.js";
|
|
17
|
+
import "./chunk-OEWZUX4G.js";
|
|
18
|
+
import "./chunk-LB6EBS6Y.js";
|
|
19
|
+
import "./chunk-6CL5HTPQ.js";
|
|
18
20
|
import "./chunk-7VU7V2E4.js";
|
|
19
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-UX7VWA46.js";
|
|
20
22
|
import "./chunk-BPKCU575.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-MZNPGW5Q.js";
|
|
23
|
+
import "./chunk-DRWHTIIZ.js";
|
|
23
24
|
import "./chunk-XTEI64OU.js";
|
|
24
25
|
import "./chunk-XX6NQJMA.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-5ERIZW3D.js";
|
|
27
|
+
import "./chunk-YJVHCHQX.js";
|
|
28
|
+
import "./chunk-23S5OPIO.js";
|
|
29
|
+
import "./chunk-AVYJ4YBN.js";
|
|
26
30
|
import "./chunk-OE6TDIWW.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-OPRS4IQZ.js";
|
|
32
|
+
import "./chunk-2JYRIADS.js";
|
|
33
|
+
import "./chunk-DE2SRBFZ.js";
|
|
29
34
|
import "./chunk-ZY6KU6P3.js";
|
|
30
35
|
import "./chunk-JWC6APFQ.js";
|
|
31
|
-
import "./chunk-5ERIZW3D.js";
|
|
32
|
-
import "./chunk-5ENKBSWO.js";
|
|
33
|
-
import "./chunk-HRRYG2AX.js";
|
|
34
|
-
import "./chunk-AVYJ4YBN.js";
|
|
35
36
|
import "./chunk-WLYIIEAF.js";
|
|
36
37
|
import "./chunk-TKJMZBAH.js";
|
|
37
38
|
import "./chunk-3QFXFCHG.js";
|
|
38
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-EBLFCNPY.js";
|
|
39
40
|
import "./chunk-AQ5TNQB7.js";
|
|
40
41
|
import "./chunk-XEKD23J5.js";
|
|
41
42
|
import "./chunk-H5JUT3KV.js";
|
|
42
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-IFXJ2BG7.js";
|
|
43
44
|
import "./chunk-K5NM7VAH.js";
|
|
44
45
|
import "./chunk-WNY4WMRF.js";
|
|
45
46
|
import "./chunk-OZFM4X3S.js";
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-AT7B7SOZ.js";
|
|
48
|
+
import "./chunk-N5T4M4GU.js";
|
|
49
|
+
import "./chunk-TOVPMMHM.js";
|
|
50
|
+
import "./chunk-SIZQQD6T.js";
|
|
51
|
+
import "./chunk-SYQF7OIR.js";
|
|
52
|
+
import "./chunk-MKF46GNZ.js";
|
|
50
53
|
import "./chunk-CDHS2QDC.js";
|
|
51
54
|
import "./chunk-Y7FO65VT.js";
|
|
52
55
|
import "./chunk-FMOBD2OQ.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProviderConfigSource } from './ports/provider-config-source.js';
|
|
2
2
|
import { IngressFormat, RouteContext } from './provider-proxy/types.js';
|
|
3
|
-
import {
|
|
3
|
+
import { s as OutboundEndpoint, Q as ModelRef, c as EndpointRoutingConfig, R as RequestRole } from './types-hsoKrVQS.js';
|
|
4
4
|
import { SubscriptionProviderId } from '@omnicross/contracts/subscription-types';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProviderConfigSource } from './ports/provider-config-source.cjs';
|
|
2
2
|
import { IngressFormat, RouteContext } from './provider-proxy/types.cjs';
|
|
3
|
-
import {
|
|
3
|
+
import { s as OutboundEndpoint, Q as ModelRef, c as EndpointRoutingConfig, R as RequestRole } from './types-H3wGZSOo.cjs';
|
|
4
4
|
import { SubscriptionProviderId } from '@omnicross/contracts/subscription-types';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkIIRPUVPHcjs = require('../chunk-IIRPUVPH.cjs');
|
|
4
4
|
require('../chunk-GBHYAGX3.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.TransformerChainExecutor =
|
|
7
|
+
exports.TransformerChainExecutor = _chunkIIRPUVPHcjs.TransformerChainExecutor;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk4VLRHHFEcjs = require('../../chunk-4VLRHHFE.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
exports.AnthropicTransformer =
|
|
6
|
+
exports.AnthropicTransformer = _chunk4VLRHHFEcjs.AnthropicTransformer;
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
7
|
-
require('../../chunk-
|
|
6
|
+
var _chunkOKMJLEXXcjs = require('../../chunk-OKMJLEXX.cjs');
|
|
7
|
+
require('../../chunk-KBM2W6UY.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.GeminiCodeAssistTransformer =
|
|
13
|
+
exports.GeminiCodeAssistTransformer = _chunkOKMJLEXXcjs.GeminiCodeAssistTransformer; exports.buildCodeAssistUrl = _chunkOKMJLEXXcjs.buildCodeAssistUrl; exports.resolveCodeAssistApiVersion = _chunkOKMJLEXXcjs.resolveCodeAssistApiVersion; exports.resolveCodeAssistEndpoint = _chunkOKMJLEXXcjs.resolveCodeAssistEndpoint;
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
buildCodeAssistUrl,
|
|
4
4
|
resolveCodeAssistApiVersion,
|
|
5
5
|
resolveCodeAssistEndpoint
|
|
6
|
-
} from "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
6
|
+
} from "../../chunk-N5T4M4GU.js";
|
|
7
|
+
import "../../chunk-TOVPMMHM.js";
|
|
8
8
|
export {
|
|
9
9
|
GeminiCodeAssistTransformer,
|
|
10
10
|
buildCodeAssistUrl,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
3
|
+
var _chunkV4TXMEJScjs = require('../../chunk-V4TXMEJS.cjs');
|
|
4
|
+
require('../../chunk-KBM2W6UY.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.GeminiTransformer =
|
|
7
|
+
exports.GeminiTransformer = _chunkV4TXMEJScjs.GeminiTransformer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk6VUQPOV3cjs = require('../../chunk-6VUQPOV3.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
exports.OpenAIResponseTransformer =
|
|
6
|
+
exports.OpenAIResponseTransformer = _chunk6VUQPOV3cjs.OpenAIResponseTransformer;
|
|
@@ -47,7 +47,7 @@ declare class OpenAIResponseTransformer implements Transformer {
|
|
|
47
47
|
/**
|
|
48
48
|
* Transform OpenAI CC response → Response API format
|
|
49
49
|
*/
|
|
50
|
-
transformResponseIn(response: Response,
|
|
50
|
+
transformResponseIn(response: Response, context?: TransformerContext): Promise<Response>;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
export { OpenAIResponseTransformer };
|
|
@@ -47,7 +47,7 @@ declare class OpenAIResponseTransformer implements Transformer {
|
|
|
47
47
|
/**
|
|
48
48
|
* Transform OpenAI CC response → Response API format
|
|
49
49
|
*/
|
|
50
|
-
transformResponseIn(response: Response,
|
|
50
|
+
transformResponseIn(response: Response, context?: TransformerContext): Promise<Response>;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
export { OpenAIResponseTransformer };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Transformer, TransformerLogger, UnifiedChatRequest, LLMProvider, TransformerContext } from '../types.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* OpenAITransformer — the format-axis encoder for OpenAI Chat Completions
|
|
5
|
+
* upstreams.
|
|
6
|
+
*
|
|
7
|
+
* This is the fourth format transformer, alongside `anthropic`, `gemini`, and
|
|
8
|
+
* `openai-response`. It exists because `Unified` is OpenAI-chat-*shaped* but is
|
|
9
|
+
* NOT byte-identical to the OpenAI chat wire: an endpoint decoder can attach
|
|
10
|
+
* fields that only Anthropic understands, and the pipeline threads internal
|
|
11
|
+
* routing state through the same object. Before this transformer the `openai`
|
|
12
|
+
* format had NO encoder (`getMainTransformer` returned `null`), so every one of
|
|
13
|
+
* those leaks had to be patched per-vendor — `DeepseekTransformer` and
|
|
14
|
+
* `OpenCodeGoTransformer` were two copies of the same sanitizer, and every other
|
|
15
|
+
* OpenAI provider got no sanitizing at all.
|
|
16
|
+
*
|
|
17
|
+
* ## Request (Unified → OpenAI chat wire)
|
|
18
|
+
*
|
|
19
|
+
* BLACKLIST, not whitelist. Only known-foreign fields are touched; everything
|
|
20
|
+
* else passes through verbatim. A whitelist would silently drop the parameters
|
|
21
|
+
* the chat wire legitimately carries but `UnifiedChatRequest` never declared —
|
|
22
|
+
* `top_p`, `seed`, `stop`, `response_format`, `logprobs`, and in particular
|
|
23
|
+
* `stream_options.include_usage`, which is the ONLY reason a chat stream emits
|
|
24
|
+
* a final `usage` chunk (see `openaiChatIngress`'s usage tap). Dropping it would
|
|
25
|
+
* silently zero out streaming usage for every OpenAI provider.
|
|
26
|
+
*
|
|
27
|
+
* - `meta` (top level) — internal routing metadata; `UnifiedChatRequest.meta`
|
|
28
|
+
* documents that it must never be serialised.
|
|
29
|
+
* - `reasoning` (top level) — encoded as `reasoning_effort`.
|
|
30
|
+
* - `thinking` (top level) — Anthropic-shaped; the Anthropic decoder already
|
|
31
|
+
* turned the client's `thinking` into `reasoning`, so any survivor here is
|
|
32
|
+
* residue.
|
|
33
|
+
* - `cache_control` (per message, and inside text content blocks) — an
|
|
34
|
+
* Anthropic prompt-caching marker with no OpenAI-chat equivalent.
|
|
35
|
+
* - `thinking` (per message) — ENCODED, not dropped, as `reasoning_content`.
|
|
36
|
+
* Assistant turns carry prior reasoning that a reasoning upstream requires
|
|
37
|
+
* echoed back on the next tool-result turn; dropping it yields a 400
|
|
38
|
+
* ("reasoning_content must be passed back") on multi-round tool calls. The
|
|
39
|
+
* Anthropic `signature` has no chat-wire representation and is dropped.
|
|
40
|
+
*
|
|
41
|
+
* ## Response (OpenAI chat wire → Unified)
|
|
42
|
+
*
|
|
43
|
+
* Identity. On the `/v1/chat/completions` ingress the client wire IS Unified and
|
|
44
|
+
* there is no endpoint transformer to re-encode, so rewriting `reasoning_content`
|
|
45
|
+
* here would hand an OpenAI SDK a field it cannot read. `reasoning_content`
|
|
46
|
+
* therefore stays the Unified spelling on this path, which is what the Anthropic
|
|
47
|
+
* encoder (`convertOpenAIStreamToAnthropic`) already looks for.
|
|
48
|
+
*
|
|
49
|
+
* @module transformer/transformers/OpenAITransformer
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
declare class OpenAITransformer implements Transformer {
|
|
53
|
+
static TransformerName: string;
|
|
54
|
+
name: string;
|
|
55
|
+
endPoint: string;
|
|
56
|
+
logger?: TransformerLogger;
|
|
57
|
+
/**
|
|
58
|
+
* Unified → OpenAI Chat Completions.
|
|
59
|
+
*/
|
|
60
|
+
transformRequestIn(request: UnifiedChatRequest, _provider: LLMProvider, _context: TransformerContext): Promise<Record<string, unknown>>;
|
|
61
|
+
/**
|
|
62
|
+
* OpenAI Chat Completions → Unified. Identity — see the module JSDoc for why
|
|
63
|
+
* `reasoning_content` is NOT rewritten here.
|
|
64
|
+
*/
|
|
65
|
+
transformResponseOut(response: Response, _context: TransformerContext): Promise<Response>;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { OpenAITransformer };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Transformer, TransformerLogger, UnifiedChatRequest, LLMProvider, TransformerContext } from '../types.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* OpenAITransformer — the format-axis encoder for OpenAI Chat Completions
|
|
5
|
+
* upstreams.
|
|
6
|
+
*
|
|
7
|
+
* This is the fourth format transformer, alongside `anthropic`, `gemini`, and
|
|
8
|
+
* `openai-response`. It exists because `Unified` is OpenAI-chat-*shaped* but is
|
|
9
|
+
* NOT byte-identical to the OpenAI chat wire: an endpoint decoder can attach
|
|
10
|
+
* fields that only Anthropic understands, and the pipeline threads internal
|
|
11
|
+
* routing state through the same object. Before this transformer the `openai`
|
|
12
|
+
* format had NO encoder (`getMainTransformer` returned `null`), so every one of
|
|
13
|
+
* those leaks had to be patched per-vendor — `DeepseekTransformer` and
|
|
14
|
+
* `OpenCodeGoTransformer` were two copies of the same sanitizer, and every other
|
|
15
|
+
* OpenAI provider got no sanitizing at all.
|
|
16
|
+
*
|
|
17
|
+
* ## Request (Unified → OpenAI chat wire)
|
|
18
|
+
*
|
|
19
|
+
* BLACKLIST, not whitelist. Only known-foreign fields are touched; everything
|
|
20
|
+
* else passes through verbatim. A whitelist would silently drop the parameters
|
|
21
|
+
* the chat wire legitimately carries but `UnifiedChatRequest` never declared —
|
|
22
|
+
* `top_p`, `seed`, `stop`, `response_format`, `logprobs`, and in particular
|
|
23
|
+
* `stream_options.include_usage`, which is the ONLY reason a chat stream emits
|
|
24
|
+
* a final `usage` chunk (see `openaiChatIngress`'s usage tap). Dropping it would
|
|
25
|
+
* silently zero out streaming usage for every OpenAI provider.
|
|
26
|
+
*
|
|
27
|
+
* - `meta` (top level) — internal routing metadata; `UnifiedChatRequest.meta`
|
|
28
|
+
* documents that it must never be serialised.
|
|
29
|
+
* - `reasoning` (top level) — encoded as `reasoning_effort`.
|
|
30
|
+
* - `thinking` (top level) — Anthropic-shaped; the Anthropic decoder already
|
|
31
|
+
* turned the client's `thinking` into `reasoning`, so any survivor here is
|
|
32
|
+
* residue.
|
|
33
|
+
* - `cache_control` (per message, and inside text content blocks) — an
|
|
34
|
+
* Anthropic prompt-caching marker with no OpenAI-chat equivalent.
|
|
35
|
+
* - `thinking` (per message) — ENCODED, not dropped, as `reasoning_content`.
|
|
36
|
+
* Assistant turns carry prior reasoning that a reasoning upstream requires
|
|
37
|
+
* echoed back on the next tool-result turn; dropping it yields a 400
|
|
38
|
+
* ("reasoning_content must be passed back") on multi-round tool calls. The
|
|
39
|
+
* Anthropic `signature` has no chat-wire representation and is dropped.
|
|
40
|
+
*
|
|
41
|
+
* ## Response (OpenAI chat wire → Unified)
|
|
42
|
+
*
|
|
43
|
+
* Identity. On the `/v1/chat/completions` ingress the client wire IS Unified and
|
|
44
|
+
* there is no endpoint transformer to re-encode, so rewriting `reasoning_content`
|
|
45
|
+
* here would hand an OpenAI SDK a field it cannot read. `reasoning_content`
|
|
46
|
+
* therefore stays the Unified spelling on this path, which is what the Anthropic
|
|
47
|
+
* encoder (`convertOpenAIStreamToAnthropic`) already looks for.
|
|
48
|
+
*
|
|
49
|
+
* @module transformer/transformers/OpenAITransformer
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
declare class OpenAITransformer implements Transformer {
|
|
53
|
+
static TransformerName: string;
|
|
54
|
+
name: string;
|
|
55
|
+
endPoint: string;
|
|
56
|
+
logger?: TransformerLogger;
|
|
57
|
+
/**
|
|
58
|
+
* Unified → OpenAI Chat Completions.
|
|
59
|
+
*/
|
|
60
|
+
transformRequestIn(request: UnifiedChatRequest, _provider: LLMProvider, _context: TransformerContext): Promise<Record<string, unknown>>;
|
|
61
|
+
/**
|
|
62
|
+
* OpenAI Chat Completions → Unified. Identity — see the module JSDoc for why
|
|
63
|
+
* `reasoning_content` is NOT rewritten here.
|
|
64
|
+
*/
|
|
65
|
+
transformResponseOut(response: Response, _context: TransformerContext): Promise<Response>;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { OpenAITransformer };
|
|
@@ -3,27 +3,26 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
var _chunk7AK7B36Bcjs = require('../chunk-7AK7B36B.cjs');
|
|
6
7
|
|
|
7
|
-
var _chunkRGTR7CIOcjs = require('../chunk-RGTR7CIO.cjs');
|
|
8
8
|
|
|
9
|
+
var _chunkV4TXMEJScjs = require('../chunk-V4TXMEJS.cjs');
|
|
9
10
|
|
|
10
|
-
var _chunkDWKQZ2SKcjs = require('../chunk-DWKQZ2SK.cjs');
|
|
11
11
|
|
|
12
|
+
var _chunk6VUQPOV3cjs = require('../chunk-6VUQPOV3.cjs');
|
|
12
13
|
|
|
13
|
-
var _chunk4VAVYUZScjs = require('../chunk-4VAVYUZS.cjs');
|
|
14
14
|
|
|
15
|
+
var _chunkOF3BECU2cjs = require('../chunk-OF3BECU2.cjs');
|
|
15
16
|
|
|
16
|
-
var _chunk7YN22L2Hcjs = require('../chunk-7YN22L2H.cjs');
|
|
17
17
|
|
|
18
|
+
var _chunk4VLRHHFEcjs = require('../chunk-4VLRHHFE.cjs');
|
|
18
19
|
|
|
19
|
-
var _chunkSU2GCLACcjs = require('../chunk-SU2GCLAC.cjs');
|
|
20
20
|
|
|
21
|
+
var _chunkOKMJLEXXcjs = require('../chunk-OKMJLEXX.cjs');
|
|
22
|
+
require('../chunk-KBM2W6UY.cjs');
|
|
21
23
|
|
|
22
|
-
var _chunkC72S6TTVcjs = require('../chunk-C72S6TTV.cjs');
|
|
23
24
|
|
|
24
25
|
|
|
25
|
-
var _chunkRSJ3TWJQcjs = require('../chunk-RSJ3TWJQ.cjs');
|
|
26
|
-
require('../chunk-YGXJGRFI.cjs');
|
|
27
26
|
|
|
28
27
|
|
|
29
28
|
|
|
@@ -31,9 +30,4 @@ require('../chunk-YGXJGRFI.cjs');
|
|
|
31
30
|
|
|
32
31
|
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
exports.AnthropicTransformer = _chunk4VAVYUZScjs.AnthropicTransformer; exports.BUILTIN_TRANSFORMER_NAMES = _chunkRGTR7CIOcjs.BUILTIN_TRANSFORMER_NAMES; exports.BuiltinTransformers = _chunkRGTR7CIOcjs.BuiltinTransformers; exports.DeepseekTransformer = _chunkRGTR7CIOcjs.DeepseekTransformer; exports.GeminiCodeAssistTransformer = _chunkRSJ3TWJQcjs.GeminiCodeAssistTransformer; exports.GeminiTransformer = _chunk7YN22L2Hcjs.GeminiTransformer; exports.OpenAIResponseTransformer = _chunkSU2GCLACcjs.OpenAIResponseTransformer; exports.OpenCodeGoTransformer = _chunkC72S6TTVcjs.OpenCodeGoTransformer; exports.ReasoningTransformer = _chunkDWKQZ2SKcjs.ReasoningTransformer; exports.getBuiltinTransformers = _chunkRGTR7CIOcjs.getBuiltinTransformers; exports.registerBuiltinTransformers = _chunkRGTR7CIOcjs.registerBuiltinTransformers;
|
|
33
|
+
exports.AnthropicTransformer = _chunk4VLRHHFEcjs.AnthropicTransformer; exports.BUILTIN_TRANSFORMER_NAMES = _chunk7AK7B36Bcjs.BUILTIN_TRANSFORMER_NAMES; exports.BuiltinTransformers = _chunk7AK7B36Bcjs.BuiltinTransformers; exports.GeminiCodeAssistTransformer = _chunkOKMJLEXXcjs.GeminiCodeAssistTransformer; exports.GeminiTransformer = _chunkV4TXMEJScjs.GeminiTransformer; exports.OpenAIResponseTransformer = _chunk6VUQPOV3cjs.OpenAIResponseTransformer; exports.OpenAITransformer = _chunkOF3BECU2cjs.OpenAITransformer; exports.getBuiltinTransformers = _chunk7AK7B36Bcjs.getBuiltinTransformers; exports.registerBuiltinTransformers = _chunk7AK7B36Bcjs.registerBuiltinTransformers;
|
|
@@ -1,51 +1,10 @@
|
|
|
1
1
|
import { TransformerService } from './TransformerService.cjs';
|
|
2
2
|
import { AnthropicTransformer } from './transformers/AnthropicTransformer.cjs';
|
|
3
|
-
import { Transformer, TransformerLogger, UnifiedChatRequest, LLMProvider, TransformerContext } from './types.cjs';
|
|
4
3
|
import { GeminiCodeAssistTransformer } from './transformers/GeminiCodeAssistTransformer.cjs';
|
|
5
4
|
import { GeminiTransformer } from './transformers/GeminiTransformer.cjs';
|
|
6
5
|
import { OpenAIResponseTransformer } from './transformers/OpenAIResponseTransformer.cjs';
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* DeepseekTransformer - Transformer for DeepSeek API compatibility
|
|
12
|
-
*
|
|
13
|
-
* Handles:
|
|
14
|
-
* - max_tokens limit (8192 max for DeepSeek)
|
|
15
|
-
* - reasoning_content → thinking block conversion in streams
|
|
16
|
-
*
|
|
17
|
-
* @module transformer/transformers/DeepseekTransformer
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* DeepseekTransformer handles DeepSeek-specific API adaptations
|
|
22
|
-
*
|
|
23
|
-
* Features:
|
|
24
|
-
* - Limits max_tokens to 8192 (DeepSeek API constraint)
|
|
25
|
-
* - Converts reasoning_content in stream responses to thinking blocks
|
|
26
|
-
*/
|
|
27
|
-
declare class DeepseekTransformer implements Transformer {
|
|
28
|
-
static TransformerName: string;
|
|
29
|
-
name: string;
|
|
30
|
-
logger?: TransformerLogger;
|
|
31
|
-
/**
|
|
32
|
-
* Transform request: limit max_tokens to 8192 for legacy models only
|
|
33
|
-
* V4 models support up to 384K output tokens
|
|
34
|
-
*/
|
|
35
|
-
transformRequestIn(request: UnifiedChatRequest, _provider: LLMProvider, _context: TransformerContext): Promise<Record<string, unknown>>;
|
|
36
|
-
/**
|
|
37
|
-
* Transform response: convert reasoning_content to thinking blocks
|
|
38
|
-
*/
|
|
39
|
-
transformResponseOut(response: Response, _context: TransformerContext): Promise<Response>;
|
|
40
|
-
/**
|
|
41
|
-
* Handle JSON (non-streaming) response
|
|
42
|
-
*/
|
|
43
|
-
private handleJsonResponse;
|
|
44
|
-
/**
|
|
45
|
-
* Handle streaming response - convert reasoning_content to thinking blocks
|
|
46
|
-
*/
|
|
47
|
-
private handleStreamResponse;
|
|
48
|
-
}
|
|
6
|
+
import { OpenAITransformer } from './transformers/OpenAITransformer.cjs';
|
|
7
|
+
import './types.cjs';
|
|
49
8
|
|
|
50
9
|
/**
|
|
51
10
|
* Transformer Registry
|
|
@@ -58,15 +17,20 @@ declare class DeepseekTransformer implements Transformer {
|
|
|
58
17
|
/**
|
|
59
18
|
* Map of all built-in transformers
|
|
60
19
|
* Used for automatic registration with TransformerService
|
|
20
|
+
*
|
|
21
|
+
* This is the FORMAT axis — one encoder per upstream wire, selected by a
|
|
22
|
+
* provider row's `apiFormat` (plus `gemini-code-assist`, the Code-Assist
|
|
23
|
+
* subscription's variant of the Gemini wire). The MODIFIER axis (`maxtoken`,
|
|
24
|
+
* `sampling`, `reasoning`, …) is a separate, currently-unimplemented surface:
|
|
25
|
+
* those names are declared in the UI, round-trip through config, and are warned
|
|
26
|
+
* + skipped at resolve time until something implements them.
|
|
61
27
|
*/
|
|
62
28
|
declare const BuiltinTransformers: {
|
|
63
|
-
readonly
|
|
64
|
-
readonly ReasoningTransformer: typeof ReasoningTransformer;
|
|
29
|
+
readonly OpenAITransformer: typeof OpenAITransformer;
|
|
65
30
|
readonly GeminiTransformer: typeof GeminiTransformer;
|
|
66
31
|
readonly GeminiCodeAssistTransformer: typeof GeminiCodeAssistTransformer;
|
|
67
32
|
readonly AnthropicTransformer: typeof AnthropicTransformer;
|
|
68
33
|
readonly OpenAIResponseTransformer: typeof OpenAIResponseTransformer;
|
|
69
|
-
readonly OpenCodeGoTransformer: typeof OpenCodeGoTransformer;
|
|
70
34
|
};
|
|
71
35
|
/**
|
|
72
36
|
* Get all built-in transformer constructors
|
|
@@ -75,7 +39,7 @@ declare function getBuiltinTransformers(): typeof BuiltinTransformers;
|
|
|
75
39
|
/**
|
|
76
40
|
* List of built-in transformer names
|
|
77
41
|
*/
|
|
78
|
-
declare const BUILTIN_TRANSFORMER_NAMES: readonly ["
|
|
42
|
+
declare const BUILTIN_TRANSFORMER_NAMES: readonly ["openai", "gemini", "gemini-code-assist", "anthropic", "openai-response"];
|
|
79
43
|
type BuiltinTransformerName = (typeof BUILTIN_TRANSFORMER_NAMES)[number];
|
|
80
44
|
/**
|
|
81
45
|
* Single self-registration entry point for the built-in transformer set.
|
|
@@ -97,4 +61,4 @@ type BuiltinTransformerName = (typeof BUILTIN_TRANSFORMER_NAMES)[number];
|
|
|
97
61
|
*/
|
|
98
62
|
declare function registerBuiltinTransformers(service: TransformerService): Promise<void>;
|
|
99
63
|
|
|
100
|
-
export { AnthropicTransformer, BUILTIN_TRANSFORMER_NAMES, type BuiltinTransformerName, BuiltinTransformers,
|
|
64
|
+
export { AnthropicTransformer, BUILTIN_TRANSFORMER_NAMES, type BuiltinTransformerName, BuiltinTransformers, GeminiCodeAssistTransformer, GeminiTransformer, OpenAIResponseTransformer, OpenAITransformer, getBuiltinTransformers, registerBuiltinTransformers };
|
|
@@ -1,51 +1,10 @@
|
|
|
1
1
|
import { TransformerService } from './TransformerService.js';
|
|
2
2
|
import { AnthropicTransformer } from './transformers/AnthropicTransformer.js';
|
|
3
|
-
import { Transformer, TransformerLogger, UnifiedChatRequest, LLMProvider, TransformerContext } from './types.js';
|
|
4
3
|
import { GeminiCodeAssistTransformer } from './transformers/GeminiCodeAssistTransformer.js';
|
|
5
4
|
import { GeminiTransformer } from './transformers/GeminiTransformer.js';
|
|
6
5
|
import { OpenAIResponseTransformer } from './transformers/OpenAIResponseTransformer.js';
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* DeepseekTransformer - Transformer for DeepSeek API compatibility
|
|
12
|
-
*
|
|
13
|
-
* Handles:
|
|
14
|
-
* - max_tokens limit (8192 max for DeepSeek)
|
|
15
|
-
* - reasoning_content → thinking block conversion in streams
|
|
16
|
-
*
|
|
17
|
-
* @module transformer/transformers/DeepseekTransformer
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* DeepseekTransformer handles DeepSeek-specific API adaptations
|
|
22
|
-
*
|
|
23
|
-
* Features:
|
|
24
|
-
* - Limits max_tokens to 8192 (DeepSeek API constraint)
|
|
25
|
-
* - Converts reasoning_content in stream responses to thinking blocks
|
|
26
|
-
*/
|
|
27
|
-
declare class DeepseekTransformer implements Transformer {
|
|
28
|
-
static TransformerName: string;
|
|
29
|
-
name: string;
|
|
30
|
-
logger?: TransformerLogger;
|
|
31
|
-
/**
|
|
32
|
-
* Transform request: limit max_tokens to 8192 for legacy models only
|
|
33
|
-
* V4 models support up to 384K output tokens
|
|
34
|
-
*/
|
|
35
|
-
transformRequestIn(request: UnifiedChatRequest, _provider: LLMProvider, _context: TransformerContext): Promise<Record<string, unknown>>;
|
|
36
|
-
/**
|
|
37
|
-
* Transform response: convert reasoning_content to thinking blocks
|
|
38
|
-
*/
|
|
39
|
-
transformResponseOut(response: Response, _context: TransformerContext): Promise<Response>;
|
|
40
|
-
/**
|
|
41
|
-
* Handle JSON (non-streaming) response
|
|
42
|
-
*/
|
|
43
|
-
private handleJsonResponse;
|
|
44
|
-
/**
|
|
45
|
-
* Handle streaming response - convert reasoning_content to thinking blocks
|
|
46
|
-
*/
|
|
47
|
-
private handleStreamResponse;
|
|
48
|
-
}
|
|
6
|
+
import { OpenAITransformer } from './transformers/OpenAITransformer.js';
|
|
7
|
+
import './types.js';
|
|
49
8
|
|
|
50
9
|
/**
|
|
51
10
|
* Transformer Registry
|
|
@@ -58,15 +17,20 @@ declare class DeepseekTransformer implements Transformer {
|
|
|
58
17
|
/**
|
|
59
18
|
* Map of all built-in transformers
|
|
60
19
|
* Used for automatic registration with TransformerService
|
|
20
|
+
*
|
|
21
|
+
* This is the FORMAT axis — one encoder per upstream wire, selected by a
|
|
22
|
+
* provider row's `apiFormat` (plus `gemini-code-assist`, the Code-Assist
|
|
23
|
+
* subscription's variant of the Gemini wire). The MODIFIER axis (`maxtoken`,
|
|
24
|
+
* `sampling`, `reasoning`, …) is a separate, currently-unimplemented surface:
|
|
25
|
+
* those names are declared in the UI, round-trip through config, and are warned
|
|
26
|
+
* + skipped at resolve time until something implements them.
|
|
61
27
|
*/
|
|
62
28
|
declare const BuiltinTransformers: {
|
|
63
|
-
readonly
|
|
64
|
-
readonly ReasoningTransformer: typeof ReasoningTransformer;
|
|
29
|
+
readonly OpenAITransformer: typeof OpenAITransformer;
|
|
65
30
|
readonly GeminiTransformer: typeof GeminiTransformer;
|
|
66
31
|
readonly GeminiCodeAssistTransformer: typeof GeminiCodeAssistTransformer;
|
|
67
32
|
readonly AnthropicTransformer: typeof AnthropicTransformer;
|
|
68
33
|
readonly OpenAIResponseTransformer: typeof OpenAIResponseTransformer;
|
|
69
|
-
readonly OpenCodeGoTransformer: typeof OpenCodeGoTransformer;
|
|
70
34
|
};
|
|
71
35
|
/**
|
|
72
36
|
* Get all built-in transformer constructors
|
|
@@ -75,7 +39,7 @@ declare function getBuiltinTransformers(): typeof BuiltinTransformers;
|
|
|
75
39
|
/**
|
|
76
40
|
* List of built-in transformer names
|
|
77
41
|
*/
|
|
78
|
-
declare const BUILTIN_TRANSFORMER_NAMES: readonly ["
|
|
42
|
+
declare const BUILTIN_TRANSFORMER_NAMES: readonly ["openai", "gemini", "gemini-code-assist", "anthropic", "openai-response"];
|
|
79
43
|
type BuiltinTransformerName = (typeof BUILTIN_TRANSFORMER_NAMES)[number];
|
|
80
44
|
/**
|
|
81
45
|
* Single self-registration entry point for the built-in transformer set.
|
|
@@ -97,4 +61,4 @@ type BuiltinTransformerName = (typeof BUILTIN_TRANSFORMER_NAMES)[number];
|
|
|
97
61
|
*/
|
|
98
62
|
declare function registerBuiltinTransformers(service: TransformerService): Promise<void>;
|
|
99
63
|
|
|
100
|
-
export { AnthropicTransformer, BUILTIN_TRANSFORMER_NAMES, type BuiltinTransformerName, BuiltinTransformers,
|
|
64
|
+
export { AnthropicTransformer, BUILTIN_TRANSFORMER_NAMES, type BuiltinTransformerName, BuiltinTransformers, GeminiCodeAssistTransformer, GeminiTransformer, OpenAIResponseTransformer, OpenAITransformer, getBuiltinTransformers, registerBuiltinTransformers };
|