This repository is a full-stack, multi-tenant AI API gateway platform (named 'sub2api') that proxies requests to a wide range of AI model providers including OpenAI, Anthropic, Gemini, Grok, DeepSeek, and many others. It provides authentication (JWT, OAuth, API keys), rate limiting, token-level billing, subscription management, user and admin management, payment processing (Alipay, WeChat Pay, Stripe, Airwallex, EasyPay), content moderation, channel monitoring, and operational dashboards. The backend is written in Go using the Gin framework and Ent ORM, with PostgreSQL and Redis for data storage and caching. The frontend is built with Vue 3, TypeScript, and Pinia stores, offering both admin and user interfaces. The system is designed for production deployment with Docker, includes extensive unit and integration tests, and supports a plugin architecture for extensible OAuth transport. Despite its large codebase and many features, the architecture follows a clear service-repository pattern with well-isolated packages, making it a solid example of a complex API gateway implementation.
GCLI2API is a production-grade API proxy that converts Google Gemini CLI and Antigravity credentials into OpenAI, Gemini, and Claude compatible API endpoints. It manages OAuth credentials with automatic rotation, error-based cooldowns, and load balancing, providing a unified interface for multiple backend services. The system includes a web-based control panel for credential management, real-time logs, configuration editing, and batch operations. The architecture is a FastAPI web application with modular routers for each API format (OpenAI, Gemini, Claude) and two backend modes (geminicli, antigravity). Format converters handle bidirectional translation between Anthropic, OpenAI, and Gemini schemas, including tool calls, streaming, and thinking blocks. Storage is abstracted via an adapter pattern supporting SQLite, MongoDB, and PostgreSQL, with optional Redis caching for credential pools. Key features include streaming support with fake streaming fallback, anti-truncation via synthetic tool calls, thought signature preservation across format conversions, and a keepalive service. The system relies on httpx for async HTTP, Pydantic for data models, and external Google Cloud APIs for OAuth and quota management. Deployment is supported via Docker, docker-compose, and platform-specific install scripts for Linux, macOS, Windows, and Termux. This is a pure application with no data research or ML components. It demonstrates strong engineering practices in credential management, format conversion, and async I/O, though it suffers from some code duplication between backend modes and limited test coverage.
Antigravity Manager is an Electron desktop application that serves as a multi-account manager and local API proxy gateway for AI models (Google Gemini, Claude, OpenAI-compatible). It allows users to pool multiple Google Cloud accounts, automatically rotates between them based on real-time quota and rate limits, and exposes a local proxy server that translates between OpenAI, Anthropic, and Gemini API protocols. The application handles OAuth token lifecycle, credential storage across OS keychains and encrypted files, and includes a React UI for account management, quota monitoring, and configuration. Architecturally, the app is a monolith with three major layers: an Electron main process that bootstraps a NestJS server (Fastify), a React renderer with TanStack Router and shadcn/ui, and a Python CLI for headless account operations. The proxy gateway is the most complex module, with controllers for OpenAI chat completions, Anthropic messages, Gemini models, batch jobs, file uploads, and WebSocket-based Responses API. Credential management is handled through a multi-provider master key system with migration paths, atomic file writes, and SQLite persistence via Drizzle ORM. The codebase also includes device identity profile manipulation (fingerprint spoofing) gated by environment variables, and binary patching of the agy CLI executable. The codebase demonstrates strong engineering practices with extensive Vitest unit tests (250+ test files), Playwright e2e tests, Zod schema validation at IPC boundaries, and structured error handling. However, it also carries risks: hardcoded model aliases and Google API endpoints, fragile binary patching logic, and a large surface area of credential storage strategies that may drift as OS APIs evolve. The repo is actively maintained with frequent commits and CI pipelines, but the complex fallback chains and security-sensitive code require careful ongoing maintenance.