interface GatewayModel {
    id: string;
    owned_by: string;
    context_window: number;
    supports_streaming: boolean;
    supports_vision: boolean;
    allowed: boolean;
    restriction_reason?: string | null;
}
interface FetchGatewayModelsOptions {
    gatewayUrl: string;
    /** Bearer token; required for accurate free-tier marks. */
    authToken?: string;
}
declare const DEFAULT_GATEWAY_MODEL = "claude-opus-4-8";
declare const DEFAULT_CODEX_MODEL = "gpt-5.5";
declare function isBlockedModelId(modelId: string): boolean;
declare function fetchGatewayModels(options?: FetchGatewayModelsOptions): Promise<GatewayModel[]>;
declare function isAnthropicModel(model: GatewayModel): boolean;
declare function isOpenAIModel(model: GatewayModel): boolean;
declare function isCloudflareModelId(modelId: string): boolean;
declare function isCloudflareModel(model: GatewayModel): boolean;
interface ModelInfo {
    id: string;
    owned_by?: string;
    allowed: boolean;
    restriction_reason?: string | null;
}
declare function fetchModelsList(options?: FetchGatewayModelsOptions): Promise<ModelInfo[]>;
/**
 * The model a session should start on: the preferred id when present and
 * allowed, else the newest allowed model — a free-tier org must not default
 * onto a model that 403s its first message. Falls back to the preferred id
 * when the list is empty (fetch failed) or nothing is allowed (all locked —
 * the picker gate communicates that state better than a silent swap).
 */
declare function pickAllowedModel(models: ReadonlyArray<Pick<GatewayModel, "id" | "allowed">>, preferred: string): string;
declare function getProviderName(ownedBy: string): string;
declare function getClaudeModelRecency(modelId: string): number;
declare function formatGatewayModelName(model: GatewayModel): string;
declare function formatModelId(modelId: string): string;

export { DEFAULT_CODEX_MODEL, DEFAULT_GATEWAY_MODEL, type FetchGatewayModelsOptions, type GatewayModel, type ModelInfo, fetchGatewayModels, fetchModelsList, formatGatewayModelName, formatModelId, getClaudeModelRecency, getProviderName, isAnthropicModel, isBlockedModelId, isCloudflareModel, isCloudflareModelId, isOpenAIModel, pickAllowedModel };
