llm-proxy 1.0.27 → 1.0.29
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.
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
export declare class AdapterError extends Error {
|
|
2
|
-
details?: any;
|
|
3
|
-
constructor(message: string, details?: any);
|
|
4
|
-
}
|
|
5
|
-
export declare class UnsupportedProviderError extends AdapterError {
|
|
6
|
-
constructor(provider: string);
|
|
7
|
-
}
|
|
8
|
-
export declare class ContentExtractionError extends AdapterError {
|
|
9
|
-
constructor(contentType: string, details?: any);
|
|
10
|
-
}
|
|
11
|
-
export declare class ResponseValidationError extends AdapterError {
|
|
12
|
-
response?: any;
|
|
13
|
-
constructor(message: string, response?: any);
|
|
14
|
-
}
|
|
15
1
|
import { LLMResponse, Providers } from "../types";
|
|
16
2
|
export declare class OutputFormatAdapter {
|
|
17
3
|
static adaptResponse(response: any, provider: Providers): LLMResponse;
|
|
18
|
-
private static
|
|
19
|
-
private static
|
|
4
|
+
private static adaptCompleteResponse;
|
|
5
|
+
private static adaptStreamingResponse;
|
|
20
6
|
private static mapRole;
|
|
21
7
|
private static extractContent;
|
|
22
8
|
}
|
|
@@ -1,73 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OutputFormatAdapter =
|
|
4
|
-
// Custom error classes
|
|
5
|
-
class AdapterError extends Error {
|
|
6
|
-
constructor(message, details) {
|
|
7
|
-
super(message);
|
|
8
|
-
this.details = details;
|
|
9
|
-
this.name = "AdapterError";
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.AdapterError = AdapterError;
|
|
13
|
-
class UnsupportedProviderError extends AdapterError {
|
|
14
|
-
constructor(provider) {
|
|
15
|
-
super(`Unsupported provider: ${provider}`);
|
|
16
|
-
this.name = "UnsupportedProviderError";
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.UnsupportedProviderError = UnsupportedProviderError;
|
|
20
|
-
class ContentExtractionError extends AdapterError {
|
|
21
|
-
constructor(contentType, details) {
|
|
22
|
-
super(`Failed to extract content for type: ${contentType}`, details);
|
|
23
|
-
this.name = "ContentExtractionError";
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.ContentExtractionError = ContentExtractionError;
|
|
27
|
-
class ResponseValidationError extends AdapterError {
|
|
28
|
-
constructor(message, response) {
|
|
29
|
-
super(message);
|
|
30
|
-
this.response = response;
|
|
31
|
-
this.name = "ResponseValidationError";
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.ResponseValidationError = ResponseValidationError;
|
|
3
|
+
exports.OutputFormatAdapter = void 0;
|
|
35
4
|
const types_1 = require("../types");
|
|
36
5
|
class OutputFormatAdapter {
|
|
37
6
|
static adaptResponse(response, provider) {
|
|
38
7
|
if (!response) {
|
|
39
|
-
throw new
|
|
8
|
+
throw new Error("Response object is null or undefined");
|
|
40
9
|
}
|
|
41
10
|
try {
|
|
42
11
|
switch (provider) {
|
|
43
12
|
case types_1.Providers.OPENAI:
|
|
44
|
-
this.validateOpenAIResponse(response);
|
|
45
13
|
return response;
|
|
46
14
|
case types_1.Providers.ANTHROPIC_BEDROCK:
|
|
47
|
-
|
|
15
|
+
// Check if it's a streaming chunk or complete response
|
|
16
|
+
if (response.type === "message" && !response.delta) {
|
|
17
|
+
return this.adaptCompleteResponse(response);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return this.adaptStreamingResponse(response);
|
|
21
|
+
}
|
|
48
22
|
default:
|
|
49
|
-
throw new
|
|
23
|
+
throw new Error(`Unsupported provider: ${provider}`);
|
|
50
24
|
}
|
|
51
25
|
}
|
|
52
26
|
catch (error) {
|
|
53
|
-
|
|
54
|
-
throw error;
|
|
55
|
-
}
|
|
56
|
-
throw new AdapterError("Failed to adapt response", {
|
|
57
|
-
provider,
|
|
58
|
-
originalError: error,
|
|
59
|
-
});
|
|
27
|
+
throw new Error(`Failed to adapt response: ${error.message}`);
|
|
60
28
|
}
|
|
61
29
|
}
|
|
62
|
-
static
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
30
|
+
static adaptCompleteResponse(response) {
|
|
31
|
+
return {
|
|
32
|
+
id: response.id,
|
|
33
|
+
object: "text_completion",
|
|
34
|
+
created: Date.now(),
|
|
35
|
+
model: response.model,
|
|
36
|
+
choices: response.content.map((contentBlock, index) => ({
|
|
37
|
+
index,
|
|
38
|
+
message: {
|
|
39
|
+
role: this.mapRole(contentBlock),
|
|
40
|
+
content: this.extractContent(contentBlock),
|
|
41
|
+
},
|
|
42
|
+
logprobs: null,
|
|
43
|
+
finish_reason: response.stop_reason || null,
|
|
44
|
+
})),
|
|
45
|
+
usage: {
|
|
46
|
+
prompt_tokens: response.usage.input_tokens,
|
|
47
|
+
completion_tokens: response.usage.output_tokens,
|
|
48
|
+
total_tokens: response.usage.input_tokens + response.usage.output_tokens,
|
|
49
|
+
prompt_tokens_details: { cached_tokens: 0 },
|
|
50
|
+
completion_tokens_details: { reasoning_tokens: 0 },
|
|
51
|
+
},
|
|
52
|
+
system_fingerprint: "anthropic_translation",
|
|
53
|
+
};
|
|
66
54
|
}
|
|
67
|
-
static
|
|
55
|
+
static adaptStreamingResponse(chunk) {
|
|
68
56
|
var _a, _b;
|
|
69
|
-
// Handle
|
|
70
|
-
if (
|
|
57
|
+
// Handle stop messages
|
|
58
|
+
if (chunk.type === "content_block_stop" || chunk.type === "message_stop") {
|
|
59
|
+
const metrics = chunk["amazon-bedrock-invocationMetrics"];
|
|
71
60
|
return {
|
|
72
61
|
id: `stream-${Date.now()}`,
|
|
73
62
|
object: "text_completion",
|
|
@@ -78,130 +67,53 @@ class OutputFormatAdapter {
|
|
|
78
67
|
index: 0,
|
|
79
68
|
message: {
|
|
80
69
|
role: "assistant",
|
|
81
|
-
content: "",
|
|
70
|
+
content: "",
|
|
82
71
|
},
|
|
83
72
|
logprobs: null,
|
|
84
73
|
finish_reason: "stop",
|
|
85
74
|
},
|
|
86
75
|
],
|
|
87
76
|
usage: {
|
|
88
|
-
prompt_tokens: 0,
|
|
89
|
-
completion_tokens: 0,
|
|
90
|
-
total_tokens: 0,
|
|
91
|
-
prompt_tokens_details: { cached_tokens: 0 },
|
|
92
|
-
completion_tokens_details: { reasoning_tokens: 0 },
|
|
93
|
-
},
|
|
94
|
-
system_fingerprint: "anthropic_translation",
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
// Handle streaming content blocks
|
|
98
|
-
if (response.type === "content_block_start" || response.content_block) {
|
|
99
|
-
return {
|
|
100
|
-
id: `stream-${Date.now()}`,
|
|
101
|
-
object: "text_completion",
|
|
102
|
-
created: Date.now(),
|
|
103
|
-
model: "anthropic.claude-3-haiku", // This will be overwritten in complete response
|
|
104
|
-
choices: [
|
|
105
|
-
{
|
|
106
|
-
index: 0,
|
|
107
|
-
message: {
|
|
108
|
-
role: "assistant",
|
|
109
|
-
content: ((_a = response.content_block) === null || _a === void 0 ? void 0 : _a.text) || "",
|
|
110
|
-
},
|
|
111
|
-
logprobs: null,
|
|
112
|
-
finish_reason: "null",
|
|
113
|
-
},
|
|
114
|
-
],
|
|
115
|
-
usage: {
|
|
116
|
-
prompt_tokens: 0,
|
|
117
|
-
completion_tokens: 0,
|
|
118
|
-
total_tokens: 0,
|
|
77
|
+
prompt_tokens: (metrics === null || metrics === void 0 ? void 0 : metrics.inputTokenCount) || 0,
|
|
78
|
+
completion_tokens: (metrics === null || metrics === void 0 ? void 0 : metrics.outputTokenCount) || 0,
|
|
79
|
+
total_tokens: ((metrics === null || metrics === void 0 ? void 0 : metrics.inputTokenCount) || 0) + ((metrics === null || metrics === void 0 ? void 0 : metrics.outputTokenCount) || 0),
|
|
119
80
|
prompt_tokens_details: { cached_tokens: 0 },
|
|
120
81
|
completion_tokens_details: { reasoning_tokens: 0 },
|
|
121
82
|
},
|
|
122
83
|
system_fingerprint: "anthropic_translation",
|
|
123
84
|
};
|
|
124
85
|
}
|
|
125
|
-
//
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
created: Date.now(),
|
|
139
|
-
model: response.message.model,
|
|
140
|
-
choices: response.message.content.map((contentBlock, index) => {
|
|
141
|
-
var _a;
|
|
142
|
-
return ({
|
|
143
|
-
index,
|
|
144
|
-
message: {
|
|
145
|
-
role: this.mapRole(contentBlock),
|
|
146
|
-
content: this.extractContent(contentBlock),
|
|
147
|
-
},
|
|
148
|
-
logprobs: null,
|
|
149
|
-
finish_reason: ((_a = response.message) === null || _a === void 0 ? void 0 : _a.stop_reason) || "",
|
|
150
|
-
});
|
|
151
|
-
}),
|
|
152
|
-
usage: {
|
|
153
|
-
prompt_tokens: response.message.usage.input_tokens,
|
|
154
|
-
completion_tokens: response.message.usage.output_tokens,
|
|
155
|
-
total_tokens: response.message.usage.input_tokens +
|
|
156
|
-
response.message.usage.output_tokens,
|
|
157
|
-
prompt_tokens_details: { cached_tokens: 0 },
|
|
158
|
-
completion_tokens_details: { reasoning_tokens: 0 },
|
|
159
|
-
},
|
|
160
|
-
system_fingerprint: "anthropic_translation",
|
|
161
|
-
};
|
|
162
|
-
return openAIResponse;
|
|
163
|
-
}
|
|
164
|
-
catch (error) {
|
|
165
|
-
throw new AdapterError("Failed to adapt Anthropic response", {
|
|
166
|
-
responseId: response.message.id,
|
|
167
|
-
originalError: error,
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
// Handle other message types (delta updates, metrics, etc.)
|
|
172
|
-
if (response.delta) {
|
|
173
|
-
return {
|
|
174
|
-
id: `stream-${Date.now()}`,
|
|
175
|
-
object: "text_completion",
|
|
176
|
-
created: Date.now(),
|
|
177
|
-
model: "anthropic.claude-3-haiku",
|
|
178
|
-
choices: [
|
|
179
|
-
{
|
|
180
|
-
index: 0,
|
|
181
|
-
message: {
|
|
182
|
-
role: "assistant",
|
|
183
|
-
content: response.delta.text || "",
|
|
184
|
-
},
|
|
185
|
-
logprobs: null,
|
|
186
|
-
finish_reason: "null",
|
|
86
|
+
// Handle content blocks or deltas
|
|
87
|
+
const content = ((_a = chunk.content_block) === null || _a === void 0 ? void 0 : _a.text) || ((_b = chunk.delta) === null || _b === void 0 ? void 0 : _b.text) || "";
|
|
88
|
+
return {
|
|
89
|
+
id: `stream-${Date.now()}`,
|
|
90
|
+
object: "text_completion",
|
|
91
|
+
created: Date.now(),
|
|
92
|
+
model: "anthropic.claude-3-haiku",
|
|
93
|
+
choices: [
|
|
94
|
+
{
|
|
95
|
+
index: 0,
|
|
96
|
+
message: {
|
|
97
|
+
role: "assistant",
|
|
98
|
+
content,
|
|
187
99
|
},
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
prompt_tokens: 0,
|
|
191
|
-
completion_tokens: 0,
|
|
192
|
-
total_tokens: 0,
|
|
193
|
-
prompt_tokens_details: { cached_tokens: 0 },
|
|
194
|
-
completion_tokens_details: { reasoning_tokens: 0 },
|
|
100
|
+
logprobs: null,
|
|
101
|
+
finish_reason: "null",
|
|
195
102
|
},
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
103
|
+
],
|
|
104
|
+
usage: {
|
|
105
|
+
prompt_tokens: 0,
|
|
106
|
+
completion_tokens: 0,
|
|
107
|
+
total_tokens: 0,
|
|
108
|
+
prompt_tokens_details: { cached_tokens: 0 },
|
|
109
|
+
completion_tokens_details: { reasoning_tokens: 0 },
|
|
110
|
+
},
|
|
111
|
+
system_fingerprint: "anthropic_translation",
|
|
112
|
+
};
|
|
201
113
|
}
|
|
202
114
|
static mapRole(content) {
|
|
203
115
|
if (!content || !content.type) {
|
|
204
|
-
throw new
|
|
116
|
+
throw new Error("Invalid content block structure");
|
|
205
117
|
}
|
|
206
118
|
switch (content.type) {
|
|
207
119
|
case types_1.BedrockAnthropicContentType.TOOL_USE:
|
|
@@ -210,34 +122,23 @@ class OutputFormatAdapter {
|
|
|
210
122
|
case types_1.BedrockAnthropicContentType.TEXT:
|
|
211
123
|
return "assistant";
|
|
212
124
|
default:
|
|
213
|
-
|
|
125
|
+
return "assistant"; // Default to assistant for unknown types
|
|
214
126
|
}
|
|
215
127
|
}
|
|
216
128
|
static extractContent(content) {
|
|
217
129
|
if (!content || !content.type) {
|
|
218
|
-
throw new
|
|
130
|
+
throw new Error("Invalid content block structure");
|
|
219
131
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
case types_1.BedrockAnthropicContentType.TOOL_USE:
|
|
231
|
-
return content.id || "";
|
|
232
|
-
default:
|
|
233
|
-
throw new ContentExtractionError(`Unsupported content type: ${content.type}`);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
catch (error) {
|
|
237
|
-
throw new ContentExtractionError(`Failed to extract content`, {
|
|
238
|
-
contentType: content.type,
|
|
239
|
-
originalError: error,
|
|
240
|
-
});
|
|
132
|
+
switch (content.type) {
|
|
133
|
+
case types_1.BedrockAnthropicContentType.TEXT:
|
|
134
|
+
const textContent = content;
|
|
135
|
+
return textContent.text || "";
|
|
136
|
+
case types_1.BedrockAnthropicContentType.TOOL_RESULT:
|
|
137
|
+
return content.content || "";
|
|
138
|
+
case types_1.BedrockAnthropicContentType.TOOL_USE:
|
|
139
|
+
return content.id || "";
|
|
140
|
+
default:
|
|
141
|
+
return "";
|
|
241
142
|
}
|
|
242
143
|
}
|
|
243
144
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutputFormatAdapter.js","sourceRoot":"","sources":["../../src/middleware/OutputFormatAdapter.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"OutputFormatAdapter.js","sourceRoot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AAC;YAC9B,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;YACrB,KAAK,mCAA2B,CAAC,QAAQ,CAAC;YAC1C,KAAK,mCAA2B,CAAC,WAAW;gBAC1C,OAAO,MAAM,CAAC;YAChB,KAAK,mCAA2B,CAAC,IAAI;gBACnC,OAAO,WAAW,CAAC;YACrB;gBACE,OAAO,WAAW,CAAC,CAAC,yCAAyC;QACjE,CAAC;IACH,CAAC;IAEO,MAAM,CAAC,cAAc,CAAC,OAAgC;QAC5D,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;YACrB,KAAK,mCAA2B,CAAC,IAAI;gBACnC,MAAM,WAAW,GAAG,OAAsC,CAAC;gBAC3D,OAAO,WAAW,CAAC,IAAI,IAAI,EAAE,CAAC;YAChC,KAAK,mCAA2B,CAAC,WAAW;gBAC1C,OAAQ,OAA6C,CAAC,OAAO,IAAI,EAAE,CAAC;YACtE,KAAK,mCAA2B,CAAC,QAAQ;gBACvC,OAAQ,OAA0C,CAAC,EAAE,IAAI,EAAE,CAAC;YAC9D;gBACE,OAAO,EAAE,CAAC;QACd,CAAC;IACH,CAAC;CACF;AAvJD,kDAuJC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "llm-proxy",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.29",
|
|
4
4
|
"description": "An LLM Proxy that allows the user to interact with different language models from different providers using unified request and response formats.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|