/** * @license * Copyright 2026 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { HttpOptions } from '@google/genai'; import { BaseLlmConnection } from './base_llm_connection.js'; import { Gemini, GeminiParams } from './google_llm.js'; import { LlmRequest } from './llm_request.js'; import { LlmResponse } from './llm_response.js'; export interface ApigeeLlmParams extends GeminiParams { /** * The name of the model to use. The model string specifies the LLM provider * (e.g., Vertex AI, Gemini), API version, and the model ID. Supported format: * `apigee/[/][/]` * Components: * `provider` (optional): `vertex_ai` or `gemini`. * `version` (optional): The API version (e.g., `v1`, `v1beta`). If not * provided, a default version will selected based on the provider. * `model_id` (required): The model identifier (e.g., * `gemini-2.5-flash`). * Examples: * - `apigee/gemini-2.5-flash` * - `apigee/v1/gemini-2.5-flash` * - `apigee/vertex_ai/gemini-2.5-flash` * - `apigee/gemini/v1/gemini-2.5-flash` * - `apigee/vertex_ai/v1beta/gemini-2.5-flash` */ model: string; /** * The proxy URL for the provider API. If not provided, it will look for * the APIGEE_PROXY_URL environment variable. */ proxyUrl?: string; /** * API key to use. If not provided, it will look for the GOOGLE_GENAI_API_KEY, * GOOGLE_API_KEY or GEMINI_API_KEY environment variable, in that order. If * gemini provider is selected and no key is provided, the fake key "-" will * be used for the "x-goog-api-key" header. */ apiKey?: string; } export declare class ApigeeLlm extends Gemini { private readonly proxyUrl; /** * A list of model name patterns that are supported by this LLM. * * @returns A list of supported models. */ static readonly supportedModels: Array; constructor({ model, proxyUrl, apiKey, vertexai, location, project, headers, }: ApigeeLlmParams); protected getHttpOptions(): HttpOptions; protected getLiveHttpOptions(): HttpOptions; private identifyApiVersion; private _apigeeLiveApiVersion?; get liveApiVersion(): string; generateContentAsync(llmRequest: LlmRequest, stream?: boolean, abortSignal?: AbortSignal): AsyncGenerator; connect(llmRequest: LlmRequest): Promise; }