agentgui 1.0.440 → 1.0.442
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/lib/acp-manager.js +5 -3
- package/package.json +1 -1
package/lib/acp-manager.js
CHANGED
|
@@ -209,13 +209,15 @@ export async function queryModels(agentId) {
|
|
|
209
209
|
});
|
|
210
210
|
if (!res.ok) return [];
|
|
211
211
|
const data = await res.json();
|
|
212
|
-
const
|
|
212
|
+
const seen = new Map();
|
|
213
213
|
for (const prov of (data.all || [])) {
|
|
214
214
|
for (const m of Object.values(prov.models || {})) {
|
|
215
|
-
|
|
215
|
+
if (!seen.has(m.id)) {
|
|
216
|
+
seen.set(m.id, { id: m.id, label: m.name || m.id, provider: prov.name || prov.id });
|
|
217
|
+
}
|
|
216
218
|
}
|
|
217
219
|
}
|
|
218
|
-
return
|
|
220
|
+
return Array.from(seen.values());
|
|
219
221
|
} catch (_) { return []; }
|
|
220
222
|
}
|
|
221
223
|
|