import type { ProviderHeaders } from "@bastani/pi-ai"; import type { Api, Model } from "@bastani/pi-ai/compat"; import type { ThinkingLevel } from "@earendil-works/pi-agent-core"; import type { AgentSessionInternalSurface as AgentSession } from "./agent-session-methods.ts"; import { type ModelCycleResult, type ModelMutationOptions } from "./agent-session-types.js"; export declare function _getRequiredRequestAuth(this: AgentSession, model: Model, signal?: AbortSignal): Promise<{ apiKey?: string; headers?: ProviderHeaders; baseUrl?: string; env?: Record; }>; /** * 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, previousModel: Model | undefined, source: "set" | "cycle" | "restore" | "fallback"): void; export declare function _emitModelSelect(this: AgentSession, nextModel: Model, previousModel: Model | undefined, source: "set" | "cycle" | "restore" | "fallback"): Promise; /** * 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, options?: ModelMutationOptions): Promise; /** * 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", options?: ModelMutationOptions): Promise; export declare function _cycleScopedModel(this: AgentSession, direction: "forward" | "backward", options: ModelMutationOptions): Promise; export declare function _cycleAvailableModel(this: AgentSession, direction: "forward" | "backward", options: ModelMutationOptions): Promise; export declare function setThinkingLevel(this: AgentSession, level: ThinkingLevel, options?: ModelMutationOptions): Promise; /** * Cycle to next thinking level. * @returns New level, or undefined if model doesn't support thinking */ export declare function cycleThinkingLevel(this: AgentSession, options?: ModelMutationOptions): Promise; /** * 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, targetModel?: Model, explicitLevel?: ThinkingLevel): ThinkingLevel; export declare function _clampThinkingLevel(this: AgentSession, level: ThinkingLevel, _availableLevels: ThinkingLevel[]): ThinkingLevel; /** * 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; }; //# sourceMappingURL=agent-session-models.d.ts.map