@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
49 lines (48 loc) • 1.9 kB
TypeScript
import { type Schema, type LanguageModelV1 } from "ai";
import type { ZodUnknownSchema } from "../types/typeAliases.js";
import type { AIProviderName } from "../core/types.js";
import type { StreamOptions, StreamResult } from "../types/streamTypes.js";
import { BaseProvider } from "../core/baseProvider.js";
/**
* OpenAI Compatible Provider - BaseProvider Implementation
* Provides access to one of the OpenAI-compatible endpoint (OpenRouter, vLLM, LiteLLM, etc.)
*/
export declare class OpenAICompatibleProvider extends BaseProvider {
private model?;
private config;
private discoveredModel?;
private customOpenAI;
constructor(modelName?: string, sdk?: unknown);
protected getProviderName(): AIProviderName;
protected getDefaultModel(): string;
/**
* Returns the Vercel AI SDK model instance for OpenAI Compatible endpoints
* Handles auto-discovery if no model was specified
*/
protected getAISDKModel(): Promise<LanguageModelV1>;
protected handleProviderError(error: unknown): Error;
/**
* OpenAI Compatible endpoints support tools for compatible models
*/
supportsTools(): boolean;
/**
* Provider-specific streaming implementation
* Note: This is only used when tools are disabled
*/
protected executeStream(options: StreamOptions, analysisSchema?: ZodUnknownSchema | Schema<unknown>): Promise<StreamResult>;
/**
* Get available models from OpenAI Compatible endpoint
*
* Fetches from the /v1/models endpoint to discover available models.
* This is useful for auto-discovery when no model is specified.
*/
getAvailableModels(): Promise<string[]>;
/**
* Get the first available model for auto-selection
*/
getFirstAvailableModel(): Promise<string>;
/**
* Fallback models when discovery fails
*/
private getFallbackModels;
}