/**
 * grader-api.ts
 *
 * Shared utility for calling LLM grading APIs from grader scripts.
 *
 * Dispatches to the correct provider API (OpenAI, Anthropic) based on the
 * grader model prefix. Reads the appropriate API key from environment.
 *
 * Also exports `loadGraderModel()` to resolve the grader from
 * `config/models`.
 *
 * Migrated from lib/grader-api.ts — no module-level side effects, no
 * process.exit(), accepts rootDir as parameter for file-based operations.
 */
import type { Logger } from "../_vendor/ailf-core/index.d.ts";
interface ProviderConfig {
    apiKey: string;
    baseUrl: string;
    modelName: string;
}
/**
 * Call the grader model once to score a response against a rubric.
 *
 * Dispatches to the correct provider API based on the model prefix.
 * Returns a numeric score (0–100) or null if the call or parse fails.
 */
export declare function gradeOnce(graderModel: string, responseText: string, rubricText: string, logger?: Logger): Promise<null | number>;
/**
 * Load the grader model from `config/models`.
 * Returns both the model ID and human-readable label.
 * Falls back to `openai:gpt-5` if not configured.
 *
 * @throws Error if config/models is not found
 */
export declare function loadGraderModel(rootDir: string): {
    id: string;
    label: string;
};
export declare function extractScore(content: string): null | number;
/**
 * Parse a Promptfoo-style model ID and resolve the provider config.
 *
 * Supported formats:
 *   - `openai:chat:gpt-5.2`       → OpenAI, model = `gpt-5.2`
 *   - `openai:gpt-5`              → OpenAI, model = `gpt-5`
 *   - `anthropic:messages:claude-opus-4-5-20251101` → Anthropic, model = `claude-opus-4-5-20251101`
 *   - `anthropic:claude-sonnet-4`  → Anthropic, model = `claude-sonnet-4`
 */
export declare function resolveProvider(graderModel: string): ProviderConfig;
export {};
