import { ILLMProvider, LLMRequestPayload, LLMResponsePayload, ProviderConfig, ILogger } from '../types'; import { AxiosInstance, AxiosRequestConfig } from 'axios'; /** * Base provider with connection pooling and standardized error handling */ export declare abstract class BaseProvider implements ILLMProvider { protected readonly config: ProviderConfig; protected client: AxiosInstance; abstract readonly id: string; protected logger?: ILogger; constructor(config: ProviderConfig, logger?: ILogger); protected setAuthHeader(apiKey: string): void; abstract generateChat(payload: LLMRequestPayload, config?: ProviderConfig): Promise; abstract generateText(payload: LLMRequestPayload, config?: ProviderConfig): Promise; /** * Optional health check method */ healthCheck(): Promise; /** * Prepare request payload (normalize stop sequences, remove undefined values) */ protected prepareRequest(payload: LLMRequestPayload): LLMRequestPayload; /** * Make a POST request with standardized error handling */ protected post(url: string, data: unknown, config?: AxiosRequestConfig): Promise; /** * Convert axios errors to SDK error types */ protected handleError(error: unknown): Error; /** * Get full URL for an endpoint */ protected getFullUrl(endpoint: string): string; /** * Get headers for a request */ protected getHeaders(config?: ProviderConfig): Record; /** * Make a streaming POST request using fetch (for SSE support) * Returns the raw Response for stream processing */ protected postStream(endpoint: string, data: unknown, config?: ProviderConfig, signal?: AbortSignal): Promise; } //# sourceMappingURL=base.d.ts.map