UNPKG

revenium-middleware-litellm-node

Version:

Comprehensive middleware for Node.js applications using LiteLLM Proxy to automatically track LLM usage, costs, and performance metrics with Revenium

86 lines 2.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.URL_PROTOCOL = exports.HOSTNAME_IP = exports.HOSTNAME = exports.PATHNAME_URL = exports.SUPPORTED_ROLES = exports.supportedEndpoints = exports.stringFields = exports.PROVIDER_REGISTRY = void 0; /** * Comprehensive provider registry * Organized by priority - more specific patterns first */ exports.PROVIDER_REGISTRY = [ { source: 'OPENAI', displayName: 'OpenAI', patterns: ['gpt-', 'davinci', 'curie', 'babbage', 'ada', 'text-embedding'], prefixes: ['openai'] }, { source: 'ANTHROPIC', displayName: 'Anthropic', patterns: ['claude', 'anthropic'], prefixes: ['anthropic'] }, { source: 'GOOGLE', displayName: 'Google Vertex AI', patterns: ['gemini', 'palm', 'bison', 'gecko'], prefixes: ['vertex_ai', 'palm'] }, { source: 'AZURE', displayName: 'Azure OpenAI', patterns: ['azure'], prefixes: ['azure'] }, { source: 'COHERE', displayName: 'Cohere', patterns: ['command', 'cohere'], prefixes: ['cohere'] }, { source: 'HUGGINGFACE', displayName: 'Hugging Face', patterns: ['huggingface'], prefixes: ['huggingface'] }, { source: 'TOGETHER', displayName: 'Together AI', patterns: ['llama', 'mistral', 'mixtral'], prefixes: ['together_ai'] }, { source: 'OLLAMA', displayName: 'Ollama', patterns: ['ollama'], prefixes: ['ollama'] }, { source: 'MISTRAL', displayName: 'Mistral', patterns: ['mistral'], prefixes: ['mistral'] }, { source: 'GROQ', displayName: 'Groq', patterns: ['groq'], prefixes: ['groq'] } ]; exports.stringFields = [ 'traceId', 'taskId', 'taskType', 'subscriberEmail', 'subscriberId', 'subscriberCredentialName', 'subscriberCredential', 'organizationId', 'subscriptionId', 'productId', 'agent' ]; exports.supportedEndpoints = [ '/chat/completions', '/v1/chat/completions', '/embeddings', '/v1/embeddings' ]; exports.SUPPORTED_ROLES = ['system', 'user', 'assistant', 'function', 'tool']; exports.PATHNAME_URL = ['/chat/completions', '/embeddings']; exports.HOSTNAME = 'localhost'; exports.HOSTNAME_IP = '127.0.0.1'; exports.URL_PROTOCOL = 'http'; //# sourceMappingURL=constants.js.map