/** * The model picker's presentation logic, free of any renderer: which rows show, * how they group and filter, and which thinking/latency controls apply. The web * menu and native sheets both render from this. */ import type { ClientModel, LatencyMode, ReasoningEffort } from "@opengeni/sdk"; import { type PickerBillingClass, type PickerModelRow } from "./model-policy.js"; import { type OpenGeniText } from "./messages/runtime.js"; type ClientPickerModelRow = PickerModelRow; export type ModelPolicyPickerMessages = { label: string; loading: string; noModels: string; connectTitle: string; connectBody: string; connectAction: string; thinking: string; fast: string; fastRateHint: string; /** Label for the Standard/Fast/Ultrafast choice shown when a model offers Ultrafast. */ speed?: string; standard?: string; ultrafast?: string; /** How Ultrafast counts against a ChatGPT/Codex plan's usage limits. */ ultrafastUsageHint?: string; codexOnly: string; searchLabel?: string; searchPlaceholder?: string; currentModel?: string; noMatches?: string; unsupportedAttachments?: string; thinkingEffort?: string; selected?: string; free?: string; billingHints: Record; }; export declare const defaultModelPolicyPickerMessages: (t: OpenGeniText) => ModelPolicyPickerMessages; /** Host branding for one payment group; the icon type belongs to the renderer. */ export type ModelPickerGroupBranding = { label?: string | undefined; /** Omit to preserve the default; null hides the supporting text. */ description?: string | null | undefined; /** Decorative, non-interactive content. Omit for the default; null hides it. */ icon?: TIcon | undefined; }; export type ModelPickerGroupPresentation = Partial>>; /** The renderer-neutral inputs every picker surface shares. */ export type ModelPickerInput = { groupPresentation?: ModelPickerGroupPresentation | undefined; models?: ClientModel[] | undefined; rows?: PickerModelRow[] | undefined; hasImageAttachments?: boolean | undefined; model: string; effort: ReasoningEffort; latencyMode: LatencyMode; codexOnly?: boolean | undefined; collapseScopes?: boolean | undefined; allowLatencyMode?: boolean | undefined; messages?: Partial | undefined; }; /** Models settings keeps naming who is billed for a key. */ export declare const SCOPED_BILLING_HINTS: (t: OpenGeniText) => Partial>; export declare function isCodexPickerModel(model: ClientModel): boolean; /** The payment group a selection the catalog no longer lists most likely belonged to. */ export declare function billingClassForMissingSelection(modelId: string): PickerBillingClass; /** * Host branding for a payment group. While scopes are collapsed, API keys are * one group, so either API-key presentation serves both. */ export declare function groupPresentationFor(props: { groupPresentation?: ModelPickerGroupPresentation | undefined; collapseScopes?: boolean | undefined; }, billingClass: PickerBillingClass): ModelPickerGroupBranding | undefined; export declare function effectiveRows(t: OpenGeniText, props: ModelPickerInput): ClientPickerModelRow[]; export type ModelPickerMenuGroup = { billingClass: PickerBillingClass; label: string; description: string | null; rows: ClientPickerModelRow[]; }; export type ModelPickerThinking = { efforts: ReasoningEffort[]; value: ReasoningEffort; showThinking: boolean; /** The single Fast toggle; false when `speeds` replaces it. */ showFast: boolean; /** * The speed choice for models that offer more than one faster mode * (Standard, Fast, Ultrafast), or null when the Fast toggle (or nothing) applies. */ speeds: ModelPickerSpeed[] | null; /** The selected row cannot run, so its controls are read-only. */ disabled: boolean; }; export type ModelPickerSpeed = { id: LatencyMode; label: string; /** What the speed costs relative to Standard, or null for Standard. */ hint: string | null; }; export type ModelPickerMenuView = { messages: ModelPolicyPickerMessages; rows: ClientPickerModelRow[]; selected: ClientPickerModelRow | null; /** Any row can run; otherwise the surface offers to connect models instead. */ anySelectable: boolean; /** Whether the query is non-empty (decides "no matches" versus "no models"). */ searching: boolean; groups: ModelPickerMenuGroup[]; matchCount: number; /** Thinking and Fast controls for the selected model, or null when it has none. */ thinking: ModelPickerThinking | null; /** The selected model cannot view images the draft carries. */ unsupportedAttachments: boolean; }; /** Everything a picker menu shows for this input and search query. */ export declare function modelPickerMenuView(t: OpenGeniText, props: ModelPickerInput, query: string): ModelPickerMenuView; export type ModelPickerChoice = { /** The new model, or null when the row is already selected. */ model: string | null; /** Always reported, so hosts can commit model and effort together. */ effort: ReasoningEffort; /** Fast falls back to standard when the new model cannot run it. */ latencyMode: LatencyMode | null; }; /** What choosing a row changes, or null when the row cannot be chosen. */ export declare function modelPickerChoice(props: Pick, row: ClientPickerModelRow): ModelPickerChoice | null; /** The web segmented control's short labels ("X-high" fits a phone row). */ export declare function compactEffortLabel(t: OpenGeniText, effort: ReasoningEffort, label: string): string; export {};