@jeffusion/bungee-core 6.7.3 → 6.8.0
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/config-storage-worker.js +1 -1
- package/dist/main.js +74 -66
- package/dist/plugins/codex-router/index.js +4 -4
- package/dist/plugins/codex-router/index.js.map +5 -5
- package/dist/plugins/llm-protocol-adapter/control.js +295 -47
- package/dist/plugins/llm-protocol-adapter/control.js.map +9 -8
- package/dist/plugins/llm-protocol-adapter/index.js +304 -48
- package/dist/plugins/llm-protocol-adapter/index.js.map +10 -9
- package/dist/plugins/llm-protocol-adapter/manifest.json +4 -0
- package/dist/plugins/token-metering/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -3362,7 +3362,7 @@ function parseBindings(value) {
|
|
|
3362
3362
|
throw new Error("codex_router_invalid_target");
|
|
3363
3363
|
if (target.protocol === undefined)
|
|
3364
3364
|
throw new Error("codex_router_target_protocol_required");
|
|
3365
|
-
if (!["responses", "chat_completions", "anthropic_messages"].includes(target.protocol))
|
|
3365
|
+
if (!["responses", "chat_completions", "anthropic_messages", "gemini_generate_content"].includes(target.protocol))
|
|
3366
3366
|
throw new Error("codex_router_target_protocol_invalid");
|
|
3367
3367
|
const publicId = bindingSource(entry);
|
|
3368
3368
|
if (ids.has(publicId))
|
|
@@ -3653,7 +3653,7 @@ var CodexRouterPlugin = definePlugin(class {
|
|
|
3653
3653
|
const delta = typeof input.input === "string" ? [{ role: "user", content: input.input }] : input.input;
|
|
3654
3654
|
if (!Array.isArray(delta))
|
|
3655
3655
|
throw new DataAdmissionError(422, "codex_router_invalid_history");
|
|
3656
|
-
if (prior.items.some((item) => item.encrypted_content || item.type === "compaction")) {
|
|
3656
|
+
if (protocol !== "gemini_generate_content" && prior.items.some((item) => item.encrypted_content || item.type === "compaction")) {
|
|
3657
3657
|
if (protocol !== "responses" || JSON.stringify(prior.target) !== JSON.stringify(binding.target) || prior.origin?.provider !== binding.provider || prior.origin?.model !== binding.model || !prior.origin?.upstreamId)
|
|
3658
3658
|
throw new DataAdmissionError(422, "codex_router_unrestorable_history_start_new_conversation");
|
|
3659
3659
|
requiredUpstreamId = prior.origin.upstreamId;
|
|
@@ -3668,7 +3668,7 @@ var CodexRouterPlugin = definePlugin(class {
|
|
|
3668
3668
|
let logicalInput = typeof input.input === "string" ? [{ role: "user", content: input.input }] : input.input;
|
|
3669
3669
|
if (!Array.isArray(logicalInput))
|
|
3670
3670
|
throw new DataAdmissionError(422, "codex_router_invalid_history");
|
|
3671
|
-
if (protocol !== "responses" && !opaqueRestored && logicalInput.some((item) => item?.encrypted_content || item?.type === "compaction"))
|
|
3671
|
+
if (protocol !== "responses" && protocol !== "gemini_generate_content" && !opaqueRestored && logicalInput.some((item) => item?.encrypted_content || item?.type === "compaction"))
|
|
3672
3672
|
throw new DataAdmissionError(422, "codex_router_unrestorable_history_start_new_conversation");
|
|
3673
3673
|
const hasTools = input.tools?.length || logicalInput.some((item) => item?.type === "additional_tools" && item.tools?.length);
|
|
3674
3674
|
if (hasTools && (!capabilities.toolCall || binding.capabilityOverrides?.tools === false))
|
|
@@ -3839,4 +3839,4 @@ export {
|
|
|
3839
3839
|
server_default as default
|
|
3840
3840
|
};
|
|
3841
3841
|
|
|
3842
|
-
//# debugId=
|
|
3842
|
+
//# debugId=89980D241AFB595A64756E2164756E21
|