/** * Which models a project shows by DEFAULT — the single source of truth for * "the latest ones", shared by the gateway (which enforces enablement) and the * web picker / "Manage models" tab (which render it). * * This rule used to live client-side inside `useModelStore` (packages/sdk), so * the server had no idea which models the picker would actually show: an admin * saw "15 of 15 shown in the model picker" while the picker rendered 3. It's a * pure function over catalog metadata, so it belongs here next to * `providerFlagship` — the other "which model should we pick for you" rule. */ /** The catalog metadata the default-set rule needs. `id` is the gateway WIRE id. */ export interface EnablementCandidate { /** Wire id — bare (`glm-5.3-flash`) for managed, `provider/model` for BYOK. */ id: string; /** models.dev release date (`YYYY-MM-DD`). */ released?: string | null; /** models.dev family/lineage grouping (e.g. `claude-4`, `gpt-sol`). */ family?: string | null; /** Real upstream provider. Falls back to the wire id's `provider/` prefix. */ provider?: string | null; } /** A model released within this window counts as current. */ export declare const DEFAULT_ENABLEMENT_WINDOW_MONTHS = 6; /** The newest member of a group; ties and undated models resolve by catalog order. */ /** * Amazon Bedrock lists most current models three ways: the bare in-region id * (`openai.gpt-5.6-luna`), regional cross-region inference profiles * (`us.` / `eu.` / `jp.` / `apac.` / `au.`), and a `global.` profile — same * family, same release date. For these models Bedrock REFUSES the bare id * ("Invocation of model ID … with on-demand throughput isn't supported. Retry * your request with the ID or ARN of an inference profile"), verified live * 2026-08-25 on gpt-5.6-luna/terra and grok-4.6. Rank: global 2 > regional 1 * > bare 0. A provider prefix (`amazon-bedrock/…`) is tolerated. */ export declare function bedrockInferenceProfileRank(id: string): 0 | 1 | 2; /** * The wire ids enabled by default: the newest model of each family, limited to * families with a release inside the window. * * A provider whose catalog carries no usable dates at all would otherwise * contribute NOTHING and vanish from the picker, so every provider always keeps * at least its newest model. That guarantee is why this returns a set per * provider rather than filtering the flat list by date. */ export declare function defaultEnabledModelIds(models: EnablementCandidate[], opts?: { now?: Date; windowMonths?: number; }): Set; /** * The candidates an AUTO-SELECTED default may be drawn from. * * `bedrockInferenceProfileRank` breaks a release-date TIE between a bare * Bedrock id and its `global.`/`us.` twin. That is not enough on its own: * models.dev does not publish which Bedrock families have an inference * profile, and the newest Bedrock model in the 2026-08-25 catalog — * `xai.grok-4.6` (2026-08-12) — ships with NO twin at all. It therefore won * "newest" outright and every fresh Bedrock-BYOK workspace auto-selected an * id Bedrock refuses ("Invocation of model ID xai.grok-4.6 with on-demand * throughput isn't supported. Retry your request with the ID or ARN of an * inference profile"), then looped "Retrying in Ns" forever. Proven live on * the SampleCo self-host 2026-08-26. * * Rule: when a set carries ANY inference-profile id, its bare ids are not * auto-selectable. An inference profile is always invokable; a bare id may * not be, and nothing in the catalog says which. Bare ids stay LISTED and * pickable — a human can still choose one — but nothing chooses one FOR the * user. A set with no profile ids at all (every non-Bedrock provider) is * returned unchanged, so this is inert outside Bedrock. */ export declare function autoSeedableModels(models: T[]): T[]; /** * The model a surface should AUTO-SELECT for a provider when the user has * chosen nothing: the newest auto-selectable model (see `autoSeedableModels`), * with the Bedrock inference profile winning a release-date tie * (`global.` > regional > bare) and catalog order breaking a full tie. * * One implementation for both default paths — the gateway's `providerFlagship` * (apps/api) and the native pre-runtime picker's per-provider `default` * (packages/sdk) — because two copies of "which model do we pick for you" is * exactly how they drifted apart before. */ export declare function autoSeedDefaultModel(models: T[]): T | undefined; //# sourceMappingURL=enablement.d.ts.map