open-agents-ai 0.103.4 → 0.103.5
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 +25 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31255,6 +31255,31 @@ async function handleEndpoint(arg, ctx, local = false) {
|
|
|
31255
31255
|
`);
|
|
31256
31256
|
}
|
|
31257
31257
|
process.stdout.write("\n");
|
|
31258
|
+
try {
|
|
31259
|
+
const newModels = await fetchModels(normalizedUrl, apiKey);
|
|
31260
|
+
if (newModels.length > 0) {
|
|
31261
|
+
const currentModel = ctx.config.model;
|
|
31262
|
+
const found = findModel(newModels, currentModel);
|
|
31263
|
+
if (!found) {
|
|
31264
|
+
const autoModel = newModels[0].name;
|
|
31265
|
+
const oldModel = currentModel;
|
|
31266
|
+
ctx.setModel(autoModel);
|
|
31267
|
+
if (local) {
|
|
31268
|
+
ctx.saveLocalSettings({ model: autoModel });
|
|
31269
|
+
} else {
|
|
31270
|
+
ctx.saveSettings({ model: autoModel });
|
|
31271
|
+
}
|
|
31272
|
+
renderWarning(`Model "${oldModel}" not found on ${provider.label}.`);
|
|
31273
|
+
renderModelSwitch(oldModel, autoModel);
|
|
31274
|
+
} else {
|
|
31275
|
+
process.stdout.write(` ${c2.green("\u2714")} Model "${ctx.config.model}" available on ${provider.label}.
|
|
31276
|
+
|
|
31277
|
+
`);
|
|
31278
|
+
}
|
|
31279
|
+
}
|
|
31280
|
+
} catch {
|
|
31281
|
+
renderWarning(`Could not verify model availability on ${provider.label}. If inference fails, use /model to switch.`);
|
|
31282
|
+
}
|
|
31258
31283
|
}
|
|
31259
31284
|
async function handleUpdate(subcommand, ctx) {
|
|
31260
31285
|
const repoRoot = ctx.repoRoot;
|
package/package.json
CHANGED