open-agents-ai 0.185.11 → 0.185.12
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 +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49849,7 +49849,9 @@ async function showModelPicker(ctx, local = false) {
|
|
|
49849
49849
|
try {
|
|
49850
49850
|
let models;
|
|
49851
49851
|
try {
|
|
49852
|
-
|
|
49852
|
+
const fetchPromise = fetchModels(ctx.config.backendUrl, ctx.config.apiKey);
|
|
49853
|
+
const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new Error(`Timed out fetching models from ${ctx.config.backendUrl} (10s). The endpoint may be down. Use /endpoint to switch.`)), 1e4));
|
|
49854
|
+
models = await Promise.race([fetchPromise, timeoutPromise]);
|
|
49853
49855
|
} finally {
|
|
49854
49856
|
clearInterval(spinTimer);
|
|
49855
49857
|
process.stdout.write(`\r${" ".repeat(40)}\r`);
|
package/package.json
CHANGED