@parcha/agentrun-jev 0.1.0-beta.5 → 0.1.0-beta.9
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 +5 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -143,7 +143,11 @@ export function createJevRunner(options = {}) {
|
|
|
143
143
|
const safeStatus = Number.isInteger(status) && status >= 100 && status <= 599 ? status : undefined;
|
|
144
144
|
const capacity = error instanceof APIError && record(error.body) && record(error.body.detail)
|
|
145
145
|
&& error.body.detail.error_type === "max_tokens_exceeded";
|
|
146
|
-
|
|
146
|
+
// Only the structured reason is named; the provider's body text never reaches the message.
|
|
147
|
+
const returned = safeStatus === undefined ? "Jev returned an HTTP failure" : `Jev returned HTTP ${safeStatus}`;
|
|
148
|
+
throw new JevError("http", capacity
|
|
149
|
+
? `${returned}: the request exceeds the model's token budget (max_tokens_exceeded). Send fewer or shorter items per request.`
|
|
150
|
+
: `${returned}.`, attempt, safeStatus, undefined, capacity ? { reason: "max_tokens_exceeded" } : undefined);
|
|
147
151
|
}
|
|
148
152
|
if (error instanceof APIConnectionError)
|
|
149
153
|
throw new JevError("connection", "Jev transport failed.", attempt);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcha/agentrun-jev",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.9",
|
|
4
4
|
"description": "Optional Jev system one decisions for AgentRun workflows",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"test": "node --test test/*.test.mjs"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@parcha/agentrun-dsl": "0.1.0-beta.
|
|
30
|
+
"@parcha/agentrun-dsl": "0.1.0-beta.9",
|
|
31
31
|
"@typesafe-ai/sdk": "0.6.0"
|
|
32
32
|
},
|
|
33
33
|
"repository": {
|