feat: model 列表增加 input 字段

Made-with: Cursor
This commit is contained in:
stswangzhiping
2026-04-14 09:04:58 +08:00
parent 8f6e7c55e9
commit c64aeab3b2

View File

@@ -52,7 +52,7 @@ function fetchModels(baseUrl, apiKey, callback) {
try { try {
const json = JSON.parse(data); const json = JSON.parse(data);
if (json.data && Array.isArray(json.data)) { if (json.data && Array.isArray(json.data)) {
callback(null, json.data.map((m) => ({ id: m.id, name: m.id }))); callback(null, json.data.map((m) => ({ id: m.id, name: m.id, input: ['text', 'image'] })));
} else if (json.error) { } else if (json.error) {
callback(new Error(json.error.message || JSON.stringify(json.error))); callback(new Error(json.error.message || JSON.stringify(json.error)));
} else { } else {