import type { ThinkingLevel } from "@earendil-works/pi-agent-core";
import type { Api, Model } from "@earendil-works/pi-ai/compat";
import type { AgentSessionInternalSurface as AgentSession } from "./agent-session-methods.ts";
import { type ContextWindowReplayRequest, type ContextWindowReplaySource, type ModelCycleResult } from "./agent-session-types.ts";
export declare function _getRequiredRequestAuth(this: AgentSession, model: Model<Api>): Promise<{
    apiKey: string;
    headers?: Record<string, string>;
}>;
/**
 * Install tool hooks once on the Agent instance.
 *
 * The callbacks read `this._extensionRunner` at execution time, so extension reload swaps in the
 * new runner without reinstalling hooks. Extension-specific tool wrappers are still used to adapt
 * registered tool execution to the extension context. Tool call and tool result interception now
 * happens here instead of in wrappers.
 */
export declare function _emitModelChanged(this: AgentSession, nextModel: Model<Api>, previousModel: Model<Api> | undefined, source: "set" | "cycle" | "restore" | "fallback"): void;
export declare function _emitModelSelect(this: AgentSession, nextModel: Model<Api>, previousModel: Model<Api> | undefined, source: "set" | "cycle" | "restore" | "fallback"): Promise<void>;
/**
 * Set model directly.
 * Validates that auth is configured, saves to session and settings.
 * @throws Error if no auth is configured for the model
 */
export declare function setModel(this: AgentSession, model: Model<Api>): Promise<void>;
/**
 * Cycle to next/previous model.
 * Uses scoped models (from --models flag) if available, otherwise all available models.
 * @param direction - "forward" (default) or "backward"
 * @returns The new model info, or undefined if only one model available
 */
export declare function cycleModel(this: AgentSession, direction?: "forward" | "backward"): Promise<ModelCycleResult | undefined>;
export declare function _cycleScopedModel(this: AgentSession, direction: "forward" | "backward"): Promise<ModelCycleResult | undefined>;
export declare function _cycleAvailableModel(this: AgentSession, direction: "forward" | "backward"): Promise<ModelCycleResult | undefined>;
/**
 * Set thinking level.
 * Clamps to model capabilities based on available thinking levels.
 * Saves to session and settings only if the level actually changes.
 */
export declare function setThinkingLevel(this: AgentSession, level: ThinkingLevel): void;
/**
 * Cycle to next thinking level.
 * @returns New level, or undefined if model doesn't support thinking
 */
export declare function cycleThinkingLevel(this: AgentSession): ThinkingLevel | undefined;
/**
 * Get available thinking levels for current model.
 * The provider will clamp to what the specific model supports internally.
 */
export declare function getAvailableThinkingLevels(this: AgentSession): ThinkingLevel[];
/**
 * Check if current model supports thinking/reasoning.
 */
export declare function supportsThinking(this: AgentSession): boolean;
export declare function _getThinkingLevelForModelSwitch(this: AgentSession, explicitLevel?: ThinkingLevel): ThinkingLevel;
export declare function _clampThinkingLevel(this: AgentSession, level: ThinkingLevel, _availableLevels: ThinkingLevel[]): ThinkingLevel;
export declare function getAvailableContextWindows(this: AgentSession): number[];
export declare function supportsContextWindowSelection(this: AgentSession): boolean;
export declare function setContextWindow(this: AgentSession, contextWindow: number, options?: {
    persistDefault?: boolean;
}): void;
export declare function _withContextWindowForModelSwitch(this: AgentSession, model: Model<Api>): Model<Api>;
export declare function _shouldCarryCurrentContextWindowForModelSwitch(this: AgentSession, currentModel: Model<Api>, settingsDefaultContextWindow: number | undefined): boolean;
export declare function _getSettingsContextWindowRequestForModel(this: AgentSession, model: Model<Api>): ContextWindowReplayRequest | undefined;
export declare function _getContextWindowReplayForModel(this: AgentSession, model: Model<Api>, requestedContextWindow: number | undefined, source: ContextWindowReplaySource | undefined): {
    model: Model<Api>;
    contextWindow: number;
    wouldWarn: boolean;
};
export declare function _getDefaultContextWindowReplayForModel(this: AgentSession, model: Model<Api>, wouldWarn: boolean): {
    model: Model<Api>;
    contextWindow: number;
    wouldWarn: boolean;
};
export declare function _getResumeContextWindowReplayForModel(this: AgentSession, model: Model<Api>): {
    model: Model<Api>;
    contextWindow: number;
    wouldWarn: boolean;
};
export declare function _applyContextWindowReplay(this: AgentSession, contextWindow: number | undefined): void;
export declare function _appendContextWindowChangeIfChanged(this: AgentSession, previousModel: Model<Api> | undefined, nextModel: Model<Api>): void;
/**
 * Set steering message mode.
 * Saves to settings.
 */
export declare const agentSessionModelsMethods: {
    _getRequiredRequestAuth: typeof _getRequiredRequestAuth;
    _emitModelChanged: typeof _emitModelChanged;
    _emitModelSelect: typeof _emitModelSelect;
    setModel: typeof setModel;
    cycleModel: typeof cycleModel;
    _cycleScopedModel: typeof _cycleScopedModel;
    _cycleAvailableModel: typeof _cycleAvailableModel;
    setThinkingLevel: typeof setThinkingLevel;
    cycleThinkingLevel: typeof cycleThinkingLevel;
    getAvailableThinkingLevels: typeof getAvailableThinkingLevels;
    supportsThinking: typeof supportsThinking;
    _getThinkingLevelForModelSwitch: typeof _getThinkingLevelForModelSwitch;
    _clampThinkingLevel: typeof _clampThinkingLevel;
    getAvailableContextWindows: typeof getAvailableContextWindows;
    supportsContextWindowSelection: typeof supportsContextWindowSelection;
    setContextWindow: typeof setContextWindow;
    _withContextWindowForModelSwitch: typeof _withContextWindowForModelSwitch;
    _shouldCarryCurrentContextWindowForModelSwitch: typeof _shouldCarryCurrentContextWindowForModelSwitch;
    _getSettingsContextWindowRequestForModel: typeof _getSettingsContextWindowRequestForModel;
    _getContextWindowReplayForModel: typeof _getContextWindowReplayForModel;
    _getDefaultContextWindowReplayForModel: typeof _getDefaultContextWindowReplayForModel;
    _getResumeContextWindowReplayForModel: typeof _getResumeContextWindowReplayForModel;
    _applyContextWindowReplay: typeof _applyContextWindowReplay;
    _appendContextWindowChangeIfChanged: typeof _appendContextWindowChangeIfChanged;
};
//# sourceMappingURL=agent-session-models.d.ts.map