Skip to content

Agent template form gives no reason for an empty model list #2941

Description

@codyhartsook

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

  1. Open /agent-templates/new.
  2. Choose a namespace that has no ModelConfig.
  3. 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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions