/** * Anthropic LLM scan provider. * * Talks to the Anthropic Messages API (`/v1/messages`). The Anthropic * request shape differs from the OpenAI-compatible surface in two ways: * - `system` is a top-level string, not a `system` message role. * - `max_tokens` is a required field on every request. * The response is an array of content blocks; the first block's `text` * field carries the model output. */ import type { LlmScanReport } from "../scanner/types.js"; import type { LlmScanInput, LlmScanProvider, LlmProviderOptions } from "./provider.js"; /** * Anthropic Messages API LLM scan provider. * * @see {@link LlmScanProvider} */ export declare class AnthropicLlmProvider implements LlmScanProvider { private readonly apiKey?; private readonly baseUrl; private readonly model; private readonly maxTokens; private readonly timeoutMs; private readonly maxInputChars; /** * @param options - Provider configuration. Env-var fallbacks: * `apiKey` defaults to `process.env.ANTHROPIC_API_KEY`. */ constructor(options?: LlmProviderOptions); /** @inheritdoc */ scan(input: LlmScanInput): Promise; /** @inheritdoc */ testConnection(): Promise; /** * Issue a POST to `/v1/messages` with timeout and error normalization. * * @param body - The JSON request body. * @param signal - Optional external abort signal combined with the owned * timeout controller via `AbortSignal.any`. An external abort propagates * as `DOMException('The operation was aborted.', 'AbortError')`. * @returns The `content[0].text` string from the response. * @throws {LlmProviderError} On network, timeout, HTTP, or shape errors. * @throws {DOMException} With name `AbortError` when `signal` is aborted. */ private request; } //# sourceMappingURL=anthropic.d.ts.map