import type { SKYKOIConfig } from "../../config/config.js";
import type { ThinkLevel } from "./directives.js";
import { loadModelCatalog } from "../../koi/model-catalog.js";
import { type ModelAliasIndex } from "../../koi/model-selection.js";
import { type SessionEntry } from "../../config/sessions.js";
export type ModelDirectiveSelection = {
    provider: string;
    model: string;
    isDefault: boolean;
    alias?: string;
};
type ModelCatalog = Awaited<ReturnType<typeof loadModelCatalog>>;
type ModelSelectionState = {
    provider: string;
    model: string;
    allowedModelKeys: Set<string>;
    allowedModelCatalog: ModelCatalog;
    resetModelOverride: boolean;
    resolveDefaultThinkingLevel: () => Promise<ThinkLevel>;
    needsModelCatalog: boolean;
};
export type StoredModelOverride = {
    provider?: string;
    model: string;
    source: "session" | "parent";
};
export declare function resolveStoredModelOverride(params: {
    sessionEntry?: SessionEntry;
    sessionStore?: Record<string, SessionEntry>;
    sessionKey?: string;
    parentSessionKey?: string;
}): StoredModelOverride | null;
export declare function createModelSelectionState(params: {
    cfg: SKYKOIConfig;
    koiCfg: NonNullable<NonNullable<SKYKOIConfig["kois"]>["defaults"]> | undefined;
    sessionEntry?: SessionEntry;
    sessionStore?: Record<string, SessionEntry>;
    sessionKey?: string;
    parentSessionKey?: string;
    storePath?: string;
    defaultProvider: string;
    defaultModel: string;
    provider: string;
    model: string;
    hasModelDirective: boolean;
}): Promise<ModelSelectionState>;
export declare function resolveModelDirectiveSelection(params: {
    raw: string;
    defaultProvider: string;
    defaultModel: string;
    aliasIndex: ModelAliasIndex;
    allowedModelKeys: Set<string>;
}): {
    selection?: ModelDirectiveSelection;
    error?: string;
};
export declare function resolveContextTokens(params: {
    koiCfg: NonNullable<NonNullable<SKYKOIConfig["kois"]>["defaults"]> | undefined;
    model: string;
}): number;
export {};
