fix: Enhances model display for Fal.ai image gen source (#4694) * fix: Enhances model display for Fal.ai image gen source * Move text processing to backend --------- Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Signed| @@ -1322,7 +1322,8 @@ falai.post('/models', async (_request, response) => { | ||
| 1322 | 1322 | |
| 1323 | 1323 | const modelOptions = models |
| 1324 | 1324 | .sort((a, b) => a.title.localeCompare(b.title)) |
| 1325 | 1325 | .map(x => ({ value: x.modelUrl.split('fal-ai/')[1], text: x.title })); |
| 1326 | + .map(x => ({ ...x, text: `${x.text} (${x.value})` })); | |
| 1326 | 1327 | return response.send(modelOptions); |
| 1327 | 1328 | } catch (error) { |
| 1328 | 1329 | console.error(error); |