import type { ThinkingLevel } from "@earendil-works/pi-agent-core";
import type { Api, Model } from "@earendil-works/pi-ai/compat";
import type { ModelRegistry } from "./model-registry.ts";
import type { InitialModelResult, ScopedModel } from "./model-resolver-types.ts";
/**
 * 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, modelRegistry: ModelRegistry): Promise<Model<Api> | 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;
    modelRegistry: ModelRegistry;
}): Promise<InitialModelResult>;
/**
 * Restore model from session, with fallback to available models
 */
export declare function restoreModelFromSession(savedProvider: string, savedModelId: string, currentModel: Model<Api> | undefined, shouldPrintMessages: boolean, modelRegistry: ModelRegistry): Promise<{
    model: Model<Api> | undefined;
    fallbackMessage: string | undefined;
}>;
//# sourceMappingURL=model-resolver-initial.d.ts.map