import type { AnthropicProvider } from '@ai-sdk/anthropic';
import type { GoogleGenerativeAIProvider } from '@ai-sdk/google';
import type { OpenAIProvider } from '@ai-sdk/openai';
import type { OpenAICompatibleProvider } from '@ai-sdk/openai-compatible';
import { type Agent } from 'undici';
import type { AIProviderConfig } from '../../types/index.js';
/**
 * Discriminated union pairing each underlying SDK provider with its `kind`.
 * Lets callers narrow the provider type via `kind` without `as unknown as`
 * casts. The pairing is enforced by `createProvider`'s return value.
 */
export type TaggedProvider = {
    kind: 'chatgpt-codex';
    provider: OpenAIProvider;
} | {
    kind: 'github-copilot';
    provider: OpenAIProvider;
} | {
    kind: 'openai-compatible';
    provider: OpenAICompatibleProvider<string, string, string, string>;
} | {
    kind: 'anthropic';
    provider: AnthropicProvider;
} | {
    kind: 'google';
    provider: GoogleGenerativeAIProvider;
};
/**
 * Creates an AI SDK provider based on the sdkProvider configuration.
 * Defaults to 'openai-compatible' if not specified.
 *
 * Async because provider SDK packages are loaded lazily — only the one that
 * matches the caller's `sdkProvider` is imported, so a session that only
 * uses Anthropic never loads the Google or OpenAI packages.
 */
export declare function createProvider(providerConfig: AIProviderConfig, undiciAgent: Agent): Promise<TaggedProvider>;
//# sourceMappingURL=provider-factory.d.ts.map