/** * @toolplex/ai-engine - ToolPlex Provider * * Custom ToolPlex Provider for Vercel AI SDK. * Wraps the ToolPlex AI API backend (api.toolplex.ai) which proxies OpenRouter * and returns OpenRouter-format SSE streaming responses. * * The backend handles: * - Authentication via ToolPlex API keys (x-api-key header) * - Usage tracking and enforcement * - OpenRouter model access * - Tool call handling */ import type { LoggerAdapter } from "../adapters/types.js"; export interface ToolPlexConfig { apiKey: string; baseURL?: string; clientVersion?: string; logger?: LoggerAdapter; } /** * Global map to store usage data from DONE events * Key: sessionId, Value: Usage data from backend * This is cleared after being read by the engine */ export declare const toolplexUsageMap: Map; /** * ToolPlex model factory function type */ export type ToolPlexModelFactory = (modelId: string) => any; /** * Create a ToolPlex provider instance * * Uses the specialized OpenRouter SDK provider with custom configuration to work with * the ToolPlex backend API which proxies OpenRouter and returns OpenRouter's SSE format. */ export declare function createToolPlex(config: ToolPlexConfig): ToolPlexModelFactory; //# sourceMappingURL=toolplex.d.ts.map