Bus UI Assistant

AIModelSelect keeps model choice explicit.

Use it when the host needs a node-first picker or read-only model label with a known fallback for unavailable selections.

Public API

AIModelSelect(p AIModelSelectProps) gx.Node

When to use it

Use AIModelSelect for assistant workbenches that let the operator change models or inspect the current model without hiding the selection policy in the host.

Key props

ID, Current, Options, Fallback, OnChange, and ThreadID.

Example

Loading AIModelSelect demo...

Go API

import (
  gx "github.com/busdk/bus-gx/pkg/gx"
  assistantui "github.com/busdk/bus-ui/pkg/assistantui"
)

node := assistantui.AIModelSelect(assistantui.AIModelSelectProps{
  ID:      "model",
  Current: "gpt-5",
  Options: []assistantui.AIModelOption{{ID: "gpt-5", Label: "GPT-5"}},
})

html, err := gx.RenderHTML(node)

.gx source

In .gx source, author the visible component state as GX markup. Keep the Go API block above for the package helper or render-boundary call.

package busuiexamples

import gx "github.com/busdk/bus-gx/pkg/gx"

func AIModelSelectExample() gx.Node {
  return <label class="ai-model-select" for="model">
  <Text value={"Model"}></Text>
  <select id="model" name="model" value="gpt-5">
    <option value="gpt-5" selected><Text value={"GPT-5"}></Text></option>
  </select>
</label>
}

Related

Return to Assistant or the Bus UI reference.