/** * AI SDK Provider Map * * Maps model strings to AI SDK providers with lazy loading. * Supports formats: "provider/model" or "model" (uses default provider) */ import { AISDKProviderOptions } from './types'; /** * Parsed model string result */ export interface ParsedModel { providerId: string; modelId: string; } /** * Provider factory function type */ export type ProviderFactory = (options?: AISDKProviderOptions) => unknown; /** * Parse a model string into provider and model ID * * @example * parseModelString("openai/gpt-4o") // { providerId: "openai", modelId: "gpt-4o" } * parseModelString("gpt-4o-mini") // { providerId: "openai", modelId: "gpt-4o-mini" } * parseModelString("claude-3-5-sonnet") // { providerId: "anthropic", modelId: "claude-3-5-sonnet" } */ export declare function parseModelString(model: string, defaultProvider?: string): ParsedModel; /** * Resolve provider alias to canonical name */ export declare function resolveProviderAlias(providerId: string): string; /** * Check if a provider is supported */ export declare function isProviderSupported(providerId: string): boolean; /** * Get the package name for a provider */ export declare function getProviderPackage(providerId: string): string | null; /** * Get the environment variable key for a provider's API key */ export declare function getProviderEnvKey(providerId: string): string | null; /** * List all supported providers */ export declare function listSupportedProviders(): string[]; /** * Register a custom provider factory * * @example * registerCustomProvider('my-provider', (options) => createMyProvider(options)); */ export declare function registerCustomProvider(providerId: string, factory: ProviderFactory): void; /** * Unregister a custom provider */ export declare function unregisterCustomProvider(providerId: string): boolean; /** * Get a custom provider factory */ export declare function getCustomProvider(providerId: string): ProviderFactory | undefined; /** * Dynamically import and create an AI SDK provider * Uses lazy loading to avoid importing AI SDK packages until needed */ export declare function createAISDKProvider(providerId: string, options?: AISDKProviderOptions): Promise; /** * Validate that a provider has the required API key */ export declare function validateProviderApiKey(providerId: string): boolean; /** * Get missing API key message for a provider */ export declare function getMissingApiKeyMessage(providerId: string): string;