UNPKG

@tehreet/conduit

Version:

LLM API gateway with intelligent routing, robust process management, and health monitoring

30 lines 1.01 kB
export interface RoutingContext { request: any; tokenCount: number; config: any; env: NodeJS.ProcessEnv; synapseContext?: any; requestBody?: any; } export interface RoutingDecision { model: string; source?: string; reason: string; tokenCount?: number; metadata?: Record<string, any>; } export interface ConduitPlugin { name: string; version: string; beforeRouting?(context: RoutingContext): Promise<RoutingContext>; afterRouting?(decision: RoutingDecision): Promise<RoutingDecision>; onModelSelected?(model: string, context: any): Promise<void>; customRouter?(context: RoutingContext): Promise<RoutingDecision | null>; } export interface PluginManager { registerPlugin(plugin: ConduitPlugin): void; loadPlugins(pluginDir: string): Promise<void>; executeHook<T>(hookName: string, data: T): Promise<T>; executeCustomRouting(context: RoutingContext): Promise<RoutingDecision | null>; } //# sourceMappingURL=plugin-interface.d.ts.map