mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-04-05 16:26:15 +02:00
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:
parent
fa93ed51e2
commit
e49f25bda7
|
|
@ -369,7 +369,7 @@ export default function ModelsPage(props: {
|
||||||
</td>
|
</td>
|
||||||
<td className="px-4 py-3">
|
<td className="px-4 py-3">
|
||||||
<span className="text-sm text-text-secondary">
|
<span className="text-sm text-text-secondary">
|
||||||
{model.details.parameter_size || 'N/A'}
|
{model.details?.parameter_size || 'N/A'}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-4 py-3">
|
<td className="px-4 py-3">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user