filter out models that don't have a valid id (#4920)
Signed| @@ -1842,7 +1842,9 @@ router.post('/status', async function (request, statusResponse) { | ||
| 1842 | 1842 | } |
| 1843 | 1843 | |
| 1844 | 1844 | if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.CHUTES && Array.isArray(data?.data)) { |
| 1845 | 1845 | data.data = data.data.map(model => { |
| 1846 | + .filter(model => model?.id) | |
| 1847 | + .map(model => { | |
| 1846 | 1848 | if (model.pricing?.prompt !== undefined && model.pricing?.completion !== undefined) { |
| 1847 | 1849 | return { |
| 1848 | 1850 | ...model, |