/** Backend identifier (display name for pi). */
export type BackendId = "claude-code" | "codex" | "cursorai";
/** Strategy for model selection. */
export type Strategy = "load-balancing" | "high-availability";
/** Default backend order for HA (Codex → Claude Code → CursorAI). */
export declare const DEFAULT_PRIORITY: BackendId[];
export declare const DEFAULT_STRATEGY: Strategy;
/** Map from provider/model patterns (from ccusage) to our backend id. */
export declare const DEFAULT_BACKEND_MAP: Record<string, BackendId>;
/** Default pi provider + model per backend (user can override in config). */
export declare const DEFAULT_MODELS: Record<BackendId, {
    provider: string;
    model: string;
}>;
export interface ServerConfig {
    /** Strategy: load-balancing or high-availability */
    strategy?: Strategy;
    /** Ordered list of backend ids for HA; first is preferred */
    priority?: BackendId[];
    /** Optional: map provider/model pattern -> backend id (extends default) */
    backendMap?: Record<string, BackendId>;
    /** Optional: default provider+model per backend id */
    defaultModels?: Partial<Record<BackendId, {
        provider: string;
        model: string;
    }>>;
}
/** Get full server config (with defaults). Uses in-memory cache; call invalidateConfig() after writes. */
export declare function getConfig(): ServerConfig & {
    strategy: Strategy;
    priority: BackendId[];
    backendMap: Record<string, BackendId>;
    defaultModels: Record<BackendId, {
        provider: string;
        model: string;
    }>;
};
/** Invalidate config cache so next getConfig() reads from disk. */
export declare function invalidateConfig(): void;
/** Get current strategy. */
export declare function getStrategy(): Strategy;
/** Set strategy and persist to server config file. */
export declare function setStrategy(strategy: Strategy): void;
/** Get current HA priority (ordered backend ids). */
export declare function getPriority(): BackendId[];
/** Set HA priority and persist. Rejects invalid or duplicate entries by normalizing. */
export declare function setPriority(priority: string[]): BackendId[];
/** Resolve global pi settings path. */
export declare function getGlobalSettingsPath(): string;
/** Resolve project pi settings path (defaults to cwd). */
export declare function getProjectSettingsPath(projectPath?: string): string;
/** Map a provider or model string from ccusage to backend id. */
export declare function modelToBackend(providerOrModel: string, config?: ServerConfig & {
    strategy: Strategy;
    priority: BackendId[];
    backendMap: Record<string, BackendId>;
    defaultModels: Record<BackendId, {
        provider: string;
        model: string;
    }>;
}): BackendId | undefined;
