ngx-prompt-kit

Model Picker

ngx-prompt-kit original — not part of ibelick/prompt-kit

Dropdown for selecting an LLM. Items show name, provider, optional tagline, optional tier badge, and optional pricing line. Pricing is consumer-supplied — no model rates are bundled.

Examples

Full detail

Three models with tiers + pricing. Selected model's name and tier badge appear in the trigger; the dropdown shows all metadata. Click a model to switch.

Compact, in a toolbar

Set [compact]='true' to drop the tier badge from the trigger and shrink the button. Useful in horizontal toolbars where vertical space matters.

Active model:

With a disabled (coming soon) model

Set disabled: true on a Model entry to grey it out. (changed) does not fire and selectedId does not update if the user clicks it.

Installation

Add the model-picker component (and the cn() utility) to your project.

ng generate ngx-prompt-kit:model-picker

Component API

PkModelPicker

PropTypeDefaultDescription
modelsreadonly Model[]The selectable models (required). See Model interface below.
selectedIdstring | null null Two-way bindable via [(selectedId)]. Component reflects the selection in the trigger; consumer drives any side effects.
placeholderstring "Select model" Trigger label when nothing is selected.
compactboolean false Smaller trigger; drops the tier badge from the trigger button. The dropdown is unaffected.
localestring | undefinedBCP-47 locale for the price formatter. Defaults to runtime locale.
classstringExtra classes for the host.

Model interface

PropTypeDefaultDescription
idstringStable identifier (required).
namestringDisplay name (required).
providerstring?Small muted suffix in the dropdown.
taglinestring?One-line description below the name in the dropdown.
tier"fast" | "balanced" | "smart" | undefinedOptional badge — fast (primary), balanced (secondary), smart (amber).
inputPricePer1M / outputPricePer1Mnumber?Per-million-token pricing in `currency`. Both must be set for the price line to render.
currencystring? "USD" ISO 4217 code; passed to Intl.NumberFormat with the resolved locale.
disabledboolean?Greys the item out and suppresses (changed).

Outputs

PropTypeDefaultDescription
changed(model: Model) => voidFires when a non-disabled model is picked. Full Model object emitted.