@jeffusion/bungee-llms 5.23.0 → 5.23.1
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/plugin-api.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export { TOKEN_ACCOUNTING_AUTHORITIES, assertCanonicalTokenAccountingEventV2, cr
|
|
|
2
2
|
export type { CanonicalTokenAccountingEventV2 } from './token-accounting/types';
|
|
3
3
|
export * from './responses-codec';
|
|
4
4
|
export * from './protocol-session';
|
|
5
|
+
export { protocolRequestPath } from './protocol-session/endpoint';
|
package/dist/plugin-api.js
CHANGED
|
@@ -5242,6 +5242,23 @@ function validateStreamEnvelope(raw, protocol) {
|
|
|
5242
5242
|
validateUsage(e.usage, protocol);
|
|
5243
5243
|
}
|
|
5244
5244
|
}
|
|
5245
|
+
// src/protocol-session/endpoint.ts
|
|
5246
|
+
function protocolRequestPath(protocol, model, streaming) {
|
|
5247
|
+
switch (protocol) {
|
|
5248
|
+
case "responses":
|
|
5249
|
+
return "/responses";
|
|
5250
|
+
case "chat_completions":
|
|
5251
|
+
return "/v1/chat/completions";
|
|
5252
|
+
case "anthropic_messages":
|
|
5253
|
+
return "/v1/messages";
|
|
5254
|
+
case "gemini_generate_content":
|
|
5255
|
+
if (typeof model !== "string" || !model)
|
|
5256
|
+
fail("invalid_payload", "Target model is required", "model");
|
|
5257
|
+
return `/v1beta/models/${encodeURIComponent(model)}:${streaming ? "streamGenerateContent" : "generateContent"}`;
|
|
5258
|
+
default:
|
|
5259
|
+
return fail("unsupported_protocol", "Unknown protocol");
|
|
5260
|
+
}
|
|
5261
|
+
}
|
|
5245
5262
|
export {
|
|
5246
5263
|
DEFAULT_RESPONSES_CODEC_LIMITS,
|
|
5247
5264
|
LLM_PROTOCOLS,
|
|
@@ -5257,5 +5274,6 @@ export {
|
|
|
5257
5274
|
encodeResponsesResult,
|
|
5258
5275
|
getProviderTokenAccountingCapabilities,
|
|
5259
5276
|
inspectAgentMessages,
|
|
5277
|
+
protocolRequestPath,
|
|
5260
5278
|
replaceAgentMessageEncryptedContent
|
|
5261
5279
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jeffusion/bungee-llms",
|
|
3
|
-
"version": "5.23.
|
|
3
|
+
"version": "5.23.1",
|
|
4
4
|
"description": "Extensible LLM adapters and protocol conversion package for Bungee",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"prepublishOnly": "bun run build"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@jeffusion/bungee-types": "^5.23.
|
|
14
|
+
"@jeffusion/bungee-types": "^5.23.1"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"bun-types": "^1.3.2",
|