UNPKG

@tehreet/conduit

Version:

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

84 lines 2.44 kB
export interface SynapseContext { projectId?: string; agentId?: string; agentType?: string; projectModelConfig?: string; agentModelConfig?: string; workspaceId?: string; userId?: string; sessionId?: string; requestId?: string; orgId?: string; metadata?: Record<string, any>; } export interface ParsedProjectConfig { enabled: boolean; defaultModel?: string; fallbackModel?: string; maxTokens?: number; costLimit?: number; rateLimits?: { requestsPerMinute?: number; tokensPerMinute?: number; }; } export interface ParsedAgentConfig { useProjectDefaults: boolean; overrideModel?: string; maxTokens?: number; systemPrompt?: string; temperature?: number; topP?: number; reasoning?: boolean; } export declare class ContextExtractor { /** * Extract Synapse context from environment variables */ static extractSynapseContext(env: NodeJS.ProcessEnv): SynapseContext; /** * Extract Synapse context from environment variables (non-static) */ extractSynapseContext(env: NodeJS.ProcessEnv): SynapseContext; /** * Parse project model configuration */ static parseProjectConfig(configString?: string): ParsedProjectConfig | null; /** * Parse agent model configuration */ static parseAgentConfig(configString?: string): ParsedAgentConfig | null; /** * Get effective model configuration */ static getEffectiveModelConfig(synapseContext: SynapseContext): { model?: string; source: 'agent' | 'project' | 'none'; config: ParsedAgentConfig | ParsedProjectConfig | null; }; /** * Validate Synapse context */ static validateSynapseContext(context: SynapseContext): { valid: boolean; errors: string[]; warnings: string[]; }; /** * Extract additional metadata from environment */ private static extractMetadata; /** * Create test context for development */ static createTestContext(overrides?: Partial<SynapseContext>): SynapseContext; /** * Convert Synapse model format to Claude format */ static mapSynapseModelToClaude(synapseModel: string): string; /** * Convert Claude model format to Synapse format */ static mapClaudeModelToSynapse(claudeModel: string): string; } //# sourceMappingURL=context-extractor.d.ts.map