import { ErrorCategory } from "./error-category.type.mjs"; import { AIErrorOptions } from "./ai-error.mjs"; import { ProviderError } from "./provider-error.mjs"; //#region ../ai/src/errors/content-filter-error.d.ts /** * Payload for `ContentFilterError`. Both fields optional — providers * don't consistently disclose the specific filter reason or * categories, especially when the block is pre-generation. */ type ContentFilterErrorOptions = AIErrorOptions & { reason?: string; categories?: string[]; }; /** * Response (or request) was blocked by the provider's safety filter. * Not retryable with the same input — reshape the prompt or lean on * a less-restrictive model. * * @example * if (result.error instanceof ContentFilterError) { * return respondWithPolicyMessage(result.error.reason); * } */ declare class ContentFilterError extends ProviderError { static readonly defaultCategory: ErrorCategory; readonly reason?: string; readonly categories?: string[]; constructor(message: string, options?: ContentFilterErrorOptions); } //#endregion export { ContentFilterError, ContentFilterErrorOptions }; //# sourceMappingURL=content-filter-error.d.mts.map