Qwen Gate
Expose Qwen web sessions through a self-hosted OpenAI-compatible API for existing developer tools.
- Source repo
- youssefvdel/qwengate
- Stars
- ★ 223
- Last updated
- 3mo ago v0.8.0
- FARS reviewed
- Nov 08, 2026
- License
- MIT
- Primary language
- TypeScript
- FA score
- 47/100 · Major gaps
At a glance
- How it runs
- Works with
- Platform-specificOpenAI APIClaude Code (Partial support)
- Cost
- Free, no paid service needed
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- A Claude Code, Cursor, or OpenCode user wants to point an existing OpenAI-compatible client at a self-hosted endpoint for Qwen models.
- Not a fit if
- Teams that require the official Qwen API or service-level guarantees
- Users who cannot use browser automation to sign in to chat.qwen.ai
- Maintenance
- Commits in the last 6 monthslast commit 2026-08-08latest release v0.8.0 (2026-06-25)+0.6 ★/day over 7 days
- Source review
- 47/100 · Major gaps
What does this agent do, and when should you use it?
Qwen Gate is a self-hosted gateway that signs in to chat.qwen.ai with browser automation and exposes Qwen models through OpenAI-compatible endpoints. It runs TypeScript directly with Bun and provides /v1/chat/completions and /v1/models for clients configured with the local service URL. Features include SSE streaming, account rotation, a reusable session pool, and parsing of tool calls. A web dashboard covers request activity, accounts, network debugging, and settings. Playwright is used for login and authentication, while API requests use the wreq-js Node.js fetch transport. It fits developers who can operate the service and manage Qwen accounts, and whose clients speak the OpenAI API format; the project says it is for educational and study purposes and is not affiliated with Qwen or Alibaba.
Run qg or bun start to launch the Hono API and dashboard on the configured port (26405 by default). An administrator adds Qwen email and password credentials at /dashboard/accounts; the gateway uses Playwright to sign in and persist sessions. A client then sends model, message, and optional tool definitions to /v1/chat/completions, or queries /v1/models. The gateway obtains responses from Qwen, can stream them over SSE, and manages account rotation, cooldowns after rate limits, and retries; text-form tool calls are parsed into OpenAI-style tool call objects. The dashboard includes overview, logs, accounts, network debugging, and settings pages, with configuration and request logging behavior controlled by settings.
- A Claude Code, Cursor, or OpenCode user wants to point an existing OpenAI-compatible client at a self-hosted endpoint for Qwen models.
- A developer managing several Qwen accounts wants round-robin distribution, automatic failover, and cooldown tracking.
- A developer whose client expects SSE wants to route streaming requests through Qwen web sessions.
- An operator wants a local dashboard for request logs, account status, and outbound network inspection.
- A developer wants to experiment with tool calls and accepts that the gateway parses them from generated text with documented limitations.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
curl -sSL https://raw.githubusercontent.com/youssefvdel/qwen-gate/main/install.sh | bash
- Environment variables
API_KEY- Config files
config.json- Runtime
- Bun 1.3+
- Install notes cover
- Windows · macOS · Linux
How do you install or deploy this agent?
On Linux or macOS, the install script clones the repository, installs dependencies, and creates CLI aliases; manual setup requires Git and Bun. On Windows, use the PowerShell installer or clone the repository and run bun install. You will need a Qwen account and must add it in the dashboard. The README specifies Bun 1.3+ and uses browser automation for authentication.
curl -sSL https://raw.githubusercontent.com/youssefvdel/qwen-gate/main/install.sh | bash
cd qwen-gate
qgFor Windows, the documented installer command is:
powershell -ExecutionPolicy Bypass -c "curl.exe -sSL https://raw.githubusercontent.com/youssefvdel/qwen-gate/main/install.ps1 | iex"How do you use this agent?
Start the service, then open the dashboard and add a Qwen account. Set API_KEY in config.json if you want API authentication; its default is empty, which disables auth. Configure a client with base URL http://localhost:26405/v1 and send a Bearer token if one is configured. The example below starts the server and makes a first chat completion request:
qgcurl -X POST http://localhost:26405/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-key" \
-d '{
"model": "qwen3-max",
"messages": [{"role": "user", "content": "Hello!"}]
}'Replace your-api-key with the value configured in config.json; omit authorization when API auth is disabled. Set "stream": true to request SSE output.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
What are this agent's strengths and limitations?
- Implements
/v1/chat/completionsand/v1/models, allowing OpenAI-compatible clients to reuse their existing API integration. - Rotates multiple accounts with failover and cooldown tracking for operators managing several Qwen web accounts.
- Uses browser automation for login while sending API requests through fetch; its session pool reuses sessions and autoscale under load.
- Combines SSE, file upload handling, output cleanup, tool-call parsing, and a dashboard for requests and account status.
- Core operation depends on chat.qwen.ai web sessions and browser automation, tying availability to one service and its terms; the project disclaims official affiliation and limits its stated purpose to education and study.
- Operators must run a Bun service and manage Qwen credentials and persisted sessions, adding operational and credential-handling work compared with a hosted API.
- The README says Qwen does not natively support tool calling; the gateway parses model output text, and the result is not perfect.
- The README makes no service-level, quota, or long-term availability guarantees; website login or rate-limit changes may disrupt requests.
How does this agent compare with similar options?
Compared with calling a hosted OpenAI-compatible API directly, Qwen Gate is a self-run local gateway backed by chat.qwen.ai web sessions. It wraps those sessions in an OpenAI-style endpoint, at the cost of operating browser authentication and Qwen accounts. The README does not directly compare it with other gateways.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Qwen Gate This agent | 47 · Major gaps | CLIFree | ★ 223 | 3mo ago | TypeScript | OpenAI API |
| HarnessRouter Community Edition | 71 · Some gaps | Self-hosted serviceFree + model costs | ★ 4.5k | today | Python | Codex · Claude Code |
| AI Free | 47 · Major gaps | Desktop appFree | ★ 230 | 3mo ago | JavaScript | ChatGPT · OpenAI API · Claude API |
| My Free Code | 54 · Major gaps | Self-hosted serviceFree + model costs | ★ 629 | 1mo ago | Python | Claude Code · OpenAI API · Claude API |
How does FollowAgents rate this agent?
Why each dimension lost points
The README says the service logs in through chat.qwen.ai browser automation and asks users to enter Qwen credentials; its configuration table says an empty API_KEY disables authentication. The supplied material does not show credential encryption, detailed access controls, deployment network boundaries, or sensitive-log policy, so least privilege, confirmation, data flow, credential handling, and external effects are only partly addressed. The update command pulls code and installs dependencies without describing rollback. The README clearly disclaims affiliation with Alibaba/Qwen, supporting source attribution.
The README, AGENTS file, and package.json mostly describe Bun operation, startup, and test commands, but AGENTS calls Bun the only runtime while package.json also provides a Node startup script. The CI file lists locked installation, static checks, and tests, and the README describes test coverage; this static review cannot establish that they pass. Dependency ranges are present and a lockfile is referenced, but the supplied material does not establish dependency availability or vulnerability review. The CLI reports startup and update failures, while its status error is brief.
The README targets OpenAI-compatible clients, names several use cases, and provides chat, streaming, and tool-calling examples. It explains that tool calls are parsed from model text and are imperfect, and lists browser engines, port, authentication, and logging settings. Runtime guidance centers on Bun 1.3+; the Windows installation command requests administrator PowerShell. Environment requirements and limits are covered in part.
The README is organized around installation, usage, configuration, architecture, CLI, updates, and project structure; it provides Linux/macOS, Windows, and manual installation instructions and links API, deployment, and development docs. Product and CLI names are mostly stable, but the supplied excerpts cannot verify every README feature claim against current source. The MIT license file is complete. Version 0.7.0 and a release badge are shown, but no changelog is included in the packet. The security policy gives a vulnerability-reporting path and supported-version policy, with a 48-hour response statement.
The product wraps Qwen web sessions in a local OpenAI-compatible API and offers account rotation, streaming, tool calling, and a dashboard, reducing client adaptation work. The README provides usable startup and API examples. Claims about free models and avoiding cooldowns through multiple accounts are not independently established by the supplied material, and account upkeep, browser authentication, and deployment costs are not quantified.
Core features and installation claims are traceable to the README, while configuration, runtime commands, and CLI behavior receive some support from AGENTS and source. CI and test files provide some corroboration, but the packet is partial and a test excerpt contains a placeholder mock implementation, so it cannot substantiate every claim. The README clearly describes the tool-call parsing approach and disclaims official affiliation, separating some facts from limitations; free-model and performance benefits remain unverified claims.
- The README says API authentication is disabled when API_KEY is empty; configure authentication and confirm network access boundaries before exposing the service to untrusted networks.
- The gateway uses Qwen credentials and browser sessions and depends on chat.qwen.ai; use a dedicated account and observe the service terms as the README advises.
- The README promotes multi-account rotation to bypass cooldowns and free model access; these benefits are not verified by the supplied static material.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
v0.8.0 v0.8.0 — Anthropic API, wreq-js rewrite, tool fixes
Release notes excerpt
Features - feat: Anthropic-compatible /v1/messages endpoint — streaming, thinking, tool calls, Claude Code support - feat: Replace wreq-js with BoringSSL native worker (wreq-worker.mjs) — eliminates Rust tokio epoll crashes - feat: Browserless fetch mode — direct HTTP fetch instead of Playwright for accounts with valid cookies Tool Call Fixes - fix: Tool_use SSE format matches Anthropic spec exactly (content_block_start with empty input: {}, input_json_delta events, content_block_stop) …View on GitHub ↗ -
Release notes excerpt
Fixes - fix: close wreq-js sessions after every use — eliminates tokio epoll Bad file descriptor panic - fix: close wreq-js sessions in background acw_tc cookie refresh timer - fix: close wreq-js sessions on all error paths (no more leaks on failures) Before Every request leaked ~5-10 wreq-js sessions (STS token, parse trigger, parse polling, session creation, chat completion). The Rust tokio runtime continued polling on their epoll fds after JavaScript GC'd them, causing: unexpected error when polling the I/O driver: Bad file descriptor After …View on GitHub ↗ -
Release notes excerpt
Changes - perf: merge file uploads into single context.txt — halves upload latency (2 sequential file uploads → 1) - perf: reduce parse poll timeout from 60s to 5s for small text files - perf: add timing log to parse polling for diagnostics - fix: update default system prompt to reference context.txt format - fix: remove dead applyRequestJitter code (was never called)View on GitHub ↗
FAQ
Do Qwen model requests incur a per-token charge?
What account and runtime do I need?
Can I use it with an OpenAI SDK or Claude Code?
http://localhost:26405/v1; requests go through the local gateway to Qwen.Are tool calls equivalent to native OpenAI tool calling?
What happens when an account is rate-limited or login fails?
Is Qwen Gate free?
Is Qwen Gate open source?
Is Qwen Gate safe to use?
Is Qwen Gate still maintained?
Who makes Qwen Gate?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.