ccLoad  by caidaoli

AI API proxy with intelligent multi-provider routing

Created 7 months ago
255 stars

Top 98.8% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

ccLoad is a high-performance Go-based AI API proxy service designed to address the complexities of managing multiple API channels for services like Claude, Gemini, and OpenAI. It provides intelligent routing, automatic fault switching, and real-time monitoring, enabling users to maintain stable and efficient AI integrations with zero manual intervention.

How It Works

Built with Gin and Sonic JSON for 1000+ concurrent requests per second, ccLoad features intelligent routing based on priority and weighted round-robin. It offers automatic fault detection with exponential backoff cooling and multi-URL load balancing that favors lower-latency endpoints. The system also detects "soft errors" (e.g., HTTP 200 with JSON errors) and supports both SQLite (embedded) and MySQL databases via a factory pattern for code reusability.

Quick Start & Requirements

Deployment options include Docker (recommended, with docker-compose or direct docker run), source compilation (requires Go 1.25.0+), binary download, and Hugging Face Spaces. Docker setups are straightforward, often requiring only environment variable configuration for passwords. Hugging Face Spaces offers a free tier with resource limitations (2 CPU, 16GB RAM) and a hibernation policy; external MySQL is recommended for persistent storage in cloud environments.

Highlighted Details

  • Performance: Achieves 1000+ concurrent requests using Gin and Sonic JSON.
  • Intelligent Routing & Failover: Priority-based routing, weighted round-robin, automatic fault switching with exponential backoff, and latency-based multi-URL load balancing.
  • Cost Management: Supports OpenAI service tiers (priority/flex/default), tiered pricing for models, and local token estimation (<5ms, 93%+ accuracy).
  • Robustness: Detects "soft errors" and offers channel-level and key-level error classification.
  • Ease of Use: Out-of-the-box functionality with embedded SQLite, multi-architecture Docker images, and a comprehensive web-based management interface.
  • Monitoring: Real-time dashboard for request trends, errors, token usage, and channel performance.

Maintenance & Community

The project is actively developed, with a focus on architectural optimization and feature additions. Contributions are welcomed via GitHub Issues and Pull Requests. Specific community channels like Discord or Slack are not listed.

Licensing & Compatibility

Released under the permissive MIT License, allowing for commercial use and integration into closed-source projects without significant restrictions.

Limitations & Caveats

Hugging Face Spaces free tier has resource constraints and a hibernation policy. Production deployments require setting a strong CCLOAD_PASS and configuring API access tokens via the web interface. API keys are handled in memory; HTTPS reverse proxy is recommended for enhanced security. Tokens expire after 24 hours in browser localStorage.

Health Check
Last Commit

23 hours ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
9
Star History
54 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.