/** * LLM Configuration * * Provider configurations, model definitions, and environment variable handling. */ /** * Supported LLM providers */ export type LLMProvider = 'openai' | 'anthropic' | 'azure' | 'custom'; /** * Model capabilities */ export interface ModelCapabilities { /** Supports function/tool calling */ functionCalling: boolean; /** Supports vision/image inputs */ vision: boolean; /** Supports streaming responses */ streaming: boolean; /** Supports JSON mode */ jsonMode: boolean; /** Supports system messages */ systemMessages: boolean; } /** * Model pricing information (per 1M tokens) */ export interface ModelPricing { /** Cost per 1M input tokens in USD */ inputTokens: number; /** Cost per 1M output tokens in USD */ outputTokens: number; } /** * Model configuration */ export interface ModelConfig { /** Model identifier */ id: string; /** Display name */ name: string; /** Provider */ provider: LLMProvider; /** Maximum context window size */ contextWindow: number; /** Maximum output tokens */ maxOutputTokens: number; /** Model capabilities */ capabilities: ModelCapabilities; /** Pricing information */ pricing?: ModelPricing; /** Deprecation date (if applicable) */ deprecatedAt?: Date; } /** * Provider-specific configuration */ export interface LLMProviderConfig { /** Provider type */ provider: LLMProvider; /** API key for authentication */ apiKey: string; /** Base URL for API requests (optional) */ baseUrl?: string; /** Organization ID (optional, for OpenAI) */ organization?: string; /** Request timeout in milliseconds */ timeout?: number; /** Maximum retries for failed requests */ maxRetries?: number; /** Custom headers for requests */ headers?: Record; /** Default model to use */ defaultModel?: string; } /** * Default OpenAI model configurations */ export declare const OPENAI_MODELS: Record; /** * Default Anthropic model configurations */ export declare const ANTHROPIC_MODELS: Record; /** * Combined model configurations */ export declare const MODEL_CONFIGS: Record; /** * Environment variable names for API keys */ export declare const ENV_VARS: { readonly OPENAI_API_KEY: "OPENAI_API_KEY"; readonly OPENAI_ORG_ID: "OPENAI_ORG_ID"; readonly ANTHROPIC_API_KEY: "ANTHROPIC_API_KEY"; readonly AZURE_OPENAI_API_KEY: "AZURE_OPENAI_API_KEY"; readonly AZURE_OPENAI_ENDPOINT: "AZURE_OPENAI_ENDPOINT"; }; /** * Get API key from environment variables * * @param provider - Provider to get API key for * @returns API key or undefined if not found */ export declare function getApiKeyFromEnv(provider: LLMProvider): string | undefined; /** * Get organization ID from environment variables (OpenAI only) * * @returns Organization ID or undefined if not found */ export declare function getOrgIdFromEnv(): string | undefined; /** * Get base URL from environment variables * * @param provider - Provider to get base URL for * @returns Base URL or undefined if not found */ export declare function getBaseUrlFromEnv(provider: LLMProvider): string | undefined; /** * Auto-detect provider from model name * * @param modelId - Model identifier * @returns Detected provider or 'custom' if unknown */ export declare function detectProvider(modelId: string): LLMProvider; /** * Get model configuration by ID * * @param modelId - Model identifier * @returns Model configuration or undefined if not found */ export declare function getModelConfig(modelId: string): ModelConfig | undefined; /** * Validate model configuration * * @param modelId - Model identifier * @throws Error if model is not supported or deprecated */ export declare function validateModel(modelId: string): void; /** * Get default configuration for a provider * * @param provider - Provider type * @returns Default provider configuration */ export declare function getDefaultProviderConfig(provider: LLMProvider): Partial; //# sourceMappingURL=config.d.ts.map