The agent template form gives no reason for an empty model list
ui/src/components/agent-template-form/AgentTemplateForm.tsx offers only the ModelConfigs in the template's own namespace. When that namespace has none, the select opens empty and the help text below it still reads:
The only field the CRD requires. It names a ModelConfig in this template's own namespace.
The field is required, so the form cannot be submitted, and nothing on the page says why. It reads as a broken form rather than an empty namespace. The same empty select appears when the model list fails to load, because the form never reads models.error.
Reproduce
- Open
/agent-templates/new.
- Choose a namespace that has no ModelConfig.
- Open the model configuration select.
Expected
The help text says what happened:
- No model configurations in the namespace: say so, and suggest another namespace or asking an administrator to add one. The form cannot tell a namespace with no ModelConfig from one whose ModelConfigs the user may not read, so the text should cover both.
- The list failed to load and there is nothing to choose from: say it could not be loaded.
An existing template cannot change namespace, so the edit form should not suggest choosing another one. SWR keeps the last good list when a revalidation fails, so a load error should only replace the hint when it leaves nothing to choose from.
Checked against main at ddb9e0ab5b70 (2026-09-24).
The agent template form gives no reason for an empty model list
ui/src/components/agent-template-form/AgentTemplateForm.tsxoffers only the ModelConfigs in the template's own namespace. When that namespace has none, the select opens empty and the help text below it still reads:The field is required, so the form cannot be submitted, and nothing on the page says why. It reads as a broken form rather than an empty namespace. The same empty select appears when the model list fails to load, because the form never reads
models.error.Reproduce
/agent-templates/new.Expected
The help text says what happened:
An existing template cannot change namespace, so the edit form should not suggest choosing another one. SWR keeps the last good list when a revalidation fails, so a load error should only replace the hint when it leaves nothing to choose from.
Checked against
mainatddb9e0ab5b70(2026-09-24).