ngx-prompt-kit

Model Browser

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

OpenRouter-style split-pane model picker. Search + optional filter chips on the left, model list grouped by category, and a detail pane on the right showing description, pricing, and arbitrary metric rows. The marketplace pattern when a single dropdown isn't enough.

Examples

Full marketplace

Search, click a filter chip to narrow by group, click a model to inspect. The Use this model button at the bottom of the detail pane fires (changed).

Frontier

Open Source

Local

Installation

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

ng generate ngx-prompt-kit:model-browser

Component API

PkModelBrowser

PropTypeDefaultDescription
modelsreadonly BrowserModel[]The browseable models (required).
selectedIdstring | null null Two-way bindable via [(selectedId)]. Selecting a row updates this; (changed) only fires on confirm.
filtersreadonly BrowserFilter[] [] Two-way bindable via [(filters)]. Active filter ids are matched against each model's group.
searchPlaceholderstring "Search models" Placeholder text for the search input.
selectableboolean true Whether to render the confirmation button in the detail pane.
selectLabelstring "Use this model" Label for the confirmation button.
localestring?Locale for the price formatter.
classstringExtra classes for the host.

BrowserModel interface

PropTypeDefaultDescription
idstringStable identifier (required).
namestringDisplay name (required).
iconUrlstring?Logo source; falls back to initials.
providerstring?Small muted line beneath the name.
descriptionstring?Long-form text in the detail pane.
groupstring?Category label — list groups by this and filter ids match against it.
inputPricePer1M / outputPricePer1Mnumber?Both required for the price metric to render.
currencystring? "USD" ISO 4217 code; passed to Intl.NumberFormat.
metricsReadonlyArray<{ label, value }>?Free-form key/value rows in the detail pane.
disabledboolean?Greys the row and suppresses (changed).

Outputs

PropTypeDefaultDescription
changed(model: BrowserModel) => voidFires when the consumer confirms via the action button (selectable=true) — not on row click.