DS2API is a production-grade API proxy/gateway that translates DeepSeek's web chat API into OpenAI, Claude, Gemini, and Ollama-compatible endpoints. It provides a full-featured web UI for administration, account management, proxy configuration, and API testing. The system handles authentication (JWT, API keys, managed accounts), streaming responses with tool call detection, and multi-protocol request normalization. Architecturally, it is a Go backend with a React frontend (Vite + Tailwind). The backend is modular: protocol-specific handlers (OpenAI chat/responses, Claude messages, Gemini generate, Ollama chat) share a common prompt compatibility layer that normalizes requests to DeepSeek's internal format. A custom DeepSeek client manages authentication, PoW challenges, session lifecycle, and streaming. The SSE parsing infrastructure, tool call sieve, account pool, and config store are reusable components with extensive test coverage. Key data flows: incoming API requests are parsed and normalized to a unified prompt representation (role-tagged messages, tool descriptions, file references). The prompt is sent to DeepSeek's web chat API via a streaming or non-streaming completion runtime. Responses are parsed from SSE chunks, transformed (thinking extraction, tool call normalization, citation handling), and streamed back in the original protocol format. The system supports retry logic, account switching, and current input file injection for large contexts. External dependencies include DeepSeek's web chat API (reverse-engineered), Go standard library, chi router, utls for TLS fingerprinting, Node.js for Vercel streaming and WebUI build, and React/Vite for the frontend. The project is actively maintained with CI/CD pipelines, Docker images, and Vercel deployment support.
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.