import type { CliProvider } from "../config.js";
import { runCliModel } from "../llm/cli.js";
import type { ModelRequestOptions, OpenAiReasoningEffort } from "../llm/model-options.js";
import type { Prompt } from "../llm/prompt.js";
import type { ProviderRuntimeBindings } from "../llm/provider-profile.js";
import type { SummaryStreamHandler } from "./events.js";
import { summarizeWithModelId } from "./model-call.js";
import type { ModelAttempt, SummaryAttemptResult } from "./types.js";
export type ModelExecutorDeps = {
    env: Record<string, string | undefined>;
    envForRun: Record<string, string | undefined>;
    execFileImpl: Parameters<typeof runCliModel>[0]["execFileImpl"];
    timeoutMs: number;
    retries: number;
    streamingEnabled: boolean;
    openaiRequestOptions?: ModelRequestOptions;
    openaiRequestOptionsOverride?: ModelRequestOptions;
    cliReasoningEffortOverride?: OpenAiReasoningEffort;
    cliConfigForRun: Parameters<typeof runCliModel>[0]["config"];
    cliAvailability: Partial<Record<CliProvider, boolean>>;
    trackedFetch: typeof fetch;
    resolveMaxOutputTokensForCall: (modelId: string) => Promise<number | null>;
    resolveMaxInputTokensForCall: (modelId: string) => Promise<number | null>;
    llmCalls: Array<{
        provider: "xai" | "openai" | "google" | "anthropic" | "zai" | "nvidia" | "minimax" | "github-copilot" | "ollama" | "cli";
        model: string;
        usage: Awaited<ReturnType<typeof summarizeWithModelId>>["usage"] | null;
        costUsd?: number | null;
        purpose: "summary" | "markdown" | "speaker-identification";
    }>;
    log?: ((message: string) => void) | null;
    trace?: ((name: string, detail?: string | null) => void) | null;
    providerRuntime: ProviderRuntimeBindings;
    openrouterApiKey: string | null;
};
export declare function createModelExecutor(deps: ModelExecutorDeps): {
    envHasKeyFor: (requiredEnv: ModelAttempt["requiredEnv"]) => boolean;
    formatMissingModelError: (attempt: ModelAttempt) => string;
    providerRuntime: ProviderRuntimeBindings;
    runSummaryAttempt: ({ attempt, prompt, allowStreaming, onModelChosen, cli, streamHandler, }: {
        attempt: ModelAttempt;
        prompt: Prompt;
        allowStreaming: boolean;
        onModelChosen?: ((modelId: string) => void) | null;
        cli?: {
            promptOverride?: string;
            allowTools?: boolean;
            cwd?: string;
            extraArgsByProvider?: Partial<Record<CliProvider, string[]>>;
        } | null;
        streamHandler?: SummaryStreamHandler | null;
    }) => Promise<SummaryAttemptResult>;
};
