@iinm/plain-agent 1.5.1 → 1.5.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/package.json
CHANGED
|
@@ -103,7 +103,7 @@ export async function callAnthropicModel(
|
|
|
103
103
|
"Content-Type": "application/json",
|
|
104
104
|
},
|
|
105
105
|
body: JSON.stringify(request),
|
|
106
|
-
signal: AbortSignal.timeout(
|
|
106
|
+
signal: AbortSignal.timeout(8 * 60 * 1000),
|
|
107
107
|
});
|
|
108
108
|
|
|
109
109
|
// bedrock + sso profile
|
|
@@ -146,7 +146,7 @@ export async function callAnthropicModel(
|
|
|
146
146
|
method: signed.method,
|
|
147
147
|
headers: signed.headers,
|
|
148
148
|
body: signed.body,
|
|
149
|
-
signal: AbortSignal.timeout(
|
|
149
|
+
signal: AbortSignal.timeout(8 * 60 * 1000),
|
|
150
150
|
});
|
|
151
151
|
};
|
|
152
152
|
|
|
@@ -103,7 +103,7 @@ export async function callBedrockConverseModel(
|
|
|
103
103
|
method: signed.method,
|
|
104
104
|
headers: signed.headers,
|
|
105
105
|
body: signed.body,
|
|
106
|
-
signal: AbortSignal.timeout(
|
|
106
|
+
signal: AbortSignal.timeout(8 * 60 * 1000),
|
|
107
107
|
});
|
|
108
108
|
|
|
109
109
|
if (response.status !== 200) {
|
package/src/providers/gemini.mjs
CHANGED
|
@@ -143,7 +143,7 @@ export function createCacheEnabledGeminiModelCaller(
|
|
|
143
143
|
"Content-Type": "application/json",
|
|
144
144
|
},
|
|
145
145
|
body: JSON.stringify(request),
|
|
146
|
-
signal: AbortSignal.timeout(
|
|
146
|
+
signal: AbortSignal.timeout(8 * 60 * 1000),
|
|
147
147
|
});
|
|
148
148
|
|
|
149
149
|
if (response.status === 429 || response.status >= 500) {
|
|
@@ -299,7 +299,7 @@ export function createCacheEnabledGeminiModelCaller(
|
|
|
299
299
|
"Content-Type": "application/json",
|
|
300
300
|
},
|
|
301
301
|
body: JSON.stringify(request),
|
|
302
|
-
signal: AbortSignal.timeout(
|
|
302
|
+
signal: AbortSignal.timeout(8 * 60 * 1000),
|
|
303
303
|
})
|
|
304
304
|
.then(async (response) => {
|
|
305
305
|
if (response.status !== 200) {
|
package/src/providers/openai.mjs
CHANGED
|
@@ -63,7 +63,7 @@ export async function callOpenAIModel(
|
|
|
63
63
|
Authorization: `Bearer ${apiKey}`,
|
|
64
64
|
},
|
|
65
65
|
body: JSON.stringify(request),
|
|
66
|
-
signal: AbortSignal.timeout(
|
|
66
|
+
signal: AbortSignal.timeout(8 * 60 * 1000),
|
|
67
67
|
});
|
|
68
68
|
|
|
69
69
|
const retryInterval = Math.min(2 * 2 ** retryCount, 16);
|
|
@@ -103,7 +103,7 @@ export async function callOpenAICompatibleModel(
|
|
|
103
103
|
"Content-Type": "application/json",
|
|
104
104
|
},
|
|
105
105
|
body: JSON.stringify(request),
|
|
106
|
-
signal: AbortSignal.timeout(
|
|
106
|
+
signal: AbortSignal.timeout(8 * 60 * 1000),
|
|
107
107
|
});
|
|
108
108
|
|
|
109
109
|
// bedrock + sso profile
|
|
@@ -146,7 +146,7 @@ export async function callOpenAICompatibleModel(
|
|
|
146
146
|
method: signed.method,
|
|
147
147
|
headers: signed.headers,
|
|
148
148
|
body: signed.body,
|
|
149
|
-
signal: AbortSignal.timeout(
|
|
149
|
+
signal: AbortSignal.timeout(8 * 60 * 1000),
|
|
150
150
|
});
|
|
151
151
|
};
|
|
152
152
|
|