@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.
- package/dist/{CompletionService-BniP7j88.d.cts → CompletionService-BJu4AWVc.d.cts} +1 -1
- package/dist/{CompletionService-BqrKPwfA.d.ts → CompletionService-C4W2gBi_.d.ts} +1 -1
- package/dist/{ProviderProxy-Ckr6oTrE.d.ts → ProviderProxy-DxsNi3cO.d.ts} +1 -1
- package/dist/{ProviderProxy-Bz_nkOwq.d.cts → ProviderProxy-OuQPYW2I.d.cts} +1 -1
- package/dist/{chunk-24W3DVGI.js → chunk-5XG6FR5F.js} +1 -1
- package/dist/{chunk-WYUXJKMK.js → chunk-DRUT7H5H.js} +1 -1
- package/dist/{chunk-NCCEWVWY.cjs → chunk-DV7656NN.cjs} +571 -364
- package/dist/{chunk-57Y2EA2G.cjs → chunk-JGRNVH7C.cjs} +1 -1
- package/dist/{chunk-2DMOOZ4F.cjs → chunk-LWBXQXZ3.cjs} +1 -1
- package/dist/{chunk-7PIUVCKK.js → chunk-MZCJL3QU.js} +1 -1
- package/dist/{chunk-LVQOCIES.cjs → chunk-QLVRJ5FS.cjs} +2 -2
- package/dist/{chunk-L4L77G3X.js → chunk-TU4BB776.js} +221 -14
- package/dist/{chunk-ZMERU7D3.js → chunk-VXHN5IDL.js} +1 -1
- package/dist/{chunk-QWNUOR7F.cjs → chunk-ZTN2PVKO.cjs} +1 -1
- package/dist/completion/CompletionService.cjs +6 -6
- package/dist/completion/CompletionService.d.cts +2 -2
- package/dist/completion/CompletionService.d.ts +2 -2
- package/dist/completion/CompletionService.js +5 -5
- package/dist/completion.cjs +6 -6
- package/dist/completion.d.cts +2 -2
- package/dist/completion.d.ts +2 -2
- package/dist/completion.js +5 -5
- package/dist/image-generation.d.cts +4 -4
- package/dist/image-generation.d.ts +4 -4
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +5 -5
- package/dist/openai-operation.d.cts +1 -1
- package/dist/openai-operation.d.ts +1 -1
- package/dist/outbound-api/routeResolver.cjs +2 -2
- package/dist/outbound-api/routeResolver.d.cts +5 -5
- package/dist/outbound-api/routeResolver.d.ts +5 -5
- package/dist/outbound-api/routeResolver.js +1 -1
- package/dist/outbound-api/subscriptionRegistryPort.d.cts +9 -1
- package/dist/outbound-api/subscriptionRegistryPort.d.ts +9 -1
- package/dist/outbound-api/types.d.cts +4 -4
- package/dist/outbound-api/types.d.ts +4 -4
- package/dist/outbound-api.cjs +6 -6
- package/dist/outbound-api.d.cts +6 -6
- package/dist/outbound-api.d.ts +6 -6
- package/dist/outbound-api.js +5 -5
- package/dist/pipeline/AccountAllowanceScheduling.d.cts +4 -4
- package/dist/pipeline/AccountAllowanceScheduling.d.ts +4 -4
- package/dist/pipeline/SubscriptionAuthSource.d.cts +11 -0
- package/dist/pipeline/SubscriptionAuthSource.d.ts +11 -0
- package/dist/ports.d.cts +4 -4
- package/dist/ports.d.ts +4 -4
- package/dist/provider-proxy/ProviderProxy.cjs +6 -6
- package/dist/provider-proxy/ProviderProxy.d.cts +2 -2
- package/dist/provider-proxy/ProviderProxy.d.ts +2 -2
- package/dist/provider-proxy/ProviderProxy.js +5 -5
- package/dist/provider-proxy/identity/openCodeGoHeaders.cjs +2 -2
- package/dist/provider-proxy/identity/openCodeGoHeaders.js +1 -1
- package/dist/provider-proxy/ingress/providerProxyShared.cjs +12 -6
- package/dist/provider-proxy/ingress/providerProxyShared.d.cts +36 -2
- package/dist/provider-proxy/ingress/providerProxyShared.d.ts +36 -2
- package/dist/provider-proxy/ingress/providerProxyShared.js +11 -5
- package/dist/provider-proxy/types.d.cts +1 -1
- package/dist/provider-proxy/types.d.ts +1 -1
- package/dist/provider-proxy.cjs +6 -6
- package/dist/provider-proxy.d.cts +6 -6
- package/dist/provider-proxy.d.ts +6 -6
- package/dist/provider-proxy.js +5 -5
- package/dist/{routeResolver-BdNJvTZP.d.cts → routeResolver-BQYMEXer.d.cts} +2 -2
- package/dist/{routeResolver-zVoCx9r3.d.ts → routeResolver-DTfyzaFb.d.ts} +2 -2
- package/dist/transformer/transformers/OpenAITransformer.cjs +2 -2
- package/dist/transformer/transformers/OpenAITransformer.js +1 -1
- package/dist/transformer/transformers.cjs +3 -3
- package/dist/transformer/transformers.js +2 -2
- package/dist/transformer.cjs +3 -3
- package/dist/transformer.js +2 -2
- package/dist/{types-Dt1bgHPg.d.cts → types-BpSkj2JA.d.cts} +3 -3
- package/dist/{types-BVwJQ9ZS.d.cts → types-BsZ1s_a_.d.cts} +1 -1
- package/dist/{types-By9Tg6-I.d.ts → types-Di8VH1c9.d.ts} +12 -0
- package/dist/{types-BSIJdsyl.d.cts → types-Dpr5IAaP.d.cts} +12 -0
- package/dist/{types-IRPv4i1Y.d.ts → types-EReErShW.d.ts} +3 -3
- package/dist/{types-VAHRysdP.d.ts → types-USaixzVP.d.ts} +1 -1
- package/package.json +2 -2
|
@@ -353,7 +353,7 @@ async function resolveSubscriptionRoute(args) {
|
|
|
353
353
|
boundAccountFallbackPolicy: config.boundAccountFallbackPolicy,
|
|
354
354
|
attribution: { sessionId, apiKeyId: _nullishCoalesce(apiKeyId, () => ( null)) }
|
|
355
355
|
};
|
|
356
|
-
const subscriptionConfig = providerId === "opencodego" ? await _optionalChain([registry, 'optionalAccess', _9 => _9.getOpenCodeGoConfig, 'optionalCall', _10 => _10()]) : void 0;
|
|
356
|
+
const subscriptionConfig = providerId === "opencodego" ? await _optionalChain([registry, 'optionalAccess', _9 => _9.getOpenCodeGoConfig, 'optionalCall', _10 => _10()]) : providerId === "copilot" ? await _optionalChain([registry, 'optionalAccess', _11 => _11.getCopilotConfig, 'optionalCall', _12 => _12()]) : void 0;
|
|
357
357
|
const route = {
|
|
358
358
|
sessionId,
|
|
359
359
|
targetProviderFormat: "transform",
|
|
@@ -11,7 +11,7 @@ function setOpenCodeGoUserAgent(userAgent) {
|
|
|
11
11
|
}
|
|
12
12
|
function getOpenCodeGoUserAgent() {
|
|
13
13
|
if (configuredUserAgent) return configuredUserAgent;
|
|
14
|
-
const version = true ? "0.4.
|
|
14
|
+
const version = true ? "0.4.6" : "0.0.0-dev";
|
|
15
15
|
return `omnicross/${version}`;
|
|
16
16
|
}
|
|
17
17
|
function extractOpenCodeSessionHeader(reqHeaders) {
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
|
|
7
7
|
// src/transformer/transformers/OpenAITransformer.ts
|
|
8
8
|
var FOREIGN_MESSAGE_KEYS = ["cache_control", "thinking"];
|
|
9
|
-
var FOREIGN_BODY_KEYS = ["meta", "reasoning", "thinking", "top_k", "metadata_user_id", "_transformWarnings"];
|
|
9
|
+
var FOREIGN_BODY_KEYS = ["meta", "reasoning", "thinking", "top_k", "metadata_user_id", "_transformWarnings", "_serverSideTools"];
|
|
10
10
|
function normalizeContent(content) {
|
|
11
11
|
if (!Array.isArray(content)) return content;
|
|
12
12
|
const cleaned = content.map((block) => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkNOITAVHAcjs = require('./chunk-NOITAVHA.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkZTN2PVKOcjs = require('./chunk-ZTN2PVKO.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunk47E3I5PFcjs = require('./chunk-47E3I5PF.cjs');
|
|
@@ -19,7 +19,7 @@ var _chunkN3MGNLCUcjs = require('./chunk-N3MGNLCU.cjs');
|
|
|
19
19
|
|
|
20
20
|
// src/transformer/transformers/index.ts
|
|
21
21
|
var BuiltinTransformers = {
|
|
22
|
-
OpenAITransformer:
|
|
22
|
+
OpenAITransformer: _chunkZTN2PVKOcjs.OpenAITransformer,
|
|
23
23
|
GeminiTransformer: _chunkBTSADEX4cjs.GeminiTransformer,
|
|
24
24
|
GeminiCodeAssistTransformer: _chunkN3MGNLCUcjs.GeminiCodeAssistTransformer,
|
|
25
25
|
AntigravityTransformer: _chunkZG57GAVUcjs.AntigravityTransformer,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
} from "./chunk-XX6NQJMA.js";
|
|
54
54
|
import {
|
|
55
55
|
extractOpenCodeSessionHeader
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-DRUT7H5H.js";
|
|
57
57
|
import {
|
|
58
58
|
NEVER_FORWARD_HEADERS,
|
|
59
59
|
fillMissingHeaders,
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
parseModelRef,
|
|
119
119
|
resolvePrefixTarget,
|
|
120
120
|
resolveRoute
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-VXHN5IDL.js";
|
|
122
122
|
import {
|
|
123
123
|
getSubscriptionRegistryForOutbound
|
|
124
124
|
} from "./chunk-AQ5TNQB7.js";
|
|
@@ -897,6 +897,124 @@ async function aggregateAnthropicSseToJsonBody(response, rewriteModel, signal) {
|
|
|
897
897
|
if (rewriteModel) message["model"] = rewriteModel;
|
|
898
898
|
return JSON.stringify(message);
|
|
899
899
|
}
|
|
900
|
+
async function aggregateResponsesSseToJsonBody(response, rewriteModel, signal) {
|
|
901
|
+
const text = await readResponseTextWithSignal(response, signal);
|
|
902
|
+
let terminal = null;
|
|
903
|
+
for (const raw of text.split("\n")) {
|
|
904
|
+
const line = raw.trim();
|
|
905
|
+
if (!line.startsWith("data:")) continue;
|
|
906
|
+
const payload = line.slice(5).trim();
|
|
907
|
+
if (!payload || payload === "[DONE]") continue;
|
|
908
|
+
try {
|
|
909
|
+
const ev = JSON.parse(payload);
|
|
910
|
+
if (ev["type"] === "response.completed" || ev["type"] === "response.failed" || ev["type"] === "response.incomplete") {
|
|
911
|
+
const resp = ev["response"];
|
|
912
|
+
if (resp && typeof resp === "object") terminal = resp;
|
|
913
|
+
}
|
|
914
|
+
} catch {
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
if (!terminal) return null;
|
|
918
|
+
if (rewriteModel && typeof terminal["model"] === "string") terminal["model"] = rewriteModel;
|
|
919
|
+
return JSON.stringify(terminal);
|
|
920
|
+
}
|
|
921
|
+
async function aggregateOpenAIChatChunksToJsonBody(response, rewriteModel, signal) {
|
|
922
|
+
const text = await readResponseTextWithSignal(response, signal);
|
|
923
|
+
let id;
|
|
924
|
+
let created;
|
|
925
|
+
let model;
|
|
926
|
+
let content = "";
|
|
927
|
+
let reasoning = "";
|
|
928
|
+
let finishReason = null;
|
|
929
|
+
let usage;
|
|
930
|
+
const toolCalls = /* @__PURE__ */ new Map();
|
|
931
|
+
let sawChoice = false;
|
|
932
|
+
for (const raw of text.split("\n")) {
|
|
933
|
+
const line = raw.trim();
|
|
934
|
+
if (!line.startsWith("data:")) continue;
|
|
935
|
+
const payload = line.slice(5).trim();
|
|
936
|
+
if (!payload || payload === "[DONE]") continue;
|
|
937
|
+
let ev;
|
|
938
|
+
try {
|
|
939
|
+
ev = JSON.parse(payload);
|
|
940
|
+
} catch {
|
|
941
|
+
continue;
|
|
942
|
+
}
|
|
943
|
+
if (typeof ev["id"] === "string" && id === void 0) id = ev["id"];
|
|
944
|
+
if (typeof ev["created"] === "number" && created === void 0) created = ev["created"];
|
|
945
|
+
if (typeof ev["model"] === "string" && model === void 0) model = ev["model"];
|
|
946
|
+
if (ev["usage"] && typeof ev["usage"] === "object") {
|
|
947
|
+
usage = ev["usage"];
|
|
948
|
+
}
|
|
949
|
+
const choices = ev["choices"];
|
|
950
|
+
if (!Array.isArray(choices) || choices.length === 0) continue;
|
|
951
|
+
const choice = choices[0];
|
|
952
|
+
if (!choice || typeof choice !== "object") continue;
|
|
953
|
+
sawChoice = true;
|
|
954
|
+
if (typeof choice["finish_reason"] === "string") finishReason = choice["finish_reason"];
|
|
955
|
+
const delta = choice["delta"];
|
|
956
|
+
if (!delta || typeof delta !== "object") continue;
|
|
957
|
+
const d = delta;
|
|
958
|
+
if (typeof d["content"] === "string") content += d["content"];
|
|
959
|
+
if (typeof d["reasoning_content"] === "string") reasoning += d["reasoning_content"];
|
|
960
|
+
const thinking = d["thinking"];
|
|
961
|
+
if (thinking && typeof thinking === "object") {
|
|
962
|
+
const tc = thinking["content"];
|
|
963
|
+
if (typeof tc === "string") reasoning += tc;
|
|
964
|
+
} else if (typeof thinking === "string") {
|
|
965
|
+
reasoning += thinking;
|
|
966
|
+
}
|
|
967
|
+
const tcs = d["tool_calls"];
|
|
968
|
+
if (Array.isArray(tcs)) {
|
|
969
|
+
for (const tcRaw of tcs) {
|
|
970
|
+
if (!tcRaw || typeof tcRaw !== "object") continue;
|
|
971
|
+
const tc = tcRaw;
|
|
972
|
+
const idx = typeof tc["index"] === "number" ? tc["index"] : 0;
|
|
973
|
+
const fn = tc["function"] ?? {};
|
|
974
|
+
const slot = toolCalls.get(idx) ?? { id: "", name: "", arguments: "" };
|
|
975
|
+
if (typeof tc["id"] === "string" && tc["id"]) slot.id = tc["id"];
|
|
976
|
+
if (typeof fn["name"] === "string" && fn["name"]) slot.name = fn["name"];
|
|
977
|
+
if (typeof fn["arguments"] === "string") slot.arguments += fn["arguments"];
|
|
978
|
+
toolCalls.set(idx, slot);
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
if (!sawChoice && !usage) return null;
|
|
983
|
+
const message = { role: "assistant", content };
|
|
984
|
+
if (reasoning) message["reasoning_content"] = reasoning;
|
|
985
|
+
if (toolCalls.size > 0) {
|
|
986
|
+
message["tool_calls"] = [...toolCalls.entries()].sort((a, b) => a[0] - b[0]).map(([index, tc]) => ({
|
|
987
|
+
index,
|
|
988
|
+
id: tc.id,
|
|
989
|
+
type: "function",
|
|
990
|
+
function: { name: tc.name, arguments: tc.arguments || "{}" }
|
|
991
|
+
}));
|
|
992
|
+
}
|
|
993
|
+
const completion = {
|
|
994
|
+
id: id ?? "chatcmpl-aggregated",
|
|
995
|
+
object: "chat.completion",
|
|
996
|
+
created: created ?? Math.floor(Date.now() / 1e3),
|
|
997
|
+
model: rewriteModel ?? model ?? "",
|
|
998
|
+
choices: [{ index: 0, message, finish_reason: finishReason ?? "stop" }]
|
|
999
|
+
};
|
|
1000
|
+
if (usage) completion["usage"] = usage;
|
|
1001
|
+
return JSON.stringify(completion);
|
|
1002
|
+
}
|
|
1003
|
+
async function sniffIsSseResponse(response) {
|
|
1004
|
+
const contentType = response.headers.get("Content-Type") ?? "";
|
|
1005
|
+
if (contentType.includes("text/event-stream")) return true;
|
|
1006
|
+
if (!response.body) return false;
|
|
1007
|
+
const peek = response.clone();
|
|
1008
|
+
try {
|
|
1009
|
+
const reader = peek.body.getReader();
|
|
1010
|
+
const { value } = await reader.read();
|
|
1011
|
+
reader.releaseLock();
|
|
1012
|
+
const head = value ? new TextDecoder().decode(value).trimStart() : "";
|
|
1013
|
+
return head.startsWith("event:") || head.startsWith("data:");
|
|
1014
|
+
} catch {
|
|
1015
|
+
return false;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
900
1018
|
function writeError(res, status, message) {
|
|
901
1019
|
if (isAnthropicProtocolResponse(res)) {
|
|
902
1020
|
writeAnthropicError(res, status, message);
|
|
@@ -2997,6 +3115,7 @@ async function resolveGeminiProject(profile, hints) {
|
|
|
2997
3115
|
if (!accessToken) return void 0;
|
|
2998
3116
|
return getGeminiCodeAssistResolver()?.resolveProject(accessToken);
|
|
2999
3117
|
}
|
|
3118
|
+
var resolveGeminiProjectForChatBridge = resolveGeminiProject;
|
|
3000
3119
|
async function resolveAntigravityProjectThreaded(profile, hints) {
|
|
3001
3120
|
const headers = {};
|
|
3002
3121
|
await profile.authStrategy.applyHeaders(headers, hints);
|
|
@@ -3073,13 +3192,16 @@ async function applyPlanAuth(body, plan) {
|
|
|
3073
3192
|
});
|
|
3074
3193
|
body.model = actualModel;
|
|
3075
3194
|
plan.transformerProvider.models = [actualModel];
|
|
3076
|
-
if (plan.proxyProviderId === "codex")
|
|
3195
|
+
if (plan.proxyProviderId === "codex") {
|
|
3196
|
+
body.store = false;
|
|
3197
|
+
if (!plan.isStream) body.stream = true;
|
|
3198
|
+
}
|
|
3077
3199
|
return { headers, accountId, actualModel };
|
|
3078
3200
|
}
|
|
3079
3201
|
function decorateCodexHeaders(headers, plan) {
|
|
3080
3202
|
if (plan.proxyProviderId !== "codex") return;
|
|
3081
3203
|
fillMissingHeaders(headers, plan.callerClientHeaders ?? {});
|
|
3082
|
-
fillMissingHeaders(headers, { accept: codexAcceptHeader(
|
|
3204
|
+
fillMissingHeaders(headers, { accept: codexAcceptHeader(true) });
|
|
3083
3205
|
fillMissingCodexCliIdentity(headers);
|
|
3084
3206
|
}
|
|
3085
3207
|
async function runNative(body, plan, operation, signal) {
|
|
@@ -4128,6 +4250,30 @@ async function handleResponsesOperation(res, responsesBody, route, deps, request
|
|
|
4128
4250
|
})
|
|
4129
4251
|
};
|
|
4130
4252
|
}
|
|
4253
|
+
if (!isStream) {
|
|
4254
|
+
if (await sniffIsSseResponse(providerResponse.response)) {
|
|
4255
|
+
const collapsed = await aggregateResponsesSseToJsonBody(
|
|
4256
|
+
providerResponse.response,
|
|
4257
|
+
route.requestedModel,
|
|
4258
|
+
signal
|
|
4259
|
+
);
|
|
4260
|
+
if (collapsed !== null) {
|
|
4261
|
+
providerResponse = {
|
|
4262
|
+
...providerResponse,
|
|
4263
|
+
response: new Response(collapsed, {
|
|
4264
|
+
status: providerResponse.response.status,
|
|
4265
|
+
headers: { "Content-Type": "application/json" }
|
|
4266
|
+
})
|
|
4267
|
+
};
|
|
4268
|
+
} else {
|
|
4269
|
+
throw new OpenAIOperationError({
|
|
4270
|
+
status: 502,
|
|
4271
|
+
code: "upstream_stream_collapse_failed",
|
|
4272
|
+
message: "upstream streamed no terminal response event"
|
|
4273
|
+
});
|
|
4274
|
+
}
|
|
4275
|
+
}
|
|
4276
|
+
}
|
|
4131
4277
|
let overloadRecorded = false;
|
|
4132
4278
|
let usageLimitRecorded = false;
|
|
4133
4279
|
const observeSse = (event) => {
|
|
@@ -5106,7 +5252,16 @@ function recordChatCompletionsStreamUsage(recorder, rawUsage, attribution) {
|
|
|
5106
5252
|
}
|
|
5107
5253
|
|
|
5108
5254
|
// src/provider-proxy/ingress/openaiChatIngress.ts
|
|
5109
|
-
var CHAT_BRIDGE_SUBSCRIPTION_PROVIDERS = /* @__PURE__ */ new Set([
|
|
5255
|
+
var CHAT_BRIDGE_SUBSCRIPTION_PROVIDERS = /* @__PURE__ */ new Set([
|
|
5256
|
+
"claude",
|
|
5257
|
+
"kimi",
|
|
5258
|
+
"grok",
|
|
5259
|
+
"opencodego",
|
|
5260
|
+
"codex",
|
|
5261
|
+
"gemini",
|
|
5262
|
+
"copilot",
|
|
5263
|
+
"antigravity"
|
|
5264
|
+
]);
|
|
5110
5265
|
var IDENTITY_ENDPOINT_TRANSFORMER = { name: "identity-openai-chat" };
|
|
5111
5266
|
async function handleOpenAIChatRequest(res, rawBody, route, deps) {
|
|
5112
5267
|
let chatBody;
|
|
@@ -5120,9 +5275,26 @@ async function handleOpenAIChatRequest(res, rawBody, route, deps) {
|
|
|
5120
5275
|
const resolvedModel = route.model;
|
|
5121
5276
|
chatBody.model = resolvedModel;
|
|
5122
5277
|
try {
|
|
5123
|
-
const plan = route.authMode === "subscription" ? await buildSubscriptionPlan3(res, route, deps, resolvedModel, isStream) : await buildByoPlan4(res, route, deps, resolvedModel, isStream);
|
|
5278
|
+
const plan = route.authMode === "subscription" ? await buildSubscriptionPlan3(res, route, deps, chatBody, resolvedModel, isStream) : await buildByoPlan4(res, route, deps, resolvedModel, isStream);
|
|
5124
5279
|
if (!plan) return;
|
|
5125
|
-
|
|
5280
|
+
let providerResponse = plan.isSubscription ? await runPipelineWithSubscriptionRetry2(chatBody, plan) : await runPipelineWithPoolReporting3(chatBody, plan);
|
|
5281
|
+
if (!isStream) {
|
|
5282
|
+
if (await sniffIsSseResponse(providerResponse.response)) {
|
|
5283
|
+
const collapsed = await aggregateOpenAIChatChunksToJsonBody(providerResponse.response);
|
|
5284
|
+
if (collapsed !== null) {
|
|
5285
|
+
providerResponse = {
|
|
5286
|
+
response: new Response(collapsed, {
|
|
5287
|
+
status: providerResponse.response.status,
|
|
5288
|
+
headers: { "Content-Type": "application/json" }
|
|
5289
|
+
}),
|
|
5290
|
+
rawStatus: providerResponse.rawStatus
|
|
5291
|
+
};
|
|
5292
|
+
} else {
|
|
5293
|
+
writeError(res, 502, "upstream streamed no completable chat chunks");
|
|
5294
|
+
return;
|
|
5295
|
+
}
|
|
5296
|
+
}
|
|
5297
|
+
}
|
|
5126
5298
|
const usageAttribution = {
|
|
5127
5299
|
sessionId: route.sessionId,
|
|
5128
5300
|
providerId: route.providerId ?? "openai",
|
|
@@ -5214,7 +5386,7 @@ async function buildByoPlan4(res, route, deps, resolvedModel, isStream) {
|
|
|
5214
5386
|
routeSessionId: route.sessionId ?? null
|
|
5215
5387
|
};
|
|
5216
5388
|
}
|
|
5217
|
-
async function buildSubscriptionPlan3(res, route, deps, resolvedModel, isStream) {
|
|
5389
|
+
async function buildSubscriptionPlan3(res, route, deps, chatBody, resolvedModel, isStream) {
|
|
5218
5390
|
const profile = route.subscriptionProfile;
|
|
5219
5391
|
if (!profile) {
|
|
5220
5392
|
writeError(res, 502, "Subscription mode requires a subscription profile");
|
|
@@ -5225,27 +5397,56 @@ async function buildSubscriptionPlan3(res, route, deps, resolvedModel, isStream)
|
|
|
5225
5397
|
writeError(
|
|
5226
5398
|
res,
|
|
5227
5399
|
501,
|
|
5228
|
-
`the OpenAI-chat\u2192subscription bridge
|
|
5400
|
+
`the OpenAI-chat\u2192subscription bridge does not implement subscription provider '${providerId}' on this endpoint yet (use the /v1/responses endpoint, a Claude/Kimi/Grok/OpenCodeGo subscription, or a BYO provider)`
|
|
5229
5401
|
);
|
|
5230
5402
|
return null;
|
|
5231
5403
|
}
|
|
5232
|
-
|
|
5404
|
+
let mappedModel = resolvedModel;
|
|
5405
|
+
if (profile.modelMapper) {
|
|
5406
|
+
const summary = buildSubscriptionRequestSummary(chatBody);
|
|
5407
|
+
const mapped = profile.modelMapper(resolvedModel, summary, route.subscriptionConfig);
|
|
5408
|
+
mappedModel = mapped.resolvedModel;
|
|
5409
|
+
}
|
|
5410
|
+
const upstreamUrl = profile.resolveUpstreamUrl?.(mappedModel, route.subscriptionConfig);
|
|
5233
5411
|
if (!upstreamUrl) {
|
|
5234
5412
|
writeError(res, 502, "Subscription profile is missing resolveUpstreamUrl");
|
|
5235
5413
|
return null;
|
|
5236
5414
|
}
|
|
5237
5415
|
const auth = route.auth ?? new SubscriptionAuthSource(profile);
|
|
5416
|
+
const chatChainNames = profile.chatBridgeTransformerNames?.(mappedModel, route.subscriptionConfig) ?? profile.resolveProviderTransformerNames?.(mappedModel, route.subscriptionConfig);
|
|
5238
5417
|
const chain = resolveSubscriptionChain(
|
|
5239
5418
|
profile,
|
|
5240
5419
|
deps.llmConfig.getTransformerService(),
|
|
5241
|
-
IDENTITY_ENDPOINT_TRANSFORMER
|
|
5420
|
+
IDENTITY_ENDPOINT_TRANSFORMER,
|
|
5421
|
+
chatChainNames
|
|
5242
5422
|
);
|
|
5243
5423
|
const transformerProvider = {
|
|
5244
5424
|
name: providerId,
|
|
5245
5425
|
baseUrl: upstreamUrl,
|
|
5246
5426
|
apiKey: "",
|
|
5247
|
-
models: [
|
|
5427
|
+
models: [mappedModel]
|
|
5248
5428
|
};
|
|
5429
|
+
const sessionKey = deriveSubscriptionSessionKey(chatBody);
|
|
5430
|
+
if (providerId === "gemini") {
|
|
5431
|
+
transformerProvider.geminiProject = await resolveGeminiProjectForChatBridge(profile, {
|
|
5432
|
+
sessionKey,
|
|
5433
|
+
preferredAccountId: route.preferredAccountId,
|
|
5434
|
+
preferredAccountGroup: route.preferredAccountGroup,
|
|
5435
|
+
boundAccountFallbackPolicy: route.boundAccountFallbackPolicy
|
|
5436
|
+
});
|
|
5437
|
+
} else if (providerId === "antigravity") {
|
|
5438
|
+
transformerProvider.geminiProject = await resolveAntigravityProjectThreaded(profile, {
|
|
5439
|
+
resolvedModel: mappedModel,
|
|
5440
|
+
reportSelection: () => {
|
|
5441
|
+
},
|
|
5442
|
+
sessionKey,
|
|
5443
|
+
preferredAccountId: route.preferredAccountId,
|
|
5444
|
+
preferredAccountGroup: route.preferredAccountGroup,
|
|
5445
|
+
boundAccountFallbackPolicy: route.boundAccountFallbackPolicy
|
|
5446
|
+
});
|
|
5447
|
+
}
|
|
5448
|
+
chatBody.model = mappedModel;
|
|
5449
|
+
const resolveUrl = providerId === "antigravity" ? (config) => config.url instanceof URL ? config.url.toString() : typeof config.url === "string" ? config.url : upstreamUrl : () => upstreamUrl;
|
|
5249
5450
|
return {
|
|
5250
5451
|
auth,
|
|
5251
5452
|
preferredAccountId: route.preferredAccountId,
|
|
@@ -5253,12 +5454,13 @@ async function buildSubscriptionPlan3(res, route, deps, resolvedModel, isStream)
|
|
|
5253
5454
|
boundAccountFallbackPolicy: route.boundAccountFallbackPolicy,
|
|
5254
5455
|
chain,
|
|
5255
5456
|
transformerProvider,
|
|
5256
|
-
resolvedModel,
|
|
5457
|
+
resolvedModel: mappedModel,
|
|
5257
5458
|
isStream,
|
|
5258
|
-
resolveUrl
|
|
5459
|
+
resolveUrl,
|
|
5259
5460
|
upstreamUrl,
|
|
5260
5461
|
proxyProviderId: providerId,
|
|
5261
5462
|
isSubscription: true,
|
|
5463
|
+
contentSessionKey: sessionKey,
|
|
5262
5464
|
routeSessionId: route.sessionId ?? null
|
|
5263
5465
|
};
|
|
5264
5466
|
}
|
|
@@ -5270,6 +5472,7 @@ async function runPipeline3(chatBody, plan) {
|
|
|
5270
5472
|
await auth.applyHeaders(authHeaders, {
|
|
5271
5473
|
upstreamUrl,
|
|
5272
5474
|
model: resolvedModel,
|
|
5475
|
+
sessionKey: plan.contentSessionKey,
|
|
5273
5476
|
preferredAccountId: plan.preferredAccountId,
|
|
5274
5477
|
preferredAccountGroup: plan.preferredAccountGroup,
|
|
5275
5478
|
boundAccountFallbackPolicy: plan.boundAccountFallbackPolicy,
|
|
@@ -5291,6 +5494,7 @@ async function runPipeline3(chatBody, plan) {
|
|
|
5291
5494
|
if (value !== void 0 && !(key in headers)) headers[key] = value;
|
|
5292
5495
|
}
|
|
5293
5496
|
}
|
|
5497
|
+
if (plan.proxyProviderId === "codex") fillMissingCodexCliIdentity(headers);
|
|
5294
5498
|
return headers;
|
|
5295
5499
|
},
|
|
5296
5500
|
fetchFn: (url, headers, body) => {
|
|
@@ -13577,6 +13781,9 @@ export {
|
|
|
13577
13781
|
projectUpstreamResponseHeaders,
|
|
13578
13782
|
relayResponse,
|
|
13579
13783
|
aggregateAnthropicSseToJsonBody,
|
|
13784
|
+
aggregateResponsesSseToJsonBody,
|
|
13785
|
+
aggregateOpenAIChatChunksToJsonBody,
|
|
13786
|
+
sniffIsSseResponse,
|
|
13580
13787
|
writeError,
|
|
13581
13788
|
writeBoundAccountError,
|
|
13582
13789
|
resolvePoolBoundKey,
|
|
@@ -353,7 +353,7 @@ async function resolveSubscriptionRoute(args) {
|
|
|
353
353
|
boundAccountFallbackPolicy: config.boundAccountFallbackPolicy,
|
|
354
354
|
attribution: { sessionId, apiKeyId: apiKeyId ?? null }
|
|
355
355
|
};
|
|
356
|
-
const subscriptionConfig = providerId === "opencodego" ? await registry?.getOpenCodeGoConfig?.() : void 0;
|
|
356
|
+
const subscriptionConfig = providerId === "opencodego" ? await registry?.getOpenCodeGoConfig?.() : providerId === "copilot" ? await registry?.getCopilotConfig?.() : void 0;
|
|
357
357
|
const route = {
|
|
358
358
|
sessionId,
|
|
359
359
|
targetProviderFormat: "transform",
|
|
@@ -6,7 +6,7 @@ var _chunkIUL4VWNUcjs = require('./chunk-IUL4VWNU.cjs');
|
|
|
6
6
|
|
|
7
7
|
// src/transformer/transformers/OpenAITransformer.ts
|
|
8
8
|
var FOREIGN_MESSAGE_KEYS = ["cache_control", "thinking"];
|
|
9
|
-
var FOREIGN_BODY_KEYS = ["meta", "reasoning", "thinking", "top_k", "metadata_user_id", "_transformWarnings"];
|
|
9
|
+
var FOREIGN_BODY_KEYS = ["meta", "reasoning", "thinking", "top_k", "metadata_user_id", "_transformWarnings", "_serverSideTools"];
|
|
10
10
|
function normalizeContent(content) {
|
|
11
11
|
if (!Array.isArray(content)) return content;
|
|
12
12
|
const cleaned = content.map((block) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkDV7656NNcjs = require('../chunk-DV7656NN.cjs');
|
|
4
4
|
require('../chunk-QVOB2DNX.cjs');
|
|
5
|
-
require('../chunk-
|
|
5
|
+
require('../chunk-QLVRJ5FS.cjs');
|
|
6
6
|
require('../chunk-NOITAVHA.cjs');
|
|
7
|
-
require('../chunk-
|
|
7
|
+
require('../chunk-ZTN2PVKO.cjs');
|
|
8
8
|
require('../chunk-47E3I5PF.cjs');
|
|
9
9
|
require('../chunk-5RSZYQJH.cjs');
|
|
10
10
|
require('../chunk-VGBJPHHD.cjs');
|
|
@@ -24,7 +24,7 @@ require('../chunk-HQP3K7PU.cjs');
|
|
|
24
24
|
require('../chunk-SQU2FGXI.cjs');
|
|
25
25
|
require('../chunk-RPII3E6Z.cjs');
|
|
26
26
|
require('../chunk-6RPZADX3.cjs');
|
|
27
|
-
require('../chunk-
|
|
27
|
+
require('../chunk-LWBXQXZ3.cjs');
|
|
28
28
|
require('../chunk-UKQHBK4Q.cjs');
|
|
29
29
|
require('../chunk-UIBD2YY5.cjs');
|
|
30
30
|
require('../chunk-R3HK6R4B.cjs');
|
|
@@ -46,7 +46,7 @@ require('../chunk-APYG5QD7.cjs');
|
|
|
46
46
|
require('../chunk-L74VDN4A.cjs');
|
|
47
47
|
require('../chunk-XSVNC2UD.cjs');
|
|
48
48
|
require('../chunk-4YINUUKQ.cjs');
|
|
49
|
-
require('../chunk-
|
|
49
|
+
require('../chunk-JGRNVH7C.cjs');
|
|
50
50
|
require('../chunk-QBZJ7P2T.cjs');
|
|
51
51
|
require('../chunk-LL3MZ7O5.cjs');
|
|
52
52
|
require('../chunk-JMJBSACD.cjs');
|
|
@@ -68,4 +68,4 @@ require('../chunk-G4CZIUIB.cjs');
|
|
|
68
68
|
require('../chunk-2RCCLQYV.cjs');
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
exports.CompletionService =
|
|
71
|
+
exports.CompletionService = _chunkDV7656NNcjs.CompletionService;
|
|
@@ -3,10 +3,10 @@ import '@omnicross/contracts/llm-config';
|
|
|
3
3
|
import '../usage-event-sink-BX7FE1NL.cjs';
|
|
4
4
|
import '../logger-4GvQNzhE.cjs';
|
|
5
5
|
import '../ports/provider-config-source.cjs';
|
|
6
|
-
import '../types-
|
|
6
|
+
import '../types-Dpr5IAaP.cjs';
|
|
7
7
|
import '../BuiltinToolExecutor-BHgH-EaZ.cjs';
|
|
8
8
|
export { C as CompletionOptions, a as CompletionResult, S as StreamCallbacks } from '../types-BScIHmPr.cjs';
|
|
9
|
-
export { C as CompletionService } from '../CompletionService-
|
|
9
|
+
export { C as CompletionService } from '../CompletionService-BJu4AWVc.cjs';
|
|
10
10
|
import './ApiKeyPoolService.cjs';
|
|
11
11
|
import '../transformer/types.cjs';
|
|
12
12
|
import '../transformer/TransformerService.cjs';
|
|
@@ -3,10 +3,10 @@ import '@omnicross/contracts/llm-config';
|
|
|
3
3
|
import '../usage-event-sink-BX7FE1NL.js';
|
|
4
4
|
import '../logger-4GvQNzhE.js';
|
|
5
5
|
import '../ports/provider-config-source.js';
|
|
6
|
-
import '../types-
|
|
6
|
+
import '../types-Di8VH1c9.js';
|
|
7
7
|
import '../BuiltinToolExecutor-Bi1LmiTP.js';
|
|
8
8
|
export { C as CompletionOptions, a as CompletionResult, S as StreamCallbacks } from '../types-BScIHmPr.js';
|
|
9
|
-
export { C as CompletionService } from '../CompletionService-
|
|
9
|
+
export { C as CompletionService } from '../CompletionService-C4W2gBi_.js';
|
|
10
10
|
import './ApiKeyPoolService.js';
|
|
11
11
|
import '../transformer/types.js';
|
|
12
12
|
import '../transformer/TransformerService.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CompletionService
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-TU4BB776.js";
|
|
4
4
|
import "../chunk-WTQMX2Q6.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-5XG6FR5F.js";
|
|
6
6
|
import "../chunk-V53ZEFXC.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-MZCJL3QU.js";
|
|
8
8
|
import "../chunk-TKZ3DZS5.js";
|
|
9
9
|
import "../chunk-FU7EAR73.js";
|
|
10
10
|
import "../chunk-IDPMD4B7.js";
|
|
@@ -24,7 +24,7 @@ import "../chunk-VVEHS2LI.js";
|
|
|
24
24
|
import "../chunk-4LSZ7NFM.js";
|
|
25
25
|
import "../chunk-XTEI64OU.js";
|
|
26
26
|
import "../chunk-XX6NQJMA.js";
|
|
27
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-DRUT7H5H.js";
|
|
28
28
|
import "../chunk-ONTTXSRL.js";
|
|
29
29
|
import "../chunk-OE6TDIWW.js";
|
|
30
30
|
import "../chunk-DRWHTIIZ.js";
|
|
@@ -46,7 +46,7 @@ import "../chunk-WLYIIEAF.js";
|
|
|
46
46
|
import "../chunk-TKJMZBAH.js";
|
|
47
47
|
import "../chunk-OZFM4X3S.js";
|
|
48
48
|
import "../chunk-3QFXFCHG.js";
|
|
49
|
-
import "../chunk-
|
|
49
|
+
import "../chunk-VXHN5IDL.js";
|
|
50
50
|
import "../chunk-AQ5TNQB7.js";
|
|
51
51
|
import "../chunk-6I4SAWCN.js";
|
|
52
52
|
import "../chunk-Y7FO65VT.js";
|
package/dist/completion.cjs
CHANGED
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkDV7656NNcjs = require('./chunk-DV7656NN.cjs');
|
|
13
13
|
require('./chunk-QVOB2DNX.cjs');
|
|
14
|
-
require('./chunk-
|
|
14
|
+
require('./chunk-QLVRJ5FS.cjs');
|
|
15
15
|
require('./chunk-NOITAVHA.cjs');
|
|
16
|
-
require('./chunk-
|
|
16
|
+
require('./chunk-ZTN2PVKO.cjs');
|
|
17
17
|
require('./chunk-47E3I5PF.cjs');
|
|
18
18
|
require('./chunk-5RSZYQJH.cjs');
|
|
19
19
|
require('./chunk-VGBJPHHD.cjs');
|
|
@@ -33,7 +33,7 @@ require('./chunk-HQP3K7PU.cjs');
|
|
|
33
33
|
require('./chunk-SQU2FGXI.cjs');
|
|
34
34
|
require('./chunk-RPII3E6Z.cjs');
|
|
35
35
|
require('./chunk-6RPZADX3.cjs');
|
|
36
|
-
require('./chunk-
|
|
36
|
+
require('./chunk-LWBXQXZ3.cjs');
|
|
37
37
|
require('./chunk-UKQHBK4Q.cjs');
|
|
38
38
|
require('./chunk-UIBD2YY5.cjs');
|
|
39
39
|
require('./chunk-R3HK6R4B.cjs');
|
|
@@ -60,7 +60,7 @@ require('./chunk-APYG5QD7.cjs');
|
|
|
60
60
|
require('./chunk-L74VDN4A.cjs');
|
|
61
61
|
require('./chunk-XSVNC2UD.cjs');
|
|
62
62
|
require('./chunk-4YINUUKQ.cjs');
|
|
63
|
-
require('./chunk-
|
|
63
|
+
require('./chunk-JGRNVH7C.cjs');
|
|
64
64
|
require('./chunk-QBZJ7P2T.cjs');
|
|
65
65
|
require('./chunk-LL3MZ7O5.cjs');
|
|
66
66
|
|
|
@@ -129,4 +129,4 @@ var _chunk2RCCLQYVcjs = require('./chunk-2RCCLQYV.cjs');
|
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
|
|
132
|
-
exports.BuiltinToolExecutor = _chunk2RCCLQYVcjs.BuiltinToolExecutor; exports.CompletionService =
|
|
132
|
+
exports.BuiltinToolExecutor = _chunk2RCCLQYVcjs.BuiltinToolExecutor; exports.CompletionService = _chunkDV7656NNcjs.CompletionService; exports.EXTRA_HEADER_RESERVED_NAMES = _chunkTX4UCSOPcjs.EXTRA_HEADER_RESERVED_NAMES; exports.NATIVE_SEARCH_TOOL_NAMES = _chunkGMMT7RVNcjs.NATIVE_SEARCH_TOOL_NAMES; exports.addOpenRouterProviderToRequest = _chunkDV7656NNcjs.addOpenRouterProviderToRequest; exports.applyAugmentation = _chunkJMJBSACDcjs.applyAugmentation; exports.attachStreamEventBuffer = _chunkDV7656NNcjs.attach; exports.buildAnthropicApiUrl = _chunkA2YMUCBTcjs.buildAnthropicApiUrl; exports.buildAzureOpenAIApiUrl = _chunkA2YMUCBTcjs.buildAzureOpenAIApiUrl; exports.buildGeminiApiUrl = _chunkA2YMUCBTcjs.buildGeminiApiUrl; exports.buildNativeSearchAugmentation = _chunkJMJBSACDcjs.buildNativeSearchAugmentation; exports.buildOpenAIApiUrl = _chunkA2YMUCBTcjs.buildOpenAIApiUrl; exports.buildOpenAIResponseApiUrl = _chunkA2YMUCBTcjs.buildOpenAIResponseApiUrl; exports.buildProviderApiUrl = _chunkA2YMUCBTcjs.buildProviderApiUrl; exports.convertMessageToAnthropic = _chunkDV7656NNcjs.convertMessageToAnthropic; exports.convertMessageToGemini = _chunkDV7656NNcjs.convertMessageToGemini; exports.convertMessageToOpenAI = _chunkDV7656NNcjs.convertMessageToOpenAI; exports.detectNativeSearch = _chunkJMJBSACDcjs.detectNativeSearch; exports.emitStreamEvent = _chunkDV7656NNcjs.emit; exports.expandHeaderPlaceholder = _chunkTX4UCSOPcjs.expandHeaderPlaceholder; exports.getBuiltinSearchTools = _chunk2RCCLQYVcjs.getBuiltinSearchTools; exports.getOpenRouterProviderConfig = _chunkDV7656NNcjs.getOpenRouterProviderConfig; exports.getProviderHeaders = _chunkTX4UCSOPcjs.getProviderHeaders; exports.mergeExtraHeaders = _chunkTX4UCSOPcjs.mergeExtraHeaders; exports.normalizeAzureEndpoint = _chunkA2YMUCBTcjs.normalizeAzureEndpoint; exports.registerStreamEventBuffer = _chunkDV7656NNcjs.register; exports.releaseStreamEventBuffer = _chunkDV7656NNcjs.release; exports.resolveApiFormat = _chunkA2YMUCBTcjs.resolveApiFormat; exports.resolveProviderEndpoint = _chunkA2YMUCBTcjs.resolveProviderEndpoint;
|
package/dist/completion.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
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';
|
|
2
|
-
export { C as CompletionService, V as VisionFallbackProvider } from './CompletionService-
|
|
2
|
+
export { C as CompletionService, V as VisionFallbackProvider } from './CompletionService-BJu4AWVc.cjs';
|
|
3
3
|
export { buildAnthropicApiUrl, buildAzureOpenAIApiUrl, buildGeminiApiUrl, buildOpenAIApiUrl, buildOpenAIResponseApiUrl, buildProviderApiUrl, normalizeAzureEndpoint, resolveApiFormat, resolveProviderEndpoint } from './completion/url-builder.cjs';
|
|
4
4
|
import { LLMProvider, OpenRouterProviderRouting } from '@omnicross/contracts/llm-config';
|
|
5
5
|
import { SimpleChatMessage, AnthropicMessage, OpenAIMessage } from '@omnicross/contracts/completion-types';
|
|
@@ -11,7 +11,7 @@ import './logger-4GvQNzhE.cjs';
|
|
|
11
11
|
import './ports/provider-config-source.cjs';
|
|
12
12
|
import './transformer/types.cjs';
|
|
13
13
|
import './transformer/TransformerService.cjs';
|
|
14
|
-
import './types-
|
|
14
|
+
import './types-Dpr5IAaP.cjs';
|
|
15
15
|
import 'node:http';
|
|
16
16
|
import '@omnicross/contracts/usage-stats-types';
|
|
17
17
|
import '@omnicross/contracts/subscription-types';
|
package/dist/completion.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
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';
|
|
2
|
-
export { C as CompletionService, V as VisionFallbackProvider } from './CompletionService-
|
|
2
|
+
export { C as CompletionService, V as VisionFallbackProvider } from './CompletionService-C4W2gBi_.js';
|
|
3
3
|
export { buildAnthropicApiUrl, buildAzureOpenAIApiUrl, buildGeminiApiUrl, buildOpenAIApiUrl, buildOpenAIResponseApiUrl, buildProviderApiUrl, normalizeAzureEndpoint, resolveApiFormat, resolveProviderEndpoint } from './completion/url-builder.js';
|
|
4
4
|
import { LLMProvider, OpenRouterProviderRouting } from '@omnicross/contracts/llm-config';
|
|
5
5
|
import { SimpleChatMessage, AnthropicMessage, OpenAIMessage } from '@omnicross/contracts/completion-types';
|
|
@@ -11,7 +11,7 @@ import './logger-4GvQNzhE.js';
|
|
|
11
11
|
import './ports/provider-config-source.js';
|
|
12
12
|
import './transformer/types.js';
|
|
13
13
|
import './transformer/TransformerService.js';
|
|
14
|
-
import './types-
|
|
14
|
+
import './types-Di8VH1c9.js';
|
|
15
15
|
import 'node:http';
|
|
16
16
|
import '@omnicross/contracts/usage-stats-types';
|
|
17
17
|
import '@omnicross/contracts/subscription-types';
|
package/dist/completion.js
CHANGED
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
getOpenRouterProviderConfig,
|
|
10
10
|
register,
|
|
11
11
|
release
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TU4BB776.js";
|
|
13
13
|
import "./chunk-WTQMX2Q6.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-5XG6FR5F.js";
|
|
15
15
|
import "./chunk-V53ZEFXC.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-MZCJL3QU.js";
|
|
17
17
|
import "./chunk-TKZ3DZS5.js";
|
|
18
18
|
import "./chunk-FU7EAR73.js";
|
|
19
19
|
import "./chunk-IDPMD4B7.js";
|
|
@@ -33,7 +33,7 @@ import "./chunk-VVEHS2LI.js";
|
|
|
33
33
|
import "./chunk-4LSZ7NFM.js";
|
|
34
34
|
import "./chunk-XTEI64OU.js";
|
|
35
35
|
import "./chunk-XX6NQJMA.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-DRUT7H5H.js";
|
|
37
37
|
import "./chunk-ONTTXSRL.js";
|
|
38
38
|
import "./chunk-OE6TDIWW.js";
|
|
39
39
|
import "./chunk-DRWHTIIZ.js";
|
|
@@ -60,7 +60,7 @@ import "./chunk-WLYIIEAF.js";
|
|
|
60
60
|
import "./chunk-TKJMZBAH.js";
|
|
61
61
|
import "./chunk-OZFM4X3S.js";
|
|
62
62
|
import "./chunk-3QFXFCHG.js";
|
|
63
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-VXHN5IDL.js";
|
|
64
64
|
import "./chunk-AQ5TNQB7.js";
|
|
65
65
|
import "./chunk-6I4SAWCN.js";
|
|
66
66
|
import {
|