import type { LLMClient } from "./types.js"; /** * The set of provider names currently supported. */ export type ProviderName = "anthropic" | "openai" | "google" | "openai-compat" | "claude-code"; /** * Injectable probe function for verifying the claude CLI is on PATH. * Defaults to an execa-based check; override in tests to avoid real CLI calls. */ export type BinaryProbe = (binary: string) => Promise; /** * Verify the claude CLI binary is on PATH. Throws an Error naming the binary * when it is absent. Call this before using the claude-code provider. * * @param binary - CLI binary name/path (default "claude"). * @param probe - Injectable PATH-check function (default uses execa; override in tests). */ export declare function preflightClaudeBinary(binary?: string, probe?: BinaryProbe): Promise; /** * True when the endpoint targets xAI's OpenAI-compatible Grok API. * SOLE place the "api.x.ai" host substring is matched (sc-1-6). */ export declare function isXaiEndpoint(endpoint?: string): boolean; /** * Validate that the required API key environment variable is set for a given provider. * * @param resolvedProvider - The resolved provider name. * @param role - Optional role label (e.g. "Planner", "Generator", "Evaluator") for the error message. * @param apiKey - Optional explicit API key from providerConfig (skips env var check if set). * @param endpoint - Optional endpoint URL used to distinguish DeepSeek/xAI from other openai-compat servers. * @throws If the required environment variable is missing and no explicit apiKey was provided. */ export declare function validateApiKey(resolvedProvider: string, role?: string, apiKey?: string, endpoint?: string): void; /** * Create an LLMClient for the given provider. * * Provider resolution order: * 1. If `provider` is explicitly set, use it directly with `model` as-is. * 2. If `model` is set but `provider` is not, infer the provider from the * model shorthand using resolveProviderModel(). * 3. If neither is set, default to "anthropic". * * API key validation is performed before constructing any adapter. Pass a * `role` string (e.g. "Planner") so error messages identify which role is * misconfigured. * * @param provider - Optional provider name. When omitted, inferred from model. * @param endpoint - Optional base URL override (used by OpenAI-compat adapters). * @param providerConfig - Optional provider-specific configuration (e.g., apiKey). * @param model - Optional model string used for provider inference when provider is not set. * @param role - Optional role label used in API key error messages. * @returns An LLMClient instance for the resolved provider. * @throws If the resolved provider is unsupported or the required API key is missing. */ export declare function createClient(provider?: string | null, endpoint?: string | null, providerConfig?: Record, model?: string, role?: string): LLMClient; //# sourceMappingURL=factory.d.ts.map