/** * Gemini LLM scan provider. * * Talks to the Google Generative Language API * (`generativelanguage.googleapis.com/v1beta`) using the * `models/:generateContent` surface. Mirrors the structure of * {@link OpenAICompatibleLlmProvider} but adapts the request body, auth * header, and response shape to Gemini's conventions. */ import type { LlmScanReport } from "../scanner/types.js"; import type { LlmScanInput, LlmScanProvider, LlmProviderOptions } from "./provider.js"; /** * Gemini LLM scan provider. * * @see {@link LlmScanProvider} */ export declare class GeminiLlmProvider implements LlmScanProvider { private readonly apiKey?; private readonly baseUrl; private readonly model; private readonly timeoutMs; private readonly maxInputChars; /** * @param options - Provider configuration. Env-var fallbacks: * `apiKey` defaults to `process.env.GEMINI_API_KEY`. */ constructor(options?: LlmProviderOptions); /** @inheritdoc */ scan(input: LlmScanInput): Promise; /** @inheritdoc */ testConnection(): Promise; /** * Issue a POST to `models/:generateContent` 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 `candidates[0].content.parts[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=gemini.d.ts.map