export class AIProviderError extends Error {
  constructor(
    message: string,
    public code: string,
    public provider: string,
    public details: unknown,
    public retryable: boolean
  ) {
    super(message);
    this.name = 'AIProviderError';

    // This line is necessary for proper prototype chain setup in TypeScript
    Object.setPrototypeOf(this, AIProviderError.prototype);
  }
}