@jeffusion/bungee-llms 4.5.0 → 5.1.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/index.js +901 -191
- package/dist/plugin-api.js +901 -191
- package/dist/token-accounting/session.d.ts +3 -1
- package/dist/token-accounting/types.d.ts +3 -0
- package/package.json +2 -2
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import type { TokenAccountingSession, TokenAccountingSessionInput } from './types';
|
|
2
|
-
export declare function createTokenAccountingSession(input: TokenAccountingSessionInput
|
|
2
|
+
export declare function createTokenAccountingSession(input: TokenAccountingSessionInput, options?: {
|
|
3
|
+
deferFinalization?: boolean;
|
|
4
|
+
}): TokenAccountingSession;
|
|
@@ -45,6 +45,7 @@ export interface TokenAccountingSession {
|
|
|
45
45
|
consumeRequest(input: TokenAccountingRequestInput): void;
|
|
46
46
|
consumeResponse(input: TokenAccountingResponseInput): CanonicalTokenAccountingEventV2;
|
|
47
47
|
consumeStreamChunk(input: TokenAccountingStreamChunkInput): CanonicalTokenAccountingEventV2 | null;
|
|
48
|
+
finalizeCompletedStream(): CanonicalTokenAccountingEventV2;
|
|
48
49
|
finalizeAbortedStream(): CanonicalTokenAccountingEventV2;
|
|
49
50
|
}
|
|
50
51
|
export interface DedicatedCountEndpointCapability {
|
|
@@ -84,6 +85,7 @@ export interface TokenAccountingSessionState {
|
|
|
84
85
|
outputAuthority?: TokenAccountingAuthority;
|
|
85
86
|
cacheReadTokens?: number;
|
|
86
87
|
cacheWriteTokens?: number;
|
|
88
|
+
protocolTerminalSeen?: boolean;
|
|
87
89
|
finalReceived: boolean;
|
|
88
90
|
}
|
|
89
91
|
export interface ProviderTokenAccountingAdapter {
|
|
@@ -92,5 +94,6 @@ export interface ProviderTokenAccountingAdapter {
|
|
|
92
94
|
consumeRequest(state: TokenAccountingSessionState, body: Record<string, unknown>): void;
|
|
93
95
|
consumeResponse(state: TokenAccountingSessionState, body: Record<string, unknown>): CanonicalTokenAccountingEventV2;
|
|
94
96
|
consumeStreamChunk(state: TokenAccountingSessionState, chunk: Record<string, unknown>): CanonicalTokenAccountingEventV2 | null;
|
|
97
|
+
finalizeCompletedStream(state: TokenAccountingSessionState): CanonicalTokenAccountingEventV2;
|
|
95
98
|
finalizeAbortedStream(state: TokenAccountingSessionState): CanonicalTokenAccountingEventV2;
|
|
96
99
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jeffusion/bungee-llms",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.1.0",
|
|
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": "^
|
|
14
|
+
"@jeffusion/bungee-types": "^5.1.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"bun-types": "^1.3.2",
|