/**
 * provider-assembler.ts — Build per-mode provider arrays from models config.
 *
 * Replicates the provider-building logic from the legacy generate-configs.ts
 * so the new compiler produces identical provider configurations.
 *
 * Separated into its own module so GenerateConfigsStep can import it
 * without pulling in the full legacy generate-configs machinery.
 *
 * W0134 — per-mode maxToolRounds
 *
 * The agentic naive variant gets a higher round budget than agentic
 * optimized: naive simulates current real-world agent behavior under
 * retrieval pressure (it spends rounds on retries when fetches fail) and
 * benefits from more headroom; optimized bypasses Jina via the .md-direct
 * branch and rarely needs more than a couple of rounds. Bumping globally
 * would inflate optimized cost without changing its measured behavior.
 *
 * Resolution order (most specific wins):
 *   1. `model.config.maxToolRounds` — per-model override.
 *   2. `defaults.modeMaxToolRounds[variant]` — per-variant override.
 *   3. `defaults.maxToolRounds` — global default.
 *   4. Hard fallback (5).
 */
import { type ModelsConfig } from "../../_vendor/ailf-core/index.d.ts";
import type { ResolvedSourceConfig } from "../../sources.js";
/**
 * Provider arrays grouped by literacy variant.
 *
 * These keys are literacy variant names (not EvalMode values). Each variant
 * needs a different set of model providers with variant-specific config
 * (e.g., agentic providers carry tool-use config, observed providers carry
 * observer instrumentation).
 */
export interface LiteracyVariantProviders {
    baseline: Record<string, unknown>[];
    agentic: Record<string, unknown>[];
    observed: Record<string, unknown>[];
}
/** @deprecated Use LiteracyVariantProviders — kept for backward compatibility */
export type AssembledProviders = LiteracyVariantProviders;
/** Result of loading models and assembling providers */
export interface ModelsAndProviders {
    models: ModelsConfig;
    providers: LiteracyVariantProviders;
}
/**
 * Load models config and assemble provider arrays for literacy variants.
 *
 * Returns provider arrays keyed by literacy variant name (baseline,
 * agentic, observed). These are consumed by the YAML writer to produce
 * the per-variant promptfoo config files.
 *
 * `loaded` (optional) lets callers pre-load and pre-filter the
 * `ModelsConfig` so a caller-side filter (e.g. W0281's
 * `filterModelsByRequest`) actually takes effect on the assembled
 * providers — building providers from the unfiltered set would silently
 * defeat the filter, since promptfoo decides which LLMs to call from the
 * providers array, not the returned `models` field.
 */
export declare function loadModelsAndProviders(rootDir: string, source?: ResolvedSourceConfig, searchMode?: string, allowedOrigins?: string[], loaded?: ModelsConfig): ModelsAndProviders;
/**
 * Resolve `maxToolRounds` for an agentic variant (W0134).
 *
 * Most-specific wins: per-model `config.maxToolRounds` > per-variant
 * `defaults.modeMaxToolRounds[variant]` > global `defaults.maxToolRounds`
 * > hard fallback (5).
 */
export declare function resolveMaxToolRounds(models: ModelsConfig, model: ModelsConfig["models"][number], variant: "agentic-naive" | "agentic-optimized"): number;
/**
 * Load the `ModelsConfig` for `rootDir` from disk. Exported so callers
 * that need to pre-filter the model set before provider assembly (e.g.
 * `PipelineRequest.models`) can hand the filtered config back to
 * `loadModelsAndProviders` via its optional `loaded` parameter.
 */
export declare function loadModelsYaml(rootDir: string): ModelsConfig;
