UNPKG

@juspay/neurolink

Version:

Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and

48 lines (47 loc) 2.02 kB
import type { ZodType, ZodTypeDef } from "zod"; import { type Schema, type LanguageModelV1 } from "ai"; import type { AIProviderName } from "../core/types.js"; import type { StreamOptions, StreamResult } from "../types/streamTypes.js"; import { BaseProvider } from "../core/baseProvider.js"; /** * Google Vertex AI Provider v2 - BaseProvider Implementation * * PHASE 3.5: Simple BaseProvider wrap around existing @ai-sdk/google-vertex implementation * * Features: * - Extends BaseProvider for shared functionality * - Preserves existing Google Cloud authentication * - Maintains Anthropic model support via dynamic imports * - Uses pre-initialized Vertex instance for efficiency * - Enhanced error handling with setup guidance */ export declare class GoogleVertexProvider extends BaseProvider { private vertex; private model; private projectId; private location; private cachedAnthropicModel; constructor(modelName?: string, sdk?: unknown); protected getProviderName(): AIProviderName; protected getDefaultModel(): string; /** * Returns the Vercel AI SDK model instance for Google Vertex * Handles both Google and Anthropic models */ protected getAISDKModel(): Promise<LanguageModelV1>; protected executeStream(options: StreamOptions, analysisSchema?: ZodType<unknown, ZodTypeDef, unknown> | Schema<unknown>): Promise<StreamResult>; protected handleProviderError(error: unknown): Error; private validateStreamOptions; /** * Check if Anthropic models are available * @returns Promise<boolean> indicating if Anthropic support is available */ hasAnthropicSupport(): Promise<boolean>; /** * Create an Anthropic model instance if available * @param modelName Anthropic model name (e.g., 'claude-3-sonnet@20240229') * @returns LanguageModelV1 instance or null if not available */ createAnthropicModel(modelName: string): Promise<LanguageModelV1 | null>; } export default GoogleVertexProvider;