Skip to content

Claude Code. Any Model. The most powerful AI coding agent now speaks every language.

refactor(picker): retire "roster" in the picker, for the thesaurus terms

Jack Rudenko444ee60f5eb3
diff --git a/packages/cli/src/model-selector-discovery.test.ts b/packages/cli/src/model-selector-discovery.test.ts
index 3e1ea0bd..13476639 100644
--- a/packages/cli/src/model-selector-discovery.test.ts
+++ b/packages/cli/src/model-selector-discovery.test.ts
@@ -5,7 +5,7 @@
*
* The defect these pin: `buildDiscoveredModelRows` returned `[]` for five
* distinguishable states — a rejected key, an unreachable endpoint, a genuinely
- * empty roster, a roster where nothing was chat-capable, and a roster that
+ * empty dynamic models catalog, a dynamic models catalog where nothing was chat-capable, and a dynamic models catalog that
* collapsed to nothing — and the caller fell through to the cloud catalog for
* all of them in silence. The user saw "fewer model names, like the provider
* does not have any models". So every test here is a state that used to be
@@ -26,7 +26,7 @@ import { afterEach, beforeEach, describe, expect, mock, spyOn, test } from "bun:
import { credentials } from "./auth/credentials/authority.js";
import {
- _rosterCollapse,
+ _modelsCatalogCollapse,
buildDiscoveredModelOutcome,
buildDiscoveredModelRows,
formatDiscoveryFailureNotice,
@@ -51,7 +51,7 @@ const KEY_URL = "https://picker-outcome.invalid/key";
const realFetch = globalThis.fetch;
const realGetRequestAuth = credentials.getRequestAuth;
-const realCollapse = _rosterCollapse.collapse;
+const realCollapse = _modelsCatalogCollapse.collapse;
function defineProvider(overrides: Partial<ProviderDefinition> = {}): ProviderDefinition {
return {
@@ -130,11 +130,11 @@ afterEach(() => {
clearRuntimeRegistry();
globalThis.fetch = realFetch;
credentials.getRequestAuth = realGetRequestAuth;
- _rosterCollapse.collapse = realCollapse;
+ _modelsCatalogCollapse.collapse = realCollapse;
});
describe("buildDiscoveredModelOutcome — all five states, told apart", () => {
- test("STATE A · a healthy roster is `rows`, non-empty, with servedCount === chatCount", async () => {
+ test("STATE A · a healthy dynamic models catalog is `rows`, non-empty, with servedCount === chatCount", async () => {
serves(["alpha-chat", "beta-chat", "gamma-chat"]);
const outcome = await buildDiscoveredModelOutcome(
@@ -151,7 +151,7 @@ describe("buildDiscoveredModelOutcome — all five states, told apart", () => {
expect(outcome.chatCount).toBe(3);
});
- test("a PARTIALLY filtered roster keeps the two counts apart — the fact discarded today", async () => {
+ test("a PARTIALLY filtered dynamic models catalog keeps the two counts apart — the fact discarded today", async () => {
serves(["alpha-chat", "text-embedding-3-large", "whisper-1"]);
const outcome = await buildDiscoveredModelOutcome(
@@ -193,7 +193,7 @@ describe("buildDiscoveredModelOutcome — all five states, told apart", () => {
]);
});
- test("STATE C · a genuinely empty roster is its own variant, carrying the failure", async () => {
+ test("STATE C · a genuinely empty dynamic models catalog is its own variant, carrying the failure", async () => {
serves([]);
const outcome = await buildDiscoveredModelOutcome(
@@ -202,14 +202,14 @@ describe("buildDiscoveredModelOutcome — all five states, told apart", () => {
stubCatalog(CATALOG_ROWS)
);
- expect(outcome.kind).toBe("empty-roster");
- if (outcome.kind !== "empty-roster") throw new Error("unreachable");
+ expect(outcome.kind).toBe("empty-models-catalog");
+ if (outcome.kind !== "empty-models-catalog") throw new Error("unreachable");
expect(outcome.failure.kind).toBe("empty-models-catalog");
expect(outcome.failure.endpoint).toContain("/v1/models");
expect(outcome.fallbackRows.length).toBe(2);
});
- test("STATE D · a rejected key is `failed` — a DIFFERENT variant from empty-roster", async () => {
+ test("STATE D · a rejected key is `failed` — a DIFFERENT variant from empty-models-catalog", async () => {
rejectsWith(401);
const outcome = await buildDiscoveredModelOutcome(
@@ -224,7 +224,7 @@ describe("buildDiscoveredModelOutcome — all five states, told apart", () => {
expect(outcome.failure.status).toBe(401);
// The whole point of the split: a 401 and an empty list are not the same
// thing, and the type no longer lets a renderer treat them as one.
- expect(outcome.kind).not.toBe("empty-roster");
+ expect(outcome.kind).not.toBe("empty-models-catalog");
expect(outcome.notice.join("")).toContain(DISPLAY_NAME);
expect(outcome.notice.join("")).toContain(ENV_VAR);
expect(outcome.fallbackRows.map((r) => r.id).sort()).toEqual([
@@ -233,12 +233,12 @@ describe("buildDiscoveredModelOutcome — all five states, told apart", () => {
]);
});
- test("STATE E · a roster that collapses to nothing is collapsed-empty, never rows:[]", async () => {
+ test("STATE E · a dynamic models catalog that collapses to nothing is collapsed-empty, never rows:[]", async () => {
// Unreachable through the one shipped resolver (every entry lands in a group
// and every group yields a choice), and modelled anyway: `{kind:"rows",
// rows: []}` would be an empty panel with no explanation — the exact defect
// class this type exists to remove, reintroduced inside it.
- _rosterCollapse.collapse = () => [];
+ _modelsCatalogCollapse.collapse = () => [];
serves(["alpha-chat", "beta-chat"]);
const outcome = await buildDiscoveredModelOutcome(
@@ -305,7 +305,7 @@ describe("buildDiscoveredModelOutcome — the fallback leg", () => {
if (outcome.kind !== "failed") throw new Error("unreachable");
const notice = outcome.notice.join("");
- expect(notice).toContain("cloud-catalog entries below — not its live roster.");
+ expect(notice).toContain("cloud-catalog entries below — not its live model list.");
expect(notice).not.toContain("Falling back to manual model entry.");
});
@@ -405,7 +405,7 @@ describe("formatDiscoveryFailureNotice", () => {
expect(lines("manual-entry")).toContain("Falling back to manual model entry.");
expect(lines("catalog")).toContain(
- `Showing ${DISPLAY_NAME}'s cloud-catalog entries below — not its live roster.`
+ `Showing ${DISPLAY_NAME}'s cloud-catalog entries below — not its live model list.`
);
// "unknown" means nothing has decided yet, so it claims nothing.
expect(lines("unknown")).not.toContain("Falling back");
@@ -455,7 +455,7 @@ describe("no rendered notice interpolates `undefined`", () => {
const KINDS = Object.keys(EVERY_KIND) as DiscoveryFailureKind[];
test("every kind × endpoint × status × detail × fallback", () => {
- // The `empty-roster` records on the fetcher half carried no endpoint for
+ // The `empty-models-catalog` records on the fetcher half carried no endpoint for
// years, so any copy that names one renders the literal string `undefined`
// to the user. Exhaustive rather than representative, because the optional
// fields are independent and a single missed guard is invisible in review.
diff --git a/packages/cli/src/model-selector.ts b/packages/cli/src/model-selector.ts
index b6f00843..564c6630 100644
--- a/packages/cli/src/model-selector.ts
+++ b/packages/cli/src/model-selector.ts
@@ -34,9 +34,9 @@ import {
import {
type DiscoveredModel,
type DiscoveryFailure,
- type RosterOutcome,
+ type ModelsCatalogOutcome,
describeDiscoveryFailure,
- discoverProviderRoster,
+ discoverProviderModelsCatalog,
getDiscoveryFailure,
rankDiscoveredModels,
toModelsCatalogEntry,
@@ -1501,7 +1501,7 @@ function describeOffer(offer: ModelOffer | undefined): string | undefined {
}
/**
- * Which list the user is about to be shown instead of the live roster.
+ * Which list the user is about to be shown instead of the dynamic models catalog.
*
* The caller that writes the notice is not always the caller that knows this.
* `warnDiscoveryFailure` runs at the point discovery fails, BEFORE the
@@ -1552,7 +1552,9 @@ export function formatDiscoveryFailureNotice(
if (fallback === "manual-entry") lines.push(" Falling back to manual model entry.\n\n");
else if (fallback === "catalog") {
- lines.push(` Showing ${displayName}'s cloud-catalog entries below — not its live roster.\n\n`);
+ lines.push(
+ ` Showing ${displayName}'s cloud-catalog entries below — not its live model list.\n\n`
+ );
}
return lines;
}
@@ -1596,9 +1598,9 @@ export function warnDiscoveryFailure(
}
/**
- * Roster → picker rows, as an injectable step.
+ * Dynamic models catalog → picker rows, as an injectable step.
*
- * A seam, not a design: `collapseModelsCatalog` folding a non-empty roster to `[]` is
+ * A seam, not a design: `collapseModelsCatalog` folding a non-empty dynamic models catalog to `[]` is
* the one state behind `PickerDiscoveryOutcome.collapsed-empty`, and the single
* shipped resolver cannot produce it (every entry lands in a group and every
* group yields a choice), so the variant is otherwise untestable. The
@@ -1606,15 +1608,15 @@ export function warnDiscoveryFailure(
* test files and is banned here. Replace the property in a test and restore it;
* the same shape the discovery tests already use on `credentials.getRequestAuth`.
*/
-export const _rosterCollapse = { collapse: collapseModelsCatalog };
+export const _modelsCatalogCollapse = { collapse: collapseModelsCatalog };
/**
* What one discovery provider's model list actually is — all five states that
* used to be the same empty array, plus the one where nothing was attempted.
*
* `buildDiscoveredModelRows` returned `[]` for a rejected API key, an
- * unreachable endpoint, a genuinely empty roster, a roster where nothing was
- * chat-capable, and a roster that collapsed to nothing — and its caller fell
+ * unreachable endpoint, a genuinely empty dynamic models catalog, a dynamic models catalog where nothing was
+ * chat-capable, and a dynamic models catalog that collapsed to nothing — and its caller fell
* through to the cloud catalog for all of them, silently. The user's report was
* *"it just shows fewer model names, like the provider does not have any
* models"*: information destroyed at a return statement, which no amount of UI
@@ -1639,17 +1641,17 @@ export type PickerDiscoveryOutcome =
| { kind: "rows"; rows: [ModelInfo, ...ModelInfo[]]; servedCount: number; chatCount: number }
| { kind: "all-filtered"; servedCount: number; sampleIds: string[]; fallbackRows: ModelInfo[] }
| { kind: "collapsed-empty"; servedCount: number; chatCount: number; fallbackRows: ModelInfo[] }
- | { kind: "empty-roster"; failure: DiscoveryFailure; fallbackRows: ModelInfo[] }
+ | { kind: "empty-models-catalog"; failure: DiscoveryFailure; fallbackRows: ModelInfo[] }
| { kind: "failed"; failure: DiscoveryFailure; notice: string[]; fallbackRows: ModelInfo[] }
| { kind: "unsupported"; reason: "no-descriptor" | "no-fetcher" };
/**
* One discovery provider's list, with the reason when there isn't one.
*
- * Starts both legs at once — the live roster and the cloud-catalog fallback —
+ * Starts both legs at once — the dynamic models catalog and the cloud-catalog fallback —
* and returns one settled answer, so a view has one state and one affordance per
* provider instead of two spinners to reconcile. The catalog leg costs a lookup
- * a healthy roster does not need; that is cheaper than doubling the wait on the
+ * a healthy dynamic models catalog does not need; that is cheaper than doubling the wait on the
* failure path, and `catalog.modelsByVendor` caches.
*/
export async function buildDiscoveredModelOutcome(
@@ -1657,36 +1659,39 @@ export async function buildDiscoveredModelOutcome(
displayName: string,
catalog: CatalogClient
): Promise<PickerDiscoveryOutcome> {
- const [rosterResult, fallbackResult] = await Promise.allSettled([
- discoverProviderRoster(provider),
+ const [modelsCatalogResult, fallbackResult] = await Promise.allSettled([
+ discoverProviderModelsCatalog(provider),
loadModelsForPickerProvider(provider, catalog),
]);
const fallbackRows = fallbackResult.status === "fulfilled" ? fallbackResult.value : [];
- // `discoverProviderRoster` never rejects by contract, but a contract is not a
+ // `discoverProviderModelsCatalog` never rejects by contract, but a contract is not a
// type: honour it rather than asserting it, so a future regression there shows
// up as a named failure instead of an unhandled rejection behind a renderer.
- const roster: RosterOutcome =
- rosterResult.status === "fulfilled"
- ? rosterResult.value
+ const modelsCatalog: ModelsCatalogOutcome =
+ modelsCatalogResult.status === "fulfilled"
+ ? modelsCatalogResult.value
: {
kind: "failed",
failure: {
kind: "unreachable",
provider,
- detail: String((rosterResult.reason as Error)?.message ?? rosterResult.reason),
+ detail: String(
+ (modelsCatalogResult.reason as Error)?.message ?? modelsCatalogResult.reason
+ ),
},
};
- if (roster.kind === "unsupported") return { kind: "unsupported", reason: roster.reason };
+ if (modelsCatalog.kind === "unsupported")
+ return { kind: "unsupported", reason: modelsCatalog.reason };
- if (roster.kind === "failed") {
- const { failure } = roster;
- // `empty-roster` is its own variant rather than a `failed` with a kind to
+ if (modelsCatalog.kind === "failed") {
+ const { failure } = modelsCatalog;
+ // `empty-models-catalog` is its own variant rather than a `failed` with a kind to
// switch on, because it is not an error: the endpoint answered. It renders
// in the NOTICE tier, visibly distinct from a rejected key.
if (failure.kind === "empty-models-catalog") {
- return { kind: "empty-roster", failure, fallbackRows };
+ return { kind: "empty-models-catalog", failure, fallbackRows };
}
const def = getProviderByName(provider);
const notice = formatDiscoveryFailureNotice(
@@ -1701,7 +1706,7 @@ export async function buildDiscoveredModelOutcome(
return { kind: "failed", failure, notice, fallbackRows };
}
- const served = rankDiscoveredModels(roster.models);
+ const served = rankDiscoveredModels(modelsCatalog.models);
const servedCount = served.length;
const discovered = served.filter((m) => isChatCapable(m.id));
const chatCount = discovered.length;
@@ -1732,7 +1737,7 @@ export async function buildDiscoveredModelOutcome(
}
/**
- * The picker rows for a provider's live roster, or `[]` for any of the six
+ * The picker rows for a provider's dynamic models catalog, or `[]` for any of the six
* reasons there isn't one.
*
* A wrapper over {@link buildDiscoveredModelOutcome} since the outcome type
@@ -1779,7 +1784,7 @@ function buildRowsFromDiscovered(
// where 167 served uids are ~39 real choices multiplied out by reasoning tier
// and speed premium. The chosen id is always a real wire id, so it still
// round-trips through buildExplicitModelSpec and argv unchanged.
- const choices = _rosterCollapse.collapse(provider, discovered.map(toModelsCatalogEntry));
+ const choices = _modelsCatalogCollapse.collapse(provider, discovered.map(toModelsCatalogEntry));
const discoveredById = new Map(discovered.map((m) => [m.id, m]));
// The live endpoint decides WHICH models appear (entitlement) and overrides
diff --git a/packages/cli/src/picker/DiscoveryNotice.tsx b/packages/cli/src/picker/DiscoveryNotice.tsx
index b78ef1db..e7f792b1 100644
--- a/packages/cli/src/picker/DiscoveryNotice.tsx
+++ b/packages/cli/src/picker/DiscoveryNotice.tsx
@@ -16,7 +16,7 @@
* neutral, not red":
*
* · `failed` → ERROR (red on `C.bgError`)
- * · `empty-roster` / `all-filtered` / `collapsed-empty` → NOTICE (`tokens.warn`)
+ * · `empty-models-catalog` / `all-filtered` / `collapsed-empty` → NOTICE (`tokens.warn`)
* · `rows` / `unsupported` → nothing at all
*
* `unsupported` rendering nothing is the load-bearing half of that last row: ~25
@@ -38,7 +38,7 @@ export interface NoticeContent {
/** A chip at the head of row one, e.g. `HTTP 401`. */
badge?: string;
/**
- * The dialog's right-hand status — `live roster unavailable`, `empty roster`.
+ * The dialog's right-hand status — `live model list unavailable`, `empty model list`.
*
* It is the FIRST of the three encodings of one fact, and it is the loudest,
* because a title in a border is read before anything inside it. The others are
@@ -69,12 +69,13 @@ function oneRow(line: string): string {
}
/**
- * The provenance sentence — the line that says the list below is NOT the live
- * roster, AND that being in the list does not mean it will run.
+ * The provenance sentence — the line that says the list below is NOT the
+ * provider's dynamic models catalog, AND that being in the list does not mean it
+ * will run.
*
* IT IS TWO CLAIMS, AND THE SECOND ONE IS THE ONE THAT WAS MISSING. The stderr
* wording says where the rows came from ("cloud-catalog entries … not its live
- * roster"), which is a statement about provenance. What it never said is the
+ * model list"), which is a statement about provenance. What it never said is the
* CONSEQUENCE: discovery failed because the credential was rejected, so nothing
* has confirmed that this account can call any of these models. A reader who is
* told only "these are catalog entries" reasonably concludes the list is merely
@@ -82,13 +83,13 @@ function oneRow(line: string): string {
* the count, the provenance and the risk in that order.
*
* This is the third of the three encodings of the same fact — the dialog title
- * (`live roster unavailable`), the per-row `catalog` mark, and this — and all
+ * (`live model list unavailable`), the per-row `catalog` mark, and this — and all
* three derive from ONE value, the outcome variant, so they cannot disagree.
*/
function provenance(displayName: string, rows: number): string {
const n = rows === 1 ? "row" : "rows";
return (
- `The ${rows} ${n} below are catalog entries, not ${displayName}'s live roster — ` +
+ `The ${rows} ${n} below are catalog entries, not ${displayName}'s live model list — ` +
"they do not confirm access, so launching one may still fail."
);
}
@@ -112,8 +113,8 @@ export function discoveryNoticeContent(
return null;
case "failed":
return failedContent(outcome, displayName);
- case "empty-roster":
- return emptyRosterContent(outcome, displayName);
+ case "empty-models-catalog":
+ return emptyModelsCatalogContent(outcome, displayName);
case "all-filtered":
return allFilteredContent(outcome, displayName);
case "collapsed-empty":
@@ -127,7 +128,7 @@ function nextStep(rows: number, displayName: string): string {
}
type Failed = Extract<PickerDiscoveryOutcome, { kind: "failed" }>;
-type EmptyRoster = Extract<PickerDiscoveryOutcome, { kind: "empty-roster" }>;
+type EmptyModelsCatalog = Extract<PickerDiscoveryOutcome, { kind: "empty-models-catalog" }>;
type AllFiltered = Extract<PickerDiscoveryOutcome, { kind: "all-filtered" }>;
type Collapsed = Extract<PickerDiscoveryOutcome, { kind: "collapsed-empty" }>;
@@ -150,7 +151,7 @@ function failedContent({ failure, notice, fallbackRows }: Failed, name: string):
// file exists to avoid, so the shorter one gives way here — and the stderr path
// keeps it verbatim, which is the whole reason the formatter and the sink are
// separate.
- if (/^Showing .* not its live roster\.$/.test(line)) continue;
+ if (/^Showing .* not its live model list\.$/.test(line)) continue;
if (line === "Falling back to manual model entry.") continue;
// De-duplicate the status: it is the badge now, and spending nine columns of a
// 78-column headline saying it twice costs the end of the sentence.
@@ -162,9 +163,9 @@ function failedContent({ failure, notice, fallbackRows }: Failed, name: string):
lines,
...(badge === undefined ? {} : { badge }),
// The dialog RIGHT-hand status. "unavailable" rather than "failed": the
- // provider is not broken, claudish could not read its roster, and the two read
+ // provider is not broken, claudish could not read its dynamic models catalog, and the two read
// very differently to someone deciding whether to trust the rows below.
- title: "live roster unavailable",
+ title: "live model list unavailable",
};
}
@@ -174,7 +175,10 @@ function failedContent({ failure, notice, fallbackRows }: Failed, name: string):
* ignore red. It stays visibly distinct from a rejected key in BOTH tier and copy,
* which is what V7 asks for.
*/
-function emptyRosterContent({ failure, fallbackRows }: EmptyRoster, name: string): NoticeContent {
+function emptyModelsCatalogContent(
+ { failure, fallbackRows }: EmptyModelsCatalog,
+ name: string
+): NoticeContent {
const at = failure.endpoint ? ` — the endpoint answered at ${failure.endpoint}` : "";
return {
severity: "notice",
@@ -182,7 +186,7 @@ function emptyRosterContent({ failure, fallbackRows }: EmptyRoster, name: string
`${name}'s model list is empty${at} and listed nothing.`,
nextStep(fallbackRows.length, name),
],
- title: "empty roster",
+ title: "empty model list",
};
}
diff --git a/packages/cli/src/picker/ModelPicker.test.tsx b/packages/cli/src/picker/ModelPicker.test.tsx
index 51a2a316..b22ba88a 100644
--- a/packages/cli/src/picker/ModelPicker.test.tsx
+++ b/packages/cli/src/picker/ModelPicker.test.tsx
@@ -67,7 +67,7 @@ const model = (over: Partial<ModelInfo> = {}): ModelInfo => ({
});
interface FakeOpts {
- roster?: PickerProviderChoice[];
+ providerList?: PickerProviderChoice[];
ready?: Record<string, boolean>;
outcome?: PickerDiscoveryOutcome;
/** Per-provider discovery outcomes. Falls back to `outcome`. */
@@ -91,15 +91,15 @@ interface Calls {
}
function fakeSource(opts: FakeOpts = {}): PickerDataSource & { calls: Calls } {
- const roster = opts.roster ?? [provider()];
+ const providerList = opts.providerList ?? [provider()];
const never = new Promise<never>(() => {});
const descriptions = opts.descriptions ?? {};
const calls: Calls = { catalog: 0, descriptions: 0, discover: [] };
return {
calls,
- providerRoster: () => roster,
+ providerList: () => providerList,
notEnabledLocalProviders: () => opts.notEnabledLocal ?? [],
- displayName: (p) => roster.find((r) => r.value === p)?.label ?? p,
+ displayName: (p) => providerList.find((r) => r.value === p)?.label ?? p,
async *probeCredentials(names) {
if (opts.hang) await never;
for (const n of names) yield [n, opts.ready?.[n] ?? true] as [string, boolean];
@@ -109,7 +109,7 @@ function fakeSource(opts: FakeOpts = {}): PickerDataSource & { calls: Calls } {
return opts.hang ? never : Promise.resolve();
},
servedModels: (p) => opts.byProvider?.[p] ?? opts.served ?? [model()],
- discoverRoster: (p): Promise<PickerDiscoveryOutcome> => {
+ discoverModelsCatalog: (p): Promise<PickerDiscoveryOutcome> => {
calls.discover.push(p);
return opts.hang
? never
@@ -243,12 +243,12 @@ describe("the dialog", () => {
test("has EXACTLY ONE cursor — the direct answer to “unclear what is happening”", async () => {
// Two panes each held a cursor and only a border colour said which one the arrow
// keys drove. One list, one `▶` — on the landing screen and inside a list alike.
- const roster = ["openrouter", "kimi", "google"].map((v) =>
+ const providerList = ["openrouter", "kimi", "google"].map((v) =>
provider({ value: v, label: v, shortcut: `${v}@`, hasDiscovery: false })
);
const d = await draw(
<ModelPicker
- source={fakeSource({ roster, served: [model({ id: "a" }), model({ id: "b" })] })}
+ source={fakeSource({ providerList, served: [model({ id: "a" }), model({ id: "b" })] })}
onDone={() => {}}
/>
);
@@ -269,7 +269,7 @@ describe("the dialog", () => {
const d = await draw(
<ModelPicker
source={fakeSource({
- roster: [provider({ hasDiscovery: false })],
+ providerList: [provider({ hasDiscovery: false })],
served: [
model({ id: "a", contextLength: 1_000_000, context: "1M" }),
model({ id: "b", contextLength: 8_000, context: "8K" }),
@@ -315,7 +315,7 @@ describe("the dialog", () => {
test("the key hints are present and unclipped at 80×24, in BOTH lists", async () => {
const d = await draw(
<ModelPicker
- source={fakeSource({ roster: [provider({ hasDiscovery: false })] })}
+ source={fakeSource({ providerList: [provider({ hasDiscovery: false })] })}
onDone={() => {}}
/>
);
@@ -354,7 +354,7 @@ describe("the dialog", () => {
// anyone adds will cost the same.
const d = await draw(
<ModelPicker
- source={fakeSource({ roster: [provider({ hasDiscovery: true })], served: [model()] })}
+ source={fakeSource({ providerList: [provider({ hasDiscovery: true })], served: [model()] })}
onDone={() => {}}
/>
);
@@ -426,7 +426,7 @@ describe("the dialog", () => {
// ── the chips: a fill is invisible to a character frame ──────────────────────────
describe("the billing and prefix CHIPS", () => {
- const roster = [
+ const providerList = [
provider({ value: "cx", label: "OpenAI Codex", shortcut: "cx@", billing: "sub" }),
provider({ value: "or", label: "OpenRouter", shortcut: "or@", billing: "metered" }),
];
@@ -439,7 +439,7 @@ describe("the billing and prefix CHIPS", () => {
// marks a STATE; a prefix is an identifier with no states, so there is nothing
// in that column for a fill to mark. (The billing cell beside it is the opposite
// case and is chipped — see the two tests below.)
- const d = await draw(<ModelPicker source={fakeSource({ roster })} onDone={() => {}} />);
+ const d = await draw(<ModelPicker source={fakeSource({ providerList })} onDone={() => {}} />);
try {
await d.until(providerListPainted);
const f = d.recapture().frame;
@@ -467,7 +467,7 @@ describe("the billing and prefix CHIPS", () => {
// reddish is the hue the `HTTP 401` badge and the discovery banner already own,
// so a cost chip that picked one of those up would paint a failure on every
// healthy metered row. Hence both assertions, on the spans.
- const d = await draw(<ModelPicker source={fakeSource({ roster })} onDone={() => {}} />);
+ const d = await draw(<ModelPicker source={fakeSource({ providerList })} onDone={() => {}} />);
try {
await d.until(providerListPainted);
const f = d.recapture().frame;
@@ -501,7 +501,7 @@ describe("the billing and prefix CHIPS", () => {
// "you already pay for this" or "something went wrong". It was `tokens.warn` —
// `C.orange`, the hue this dialog spends on a failure — under a label that means
// the opposite of a failure.
- const d = await draw(<ModelPicker source={fakeSource({ roster })} onDone={() => {}} />);
+ const d = await draw(<ModelPicker source={fakeSource({ providerList })} onDone={() => {}} />);
try {
await d.until(providerListPainted);
const chips = labelled(d.recapture().frame, "SUB");
@@ -528,7 +528,7 @@ describe("the billing and prefix CHIPS", () => {
// price cell is 9 columns and the billing cell 7, so a fill sized to the cell
// would paint two different widths and, in a column of one repeated word, one
// unbroken rectangle. The surplus is a plain filler span outside `bg`.
- const d = await draw(<ModelPicker source={fakeSource({ roster })} onDone={() => {}} />);
+ const d = await draw(<ModelPicker source={fakeSource({ providerList })} onDone={() => {}} />);
try {
await d.until(providerListPainted);
const f = d.recapture().frame;
@@ -572,7 +572,7 @@ describe("the billing and prefix CHIPS", () => {
// `captureCharFrame` reads ` esc quit ` under every one of those builds. Only
// the FILLS say whether it is a pill, and only their ADJACENCY says whether it is
// one object or two — which is why this asserts the two segments touch.
- const d = await draw(<ModelPicker source={fakeSource({ roster })} onDone={() => {}} />);
+ const d = await draw(<ModelPicker source={fakeSource({ providerList })} onDone={() => {}} />);
try {
await d.until(providerListPainted);
const f = d.recapture().frame;
@@ -599,7 +599,7 @@ describe("the billing and prefix CHIPS", () => {
}
});
- test("NO CHIP COLUMN FUSES: a flat-rate roster prints words, not a green slab", async () => {
+ test("NO CHIP COLUMN FUSES: a flat-rate provider's models print words, not a green slab", async () => {
// A scoped subscription provider answers `SUB` for EVERY row, so a chipped price
// column there is the rectangle by construction — and no amount of correct
// padding prevents it, because the padding is not what makes the fills identical.
@@ -608,7 +608,7 @@ describe("the billing and prefix CHIPS", () => {
const d = await draw(
<ModelPicker
source={fakeSource({
- roster: [
+ providerList: [
provider({
value: "kimi-coding",
label: "Kimi Coding",
@@ -646,7 +646,9 @@ describe("the billing and prefix CHIPS", () => {
const d = await draw(
<ModelPicker
source={fakeSource({
- roster: [provider({ value: "openrouter", label: "OpenRouter", hasDiscovery: false })],
+ providerList: [
+ provider({ value: "openrouter", label: "OpenRouter", hasDiscovery: false }),
+ ],
byProvider: { openrouter: [model({ id: "gpt-6-astra" })] },
})}
onDone={() => {}}
@@ -679,7 +681,7 @@ describe("the billing and prefix CHIPS", () => {
// ── the landing screen, and everything it does NOT do ────────────────────────────
describe("the picker opens on the PROVIDER list", () => {
- const roster = [
+ const providerList = [
provider({
value: "openrouter",
label: "OpenRouter",
@@ -696,7 +698,10 @@ describe("the picker opens on the PROVIDER list", () => {
// resolve all models".
const d = await draw(
<ModelPicker
- source={fakeSource({ roster, byProvider: { openrouter: [model({ id: "glm-5.3" })] } })}
+ source={fakeSource({
+ providerList,
+ byProvider: { openrouter: [model({ id: "glm-5.3" })] },
+ })}
onDone={() => {}}
/>
);
@@ -711,17 +716,18 @@ describe("the picker opens on the PROVIDER list", () => {
}
});
- test("FETCHES NOTHING before the user asks — no catalog, no roster, no descriptions", async () => {
+ test("FETCHES NOTHING before the user asks — no catalog, no dynamic models catalog, no descriptions", async () => {
// "why we prefetching? we should not, as we show on demand". The build this
- // replaces warmed the cloud catalog AND fanned out one roster request per
+ // replaces warmed the cloud catalog AND fanned out one dynamic models catalog request per
// credentialled provider, on a screen that could show neither.
- const source = fakeSource({ roster });
+ const source = fakeSource({ providerList });
const d = await draw(<ModelPicker source={source} onDone={() => {}} />);
try {
expect(source.calls).toEqual({ catalog: 0, descriptions: 0, discover: [] });
// …and the screen does not claim to be doing any of it.
expect(joined(d.text)).not.toContain("cloud catalog");
- expect(joined(d.text)).not.toContain("live rosters");
+ // No per-provider discovery meter — the rejected `0/11 providers` fan-out.
+ expect(joined(d.text)).not.toMatch(/\d+\/\d+ providers/);
} finally {
d.destroy();
}
@@ -740,7 +746,7 @@ describe("the picker opens on the PROVIDER list", () => {
// state, which is the only state a screenshot was ever taken of.
const d = await draw(
<ModelPicker
- source={fakeSource({ roster, ready: { openrouter: true, "kimi-coding": false } })}
+ source={fakeSource({ providerList, ready: { openrouter: true, "kimi-coding": false } })}
onDone={() => {}}
/>
);
@@ -766,7 +772,7 @@ describe("the picker opens on the PROVIDER list", () => {
test("NO model count is printed for a provider nothing has counted yet", async () => {
// "we could not show number of models for some of them". A `0`, a `—` or a guess
// in that column is a claim; silence is not.
- const d = await draw(<ModelPicker source={fakeSource({ roster })} onDone={() => {}} />);
+ const d = await draw(<ModelPicker source={fakeSource({ providerList })} onDone={() => {}} />);
try {
const row = d.text.find((l) => l.includes("OpenRouter")) ?? "";
expect(row).toContain("OpenRouter");
@@ -781,7 +787,7 @@ describe("the picker opens on the PROVIDER list", () => {
let got: string | null | undefined;
const d = await draw(
<ModelPicker
- source={fakeSource({ roster })}
+ source={fakeSource({ providerList })}
onDone={(spec) => {
got = spec;
}}
@@ -804,7 +810,7 @@ describe("`k` reveals BOTH kinds of unavailable provider, each with its own reas
// missing a CREDENTIAL from a local one that is merely not ENABLED. The distinction
// is real (one sends you to find an API key, the other to a config flag), so it had
// to land somewhere: it is now each row's own tail.
- const roster = [
+ const providerList = [
provider({ value: "openrouter", label: "OpenRouter", shortcut: "or@", hasDiscovery: false }),
provider({ value: "kimi-coding", label: "Kimi Coding", shortcut: "kc@", hasDiscovery: false }),
provider({
@@ -821,7 +827,7 @@ describe("`k` reveals BOTH kinds of unavailable provider, each with its own reas
const d = await draw(
<ModelPicker
source={fakeSource({
- roster,
+ providerList,
ready: { openrouter: true, "kimi-coding": false, ollama: false },
notEnabledLocal: ["ollama"],
})}
@@ -845,7 +851,7 @@ describe("`k` reveals BOTH kinds of unavailable provider, each with its own reas
const d = await draw(
<ModelPicker
source={fakeSource({
- roster,
+ providerList,
ready: { openrouter: true, "kimi-coding": false, ollama: false },
notEnabledLocal: ["ollama"],
})}
@@ -879,14 +885,14 @@ describe("the PROVIDER list filters as you type", () => {
// deliberate omission — 17 named rows do not need narrowing — and the point of this
// block is that what was added is the SAME interaction as the model list, not a
// second one to learn.
- const roster = [
+ const providerList = [
provider({ value: "openrouter", label: "OpenRouter", shortcut: "or@", hasDiscovery: false }),
provider({ value: "kimi-coding", label: "Kimi Coding", shortcut: "kc@", hasDiscovery: false }),
provider({ value: "google", label: "Google Gemini", shortcut: "go@", hasDiscovery: false }),
];
test("typing NARROWS the list, and the count on the right follows it", async () => {
- const d = await draw(<ModelPicker source={fakeSource({ roster })} onDone={() => {}} />);
+ const d = await draw(<ModelPicker source={fakeSource({ providerList })} onDone={() => {}} />);
try {
await d.until(providerListPainted);
expect(joined(d.recapture().text)).toContain("OpenRouter");
@@ -908,7 +914,7 @@ describe("the PROVIDER list filters as you type", () => {
test("the SHORTCUT matches too, because `kc@` is what the row shows beside the name", async () => {
// Two vocabularies reach the same row — what it is called and how it is routed —
// and a user who knows the prefix should not have to remember the display name.
- const d = await draw(<ModelPicker source={fakeSource({ roster })} onDone={() => {}} />);
+ const d = await draw(<ModelPicker source={fakeSource({ providerList })} onDone={() => {}} />);
try {
await d.until(providerListPainted);
// `/` first, because `kc@` starts with one of the three command letters — which
@@ -932,7 +938,7 @@ describe("the PROVIDER list filters as you type", () => {
const d = await draw(
<ModelPicker
source={fakeSource({
- roster,
+ providerList,
ready: { openrouter: true, "kimi-coding": true, google: false },
})}
onDone={() => {}}
@@ -960,7 +966,7 @@ describe("the PROVIDER list filters as you type", () => {
let got: string | null | undefined;
const d = await draw(
<ModelPicker
- source={fakeSource({ roster })}
+ source={fakeSource({ providerList })}
onDone={(spec) => {
got = spec;
}}
@@ -988,7 +994,7 @@ describe("the PROVIDER list filters as you type", () => {
});
test("a filter that matches nothing SAYS SO, and says how to get out", async () => {
- const d = await draw(<ModelPicker source={fakeSource({ roster })} onDone={() => {}} />);
+ const d = await draw(<ModelPicker source={fakeSource({ providerList })} onDone={() => {}} />);
try {
await d.until(providerListPainted);
await d.press(["z", "z"]);
@@ -1006,7 +1012,10 @@ describe("the PROVIDER list filters as you type", () => {
// A leaked filter would open a provider onto `no model matches “kimi”`.
const d = await draw(
<ModelPicker
- source={fakeSource({ roster, byProvider: { "kimi-coding": [model({ id: "kimi-k3" })] } })}
+ source={fakeSource({
+ providerList,
+ byProvider: { "kimi-coding": [model({ id: "kimi-k3" })] },
+ })}
onDone={() => {}}
/>
);
@@ -1030,14 +1039,14 @@ describe("the PROVIDER list filters as you type", () => {
// ── entering a provider is what fetches it ───────────────────────────────────────
describe("entering a provider loads THAT provider, on demand", () => {
- const roster = [
+ const providerList = [
provider({ value: "openrouter", label: "OpenRouter", shortcut: "or@", hasDiscovery: false }),
provider({ value: "devin", label: "Devin", shortcut: "dv@", hasDiscovery: true }),
];
test("`⏎` asks the provider under the cursor, and ONLY that one", async () => {
const source = fakeSource({
- roster,
+ providerList,
byProvider: { openrouter: [model({ id: "glm-5.3" })], devin: [] },
outcomes: {
devin: { kind: "rows", rows: [model({ id: "devin-1" })], servedCount: 1, chatCount: 1 },
@@ -1063,7 +1072,9 @@ describe("entering a provider loads THAT provider, on demand", () => {
const d = await draw(
<ModelPicker
source={fakeSource({
- roster: [provider({ value: "openrouter", label: "OpenRouter", hasDiscovery: false })],
+ providerList: [
+ provider({ value: "openrouter", label: "OpenRouter", hasDiscovery: false }),
+ ],
byProvider: {
openrouter: [model({ id: "gpt-6-astra" }), model({ id: "gpt-6-astra" })],
},
@@ -1092,7 +1103,7 @@ describe("entering a provider loads THAT provider, on demand", () => {
let got: string | null | undefined = undefined;
const d = await draw(
<ModelPicker
- source={fakeSource({ roster })}
+ source={fakeSource({ providerList })}
onDone={(spec) => {
got = spec;
}}
@@ -1122,7 +1133,9 @@ describe("entering a provider loads THAT provider, on demand", () => {
const d = await draw(
<ModelPicker
source={fakeSource({
- roster: [provider({ value: "openrouter", label: "OpenRouter", hasDiscovery: false })],
+ providerList: [
+ provider({ value: "openrouter", label: "OpenRouter", hasDiscovery: false }),
+ ],
byProvider: { openrouter: [model({ id: "gpt-6" })] },
})}
onDone={(spec) => {
@@ -1148,7 +1161,9 @@ describe("entering a provider loads THAT provider, on demand", () => {
const d = await draw(
<ModelPicker
source={fakeSource({
- roster: [provider({ value: "openrouter", label: "OpenRouter", hasDiscovery: false })],
+ providerList: [
+ provider({ value: "openrouter", label: "OpenRouter", hasDiscovery: false }),
+ ],
byProvider: {
openrouter: [model({ id: "glm-5.3-flash" }), model({ id: "kimi-k3" })],
},
@@ -1175,7 +1190,7 @@ describe("entering a provider loads THAT provider, on demand", () => {
// working.
const source = (): PickerDataSource =>
fakeSource({
- roster: [provider({ value: "openrouter", label: "OpenRouter", hasDiscovery: false })],
+ providerList: [provider({ value: "openrouter", label: "OpenRouter", hasDiscovery: false })],
byProvider: { openrouter: [model({ id: "codex-2" }), model({ id: "kimi-k3" })] },
});
const d = await draw(<ModelPicker source={source()} onDone={() => {}} />);
@@ -1209,14 +1224,14 @@ describe("entering a provider loads THAT provider, on demand", () => {
// ── the cross-provider list, which is no longer the default ──────────────────────
describe("`a` opens the cross-provider list", () => {
- const roster = [
+ const providerList = [
provider({ value: "openrouter", label: "OpenRouter", shortcut: "or@", hasDiscovery: false }),
provider({ value: "kimi-coding", label: "Kimi Coding", shortcut: "kc@", hasDiscovery: false }),
];
test("it is ONE cached catalog fetch, not a fan-out across providers", async () => {
const source = fakeSource({
- roster,
+ providerList,
byProvider: {
openrouter: [model({ id: "glm-5.3-flash" })],
"kimi-coding": [model({ id: "kimi-k3" })],
@@ -1230,7 +1245,7 @@ describe("`a` opens the cross-provider list", () => {
expect(all).toContain("all models");
expect(all).toContain("glm-5.3-flash");
expect(all).toContain("kimi-k3");
- // ONE warm. And not a single roster request: no provider was opened.
+ // ONE warm. And not a single dynamic models catalog request: no provider was opened.
expect(source.calls.catalog).toBe(1);
expect(source.calls.discover).toEqual([]);
} finally {
@@ -1245,7 +1260,7 @@ describe("`a` opens the cross-provider list", () => {
const d = await draw(
<ModelPicker
source={fakeSource({
- roster,
+ providerList,
byProvider: {
openrouter: [model({ id: "gpt-6-astra" })],
"kimi-coding": [model({ id: "gpt-6-astra" })],
@@ -1272,7 +1287,7 @@ describe("`a` opens the cross-provider list", () => {
const d = await draw(
<ModelPicker
source={fakeSource({
- roster,
+ providerList,
ready: { openrouter: true, "kimi-coding": false },
byProvider: {
openrouter: [model({ id: "glm-5.3-flash" })],
@@ -1295,11 +1310,11 @@ describe("`a` opens the cross-provider list", () => {
}
});
- test("A ROSTER ALREADY OPENED IS MERGED IN — and one not opened costs no request", async () => {
+ test("A DYNAMIC MODELS CATALOG ALREADY OPENED IS MERGED IN — and one not opened costs no request", async () => {
// The `gemini` report — "why i search gemini i see only open router models, no
// models from antigravity and devin and subscriptions" — was first answered by
- // fetching every roster at startup, which the owner then rejected as
- // prefetching. This is the answer that survives both: a roster fetched because
+ // fetching every dynamic models catalog at startup, which the owner then rejected as
+ // prefetching. This is the answer that survives both: a dynamic models catalog fetched because
// he OPENED that provider improves this list for free, and a provider he never
// opened is simply not represented here.
const withDiscovery = [
@@ -1314,7 +1329,7 @@ describe("`a` opens the cross-provider list", () => {
}),
];
const source = fakeSource({
- roster: withDiscovery,
+ providerList: withDiscovery,
byProvider: {
openrouter: [model({ id: "gemini-3.8-flash" })],
// No catalog entries whatsoever — the real Antigravity's situation.
@@ -1349,7 +1364,7 @@ describe("`a` opens the cross-provider list", () => {
expect(all).toContain("gemini-3.8-flash-tiered");
expect(all).toContain("OpenRouter");
expect(all).toContain("Antigravity");
- // Exactly one roster request, and it was the one he opened.
+ // Exactly one dynamic models catalog request, and it was the one he opened.
expect(source.calls.discover).toEqual(["antigravity"]);
} finally {
d.destroy();
@@ -1372,7 +1387,7 @@ describe("a fallback list says it is a fallback — and that it may not work", (
"\n⚠ Kimi / Moonshot could not list its models: the API key was rejected (HTTP 401)\n",
" Check MOONSHOT_API_KEY (a value in your shell overrides stored credentials).\n",
" Get a key: https://platform.moonshot.cn/\n",
- " Showing Kimi / Moonshot's cloud-catalog entries below — not its live roster.\n\n",
+ " Showing Kimi / Moonshot's cloud-catalog entries below — not its live model list.\n\n",
],
fallbackRows: [model(), model({ id: "kimi-k2.6" })],
};
@@ -1400,13 +1415,13 @@ describe("a fallback list says it is a fallback — and that it may not work", (
const d = await scoped(failed);
try {
const all = joined(d.text);
- expect(all).toContain("live roster unavailable");
+ expect(all).toContain("live model list unavailable");
expect(all).toContain("catalog");
// The sentence WRAPS across two rows, so it is matched against the frame with
// its border glyphs and line breaks flattened away. A substring test over raw
// rows would fail on the wrap and say nothing about whether a reader can read
// it.
- expect(flat(d.text)).toContain("not Kimi / Moonshot's live roster");
+ expect(flat(d.text)).toContain("not Kimi / Moonshot's live model list");
} finally {
d.destroy();
}
@@ -1446,7 +1461,7 @@ describe("a fallback list says it is a fallback — and that it may not work", (
}
});
- test("a LIVE roster carries no mark — which is what makes the mark a signal", async () => {
+ test("a dynamic models catalog carries no mark — which is what makes the mark a signal", async () => {
const d = await scoped({
kind: "rows",
rows: [model()],
@@ -1472,15 +1487,19 @@ describe("a fallback list says it is a fallback — and that it may not work", (
}
});
- test("`empty-roster` renders in the NOTICE tier, without the error wash", async () => {
+ test("`empty-models-catalog` renders in the NOTICE tier, without the error wash", async () => {
// `captureCharFrame` is blind to this: the two tiers differ in COLOUR as well as in
// words, and the colour is the half a reader sees first.
const failedFrame = await scoped(failed);
const failedBgs = bgs(failedFrame.frame);
failedFrame.destroy();
const emptyFrame = await scoped({
- kind: "empty-roster",
- failure: { kind: "empty-models-catalog", provider: "kimi", endpoint: "https://api.test/v1/models" },
+ kind: "empty-models-catalog",
+ failure: {
+ kind: "empty-models-catalog",
+ provider: "kimi",
+ endpoint: "https://api.test/v1/models",
+ },
fallbackRows: [model()],
});
try {
@@ -1497,8 +1516,8 @@ describe("a fallback list says it is a fallback — and that it may not work", (
describe("the loading states", () => {
test("startup names the ONE thing it is doing, and claims no other", async () => {
- // The screen the owner rejected said `cloud catalog fetching…` and `live rosters
- // 0/11 providers` before he had asked for either. Startup now probes credentials
+ // The screen the owner rejected said `cloud catalog fetching…` beside a `0/11 providers`
+ // discovery meter, before he had asked for either. Startup now probes credentials
// and nothing else, and the screen says so.
const d = await draw(
<ModelPicker source={fakeSource({ hang: true })} onDone={() => {}} />,
@@ -1511,7 +1530,8 @@ describe("the loading states", () => {
expect(all).toContain("credentials");
expect(all).toContain("checking");
expect(all).not.toContain("cloud catalog");
- expect(all).not.toContain("live rosters");
+ // No per-provider discovery meter — the rejected `0/11 providers` fan-out.
+ expect(all).not.toMatch(/\d+\/\d+ providers/);
} finally {
d.destroy();
}
@@ -1523,8 +1543,8 @@ describe("the loading states", () => {
const d = await draw(
<ModelPicker
source={{
- ...fakeSource({ roster: [provider({ label: "Kimi / Moonshot" })] }),
- discoverRoster: () => new Promise<never>(() => {}),
+ ...fakeSource({ providerList: [provider({ label: "Kimi / Moonshot" })] }),
+ discoverModelsCatalog: () => new Promise<never>(() => {}),
}}
onDone={() => {}}
/>
diff --git a/packages/cli/src/picker/ModelPicker.tsx b/packages/cli/src/picker/ModelPicker.tsx
index 0df43720..9f3de53d 100644
--- a/packages/cli/src/picker/ModelPicker.tsx
+++ b/packages/cli/src/picker/ModelPicker.tsx
@@ -36,8 +36,8 @@
*
* THE DEFAULT SCREEN IS THE PROVIDER LIST, AND NOTHING IS FETCHED BEFORE IT. An
* intermediate build landed on a flat 574-row cross-provider list and warmed the
- * cloud catalog AND every credentialled provider's live roster to fill it — a
- * `cloud catalog fetching… / live rosters 0/11 providers` screen the user had to
+ * cloud catalog AND every credentialled provider's dynamic models catalog to fill it — a
+ * `cloud catalog fetching…` screen with a `0/11 providers` discovery meter that the user had to
* watch before he could do anything. The owner's three corrections, verbatim:
* *"why we prefetching? we should not, as we show on demand"*, *"we should not
* show the full list of models, we should show a list of providers by default and
@@ -45,13 +45,13 @@
* show unsetted providers, just active"*. So:
*
* · Startup does ONE thing: probe credentials, streaming each answer into the
- * provider list as it settles. No catalog, no roster, no description index.
- * · `⏎` on a provider fetches THAT provider's roster and shows it. The failure
+ * provider list as it settles. No catalog, no dynamic models catalog, no description index.
+ * · `⏎` on a provider fetches THAT provider's dynamic models catalog and shows it. The failure
* UX improves for free — a red panel now answers a request the user made.
* · `a` opens the cross-provider list, built from the ONE cached catalog fetch,
- * enriched by whatever rosters he has already opened and by nothing else.
+ * enriched by whatever dynamic models catalogs he has already opened and by nothing else.
*
- * NO AWAIT IS EVER SILENT, STRUCTURALLY RATHER THAN BY DILIGENCE. The roster is
+ * NO AWAIT IS EVER SILENT, STRUCTURALLY RATHER THAN BY DILIGENCE. The provider list is
* derived synchronously, so the first frame is complete before any effect runs;
* every loader is an effect; and every in-flight task draws an affordance whose
* SHAPE is chosen by what the caller can actually measure. Nothing invents a
@@ -107,7 +107,7 @@ import { ColumnHeader, HintRow, ModelRow, ProviderRow, priceVaries } from "./row
* WHICH AFFORDANCE EACH IN-FLIGHT TASK EARNS — the honesty contract, as one pure
* function so it can be asserted without a renderer.
*
- * The credential sweep is the only task with a real denominator: the roster is
+ * The credential sweep is the only task with a real denominator: the provider list is
* derived synchronously, so `done/total` is work done over work TOTAL. The GET half
* of discovery has a published DEADLINE and gets an elapsed-vs-deadline bar whose
* label says `deadline`, because a deadline is not progress. Everything else gets an
@@ -118,7 +118,7 @@ import { ColumnHeader, HintRow, ModelRow, ProviderRow, priceVaries } from "./row
* drawing a label for a phase that never runs is the same lie as an invented
* denominator.
*
- * AND THERE IS NO `live rosters` TASK ANY MORE. It had the most defensible meter in
+ * AND THERE IS NO PER-PROVIDER DISCOVERY TASK ANY MORE. It had the most defensible meter in
* the file — a real `done/total` over the providers about to be asked — and it was
* still wrong, because the work it measured was work nobody had asked for. A
* truthful bar for an unwanted fan-out is a truthful answer to the wrong question.
@@ -126,7 +126,7 @@ import { ColumnHeader, HintRow, ModelRow, ProviderRow, priceVaries } from "./row
export function buildLoadTasks(input: {
creds: { done: number; total: number } | null;
catalog: boolean;
- roster: { displayName: string; shape: DiscoveryShape; elapsed: number } | null;
+ modelsCatalog: { displayName: string; shape: DiscoveryShape; elapsed: number } | null;
}): LoadTask[] {
const tasks: LoadTask[] = [];
if (input.creds) {
@@ -139,18 +139,18 @@ export function buildLoadTasks(input: {
});
}
if (input.catalog) tasks.push({ id: "catalog", label: "cloud catalog", value: "fetching…" });
- if (input.roster) {
- const { displayName, shape, elapsed } = input.roster;
+ if (input.modelsCatalog) {
+ const { displayName, shape, elapsed } = input.modelsCatalog;
const secs = `${(elapsed / 1000).toFixed(1)}s`;
tasks.push(
shape === "deadline"
? {
- id: "roster",
+ id: "discovery",
label: displayName,
pct: Math.min(100, (100 * elapsed) / DISCOVERY_DEADLINE_MS),
value: `${secs} / ${(DISCOVERY_DEADLINE_MS / 1000).toFixed(1)}s deadline`,
}
- : { id: "roster", label: displayName, value: `discovering… ${secs}` }
+ : { id: "discovery", label: displayName, value: `discovering… ${secs}` }
);
}
return tasks;
@@ -209,7 +209,7 @@ export function ModelPicker({ source, onDone, onDiscoveryFailure }: ModelPickerP
/** `null` = the cross-provider list; a name = scoped to that provider. */
const [scope, setScope] = useState<string | null>(null);
- const scopedChoice = providers.roster.find((r) => r.value === scope) ?? null;
+ const scopedChoice = providers.providerList.find((r) => r.value === scope) ?? null;
const scopedName = scope === null ? "" : source.displayName(scope);
const hasDiscovery = scopedChoice?.hasDiscovery === true;
/**
@@ -224,14 +224,14 @@ export function ModelPicker({ source, onDone, onDiscoveryFailure }: ModelPickerP
hasDiscovery,
onDiscoveryFailure
);
- /** Rosters the user has already opened. No fetch — see `rowsFromOutcomes`. */
+ /** Dynamic models catalogs the user has already opened. No fetch — see `rowsFromOutcomes`. */
const liveRows = useMemo(() => rowsFromOutcomes(discovery.seen), [discovery.seen]);
/**
* THE CATALOG IS FETCHED FOR THE VIEWS THAT READ IT, AND FOR NO OTHER.
*
* The cross-provider list is built from it, and so is a provider that does not
- * list its own roster. A discovery provider needs nothing from it — its rows come
+ * list its own dynamic models catalog. A discovery provider needs nothing from it — its rows come
* from its own endpoint — unless discovery comes back `unsupported`, at which
* point the catalog IS the list and the warm starts then.
*/
@@ -240,7 +240,7 @@ export function ModelPicker({ source, onDone, onDiscoveryFailure }: ModelPickerP
(scope === null || !hasDiscovery || discovery.outcome?.kind === "unsupported");
const catalog = usePickerModels(
source,
- providers.roster,
+ providers.providerList,
providers.readySet,
liveRows,
wantCatalog
@@ -285,7 +285,7 @@ export function ModelPicker({ source, onDone, onDiscoveryFailure }: ModelPickerP
* not show number of models for some of them"*.
*
* Two sources, both already in hand and neither of them a fetch this map causes.
- * A roster the user opened is the truest answer for that provider, so it wins;
+ * A dynamic models catalog the user opened is the truest answer for that provider, so it wins;
* the catalog answers for the rest, but ONLY once the user has asked for a view
* that warmed it. A provider in neither set gets `null`, which `ProviderRow`
* prints as nothing at all.
@@ -306,21 +306,21 @@ export function ModelPicker({ source, onDone, onDiscoveryFailure }: ModelPickerP
// banner's provenance sentence — so they cannot disagree with each other.
//
// The UNSCOPED list is catalog-derived too, and is deliberately NOT marked. A
- // mark means "the live roster was asked for and could not be had"; nothing asked
- // for a live roster here, so marking every row would spend the loudest signal in
+ // mark means "the dynamic models catalog was asked for and could not be had"; nothing asked
+ // for a dynamic models catalog here, so marking every row would spend the loudest signal in
// the feature on the ordinary case and teach the reader to ignore it.
// ONE ROW PER MODEL INSIDE A PROVIDER, N ROWS ACROSS PROVIDERS. The owner stated
// the rule: *"if model has more than one provider that going to be two lines in
// 'all models' list. and if we enter to provider catalog, not all models — then
// the model will be just one"*. The flat list's identity is `(provider, modelId)`
// and `usePickerModels` applies it; every scoped branch below goes through
- // `dedupeByModelId`, so a live roster overlapping the catalog for the SAME
+ // `dedupeByModelId`, so a dynamic models catalog overlapping the catalog for the SAME
// provider cannot show the same model twice.
const list = useMemo((): { rows: RowView[]; fallback: boolean; loading: boolean } => {
if (scope === null) {
return { rows: catalog.rows, fallback: false, loading: catalog.phase !== "ready" };
}
- // A DISCOVERED ROSTER AND A CATALOG LIST GO THROUGH THE SAME ROW BUILDER, so a
+ // A DYNAMIC MODELS CATALOG AND A CATALOG LIST GO THROUGH THE SAME ROW BUILDER, so a
// fallback list cannot be distinguishable by accident — a different price
// string or a different spec spelling — instead of by the three deliberate
// provenance encodings.
@@ -337,26 +337,26 @@ export function ModelPicker({ source, onDone, onDiscoveryFailure }: ModelPickerP
/**
* The provider cell for every provider on screen — collision-proof by
- * construction, and computed from the ROSTER rather than from the rows so the
- * column does not change width as rosters merge in behind the cursor.
+ * construction, and computed from the PROVIDER LIST rather than from the rows so the
+ * column does not change width as dynamic models catalogs merge in behind the cursor.
*/
// The column budget depends only on the TERMINAL, never on the banner — a
// banner takes rows, not columns — so it is derived from a base layout here and
// stays put while a notice appears and disappears above the list.
const providerCells = providerCellsFor(deriveDialogLayout(width, height).inner, list.fallback);
const column = useMemo(
- () => providerColumn(providers.roster, truncate, providerCells),
- [providers.roster, providerCells]
+ () => providerColumn(providers.providerList, truncate, providerCells),
+ [providers.providerList, providerCells]
);
/** Provider → its WHOLE display name, for the filter and the detail line. */
const labels = useMemo(
- () => new Map(providers.roster.map((r) => [r.value, r.label])),
- [providers.roster]
+ () => new Map(providers.providerList.map((r) => [r.value, r.label])),
+ [providers.providerList]
);
/** Provider → what it IS: how it bills, and the credential it wants. */
const facts = useMemo(
- () => new Map<string, ProviderFacts>(providers.roster.map((r) => [r.value, factsOf(r)])),
- [providers.roster]
+ () => new Map<string, ProviderFacts>(providers.providerList.map((r) => [r.value, factsOf(r)])),
+ [providers.providerList]
);
const shown = useMemo(() => {
@@ -386,7 +386,7 @@ export function ModelPicker({ source, onDone, onDiscoveryFailure }: ModelPickerP
const tasks = buildLoadTasks({
creds: providers.probing ? { done: providers.done, total: providers.total } : null,
catalog: catalog.phase === "loading",
- roster:
+ modelsCatalog:
discovery.busy && scope !== null
? {
displayName: scopedName,
@@ -438,7 +438,7 @@ export function ModelPicker({ source, onDone, onDiscoveryFailure }: ModelPickerP
});
// The cursor can outlive the list it indexed — a filter keystroke, or a scope
- // whose roster came back shorter than the last one's.
+ // whose dynamic models catalog came back shorter than the last one's.
useEffect(() => {
setCursor((c) => Math.max(0, Math.min(c, Math.max(0, shown.length - 1))));
}, [shown.length]);
@@ -533,7 +533,7 @@ export function ModelPicker({ source, onDone, onDiscoveryFailure }: ModelPickerP
return;
}
if (name === "return" || name === "enter") {
- // ENTERING A PROVIDER IS WHAT FETCHES ITS ROSTER. Nothing before this
+ // ENTERING A PROVIDER IS WHAT FETCHES ITS DYNAMIC MODELS CATALOG. Nothing before this
// keystroke asked that endpoint anything.
const chosen = providerRows[providerCursor];
if (chosen) {
@@ -796,7 +796,7 @@ export function ModelPicker({ source, onDone, onDiscoveryFailure }: ModelPickerP
one counted summary, and it costs no rows at all when nothing is hidden.
At 80×24 those two rows were 2 of the 13 the dialog has. */}
{/* THE ONE METER IN THE PICKER, on the one screen that waits for anything.
- It is `done/total` over a roster derived synchronously — real progress
+ It is `done/total` over a provider list derived synchronously — real progress
over countable work — and it disappears, leaving its row, when the last
probe settles. */}
{settled ? (
@@ -966,7 +966,7 @@ export function ModelPicker({ source, onDone, onDiscoveryFailure }: ModelPickerP
price={r.price}
layout={rowLayout}
cursor={top + i === cursor}
- origin={list.fallback ? "catalog" : "roster"}
+ origin={list.fallback ? "catalog" : "discovered"}
chip={chipPrices}
/>
))
@@ -976,7 +976,7 @@ export function ModelPicker({ source, onDone, onDiscoveryFailure }: ModelPickerP
{/* ONE status row, ALWAYS rendered — see `CHROME_ROWS`. It carries the
scroll position when the list overflows, then whatever is still in
flight, then nothing. There is no aggregate failure line any more:
- with the fan-out gone, the only roster that can fail is one the user
+ with the fan-out gone, the only dynamic models catalog that can fail is one the user
opened, and that one gets the banner above this list. */}
<HintRow
text={statusRow(cursor, shown.length, window.length, tasks)}
@@ -1092,7 +1092,7 @@ export function descriptionOf(
*
* Exported so the title's arithmetic can be asserted: `N models · M routes` is
* only honest if the two numbers are computed differently, and a regression that
- * made them equal would be invisible on a screenshot of a roster where no model
+ * made them equal would be invisible on a screenshot of a dynamic models catalog where no model
* happens to be served twice.
*/
export function countModels(rows: readonly { model: ModelInfo }[]): number {
@@ -1126,7 +1126,7 @@ export function unavailableNote(
return provider.envVar === "" ? "needs sign-in" : `needs ${provider.envVar}`;
}
-/** A roster entry as the facts the detail line prints. Derived, never a table. */
+/** A provider-list entry as the facts the detail line prints. Derived, never a table. */
function factsOf(choice: PickerProviderChoice): ProviderFacts {
return {
label: choice.label,
@@ -1144,10 +1144,10 @@ const MAX_BANNER_ROWS = 5;
* longer than the window, then what is still loading, then nothing.
*
* IT NO LONGER CARRIES AN AGGREGATE FAILURE COUNT, because there is no longer an
- * aggregate. That line existed for the startup fan-out — thirteen rosters in
+ * aggregate. That line existed for the startup fan-out — thirteen dynamic models catalogs in
* flight at once, where a banner per failure would have pushed the list off the
- * screen and a banner for the first would have spoken for the rest. With rosters
- * fetched one at a time, on request, the only roster that can fail is the one the
+ * screen and a banner for the first would have spoken for the rest. With dynamic models catalogs
+ * fetched one at a time, on request, the only dynamic models catalog that can fail is the one the
* user just opened, and it gets the full banner above its own list.
*
* Pure so the priority can be asserted. The scroll position wins over the pending
diff --git a/packages/cli/src/picker/PickerDataSource.ts b/packages/cli/src/picker/PickerDataSource.ts
index 6ed7cf33..39654d53 100644
--- a/packages/cli/src/picker/PickerDataSource.ts
+++ b/packages/cli/src/picker/PickerDataSource.ts
@@ -7,7 +7,7 @@
* OTHERWISE. The whole feature is about what the picker shows when discovery
* FAILS, serves nothing, or is still in flight — and of those, only "unauthorized"
* is reproducible against a live provider (a bogus key, a real 401). An empty
- * roster, a roster where nothing is chat-capable, a network timeout and the
+ * dynamic models catalog, a dynamic models catalog where nothing is chat-capable, a network timeout and the
* in-flight frames themselves are not reachable from outside, and the warm catalog
* path settles faster than a screenshot can catch. So the loaders are a parameter,
* a scriptable fake drives the capture runs, and the production impl is the
@@ -19,7 +19,7 @@
*
* EVERY MEMBER'S SYNC/ASYNC SHAPE IS PART OF THE CONTRACT.
*
- * · `providerRoster`, `displayName`, `notEnabledLocalProviders`,
+ * · `providerList`, `displayName`, `notEnabledLocalProviders`,
* `discoveryShape` are SYNCHRONOUS because the first frame must be complete
* before any await, and because the in-flight indicator's SHAPE has to be
* chosen before the fetch it describes begins.
@@ -56,7 +56,7 @@ import { getAllProviders, getProviderByName } from "../providers/provider-defini
export type BillingMode = "sub" | "local" | "metered";
/**
- * Which in-flight indicator a roster discovery earns (§4.3), decided
+ * Which in-flight indicator discovering one provider's models earns (§4.3), decided
* synchronously from the provider's discovery format.
*
* `deadline` is the GET half, the only path that sees `FETCH_TIMEOUT_MS` — so an
@@ -84,14 +84,14 @@ export interface PickerProviderChoice {
billing: BillingMode;
/** The env var to name in a credential notice. Empty for OAuth-only providers. */
envVar: string;
- /** Does this provider list its own live roster? Decides whether `p` runs discovery. */
+ /** Does this provider list its own dynamic models catalog? Decides whether `p` runs discovery. */
hasDiscovery: boolean;
discoveryShape: DiscoveryShape;
}
export interface PickerDataSource {
/** Sync, so frame one is never blank: derived from the provider definitions. */
- providerRoster(): PickerProviderChoice[];
+ providerList(): PickerProviderChoice[];
/** Built-in local providers present in the catalog but not enabled in config. */
notEnabledLocalProviders(): string[];
/** The provider's editorial display name, for dialog titles and notices. */
@@ -103,7 +103,7 @@ export interface PickerDataSource {
/** What this provider SERVES, from the local served-by index. Sync. */
servedModels(provider: string): ModelInfo[];
/** One settled outcome per discovery provider, `fallbackRows` included. */
- discoverRoster(provider: string): Promise<PickerDiscoveryOutcome>;
+ discoverModelsCatalog(provider: string): Promise<PickerDiscoveryOutcome>;
/**
* One editorial sentence per model, for the detail pane. Resolves late and is
* never awaited before a first paint; the slim catalog carries no description.
@@ -175,12 +175,12 @@ export function createPickerDataSource(): PickerDataSource {
const catalog = createCatalogClient();
// Resolved once per open. `buildProviderChoices()` is pure and derived — never a
// membership table (`routing.md:139`) — so calling it twice would be free but
- // would also let the roster and the notices disagree about ordering.
+ // would also let the dynamic models catalog and the notices disagree about ordering.
const choices = buildProviderChoices().filter((c) => c.value !== "skip" && c.value !== "custom");
const names = new Map(choices.map((c) => [c.value, c.name]));
return {
- providerRoster(): PickerProviderChoice[] {
+ providerList(): PickerProviderChoice[] {
return choices.map((c) => ({
value: c.value,
label: c.name,
@@ -228,7 +228,7 @@ export function createPickerDataSource(): PickerDataSource {
return servedModelsForProvider(provider, catalog);
},
- discoverRoster(provider: string): Promise<PickerDiscoveryOutcome> {
+ discoverModelsCatalog(provider: string): Promise<PickerDiscoveryOutcome> {
return buildDiscoveredModelOutcome(provider, names.get(provider) ?? provider, catalog);
},
diff --git a/packages/cli/src/picker/chrome.tsx b/packages/cli/src/picker/chrome.tsx
index 29beb74e..23c4eed9 100644
--- a/packages/cli/src/picker/chrome.tsx
+++ b/packages/cli/src/picker/chrome.tsx
@@ -276,13 +276,13 @@ export interface LoadTask {
* THE SHAPE OF EACH ROW IS THE HONESTY CONTRACT, and it is chosen by what the
* caller can measure, not by what looks busiest:
*
- * · The credential sweep has a real denominator — the roster is derived
+ * · The credential sweep has a real denominator — the provider list is derived
* synchronously, so `done/total` is work done over work TOTAL. It gets the
* one determinate meter in the whole picker, and it EARNS it: a bounded value
* with real variance over time is the one thing a gradient bar is for.
* · The catalog warm races a 5 s wait against an 8 s refresh. Two numbers, so no
* single denominator a bar could honestly be drawn against — shimmer.
- * · A roster discovery gets a deadline bar ONLY on the GET half, whose
+ * · Discovering one provider's models gets a deadline bar ONLY on the GET half, whose
* `FETCH_TIMEOUT_MS` is published, and the label says `deadline` because a
* deadline is not progress. The three fetcher providers publish nothing, so
* they get elapsed and a shimmer. Inventing 5 000 ms for Devin would be a
diff --git a/packages/cli/src/picker/detail.tsx b/packages/cli/src/picker/detail.tsx
index 5cda0b52..5d9e659f 100644
--- a/packages/cli/src/picker/detail.tsx
+++ b/packages/cli/src/picker/detail.tsx
@@ -53,7 +53,7 @@
* are affordances, not prose.
*
* CAPABILITIES ARE EXCEPTION-ONLY AND THEY LIVE HERE, NOT ON EVERY ROW. The
- * previous build printed `[TRV]` on all 21 rows of a roster where every model had
+ * previous build printed `[TRV]` on all 21 rows of a dynamic models catalog where every model had
* all three — a column with no variance, in the place a reader is scanning names.
* On the selected row they are worth three words; on forty rows they are noise.
*/
diff --git a/packages/cli/src/picker/fixtures/fixture-source.ts b/packages/cli/src/picker/fixtures/fixture-source.ts
index ca4a1da6..5ab8b5d5 100644
--- a/packages/cli/src/picker/fixtures/fixture-source.ts
+++ b/packages/cli/src/picker/fixtures/fixture-source.ts
@@ -7,11 +7,11 @@
* never walks into this directory and the shipped binary carries no fixture data.
*
* IT WRAPS THE PRODUCTION SOURCE AND OVERRIDES ONLY THE SHAPE OF AN ANSWER — never
- * the data. The roster is still derived from the provider definitions, every model row
+ * the data. The provider list is still derived from the provider definitions, every model row
* is still the real catalog's, every price and context window is still whatever the
- * backend says. What a scenario forges is the OUTCOME VARIANT (an empty roster, a
- * timeout, a roster where nothing is chat-capable), the readiness answers, and
- * latency. That keeps the "never hardcode rosters, context windows or pricing" rule
+ * backend says. What a scenario forges is the OUTCOME VARIANT (an empty dynamic models catalog, a
+ * timeout, a dynamic models catalog where nothing is chat-capable), the readiness answers, and
+ * latency. That keeps the "never hardcode a provider's models, context windows or pricing" rule
* intact inside a capture harness, which matters because a screenshot of invented
* prices proves nothing about the layout of real ones.
*
@@ -20,8 +20,8 @@
*
* · `loading` the credential sweep held mid-`done/total` — the landing screen's
* only in-flight state, and on a real machine it is over in a second.
- * · `discovering` credentials settle normally and the ROSTER never comes back.
- * This is the per-provider wait, which exists only because a roster
+ * · `discovering` credentials settle normally and the DYNAMIC MODELS CATALOG never comes back.
+ * This is the per-provider wait, which exists only because a dynamic models catalog
* is now fetched when the user OPENS that provider.
* · `empty` a provider that answers correctly with nothing chat-capable.
* · `filtered` a provider that serves only embeddings or wildcard routes.
@@ -68,14 +68,14 @@ export function createFixtureDataSource(name: string): PickerDataSource {
const real = createPickerDataSource();
const forced = FORCED_OUTCOME.has(scenario);
// `loading` claims discovery too — not to forge an outcome (it has none; it never
- // settles) but so that a scoped provider exercises the ROSTER indicator, whose
+ // settles) but so that a scoped provider exercises the DYNAMIC MODELS CATALOG indicator, whose
// deadline shape is otherwise unreachable in a capture.
const claimsDiscovery = forced || scenario === "loading" || scenario === "discovering";
return {
- providerRoster(): PickerProviderChoice[] {
+ providerList(): PickerProviderChoice[] {
return real
- .providerRoster()
+ .providerList()
.map((r) =>
claimsDiscovery ? { ...r, hasDiscovery: true, discoveryShape: "deadline" as const } : r
);
@@ -87,7 +87,7 @@ export function createFixtureDataSource(name: string): PickerDataSource {
async *probeCredentials(names: string[]): AsyncIterable<[string, boolean]> {
// EVERY PROVIDER READY, and that is a forgery with a purpose: a capture runs with
// credential sources disabled so it cannot raise a 1Password or Keychain prompt on
- // the user's desktop, which leaves the real roster three rows long and says nothing
+ // the user's desktop, which leaves the real provider list three rows long and says nothing
// about how the list looks for a configured user.
for (const n of names) {
if (scenario === "loading") await sleep(600);
@@ -110,23 +110,23 @@ export function createFixtureDataSource(name: string): PickerDataSource {
return scenario === "loading" ? NEVER : real.descriptions();
},
- async discoverRoster(provider: string): Promise<PickerDiscoveryOutcome> {
+ async discoverModelsCatalog(provider: string): Promise<PickerDiscoveryOutcome> {
// `discovering` is the whole point of that scenario: the credential sweep
- // finishes, the provider list is on screen and usable, and the roster the
+ // finishes, the provider list is on screen and usable, and the dynamic models catalog the
// user just asked for never lands. It is the only way to photograph the
// per-provider wait, which against a real provider is over in a second.
if (scenario === "loading" || scenario === "discovering") return NEVER;
- if (!forced) return real.discoverRoster(provider);
+ if (!forced) return real.discoverModelsCatalog(provider);
// The fallback list is the REAL vendor catalog for this provider, because the
// defect being rendered is precisely that an unmarked fallback list reads as a
- // healthy short roster — and that only shows on real rows.
+ // healthy short dynamic models catalog — and that only shows on real rows.
const fallbackRows = real.servedModels(provider);
const displayName = real.displayName(provider);
if (scenario === "empty") {
return {
- kind: "empty-roster",
+ kind: "empty-models-catalog",
failure: {
kind: "empty-models-catalog",
provider,
@@ -155,7 +155,7 @@ export function createFixtureDataSource(name: string): PickerDataSource {
notice: [
`\n⚠ ${displayName} could not list its models: the model list was unreachable at https://api.example.test/v1/models — The operation was aborted due to timeout\n`,
fallbackRows.length > 0
- ? ` Showing ${displayName}'s cloud-catalog entries below — not its live roster.\n\n`
+ ? ` Showing ${displayName}'s cloud-catalog entries below — not its live model list.\n\n`
: " Falling back to manual model entry.\n\n",
],
fallbackRows,
@@ -176,7 +176,7 @@ export function createFixtureDataSource(name: string): PickerDataSource {
" Check EXAMPLE_API_KEY (a value in your shell overrides stored credentials).\n",
" Get a key: https://platform.example.test/keys\n",
fallbackRows.length > 0
- ? ` Showing ${displayName}'s cloud-catalog entries below — not its live roster.\n\n`
+ ? ` Showing ${displayName}'s cloud-catalog entries below — not its live model list.\n\n`
: " Falling back to manual model entry.\n\n",
],
fallbackRows,
diff --git a/packages/cli/src/picker/hooks/usePickerModels.ts b/packages/cli/src/picker/hooks/usePickerModels.ts
index 9c3748ff..403554f0 100644
--- a/packages/cli/src/picker/hooks/usePickerModels.ts
+++ b/packages/cli/src/picker/hooks/usePickerModels.ts
@@ -72,7 +72,7 @@ export interface PickerModelsState {
*
* EXPORTED BECAUSE THERE ARE TWO LISTS AND THEY MUST NOT DIFFER. The flat list is
* built from the served-by index; a scoped list may instead be a live discovery
- * roster or its catalog fallback. If those paths built rows differently, a fallback
+ * dynamic models catalog or its catalog fallback. If those paths built rows differently, a fallback
* list would be distinguishable by ACCIDENT — a different price string, a different
* spec spelling — rather than by the three deliberate provenance encodings, and a
* reader would learn to read the accident instead of the mark.
@@ -92,13 +92,13 @@ export function toPickerRow(choice: PickerProviderChoice, model: ModelInfo): Pic
export function usePickerModels(
source: PickerDataSource,
- roster: PickerProviderChoice[],
+ providerList: PickerProviderChoice[],
/** Providers whose credential probe came back true. */
ready: ReadonlySet<string>,
/**
- * LIVE roster rows for the providers the user has already OPENED this session
+ * dynamic models catalog rows for the providers the user has already OPENED this session
* (`rowsFromOutcomes`). Empty until he opens one, and that is the design: a
- * roster is fetched because he asked for that provider, and once it is in hand
+ * dynamic models catalog is fetched because he asked for that provider, and once it is in hand
* it costs nothing to let it improve the cross-provider list too.
*/
liveRows: ReadonlyMap<string, ModelInfo[]> = EMPTY_LIVE,
@@ -148,20 +148,20 @@ export function usePickerModels(
if (phase !== "ready") return { rows: [], counts: new Map(), phase };
const counts = new Map<string, number>();
const rows: PickerRow[] = [];
- for (const choice of roster) {
+ for (const choice of providerList) {
let cached = cache.current.get(choice.value);
if (cached === undefined) {
cached = source.servedModels(choice.value).map((m) => toPickerRow(choice, m));
cache.current.set(choice.value, cached);
}
- // THE LIVE ROSTER WINS AND THE CATALOG ROWS STAY, deduped by
+ // THE DYNAMIC MODELS CATALOG WINS AND THE CATALOG ROWS STAY, deduped by
// `(provider, modelId)`.
//
// The same model id under two DIFFERENT providers is two rows on purpose —
// that is the whole value of a cross-provider list, and the reason
// `gpt-6-astra` is worth seeing at $30.00 on `or@` beside `SUB` on `cx@`.
// This loop is per provider, so the dedupe below can only ever collapse the
- // OVERLAP between one provider's live roster and its catalog entries. The
+ // OVERLAP between one provider's dynamic models catalog and its catalog entries. The
// live entry wins because it is what this account can actually call: the
// endpoint answered for THESE credentials, where the catalog answers for
// everyone.
@@ -181,10 +181,10 @@ export function usePickerModels(
rows.sort((a, b) => compareByReleaseDateDesc(a.model, b.model));
return { rows, counts, phase };
// biome-ignore lint/correctness/useExhaustiveDependencies: `signature` is the stable projection of `ready`; depending on the Set itself rebuilds every frame
- }, [source, roster, phase, signature, ready, liveRows]);
+ }, [source, providerList, phase, signature, ready, liveRows]);
}
-/** No live rosters yet — a shared empty map, so the memo's identity is stable. */
+/** No dynamic models catalogs yet — a shared empty map, so the memo's identity is stable. */
const EMPTY_LIVE: ReadonlyMap<string, ModelInfo[]> = new Map();
/**
diff --git a/packages/cli/src/picker/hooks/usePickerProviders.ts b/packages/cli/src/picker/hooks/usePickerProviders.ts
index 937dc73f..7947daa3 100644
--- a/packages/cli/src/picker/hooks/usePickerProviders.ts
+++ b/packages/cli/src/picker/hooks/usePickerProviders.ts
@@ -1,9 +1,9 @@
/**
- * usePickerProviders — the provider roster, and the credential probe that fills it
+ * usePickerProviders — the provider list, and the credential probe that fills it
* in.
*
* `done/total` FROM THIS HOOK IS THE ONE DETERMINATE BAR IN THE PICKER, and it
- * earns the bar because both numbers are real: the roster is derived
+ * earns the bar because both numbers are real: the provider list is derived
* synchronously from the provider definitions, so `total` is known before the
* first probe starts, and `done` is work actually completed. Nothing else the
* picker waits on has a denominator, and nothing else gets a meter.
@@ -15,7 +15,7 @@
*
* MEMBERSHIP IN THE STEADY STATE IS IDENTICAL TO TODAY'S. The old picker filtered
* unready providers out entirely (`getProviderChoices`), which made the first
- * frame wait for every probe. This mounts the UNFILTERED roster: a provider with
+ * frame wait for every probe. This mounts the UNFILTERED provider list: a provider with
* no credential contributes no MODEL rows (they would fail later at
* `validateApiKeysForModels`, after the picker has closed) but it keeps its place
* in the `p` dialog, with the env var it wants — so the absence is EXPLAINED
@@ -35,8 +35,8 @@ export interface ProviderState extends PickerProviderChoice {
}
export interface PickerProvidersState {
- /** The roster as handed over — stable identity, for downstream memos. */
- roster: PickerProviderChoice[];
+ /** The provider list as handed over — stable identity, for downstream memos. */
+ providerList: PickerProviderChoice[];
/** Every pickable provider, in picker order, readiness included. */
rows: ProviderState[];
/** Ready providers — the ones that contribute model rows. */
@@ -56,17 +56,17 @@ export interface PickerProvidersState {
}
export function usePickerProviders(source: PickerDataSource): PickerProvidersState {
- // The roster is resolved ONCE. `providerRoster()` is pure and derived, so calling
+ // The provider list is resolved ONCE. `providerList()` is pure and derived, so calling
// it per render would be correct and still wrong: the rows would be new objects
// every frame and every memo downstream would miss.
- const roster = useMemo(() => source.providerRoster(), [source]);
+ const providerList = useMemo(() => source.providerList(), [source]);
const notEnabledLocal = useMemo(() => source.notEnabledLocalProviders(), [source]);
const [readiness, setReadiness] = useState<Record<string, boolean>>({});
useEffect(() => {
let live = true;
void (async () => {
- for await (const [name, ok] of source.probeCredentials(roster.map((r) => r.value))) {
+ for await (const [name, ok] of source.probeCredentials(providerList.map((r) => r.value))) {
if (!live) return;
// One `setState` per settled probe, deliberately: ~30 of them over a second
// or two is nowhere near the frame rate at which the mutable-store-plus-poll
@@ -81,9 +81,9 @@ export function usePickerProviders(source: PickerDataSource): PickerProvidersSta
// `isAvailable` has no side effect worth draining.
live = false;
};
- }, [source, roster]);
+ }, [source, providerList]);
- const rows: ProviderState[] = roster.map((r) => {
+ const rows: ProviderState[] = providerList.map((r) => {
const settled = readiness[r.value];
return { ...r, readiness: settled === undefined ? "pending" : settled ? "ready" : "missing" };
});
@@ -92,14 +92,14 @@ export function usePickerProviders(source: PickerDataSource): PickerProvidersSta
const readyRows = rows.filter((r) => r.readiness === "ready");
return {
- roster,
+ providerList,
rows,
ready: readyRows,
readySet: new Set(readyRows.map((r) => r.value)),
missing: rows.filter((r) => r.readiness === "missing"),
done,
- total: roster.length,
- probing: done < roster.length,
+ total: providerList.length,
+ probing: done < providerList.length,
notEnabledLocal,
};
}
diff --git a/packages/cli/src/picker/hooks/useProviderDiscovery.ts b/packages/cli/src/picker/hooks/useProviderDiscovery.ts
index f5eddef9..25637250 100644
--- a/packages/cli/src/picker/hooks/useProviderDiscovery.ts
+++ b/packages/cli/src/picker/hooks/useProviderDiscovery.ts
@@ -2,7 +2,7 @@
* useProviderDiscovery — one settled outcome per discovery provider, and the elapsed
* clock the in-flight indicator is drawn from.
*
- * NO REJECTION BRANCH, BY CONTRACT. `discoverProviderRoster` never rejects — every
+ * NO REJECTION BRANCH, BY CONTRACT. `discoverProviderModelsCatalog` never rejects — every
* throw inside it is mapped to `failed{kind:"unreachable"}` — and
* `buildDiscoveredModelOutcome` inherits that guarantee through `Promise.allSettled`.
* That contract is what lets this hook be small; it is also pinned by a unit test
@@ -72,7 +72,7 @@ export function useProviderDiscovery(
(name: string): void => {
const cache = inflight.current;
if (cache.has(name)) return;
- const request = source.discoverRoster(name);
+ const request = source.discoverModelsCatalog(name);
cache.set(name, request);
setStarted((prev) => (prev[name] === undefined ? { ...prev, [name]: Date.now() } : prev));
void request.then(
@@ -134,11 +134,11 @@ export function useProviderDiscovery(
}
/**
- * The rosters ALREADY IN HAND, as the cross-provider list wants them.
+ * The dynamic models catalogs ALREADY IN HAND, as the cross-provider list wants them.
*
- * THIS IS WHAT REPLACED THE STARTUP FAN-OUT. An earlier build fired one roster
+ * THIS IS WHAT REPLACED THE STARTUP FAN-OUT. An earlier build fired one dynamic models catalog
* request per credentialled provider the moment the picker opened — thirteen
- * requests, a `live rosters 0/11 providers` meter, and the owner's verdict was
+ * requests, a `0/11 providers` discovery meter, and the owner's verdict was
* *"why we prefetching? we should not, as we show on demand"*. Every one of those
* requests is now made for a provider the user actually opened, by the hook above.
* This function spends no network at all: it re-reads the outcomes that are
@@ -147,7 +147,7 @@ export function useProviderDiscovery(
*
* ONLY `rows`. A failure's `fallbackRows` are the catalog's, which the flat list
* already holds under the same provider — merging them would double that
- * provider's rows and launder a fallback into a live roster at the same time.
+ * provider's rows and launder a fallback into a dynamic models catalog at the same time.
*/
export function rowsFromOutcomes(
seen: ReadonlyMap<string, PickerDiscoveryOutcome>
diff --git a/packages/cli/src/picker/layout.test.ts b/packages/cli/src/picker/layout.test.ts
index b2bb61a3..b38d6ef7 100644
--- a/packages/cli/src/picker/layout.test.ts
+++ b/packages/cli/src/picker/layout.test.ts
@@ -144,7 +144,7 @@ describe("deriveProviderRowLayout", () => {
});
test("the name is CAPPED at the longest name there is — the surplus goes right", () => {
- // `Grok Build (subscription)` is 25 cells, the longest in the roster, so a name
+ // `Grok Build (subscription)` is 25 cells, the longest in the provider list, so a name
// column wider than 26 is dead air between a provider and the shortcut that
// qualifies it. Past the cap the extra columns go to the right-aligned tail,
// which is where a count belongs.
diff --git a/packages/cli/src/picker/layout.ts b/packages/cli/src/picker/layout.ts
index 78480721..d34cb92c 100644
--- a/packages/cli/src/picker/layout.ts
+++ b/packages/cli/src/picker/layout.ts
@@ -28,7 +28,7 @@
* `OpenCode Zen Go` share a twelve-character prefix). `providerColumn` therefore
* derives the width from the names actually on screen and widens until every one
* of them is distinct; `MIN_PROVIDER_CELLS` is set from the whole 31-provider
- * roster, at which no pair collides.
+ * list, at which no pair collides.
*
* THE DIALOG IS CENTRED AND CONTENT-SIZED. It renders in `main-screen` mode, but
* `CliRendererConfig` at `@opentui/[email protected]` carries no `height` key — the
@@ -42,7 +42,7 @@
/**
* The provider name column, and the bound that makes it collision-proof.
*
- * MEASURED over the whole 31-provider roster: at 14 columns every display name
+ * MEASURED over all 31 providers: at 14 columns every display name
* truncates to a distinct string, and at 12 `OpenCode Zen` and `OpenCode Zen Go`
* collide. 14 is therefore the floor, not a taste. The cap keeps one long
* subscription name (`Grok Build (subscription)`, 25) from eating the model id.
@@ -188,7 +188,7 @@ export const GAPS = {
* THE INVARIANT IS UNIQUENESS, NOT WIDTH: no two providers may render the same
* string. The search starts at what the row can afford (`providerCellsFor`) and
* WIDENS until every truncated name is distinct — and if even the cap collides
- * (it does not for today's roster; a user's custom endpoints can make it), the
+ * (it does not for today's provider list; a user's custom endpoints can make it), the
* colliding names fall back to their routing shortcut, which is unique by
* construction because it is the shortest prefix that parses back to exactly one
* provider.
@@ -278,7 +278,7 @@ const PROVIDER_GLYPH_CELLS = 2;
/**
* `zengo@` AS A WORD, so 8 + 1 separator.
*
- * Longest shortcut in the roster is `mistral@` at 8 — `native-anthropic@` is longer
+ * Longest shortcut in the provider list is `mistral@` at 8 — `native-anthropic@` is longer
* and is not on this list, having no credential store. It was briefly 10, sized for
* a CHIP's `displayWidth(label) + 2` fill, and the chip is gone: 17 filled prefixes
* in a column fused into one grey band (`rows.tsx` header). Text needs only its own
@@ -302,7 +302,7 @@ const PROVIDER_BILLING_CELLS = 7;
/**
* 25, DOWN FROM 26 — and the header's claim above needs the correction it implies.
*
- * "Sized for the env var" was already aspirational: MEASURED over the roster, the
+ * "Sized for the env var" was already aspirational: MEASURED over the provider list, the
* longest is `needs SAKANA_SUBSCRIPTION_API_KEY` at 33 cells, so 26 truncated it too.
* What 25 buys is the one cell the billing chip's fill needs without touching the
* NAME, which at 80 columns sits exactly on its 26-cell cap — and `needs
@@ -315,7 +315,7 @@ const MIN_PROVIDER_NAME_CELLS = 6;
/**
* The widest a provider NAME column is ever drawn, whatever the terminal gives it.
*
- * MEASURED over the whole roster: `Grok Build (subscription)` is 25 cells and
+ * MEASURED over the whole provider list: `Grok Build (subscription)` is 25 cells and
* nothing is longer, so 26 fits every name whole. Past that the cell is dead air,
* and at 92 columns it was 46 — twenty blank cells between `OpenRouter` and the
* `or@` that qualifies it, which reads as two unrelated columns rather than one
diff --git a/packages/cli/src/picker/model-picker-run.tsx b/packages/cli/src/picker/model-picker-run.tsx
index 27ab0814..a73cd87a 100644
--- a/packages/cli/src/picker/model-picker-run.tsx
+++ b/packages/cli/src/picker/model-picker-run.tsx
@@ -70,7 +70,7 @@ export interface ModelPickerOutcome {
*
* DEV-ONLY, AND REACHED BY DYNAMIC IMPORT BEHIND THE ENV CHECK, so
* `bun build --compile` never walks into `picker/fixtures/` and the shipped binary
- * carries no fixture data. The states it forces — a timeout, an empty roster, a roster
+ * carries no fixture data. The states it forces — a timeout, an empty dynamic models catalog, a dynamic models catalog
* where nothing is chat-capable, and the in-flight frames themselves — are not
* reachable against a live provider, and they are the states this feature exists to
* render. A capture of the happy path alone would validate nothing.
@@ -87,10 +87,10 @@ export async function runModelPicker(
): Promise<ModelPickerOutcome> {
// Before the first render, exactly as `tui/index.tsx:38` does it: the rail is built
// from `getAllProviders()`, so a custom or predefined endpoint must already be in the
- // roster or it is simply not there to pick. Re-entry calls this again — idempotent by
+ // provider list or it is simply not there to pick. Re-entry calls this again — idempotent by
// design. It is synchronous, and it runs before `createCliRenderer`, so it costs no
// frame. (`claudish profile edit` reaches `selectModel` WITHOUT passing through
- // `index.ts:590`, so without this line that path enumerates an unregistered roster.)
+ // `index.ts:590`, so without this line that path enumerates a provider list missing them.)
ensureEndpointsRegistered();
const source = await resolveDataSource();
diff --git a/packages/cli/src/picker/row-semantics.test.ts b/packages/cli/src/picker/row-semantics.test.ts
index 2177e72b..8a7bbe9a 100644
--- a/packages/cli/src/picker/row-semantics.test.ts
+++ b/packages/cli/src/picker/row-semantics.test.ts
@@ -187,17 +187,22 @@ describe("providerCountText — the tail says what you GET, never how it is fetc
expect(providerCountText({ count: null, hasDiscovery: true, billing: "sub" })).toBe("");
});
- test("`asks its own roster` is gone — a subscription provider says `subscription models`", () => {
- // The owner read the shipped row on a live run: `asks its own roster` describes
+ test("the rejected fetch-describing copy is gone — a subscription provider says `subscription models`", () => {
+ // The owner read the shipped row on a live run: the old copy described
// claudish's fetch, not the user's plan. His replacement, verbatim: *"subscription
// models"*. This is the case he was looking at — Grok Build, Devin, Antigravity,
- // OpenCode Zen Go: flat-rate, no catalog entries, a roster of their own.
+ // OpenCode Zen Go: flat-rate, no catalog entries, a dynamic models catalog of their own.
expect(providerCountText({ count: 0, hasDiscovery: true, billing: "sub" })).toBe(
"subscription models"
);
- for (const billing of ["sub", "metered", "local"] as const) {
- expect(providerCountText({ count: 0, hasDiscovery: true, billing })).not.toContain("roster");
- }
+ // Exact copy for the other two billing kinds too. Stronger than asserting the
+ // old wording is absent, which any OTHER wrong wording would also pass.
+ expect(providerCountText({ count: 0, hasDiscovery: true, billing: "metered" })).toBe(
+ "lists its own models"
+ );
+ expect(providerCountText({ count: 0, hasDiscovery: true, billing: "local" })).toBe(
+ "lists its own models"
+ );
});
test("and a NON-subscription provider gets its own words, because the other would be false", () => {
@@ -244,7 +249,7 @@ describe("providerCountText — the tail says what you GET, never how it is fetc
describe("priceVaries — which view earns chips", () => {
test("a flat-rate or local provider FIXES the column, so it gets no chips", () => {
// `resolveProviderDisplayPrice` answers `SUB` for every row of a subscription
- // roster. 49 identical fills stacked with no gap between rows is the failure the
+ // dynamic models catalog. 49 identical fills stacked with no gap between rows is the failure the
// skill MEASURED — chips fusing into one solid rectangle with the labels
// floating in it — and no amount of correct padding prevents it, because the
// padding is not what makes them identical.
@@ -457,7 +462,7 @@ describe("row identity depends on the VIEW", () => {
});
test("ALL MODELS: the same model TWICE under ONE provider is still one row", () => {
- // A provider's live roster and its catalog entries overlap, and that overlap
+ // A provider's dynamic models catalog and its catalog entries overlap, and that overlap
// is not two routes — it is one route described twice.
const kept = dedupeByProviderModel([
row("kimi", "kimi-k3", "kimi@kimi-k3"),
@@ -467,7 +472,7 @@ describe("row identity depends on the VIEW", () => {
expect(kept.map((r) => r.model.id)).toEqual(["kimi-k3", "kimi-k2.6"]);
});
- test("PROVIDER CATALOG: one row per model id, roster and catalog collapsed", () => {
+ test("PROVIDER CATALOG: one row per model id, dynamic models catalog and catalog collapsed", () => {
// "and if we enter to provider catalog, not all models - then the model will
// be just one". One route is in scope, so a second row would mean nothing —
// even when the two sources spell the spec differently.
@@ -477,7 +482,7 @@ describe("row identity depends on the VIEW", () => {
row("kimi", "kimi-k2.6", "[email protected]"),
]);
expect(kept.length).toBe(2);
- // The FIRST wins, and the caller puts the live roster first — what the
+ // The FIRST wins, and the caller puts the dynamic models catalog first — what the
// endpoint answered for THESE credentials beats what the catalog says.
expect(kept[0]?.spec).toBe("kimi@kimi-k3");
});
@@ -535,7 +540,11 @@ describe("discoveryNoticeContent", () => {
test("`failed` is the ERROR tier; the three empty states are the NOTICE tier", () => {
const rows: PickerDiscoveryOutcome[] = [
{ kind: "failed", failure: failure(), notice: ["⚠ x failed"], fallbackRows: [] },
- { kind: "empty-roster", failure: failure({ kind: "empty-models-catalog" }), fallbackRows: [] },
+ {
+ kind: "empty-models-catalog",
+ failure: failure({ kind: "empty-models-catalog" }),
+ fallbackRows: [],
+ },
{ kind: "all-filtered", servedCount: 3, sampleIds: ["e"], fallbackRows: [] },
{ kind: "collapsed-empty", servedCount: 3, chatCount: 3, fallbackRows: [] },
];
@@ -559,9 +568,13 @@ describe("discoveryNoticeContent", () => {
).toBeNull();
});
- test("`empty-roster` and `all-filtered` say DIFFERENT things", () => {
+ test("`empty-models-catalog` and `all-filtered` say DIFFERENT things", () => {
const empty = discoveryNoticeContent(
- { kind: "empty-roster", failure: failure({ kind: "empty-models-catalog" }), fallbackRows: [] },
+ {
+ kind: "empty-models-catalog",
+ failure: failure({ kind: "empty-models-catalog" }),
+ fallbackRows: [],
+ },
"Kimi"
);
const filtered = discoveryNoticeContent(
@@ -591,7 +604,7 @@ describe("discoveryNoticeContent", () => {
failure: failure({ status: 401 }),
notice: [
"\n⚠ Kimi could not list its models: the API key was rejected (HTTP 401)\n",
- " Showing Kimi's cloud-catalog entries below — not its live roster.\n\n",
+ " Showing Kimi's cloud-catalog entries below — not its live model list.\n\n",
],
fallbackRows: [model(), model({ id: "b" }), model({ id: "c" }), model({ id: "d" })],
},
@@ -599,7 +612,7 @@ describe("discoveryNoticeContent", () => {
);
const joined = c?.lines.join(" ") ?? "";
expect(joined).toContain("The 4 rows below");
- expect(joined).toContain("not Kimi's live roster");
+ expect(joined).toContain("not Kimi's live model list");
expect(joined).toContain("may still fail");
// The formatter's own shorter sentence is REPLACED, not printed beside it.
expect(joined).not.toContain("Showing Kimi's cloud-catalog entries");
@@ -607,7 +620,11 @@ describe("discoveryNoticeContent", () => {
test("no fallback list gets a next step instead of a provenance sentence", () => {
const without = discoveryNoticeContent(
- { kind: "empty-roster", failure: failure({ kind: "empty-models-catalog" }), fallbackRows: [] },
+ {
+ kind: "empty-models-catalog",
+ failure: failure({ kind: "empty-models-catalog" }),
+ fallbackRows: [],
+ },
"Kimi"
);
expect(without?.lines.join(" ")).toContain("Press c");
@@ -619,7 +636,7 @@ describe("discoveryNoticeContent", () => {
{ kind: "failed", failure: failure(), notice: ["⚠ x"], fallbackRows: [model()] },
"Kimi"
);
- expect(c?.title).toBe("live roster unavailable");
+ expect(c?.title).toBe("live model list unavailable");
});
test("the HTTP status becomes a badge and leaves the headline once", () => {
@@ -649,7 +666,7 @@ describe("discoveryNoticeContent", () => {
});
variants.push({ kind: "failed", failure: f, notice: ["⚠ x"], fallbackRows: [] });
variants.push({
- kind: "empty-roster",
+ kind: "empty-models-catalog",
failure: { ...f, kind: "empty-models-catalog" },
fallbackRows: [],
});
@@ -671,7 +688,7 @@ describe("wrapWords / noticeRows", () => {
test("no wrapped row exceeds the width", () => {
const long =
- "The 4 rows below are catalog entries, not Kimi / Moonshot's live roster — they do not confirm access, so launching one may still fail.";
+ "The 4 rows below are catalog entries, not Kimi / Moonshot's live model list — they do not confirm access, so launching one may still fail.";
for (const w of [30, 48, 70]) {
for (const line of wrapWords(long, w)) expect(line.length).toBeLessThanOrEqual(w);
}
@@ -717,7 +734,7 @@ describe("mergeCredentialLines", () => {
"⚠ Kimi could not list its models: the API key was rejected",
"Check MOONSHOT_API_KEY (a value in your shell overrides stored credentials).",
"Get a key: https://platform.moonshot.cn/",
- "Showing Kimi's cloud-catalog entries below — not its live roster.",
+ "Showing Kimi's cloud-catalog entries below — not its live model list.",
];
const merged = mergeCredentialLines(lines, 78);
expect(merged.length).toBe(3);
diff --git a/packages/cli/src/picker/rows.tsx b/packages/cli/src/picker/rows.tsx
index 13af79af..f2a0a20a 100644
--- a/packages/cli/src/picker/rows.tsx
+++ b/packages/cli/src/picker/rows.tsx
@@ -43,7 +43,7 @@
* `$$$` QUIET chip, rose metered — this one costs you per token
* `FREE` / `SUB` SIGNAL chip, green no per-token charge — the SAME claim
* `local` SIGNAL chip, green no charge either, by another mechanism
- * `catalog` warn text NOT the live roster — `DiscoveryNotice`
+ * `catalog` warn text NOT the dynamic models catalog — `DiscoveryNotice`
* `N/A` dead text the catalog does not say
* selection accent + `C.bgHighlight`, and a `▶` so it survives greyscale
*
@@ -57,7 +57,7 @@
* of two fills.
*
* WHICH MEANS THE BANDING RISK IS REAL AND IS ANSWERED BY THE PAIR, NOT BY A GAP.
- * `$$$` and `SUB`/`local` partition the roster, so this is a fill on all 17 rows —
+ * `$$$` and `SUB`/`local` partition the provider list, so this is a fill on all 17 rows —
* exactly the shape that fused into one grey band when the PREFIX was chipped. What
* failed there was that all 17 fills were the SAME colour; here they alternate, and
* the two fills are held apart by measurement rather than by hope: ΔE76 44.9 on the
@@ -173,7 +173,7 @@ export const CHIP_FILL_CELLS =
Math.max(...CHIP_COLUMN_LABELS.map((label) => displayWidth(label))) + 2;
/** Where a list came from — the one value that drives every provenance encoding. */
-export type ListOrigin = "roster" | "catalog";
+export type ListOrigin = "discovered" | "catalog";
/**
* What the price column prints.
@@ -225,7 +225,7 @@ export function priceFg(label: string): string {
*
* `null` is the cross-provider list. A scoped provider FIXES the column when it
* bills flat-rate or runs locally — `resolveProviderDisplayPrice` answers `SUB` for
- * every row of a subscription roster — and a column of one repeated fill is the
+ * every row a subscription provider lists — and a column of one repeated fill is the
* rectangle the skill measured.
*/
export function priceVaries(scopeBilling: BillingMode | null): boolean {
@@ -302,9 +302,9 @@ export function billingLabel(mode: BillingMode): { text: string; fg: string; bg:
* "0 models" reads as "this provider has nothing" about a provider nothing has asked.
*
* AND IT SAYS WHAT THE USER GETS, NOT HOW CLAUDISH FETCHES IT. The words were
- * `asks its own roster`, which the owner read on a live run and rejected. "Roster" is
- * this codebase's word for a provider's model list and appears nowhere else in the
- * UI, so the row described an implementation detail of the thing the reader was
+ * `asks its own` followed by this codebase's since-retired internal word for a
+ * provider's model list, which the owner read on a live run and rejected. That word
+ * appeared nowhere else in the UI, so the row described an implementation detail of the thing the reader was
* trying to choose between. His replacement, verbatim: *"subscription models"*.
*
* TWO PHRASINGS, BECAUSE ONE WOULD BE FALSE FOR HALF THE SET. Every provider that
@@ -439,7 +439,7 @@ export interface ModelRowProps {
price: string;
layout: RowLayout;
cursor: boolean;
- /** `catalog` marks a row that is NOT from the provider's live roster. */
+ /** `catalog` marks a row that is NOT from the provider's dynamic models catalog. */
origin: ListOrigin;
/**
* Draw a discrete price label as a CHIP rather than as coloured text.
@@ -515,13 +515,13 @@ export interface ProviderRowProps {
*
* `null` PRINTS NOTHING — not `0`, not `—`, not a guess. The owner's rule,
* verbatim: *"we could not show number of models for some of them"*. This
- * column is now only filled for a provider whose roster the user has already
+ * column is now only filled for a provider whose dynamic models catalog the user has already
* opened, or whose count is already in hand from a catalog the user asked for;
* everything else is silent, because a wrong count is worse than no count and
* an em dash still occupies the place where a number goes.
*/
count: number | null;
- /** Does this provider list its own roster? Decides what a known `0` means. */
+ /** Does this provider list its own dynamic models catalog? Decides what a known `0` means. */
hasDiscovery: boolean;
/** Why it is not selectable — an env var name, or empty. */
note: string;
@@ -538,7 +538,7 @@ export interface ProviderRowProps {
* verdict was *"we should not show the full list of models, we should show a list
* of providers by default and only when we go inside we load and resolve all
* models"*. So this row is the first thing the picker draws, and entering one is
- * what makes that provider's roster be fetched at all.
+ * what makes that provider's dynamic models catalog be fetched at all.
*
* IT IS A DIALOG, NOT A RAIL. The rejected build put a 19-column provider rail
* permanently beside the model list, which gave the screen two cursors with only a
diff --git a/packages/cli/src/providers/model-catalog.ts b/packages/cli/src/providers/model-catalog.ts
index b01def11..73a02141 100644
--- a/packages/cli/src/providers/model-catalog.ts
+++ b/packages/cli/src/providers/model-catalog.ts
@@ -409,7 +409,7 @@ export function createCatalogClient(deps: CatalogClientDeps = {}): CatalogClient
servedByVendor(vendorSlug: string): CatalogModel[] {
const slug = vendorSlug.toLowerCase();
// Local-only vendors are absent from the catalog BY DESIGN, so an empty
- // answer here is a fact, not a miss. Their rosters come from their own
+ // answer here is a fact, not a miss. Their dynamic models catalogs come from their own
// daemons through `modelDiscovery`.
if (NO_CATALOG_VENDOR_SLUGS.has(slug)) return [];
const { entries } = readSlimCacheWithFreshness(_readSlimCache);
diff --git a/packages/cli/src/providers/model-descriptions.ts b/packages/cli/src/providers/model-descriptions.ts
index 95bfcf8c..4306c895 100644
--- a/packages/cli/src/providers/model-descriptions.ts
+++ b/packages/cli/src/providers/model-descriptions.ts
@@ -54,7 +54,7 @@ interface DescriptionCache {
/**
* The index the picker reads. Lookup is case-insensitive on the id, because a
- * row's id comes from the slim catalog and an alias from a live roster, and the
+ * row's id comes from the slim catalog and an alias from a dynamic models catalog, and the
* two do not agree about case (`GLM-4.6` vs `glm-4.6`).
*/
export interface DescriptionIndex {
diff --git a/packages/cli/src/providers/model-discovery-builtins.ts b/packages/cli/src/providers/model-discovery-builtins.ts
index c5502e02..91e0bc8c 100644
--- a/packages/cli/src/providers/model-discovery-builtins.ts
+++ b/packages/cli/src/providers/model-discovery-builtins.ts
@@ -53,7 +53,7 @@ async function fetchDevinModelsCatalog(): Promise<FetcherResult> {
const { readDevinApiKey, readDevinServerUrl } = await import("./devin/devin-credentials.js");
endpoint = readDevinServerUrl();
// A logged-out account is a CREDENTIAL problem, and it is the kind that
- // earns a "how to fix it" line. Reporting it as an empty roster says the
+ // earns a "how to fix it" line. Reporting it as an empty dynamic models catalog says the
// subscription serves no models, which is a claim about Devin rather than
// about this machine.
if (!readDevinApiKey()) {
@@ -128,7 +128,7 @@ async function fetchAntigravityModelsCatalog(): Promise<FetcherResult> {
endpoint = `${antigravityHost()}/v1internal:fetchAvailableModels`;
const token = await getValidAntigravityAccessToken();
// No token is exactly "logged out", which is one of the two kinds that earns
- // the env-var / key-URL guidance. It used to read as an empty roster, i.e.
+ // the env-var / key-URL guidance. It used to read as an empty dynamic models catalog, i.e.
// "your subscription serves nothing".
if (!token) {
return {
diff --git a/packages/cli/src/providers/model-discovery-roster.test.ts b/packages/cli/src/providers/model-discovery-models-catalog.test.ts
similarity index 73%
rename from packages/cli/src/providers/model-discovery-roster.test.ts
rename to packages/cli/src/providers/model-discovery-models-catalog.test.ts
index 568a43ca..30e0981f 100644
--- a/packages/cli/src/providers/model-discovery-roster.test.ts
+++ b/packages/cli/src/providers/model-discovery-models-catalog.test.ts
@@ -1,5 +1,5 @@
/**
- * `discoverProviderRoster` — the discriminated outcome behind the empty array.
+ * `discoverProviderModelsCatalog` — the discriminated outcome behind the empty array.
*
* `discoverProviderModels` answers `[]` for six structurally different things,
* and its callers could not tell them apart. These tests pin which outcome each
@@ -11,7 +11,7 @@
* are replaced directly rather than through `mock.module()`, which bleeds into
* sibling Bun test files.
*
- * Run: bun test packages/cli/src/providers/model-discovery-roster.test.ts
+ * Run: bun test packages/cli/src/providers/model-discovery-models-catalog.test.ts
*/
import { afterEach, beforeEach, describe, expect, mock, test } from "bun:test";
@@ -21,7 +21,7 @@ import {
type FetcherResult,
type ModelDiscoveryDescriptor,
discoverProviderModels,
- discoverProviderRoster,
+ discoverProviderModelsCatalog,
getDiscoveryFailure,
invalidateModelDiscovery,
registerModelDiscoveryFetcher,
@@ -43,13 +43,13 @@ function defineProvider(
): ProviderDefinition {
return {
name,
- displayName: `Roster Test (${name})`,
+ displayName: `Models Catalog Test (${name})`,
transport: "openai",
- baseUrl: "https://roster-test.invalid",
+ baseUrl: "https://models-catalog-test.invalid",
apiPath: "/v1/chat/completions",
- apiKeyEnvVar: "ROSTER_TEST_API_KEY",
+ apiKeyEnvVar: "MODELS_CATALOG_TEST_API_KEY",
apiKeyDescription: "Offline test key",
- apiKeyUrl: "https://roster-test.invalid/key",
+ apiKeyUrl: "https://models-catalog-test.invalid/key",
shortcuts: [],
legacyPrefixes: [],
modelDiscovery: { path: "/v1/models", format: "openai-models-list" },
@@ -88,11 +88,11 @@ afterEach(() => {
credentials.getRequestAuth = realGetRequestAuth;
});
-describe("discoverProviderRoster — the GET half", () => {
- test("a non-empty roster is `served`, and `served.models` is never empty", async () => {
+describe("discoverProviderModelsCatalog — the GET half", () => {
+ test("a non-empty dynamic models catalog is `served`, and `served.models` is never empty", async () => {
stubResponse(JSON.stringify({ data: [{ id: "k3", context_length: 1_048_576 }] }));
- const outcome = await discoverProviderRoster("kimi-coding");
+ const outcome = await discoverProviderModelsCatalog("kimi-coding");
expect(outcome.kind).toBe("served");
if (outcome.kind !== "served") throw new Error("unreachable");
@@ -109,7 +109,7 @@ describe("discoverProviderRoster — the GET half", () => {
] as const)("HTTP %i is failed{%s}", async (status, kind) => {
stubResponse(JSON.stringify({ error: "rejected" }), status);
- const outcome = await discoverProviderRoster("kimi-coding");
+ const outcome = await discoverProviderModelsCatalog("kimi-coding");
expect(outcome).toMatchObject({
kind: "failed",
@@ -122,7 +122,7 @@ describe("discoverProviderRoster — the GET half", () => {
throw new Error("Offline");
}) as unknown as typeof fetch;
- expect(await discoverProviderRoster("kimi-coding")).toMatchObject({
+ expect(await discoverProviderModelsCatalog("kimi-coding")).toMatchObject({
kind: "failed",
failure: { kind: "unreachable", provider: "kimi-coding", detail: "Offline" },
});
@@ -133,16 +133,16 @@ describe("discoverProviderRoster — the GET half", () => {
async () => new Response("{not-json", { status: 200 })
) as unknown as typeof fetch;
- expect(await discoverProviderRoster("kimi-coding")).toMatchObject({
+ expect(await discoverProviderModelsCatalog("kimi-coding")).toMatchObject({
kind: "failed",
failure: { kind: "malformed", provider: "kimi-coding" },
});
});
- test("an empty data array is failed{empty-roster}, not `served` with []", async () => {
+ test("an empty data array is failed{empty-models-catalog}, not `served` with []", async () => {
stubResponse(JSON.stringify({ data: [] }));
- const outcome = await discoverProviderRoster("kimi-coding");
+ const outcome = await discoverProviderModelsCatalog("kimi-coding");
expect(outcome).toMatchObject({
kind: "failed",
@@ -158,7 +158,7 @@ describe("discoverProviderRoster — the GET half", () => {
globalThis.fetch = fetchMock as unknown as typeof fetch;
credentials.getRequestAuth = mock(async () => ({ headers: { authorization: " " } }));
- expect(await discoverProviderRoster("kimi-coding")).toMatchObject({
+ expect(await discoverProviderModelsCatalog("kimi-coding")).toMatchObject({
kind: "failed",
failure: { kind: "no-credentials", provider: "kimi-coding" },
});
@@ -166,14 +166,14 @@ describe("discoverProviderRoster — the GET half", () => {
});
});
-describe("discoverProviderRoster — `unsupported` is not a failure", () => {
+describe("discoverProviderModelsCatalog — `unsupported` is not a failure", () => {
test.each(["openrouter", "not-a-real-provider"])(
"%s declares no discovery, so nothing is attempted or recorded",
async (provider) => {
const fetchMock = mock(async () => new Response("should not be called"));
globalThis.fetch = fetchMock as unknown as typeof fetch;
- expect(await discoverProviderRoster(provider)).toEqual({
+ expect(await discoverProviderModelsCatalog(provider)).toEqual({
kind: "unsupported",
reason: "no-descriptor",
});
@@ -188,13 +188,13 @@ describe("discoverProviderRoster — `unsupported` is not a failure", () => {
// Not `unsupported`: the provider DID declare discovery, so this is a setup
// fault the user can fix — reporting it silently read as "the plan lists no
// models". With no override variables to name, the detail names the field.
- const provider = defineProvider("roster-no-base-url-test", {
+ const provider = defineProvider("models-catalog-no-base-url-test", {
baseUrl: "",
baseUrlEnvVars: [],
});
registerRuntimeProvider(provider);
- expect(await discoverProviderRoster(provider.name)).toEqual({
+ expect(await discoverProviderModelsCatalog(provider.name)).toEqual({
kind: "failed",
failure: {
kind: "unreachable",
@@ -205,16 +205,16 @@ describe("discoverProviderRoster — `unsupported` is not a failure", () => {
expect(getDiscoveryFailure(provider.name)?.kind).toBe("unreachable");
});
- test("a declared format nothing claims is unsupported{no-fetcher}, not an empty roster", async () => {
+ test("a declared format nothing claims is unsupported{no-fetcher}, not an empty dynamic models catalog", async () => {
// This is a PACKAGING bug — a definition opted into a format whose owner was
- // never bundled. It used to be recorded as `empty-roster`, i.e. as a claim
+ // never bundled. It used to be recorded as `empty-models-catalog`, i.e. as a claim
// about the user's subscription.
- const provider = defineProvider("roster-unclaimed-format-test", {
- modelDiscovery: { path: "", format: testFormat("roster-unclaimed-format") },
+ const provider = defineProvider("models-catalog-unclaimed-format-test", {
+ modelDiscovery: { path: "", format: testFormat("models-catalog-unclaimed-format") },
});
registerRuntimeProvider(provider);
- expect(await discoverProviderRoster(provider.name)).toEqual({
+ expect(await discoverProviderModelsCatalog(provider.name)).toEqual({
kind: "unsupported",
reason: "no-fetcher",
});
@@ -222,9 +222,9 @@ describe("discoverProviderRoster — `unsupported` is not a failure", () => {
});
});
-describe("discoverProviderRoster — the fetcher half can finally classify", () => {
- test("a fetcher reporting failure surfaces as failed with ITS kind, not empty-roster", async () => {
- const format = testFormat("roster-failing-fetcher");
+describe("discoverProviderModelsCatalog — the fetcher half can finally classify", () => {
+ test("a fetcher reporting failure surfaces as failed with ITS kind, not empty-models-catalog", async () => {
+ const format = testFormat("models-catalog-failing-fetcher");
registerModelDiscoveryFetcher(format, async (): Promise<FetcherResult> => {
return {
kind: "failed",
@@ -235,12 +235,12 @@ describe("discoverProviderRoster — the fetcher half can finally classify", ()
},
};
});
- const provider = defineProvider("roster-failing-fetcher-test", {
+ const provider = defineProvider("models-catalog-failing-fetcher-test", {
modelDiscovery: { path: "", format },
});
registerRuntimeProvider(provider);
- const outcome = await discoverProviderRoster(provider.name);
+ const outcome = await discoverProviderModelsCatalog(provider.name);
expect(outcome).toMatchObject({
kind: "failed",
@@ -257,38 +257,38 @@ describe("discoverProviderRoster — the fetcher half can finally classify", ()
});
test("a fetcher reporting no-credentials earns the credential kind", async () => {
- const format = testFormat("roster-logged-out-fetcher");
+ const format = testFormat("models-catalog-logged-out-fetcher");
registerModelDiscoveryFetcher(format, async () => ({
kind: "failed" as const,
failure: { kind: "no-credentials" as const, detail: "no OAuth token" },
}));
registerRuntimeProvider(
- defineProvider("roster-logged-out-test", { modelDiscovery: { path: "", format } })
+ defineProvider("models-catalog-logged-out-test", { modelDiscovery: { path: "", format } })
);
- expect(await discoverProviderRoster("roster-logged-out-test")).toMatchObject({
+ expect(await discoverProviderModelsCatalog("models-catalog-logged-out-test")).toMatchObject({
kind: "failed",
- failure: { kind: "no-credentials", provider: "roster-logged-out-test" },
+ failure: { kind: "no-credentials", provider: "models-catalog-logged-out-test" },
});
});
- test("a reachable-but-empty fetcher gives empty-roster WITH the endpoint it asked", async () => {
- const format = testFormat("roster-empty-fetcher");
+ test("a reachable-but-empty fetcher gives empty-models-catalog WITH the endpoint it asked", async () => {
+ const format = testFormat("models-catalog-empty-fetcher");
registerModelDiscoveryFetcher(format, async () => ({
kind: "models" as const,
models: [],
endpoint: "http://localhost:11434/api/tags",
}));
registerRuntimeProvider(
- defineProvider("roster-empty-fetcher-test", { modelDiscovery: { path: "", format } })
+ defineProvider("models-catalog-empty-fetcher-test", { modelDiscovery: { path: "", format } })
);
- expect(await discoverProviderRoster("roster-empty-fetcher-test")).toEqual({
+ expect(await discoverProviderModelsCatalog("models-catalog-empty-fetcher-test")).toEqual({
kind: "failed",
failure: {
kind: "empty-models-catalog",
- provider: "roster-empty-fetcher-test",
- // Before `FetcherResult`, this half recorded empty-roster with NO
+ provider: "models-catalog-empty-fetcher-test",
+ // Before `FetcherResult`, this half recorded empty-models-catalog with NO
// endpoint, so any copy naming one rendered the literal `undefined`.
endpoint: "http://localhost:11434/api/tags",
},
@@ -296,39 +296,43 @@ describe("discoverProviderRoster — the fetcher half can finally classify", ()
});
test("a fetcher returning models is served", async () => {
- const format = testFormat("roster-serving-fetcher");
+ const format = testFormat("models-catalog-serving-fetcher");
registerModelDiscoveryFetcher(format, async () => ({
kind: "models" as const,
models: [{ id: "llama3.2", supportsTools: true }],
endpoint: "http://localhost:11434/api/tags",
}));
registerRuntimeProvider(
- defineProvider("roster-serving-fetcher-test", { modelDiscovery: { path: "", format } })
+ defineProvider("models-catalog-serving-fetcher-test", {
+ modelDiscovery: { path: "", format },
+ })
);
- expect(await discoverProviderRoster("roster-serving-fetcher-test")).toEqual({
+ expect(await discoverProviderModelsCatalog("models-catalog-serving-fetcher-test")).toEqual({
kind: "served",
models: [{ id: "llama3.2", supportsTools: true }],
});
});
test("NEVER REJECTS: a throwing fetcher resolves to failed{unreachable}", async () => {
- const format = testFormat("roster-throwing-fetcher");
+ const format = testFormat("models-catalog-throwing-fetcher");
registerModelDiscoveryFetcher(format, async () => {
throw new Error("protobuf decode blew up");
});
registerRuntimeProvider(
- defineProvider("roster-throwing-test", { modelDiscovery: { path: "", format } })
+ defineProvider("models-catalog-throwing-test", { modelDiscovery: { path: "", format } })
);
// `.resolves` is the assertion, not a convenience: before the wrapping try,
// this rejection propagated out of the picker and, behind a live renderer
// with no stderr, would leave a progress indicator running forever.
- await expect(discoverProviderRoster("roster-throwing-test")).resolves.toMatchObject({
+ await expect(
+ discoverProviderModelsCatalog("models-catalog-throwing-test")
+ ).resolves.toMatchObject({
kind: "failed",
failure: {
kind: "unreachable",
- provider: "roster-throwing-test",
+ provider: "models-catalog-throwing-test",
detail: "protobuf decode blew up",
},
});
@@ -339,7 +343,7 @@ describe("discoverProviderModels stays the fail-soft wrapper", () => {
test.each([
["served", JSON.stringify({ data: [{ id: "k3" }] }), 200, ["k3"]],
["failed", JSON.stringify({ error: "nope" }), 401, []],
- ["empty-roster", JSON.stringify({ data: [] }), 200, []],
+ ["empty-models-catalog", JSON.stringify({ data: [] }), 200, []],
] as const)("%s → the models or []", async (_label, body, status, ids) => {
stubResponse(body, status);
@@ -357,7 +361,7 @@ describe("discoverProviderModels stays the fail-soft wrapper", () => {
return new Response(JSON.stringify({ data: [{ id: `model-${calls}` }] }), { status: 200 });
}) as unknown as typeof fetch;
- const first = await discoverProviderRoster("kimi-coding");
+ const first = await discoverProviderModelsCatalog("kimi-coding");
const second = await discoverProviderModels("kimi-coding");
expect(calls).toBe(1);
diff --git a/packages/cli/src/providers/model-discovery.ts b/packages/cli/src/providers/model-discovery.ts
index 12533ff7..ad8a8a66 100644
--- a/packages/cli/src/providers/model-discovery.ts
+++ b/packages/cli/src/providers/model-discovery.ts
@@ -17,8 +17,8 @@
* Design rules:
* - **Fail-soft, but not fail-silent.** `discoverProviderModels` returns an
* empty list on every failure path — discovery is an enhancement and must
- * never block a launch or a picker. `discoverProviderRoster` is the same work
- * reported as a {@link RosterOutcome}, for the one caller that has to explain
+ * never block a launch or a picker. `discoverProviderModelsCatalog` is the same work
+ * reported as a {@link ModelsCatalogOutcome}, for the one caller that has to explain
* the emptiness instead of absorbing it. Neither ever rejects.
* - **Nothing hardcoded.** The endpoint is derived from the provider's own
* baseUrl (+ env overrides); model ids and windows come from the response.
@@ -156,14 +156,14 @@ export interface ModelDiscoveryDescriptor {
* - `failed` carries any of the seven kinds. `provider` is filled in by the
* caller, which is the only place that knows it.
*
- * Throwing is still fine: {@link discoverProviderRoster} maps a rejection to
+ * Throwing is still fine: {@link discoverProviderModelsCatalog} maps a rejection to
* `unreachable` and never rejects itself.
*/
export type FetcherResult =
| { kind: "models"; models: DiscoveredModel[]; endpoint?: string }
| { kind: "failed"; failure: Omit<DiscoveryFailure, "provider"> };
-/** A roster fetcher for a format this module does not know how to speak. */
+/** A dynamic models catalog fetcher for a format this module does not know how to speak. */
export type ModelDiscoveryFetcher = (providerName: string) => Promise<FetcherResult>;
const _fetchers = new Map<string, ModelDiscoveryFetcher>();
@@ -255,7 +255,7 @@ export interface DiscoveryFailure {
*
* Three variants, because there are three different things to say:
*
- * - `served` — a roster. **Non-empty by construction**: every path that ends up
+ * - `served` — a dynamic models catalog. **Non-empty by construction**: every path that ends up
* with zero models records a failure instead, so there is no `served` with
* `[]` to guard against downstream.
* - `failed` — one of the seven {@link DiscoveryFailureKind}s, with the failure
@@ -267,12 +267,12 @@ export interface DiscoveryFailure {
* providers declare no `modelDiscovery`; for them the cloud catalog is the
* normal, correct answer and a notice would be noise on the majority case.
* `no-fetcher` is the exception that IS a bug — a declared format nothing
- * claims is a packaging mistake, not a roster fact — which is why it is here
+ * claims is a packaging mistake, not a dynamic models catalog fact — which is why it is here
* rather than folded into `empty-models-catalog` as it used to be. A declared
* descriptor whose base URL does not resolve is NOT here: that is a setup
* fault the user can fix, so it is `failed{unreachable}` naming the variable.
*/
-export type RosterOutcome =
+export type ModelsCatalogOutcome =
| { kind: "served"; models: DiscoveredModel[] }
| { kind: "failed"; failure: DiscoveryFailure }
| { kind: "unsupported"; reason: "no-descriptor" | "no-fetcher" };
@@ -295,7 +295,7 @@ const _failures = new Map<string, DiscoveryFailure>();
* where it is — the recorded-failure side effect and the returned value are the
* same fact, written once.
*/
-function recordFailure(failure: DiscoveryFailure): RosterOutcome {
+function recordFailure(failure: DiscoveryFailure): ModelsCatalogOutcome {
_failures.set(failure.provider, failure);
log(`[model-discovery:${failure.provider}] ${describeDiscoveryFailure(failure)}`);
return { kind: "failed", failure };
@@ -541,7 +541,10 @@ function describeIncompleteness(body: unknown, parsed: ParsedModelsList): string
* Never rejects: the dynamic import and the fetcher call are both inside the
* `try`, and both can throw.
*/
-async function discoverViaFetcher(providerName: string, format: string): Promise<RosterOutcome> {
+async function discoverViaFetcher(
+ providerName: string,
+ format: string
+): Promise<ModelsCatalogOutcome> {
let result: FetcherResult;
try {
let fetcher = getModelDiscoveryFetcher(format);
@@ -589,7 +592,7 @@ async function discoverViaFetcher(providerName: string, format: string): Promise
/**
* List the models this provider serves for the CURRENT credentials, as a
- * discriminated outcome — see {@link RosterOutcome}.
+ * discriminated outcome — see {@link ModelsCatalogOutcome}.
*
* **This function NEVER REJECTS.** Every `await` is inside a `try`, including
* the dynamic import of the builtin fetcher bundle and the fetcher call itself,
@@ -600,7 +603,9 @@ async function discoverViaFetcher(providerName: string, format: string): Promise
* running against a promise that never settles. Callers may therefore have no
* rejection branch, and a Tier-1 test registers a throwing fetcher to pin it.
*/
-export async function discoverProviderRoster(providerName: string): Promise<RosterOutcome> {
+export async function discoverProviderModelsCatalog(
+ providerName: string
+): Promise<ModelsCatalogOutcome> {
const cached = _cache.get(providerName);
if (cached && cached.expiresAt > Date.now()) return { kind: "served", models: cached.models };
@@ -773,11 +778,11 @@ export async function discoverProviderRoster(providerName: string): Promise<Rost
* The fail-soft shape every non-picker caller wants (the launcher, the status
* line, `discoverContextWindow`): discovery is an enhancement and must never
* block a launch. A caller that needs to TELL the user why there is nothing —
- * i.e. the picker — calls {@link discoverProviderRoster} instead and keeps the
+ * i.e. the picker — calls {@link discoverProviderModelsCatalog} instead and keeps the
* distinction. Both share one cache, so asking twice costs one request.
*/
export async function discoverProviderModels(providerName: string): Promise<DiscoveredModel[]> {
- const outcome = await discoverProviderRoster(providerName);
+ const outcome = await discoverProviderModelsCatalog(providerName);
return outcome.kind === "served" ? outcome.models : [];
}
diff --git a/packages/cli/src/providers/ollama-discovery.ts b/packages/cli/src/providers/ollama-discovery.ts
index 1e3df84f..a22ea2cf 100644
--- a/packages/cli/src/providers/ollama-discovery.ts
+++ b/packages/cli/src/providers/ollama-discovery.ts
@@ -48,7 +48,7 @@ interface FetchOllamaOptions {
* Default `false`, so every existing caller is byte-identical. Opt in only
* when you can report the difference: "the daemon is not running" and "the
* daemon is running and nothing is pulled" are the same `[]` otherwise, and
- * model discovery used to record both as `empty-roster` — telling the user
+ * model discovery used to record both as `empty-models-catalog` — telling the user
* their local provider serves no models when in fact nothing answered.
*/
throwOnError?: boolean;
diff --git a/packages/cli/src/providers/transport/probe-discovery.test.ts b/packages/cli/src/providers/transport/probe-discovery.test.ts
index 0eff4563..ee183424 100644
--- a/packages/cli/src/providers/transport/probe-discovery.test.ts
+++ b/packages/cli/src/providers/transport/probe-discovery.test.ts
@@ -74,7 +74,7 @@ describe("rankProbeCandidates", () => {
expect(ranked).toEqual(["claude-haiku-4", "gpt-4o-mini"]);
});
- test("drops the REALTIME/VOICE family — observed leaking into the Codex roster", () => {
+ test("drops the REALTIME/VOICE family — observed leaking into the Codex dynamic models catalog", () => {
// All five were on screen in a live provider-scoped list, offered as launchable
// coding models. The selected row's own catalog sentence disqualified it: "a
// distilled reasoning model for faster, lower-cost realtime VOICE interactions...
@@ -102,7 +102,7 @@ describe("rankProbeCandidates", () => {
test("`live` IS A BOUNDED TOKEN — a substring would eat four plausible ids", () => {
// `-` is a non-word character, so `\blive\b` matches `gpt-live-1` and does NOT
// match any of these. A bare `/live/` would drop all four, and each of them is a
- // shape a real roster produces: a benchmark-tuned fine-tune, a deployment slug,
+ // shape a real dynamic models catalog produces: a benchmark-tuned fine-tune, a deployment slug,
// a vendor codename, a probe endpoint.
for (const id of [
"livecodebench-qwen-32b",
diff --git a/packages/cli/src/providers/transport/probe-discovery.ts b/packages/cli/src/providers/transport/probe-discovery.ts
index b0d0e8ab..aa3681d8 100644
--- a/packages/cli/src/providers/transport/probe-discovery.ts
+++ b/packages/cli/src/providers/transport/probe-discovery.ts
@@ -73,13 +73,13 @@ const NON_CHAT_PATTERNS = [
/\bspeech\b/i,
// Speech-to-text. `gemini-3.5-transcribe` is the case `toPickerRows` named as
// getting through, and `mai-transcribe-*` / `gpt-transcribe` are the observed
- // leaks. No chat model in any served roster carries the word.
+ // leaks. No chat model in any served dynamic models catalog carries the word.
/\btranscribe\b/i,
/\btranscription\b/i,
// Text-to-speech under a name that does not say `tts`: `mai-voice-2`,
// `mai-voice-2-flash`.
/\bvoice\b/i,
- // REALTIME / LIVE / TRANSLATE — observed leaking into the OpenAI Codex roster as
+ // REALTIME / LIVE / TRANSLATE — observed leaking into the OpenAI Codex dynamic models catalog as
// `gpt-live-1`, `gpt-realtime-2`, `gpt-realtime-2.1`, `gpt-realtime-2.1-mini` and
// `gpt-realtime-translate`, all five offered as launchable coding models. The
// selected row's own catalog sentence disqualified it: "a distilled reasoning
diff --git a/packages/cli/src/tui/components/ErrorBanner.tsx b/packages/cli/src/tui/components/ErrorBanner.tsx
index 696c702e..fd83d314 100644
--- a/packages/cli/src/tui/components/ErrorBanner.tsx
+++ b/packages/cli/src/tui/components/ErrorBanner.tsx
@@ -16,7 +16,7 @@
*
* · `error` — an actionable failure: a rejected key, a discovery that failed.
* `tokens.error` on a `C.bgError` wash.
- * · `notice` — expected but notable: an empty roster, a list filtered to
+ * · `notice` — expected but notable: an empty dynamic models catalog, a list filtered to
* nothing. `tokens.warn`, and NO error wash. A user whose
* provider legitimately lists no models has not hit an error, and
* painting one teaches them to ignore the red.