@jacobbd/relay-ai 0.12.1 → 0.12.2
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/{chunk-OYE6YZYP.js → chunk-5R26P2P2.js} +2 -2
- package/dist/{chunk-UQKYSNDM.js → chunk-C5ZXSNNA.js} +2 -2
- package/dist/{chunk-7ASGPECN.js → chunk-KP67Q2B7.js} +7 -4
- package/dist/{chunk-7ASGPECN.js.map → chunk-KP67Q2B7.js.map} +1 -1
- package/dist/cli.js +4 -4
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/{manual-models-FJZEOQSO.js → manual-models-Z5GUNFI3.js} +3 -3
- package/dist/{ui-command-QFXKL6HH.js → ui-command-RLYV2FK6.js} +4 -4
- package/package.json +1 -1
- /package/dist/{chunk-OYE6YZYP.js.map → chunk-5R26P2P2.js.map} +0 -0
- /package/dist/{chunk-UQKYSNDM.js.map → chunk-C5ZXSNNA.js.map} +0 -0
- /package/dist/{manual-models-FJZEOQSO.js.map → manual-models-Z5GUNFI3.js.map} +0 -0
- /package/dist/{ui-command-QFXKL6HH.js.map → ui-command-RLYV2FK6.js.map} +0 -0
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
translateRequest,
|
|
86
86
|
upstreamHttpStatus,
|
|
87
87
|
validateCustomEndpointUrl
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-KP67Q2B7.js";
|
|
89
89
|
|
|
90
90
|
// src/registry/google-model-id.ts
|
|
91
91
|
var GOOGLE_MODEL_PREFIX = "models/";
|
|
@@ -9661,4 +9661,4 @@ export {
|
|
|
9661
9661
|
supportsClaudeTransparentMode,
|
|
9662
9662
|
buildHttpProxyRoutes
|
|
9663
9663
|
};
|
|
9664
|
-
//# sourceMappingURL=chunk-
|
|
9664
|
+
//# sourceMappingURL=chunk-5R26P2P2.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
supportsManualModels,
|
|
11
11
|
translateRequest,
|
|
12
12
|
validateCustomEndpointUrl
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KP67Q2B7.js";
|
|
14
14
|
|
|
15
15
|
// src/registry/validate-manual-model.ts
|
|
16
16
|
import { randomUUID } from "crypto";
|
|
@@ -149,4 +149,4 @@ export {
|
|
|
149
149
|
addManualModel,
|
|
150
150
|
removeManualModel
|
|
151
151
|
};
|
|
152
|
-
//# sourceMappingURL=chunk-
|
|
152
|
+
//# sourceMappingURL=chunk-C5ZXSNNA.js.map
|
|
@@ -7,7 +7,7 @@ import { join } from "path";
|
|
|
7
7
|
// package.json
|
|
8
8
|
var package_default = {
|
|
9
9
|
name: "@jacobbd/relay-ai",
|
|
10
|
-
version: "0.12.
|
|
10
|
+
version: "0.12.2",
|
|
11
11
|
publishConfig: {
|
|
12
12
|
access: "public"
|
|
13
13
|
},
|
|
@@ -4044,18 +4044,21 @@ function safeUpstreamErrorFields(err, includeCause) {
|
|
|
4044
4044
|
function formatUpstreamErrorTrace(err) {
|
|
4045
4045
|
return JSON.stringify(safeUpstreamErrorFields(err, true));
|
|
4046
4046
|
}
|
|
4047
|
+
function joinProviderMessage(message) {
|
|
4048
|
+
return message.split("\n").map((line) => line.trim()).filter(Boolean).join(" ");
|
|
4049
|
+
}
|
|
4047
4050
|
function formatUpstreamError(err) {
|
|
4048
4051
|
if (!err || typeof err !== "object") return "Upstream model request failed.";
|
|
4049
4052
|
const rec = err;
|
|
4050
4053
|
if (rec.data?.error?.message) {
|
|
4051
|
-
const short =
|
|
4054
|
+
const short = joinProviderMessage(rec.data.error.message);
|
|
4052
4055
|
return rec.statusCode ? `${short} (HTTP ${rec.statusCode})` : short;
|
|
4053
4056
|
}
|
|
4054
4057
|
if (rec.responseBody) {
|
|
4055
4058
|
try {
|
|
4056
4059
|
const parsed = JSON.parse(rec.responseBody);
|
|
4057
4060
|
if (parsed.error?.message) {
|
|
4058
|
-
const short =
|
|
4061
|
+
const short = joinProviderMessage(parsed.error.message);
|
|
4059
4062
|
return rec.statusCode ? `${short} (HTTP ${rec.statusCode})` : short;
|
|
4060
4063
|
}
|
|
4061
4064
|
} catch {
|
|
@@ -4788,4 +4791,4 @@ export {
|
|
|
4788
4791
|
streamAnthropicResponse,
|
|
4789
4792
|
generateAnthropicResponse
|
|
4790
4793
|
};
|
|
4791
|
-
//# sourceMappingURL=chunk-
|
|
4794
|
+
//# sourceMappingURL=chunk-KP67Q2B7.js.map
|