fix(AI): add null check to model name (#645)

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-17 18:34:31 +00:00 committed by Jake Turner
parent 8dcbf7dbcf
commit 4d866167a2

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">