2026-07-31 10:37:20 +03:00
2026-07-31 09:54:59 +03:00
2026-07-31 10:37:20 +03:00
2026-07-31 10:37:20 +03:00
2026-07-31 09:54:59 +03:00
2026-07-31 10:37:20 +03:00

Hygate

About

Hygate is a standalone, single-binary gateway that exposes Tencent's Hunyuan 3 (hy3) Gradio space through an OpenAI-compatible API. It translates the standard /v1/chat/completions and /v1/models endpoints into Gradio's /gradio_api/call/chat request/stream protocol, so any OpenAI-compatible client can talk to Hunyuan 3 without modification.

Features

  • OpenAI-compatible chat completions (streaming and non-streaming)
  • Reasoning content passthrough (reasoning_content)
  • Tool/function calling, including incremental streaming of tool-call arguments
  • Fibonacci backoff retry on upstream calls
  • Configurable endpoint, model name, and User-Agent
  • No external dependencies (standard library only)

Installation

You need Go 1.26 or newer. Install the latest release straight from the Git repository with go install:

go install code.luxferre.top/luxferre/hygate@latest

This fetches the module from https://code.luxferre.top/luxferre/hygate.git and places the hygate binary in $(go env GOPATH)/bin. Make sure that directory is on your PATH.

If you prefer to build from a local checkout instead:

git clone https://code.luxferre.top/luxferre/hygate.git
cd hygate
go install .

Alternatively, you can directly build from source by running make. This produces bin/hygate binary for your architecture.

Usage

Run the gateway:

hygate [-port 8080] [-endpoint https://tencent-hy3.hf.space] [-model hy3]

Available flags:

  • -port — TCP port to listen on (default 8080)
  • -endpoint — root URL of the Hunyuan Gradio space (default https://tencent-hy3.hf.space)
  • -model — exposed model name (default hy3)
  • -user-agent / -ua — custom User-Agent sent to the upstream

Endpoints served:

  • GET /v1/models
  • POST /v1/chat/completions

Example request with curl:

curl http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"hy3","messages":[{"role":"user","content":"Hello"}],"stream":false}'

FAQ

Does this need an API key?

No. The gateway proxies directly to the public Gradio space and does not require authentication.

Why proxy this particular model?

Even through the Gradio API, Tencent Hy3 is a very fast and performant model when it comes to agentic tasks. Unfortunately, it still is too big for most people to run locally, at decent speed or at all. This gateway solves this problem for them.

Which models are reported?

By default, a single model, hy3 (configurable via the -model flag), is advertised via /v1/models.

Are token usage counts returned?

No. The usage field is always zero, since the upstream Gradio API does not expose token counts.

Can the upstream endpoint be changed?

Yes, with the -endpoint flag. Any HuggingFace Gradio space hosting the compatible /chat endpoint will work.

Is it compatible with the Dynagate LLM gateway?

Absolutely. Just run Hygate on a separate port (e.g. 8899) and then add the following line to the Dynagate's models.csv file:

hy3,-,http://localhost:8899,

Credits

Created by Luxferre in 2026, released into the public domain with no warranties.

S
Description
A small and straightforward Tencent Hy3 API gateway
Readme
50 KiB
Languages
Go 99.5%
Makefile 0.5%