Status: [LIVE] Endpoints found: https://tencent-Hy3.hf.space/gradio_api/call/chat https://tencent-Hy3.hf.space/gradio_api/call/chat/{event_id} Source: https://github.com/sabyaghosh/hy3-openai-api-final # Hy3 OpenAI-Compatible API A production-ready OpenAI-compatible API proxy for [Tencent Hy3](https://huggingface.co/spaces/tencent/Hy3) — the 295B MoE model — via HuggingFace's Gradio API. **No API key required** to call Hy3 upstream. Drop-in replacement for `https://api.openai.com/v1`. [![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/sabyaghosh/hy3-openai-api-final) [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/) [![FastAPI](https://img.shields.io/badge/FastAPI-0.110%2B-009688.svg)](https://fastapi.tiangolo.com/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) --- ## ✨ Features - **OpenAI-compatible** — point any OpenAI SDK / LangChain / LlamaIndex client at `/v1` - **Streaming + non-streaming** — full SSE support with `text/event-stream` - **Thinking mode** — exposes model reasoning via `reasoning_content` (o1-style) - **Tool calling** — full OpenAI function-calling format - **Multi-turn conversations** — pass full message history - **Concurrency control** — semaphore with queue + 503 + `Retry-After` (prevents upstream overload) - **Observability** — structured logging, in-memory ring buffer, admin endpoints, `/stats` dashboard - **Production hardening** — optional API keys, admin token auth, input size limits, CORS spec compliance, graceful error handling - **CLI client** (`hy3.sh`) — quick one-shot prompts from the terminal - **Docker-ready** — one-command deploy to Render / Fly.io / Cloud Run / Koyeb / Railway / HF Spaces --- ## 📦 What's New ### v1.4.5 (Code-Review Release) Full line-by-line review of the repo. Highlights: - **`pyproject.toml` added — fixes a startup crash on Diploi.** `diploi.yaml` runs `uv run --with uvicorn uvicorn server:app`, and `uv run` resolves deps from `pyproject.toml`, **not** `requirements.txt`. Without it the venv contained