Qwen Gate

Expose Qwen web sessions through a self-hosted OpenAI-compatible API for existing developer tools.

Stars
★ 223
Last updated
3mo ago v0.8.0
FARS reviewed
Nov 08, 2026
License
MIT
Primary language
TypeScript

At a glance

How it runs
CLISelf-hosted serviceWeb app
Works with
Platform-specificOpenAI APIClaude Code (Partial support)
Cost
Free, no paid service needed
Setup effort
Medium · a few setup steps
You'll need
Bun 1.3+PlaywrightQwen accountShell / CLINetwork accessLocal filesystem
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

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.

  1. A Claude Code, Cursor, or OpenCode user wants to point an existing OpenAI-compatible client at a self-hosted endpoint for Qwen models.
  2. A developer managing several Qwen accounts wants round-robin distribution, automatic failover, and cooldown tracking.
  3. A developer whose client expects SSE wants to route streaming requests through Qwen web sessions.
  4. An operator wants a local dashboard for request logs, account status, and outbound network inspection.
  5. 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
qg

For 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:

qg
curl -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)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

What are this agent's strengths and limitations?

Pros
  • Implements /v1/chat/completions and /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.
Limitations
  • 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?

FollowAgents source review · FARS-2.1
Major gaps
47/ 100 5-point scale 2.4 / 5
Trust 11/29
Reliability 5/14
Adaptability 10/18
Convention 10/18
Effectiveness 7/13
Verifiability 4/8
Why each dimension lost points
Trust11 / 29 · 1.9/5

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.

Reliability5 / 14 · 1.8/5

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.

Adaptability10 / 18 · 2.8/5

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.

Convention10 / 18 · 2.8/5

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.

Effectiveness7 / 13 · 2.7/5

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.

Verifiability4 / 8 · 2.5/5

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.

Risks and how to mitigate them
  • 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.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision 5220f7d3c50c
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/qwengate.svg)](https://followagents.com/en/agents/qwengate)
<a href="https://followagents.com/en/agents/qwengate"><img src="https://followagents.com/badge/qwengate.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. 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 ↗
  2. v0.7.2
    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 ↗
  3. v0.7.1
    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?
The README describes the Qwen web models it exposes as free to use, but does not specify quotas, reliability, or service guarantees. Users must follow chat.qwen.ai's terms.
What account and runtime do I need?
You need Bun to run the gateway and a Qwen email/password account to add in the dashboard. Browser automation handles sign-in. The README recommends at least three dedicated accounts for rotation and advises against using a personal Qwen account.
Can I use it with an OpenAI SDK or Claude Code?
The README explicitly lists OpenAI-compatible clients and Claude Code. Point the client to http://localhost:26405/v1; requests go through the local gateway to Qwen.
Are tool calls equivalent to native OpenAI tool calling?
No. The README says Qwen emits tool calls as response text and the gateway parses that text into OpenAI-style objects; it notes that this is imperfect.
What happens when an account is rate-limited or login fails?
The gateway supports account rotation, failover, cooldowns, and retries. The README does not guarantee these mechanisms prevent every rate limit or browser-login failure.
Is Qwen Gate free?
Yes. Qwen Gate is free to use and does not need a paid service.
Is Qwen Gate open source?
Yes. The source code is on GitHub (youssefvdel/qwengate) under the MIT licence.
Is Qwen Gate safe to use?
FollowAgents' FARS review (Nov 08, 2026) scored Qwen Gate 11/29 on trust and safety. None of the eight safety controls the review checks for was missing outright.
Is Qwen Gate still maintained?
Development has slowed: the latest commit on GitHub is from 2026-08-08, within the last six months but not the last 30 days. The latest release is v0.8.0 (2026-06-25).
Who makes Qwen Gate?
Qwen Gate is published on GitHub by the account youssefvdel. FollowAgents has not verified which person or company is behind that account.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts