import { Message, MessageCreateParamsBase } from '@anthropic-ai/sdk/resources/messages'; import { ModelReference, z, GenerateRequest, ModelResponseData, ActionMetadata } from 'genkit'; import { ModelAction } from 'genkit/model'; import { PluginOptions } from './types.js'; import '../../types-B3i-Lt7D.js'; import 'google-auth-library'; import '@google-cloud/vertexai'; /** * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ declare const AnthropicConfigSchema: z.ZodObject<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; type AnthropicConfigSchemaType = typeof AnthropicConfigSchema; type AnthropicConfig = z.infer; declare const GENERIC_MODEL: ModelReference; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; declare const KNOWN_MODELS: { 'claude-sonnet-4-6': ModelReference; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; 'claude-opus-4-6': ModelReference; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; 'claude-haiku-4-5@20251001': ModelReference; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; 'claude-sonnet-4-5@20250929': ModelReference; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; 'claude-sonnet-4@20250514': ModelReference; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; 'claude-opus-4-5@20251101': ModelReference; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; 'claude-opus-4-1@20250805': ModelReference; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; 'claude-opus-4@20250514': ModelReference; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ version: z.ZodOptional; temperature: z.ZodOptional; maxOutputTokens: z.ZodOptional; topK: z.ZodOptional; topP: z.ZodOptional; stopSequences: z.ZodOptional>; apiKey: z.ZodOptional; } & { location: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; }; type KnownModels = keyof typeof KNOWN_MODELS; type AnthropicModelName = `claude-${string}`; declare function isAnthropicModelName(value?: string): value is AnthropicModelName; declare function model(version: string, options?: AnthropicConfig): ModelReference; interface ClientOptions { location: string; projectId: string; } declare function listActions(clientOptions: ClientOptions): ActionMetadata[]; declare function listKnownModels(clientOptions: ClientOptions, pluginOptions?: PluginOptions): ModelAction[]; declare function defineModel(name: string, clientOptions: ClientOptions, pluginOptions?: PluginOptions): ModelAction; declare function toAnthropicRequest(model: string, input: GenerateRequest): MessageCreateParamsBase; declare function fromAnthropicResponse(input: GenerateRequest, response: Message): ModelResponseData; export { type AnthropicConfig, AnthropicConfigSchema, type AnthropicConfigSchemaType, type AnthropicModelName, type ClientOptions, GENERIC_MODEL, KNOWN_MODELS, type KnownModels, defineModel, fromAnthropicResponse, isAnthropicModelName, listActions, listKnownModels, model, toAnthropicRequest };