import type { Api, Model } from "@bastani/pi-ai/compat"; import type { ThinkingLevel } from "@earendil-works/pi-agent-core"; import type { InitialModelResult, ScopedModel } from "./model-resolver-types.ts"; import type { ModelRuntime } from "./model-runtime.js"; /** * Resolve a model reference persisted in a session. Exact unauthenticated * models are authoritative failures; only an absent id may be reconstructed * from an authenticated model for the same dynamic/custom provider. */ export declare function resolveRestoredModelReference(provider: string, modelId: string, modelRuntime: ModelRuntime): Promise | undefined>; /** * Find the initial model to use based on priority: * 1. CLI args (provider + model) * 2. First model from scoped models (if not continuing/resuming) * 3. Restored from session (if continuing/resuming) * 4. Saved default from settings * 5. First available model with valid API key */ export declare function findInitialModel(options: { cliProvider?: string; cliModel?: string; scopedModels: ScopedModel[]; isContinuing: boolean; defaultProvider?: string; defaultModelId?: string; defaultThinkingLevel?: ThinkingLevel; modelThinkingLevels?: Record; modelRuntime: ModelRuntime; }): Promise; /** * Restore model from session, with fallback to available models */ export declare function restoreModelFromSession(savedProvider: string, savedModelId: string, currentModel: Model | undefined, shouldPrintMessages: boolean, modelRuntime: ModelRuntime): Promise<{ model: Model | undefined; fallbackMessage: string | undefined; }>; //# sourceMappingURL=model-resolver-initial.d.ts.map