import type { LatencyMode, ReasoningEffort } from "@opengeni/sdk"; import { type PickerModelRow } from "./model-policy.js"; /** * The session's model has no usable credit while free (promotional) credit * still covers other models. Funding comes from the workspace model catalog, * which the server computes from the organization balance. */ export type FreeCreditGap = { /** Label of the model the free credits don't cover. */ modelLabel: string; /** Selectable models the remaining free credits cover, preferred first. */ covered: { id: string; label: string; }[]; /** * The composer already selects another model that can run: a covered or * credit-funded model, or one paid another way (connected, subscription, free). */ selectionUsable: boolean; }; export declare function freeCreditGap(rows: PickerModelRow[], model: string, options?: { selectedModel?: string | null | undefined; preferredModel?: string | null | undefined; }): FreeCreditGap | null; /** * The API refused a Send or a new chat because no credit pays for its model. * The refusal is authoritative even while the catalog still reports older * funding, so the gap is named whether or not other models are covered. */ export declare function creditRefusalGap(rows: PickerModelRow[], model: string, options?: { selectedModel?: string | null | undefined; preferredModel?: string | null | undefined; }): FreeCreditGap; /** Headline for a credit stop that free credits could avoid on another model. */ export declare function freeCreditGapReason(gap: FreeCreditGap): string; /** * The banner's one-click switch, with the picker's coercion: keep the effort * and speed when the new model runs them, otherwise fall back to its default * effort and standard speed so the composer policy stays sendable. */ export declare function coveredModelChoice(row: PickerModelRow, effort: ReasoningEffort, latencyMode: LatencyMode): { model: string; effort: ReasoningEffort; latencyMode: LatencyMode | null; } | null;