fix(ai-chat): add null check to model name

When the OpenAI-compatible fallback (/v1/models) is used, models are mapped as { name: m.id, size: 0 } with no details field. Accessing model.details.parameter_size throws
TypeError: Cannot read properties of undefined, which crashes the React render and causes the entire page to go blank.
This commit is contained in:
Henry Estela 2026-04-03 17:59:24 -07:00
parent fa93ed51e2
commit e49f25bda7
No known key found for this signature in database
GPG Key ID: 90439853E9E235BA

View File

@ -369,7 +369,7 @@ export default function ModelsPage(props: {
</td>
<td className="px-4 py-3">
<span className="text-sm text-text-secondary">
{model.details.parameter_size || 'N/A'}
{model.details?.parameter_size || 'N/A'}
</span>
</td>
<td className="px-4 py-3">