NexLLM is a high-performance LLM Gateway designed for enterprise AI architectures. It provides a unified interface to abstract the complexities of various Large Language Models (LLMs), ensuring industrial-grade stability and scalability under extreme concurrency.
Our mission: To standardize LLM infrastructure and empower developers to build resilient AI applications.
- Unified API standard (OpenAI-compatible) for seamless integration with GPT-4, Claude, Gemini, Llama, and self-hosted models.
- Cross-protocol support for Streaming and Function Calling across different model providers.
- Built on an asynchronous, non-blocking architecture, supporting 100k+ TPS peak throughput.
- Millisecond-level routing latency with adaptive load balancing.
- Built-in multi-level circuit breaking, automatic retries, and rapid failover mechanisms.
- Smart rate limiting and backpressure control to protect downstream providers from traffic spikes.
- Real-time token consumption calculation and multi-dimensional analytics (by tenant, model, timestamp).
- Granular observability dashboards for usage insights.
- Flexible pricing engine supporting dynamic rates and tiered pricing models.
- Automated billing generation and real-time cost alerting.
-
Cross-Language Event-Driven Architecture Powered by Kafka and Schema Registry, ensuring strict event contracts between Java gateways, Python analytics, and provisioning tools.
-
Model Self-Healing Automatically monitors backend provider health and reroutes requests to backup models during downtime.
-
Security & Privacy Integrated sensitive-word filtering, PII de-identification, and robust authentication (API Key, OAuth2).
-
Full Observability Native integration with Prometheus (metrics) and OpenTelemetry (distributed tracing), providing full visibility into the request lifecycle.
NexLLM relies on a high-performance message bus for state synchronization. Start the core components:
# Launch Kafka Cluster, Schema Registry, and Database
docker-compose up -dRegister event schemas and generate cross-language constants using the built-in tool:
cd infra-init
# Sync configuration and generate Java/Python constant classes
python main.py all# Start the core Java high-performance gateway
./mvnw spring-boot:run -pl nexllm-gateway- Phase 1: Implement real-time token counting engine for streaming responses.
- Phase 2: Introduce latency-aware Smart Model Fallback strategies.
- Phase 3: Release enterprise multi-tenant management portal and cost allocation system.
Contributions are welcome, including:
- Bug reports
- Feature requests
- Documentation improvements
🔗 Project Home: NexLLM 🐞 Issue Tracker: GitHub Issues
This project is licensed under the Apache License 2.0. See the LICENSE file for details.