rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:zznobzz/dsh-qwen-sub-oauth
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Use a Qwen Plus/Pro subscription (chat.qwen.ai) as a model provider in DeepSeek Harness — with OAuth, no API key.
The old free Qwen OAuth (chat.qwen.ai/api/v1/oauth2/*) was shut down on 2026-04-15. The subscription flow Qwen Code uses today is different, and this plugin speaks it: device flow against auth.qwen.ai, OpenAI-compatible gateway at api.qwen.ai/compatible-mode/v1, and automatic token rotation into the DSH credential store.
qwen-sub-oauth (api.qwen.ai/compatible-mode/v1, models qwen3.8-max, qwen3.8-flash, qwen4-max, 1M context) in llm-pi-ai through the DSH config editor. It tries on activation; if the host refuses the edit while the install transaction is still open, /qwen-setup completes it./qwen-login (confirm the pending code or start a fresh flow), /qwen-status (token presence and expiry), /qwen-setup (register the route again if the automatic attempt was refused). The link is also logged to $DSH_HOME/qwen-sub-oauth.log.QWEN_SUB_OAUTH_TOKEN / QWEN_SUB_OAUTH_REFRESH into the credential store. LLM adapters re-read the reference per request, so rotation needs no restart.llm-pi-ai plugin (every shipped profile has it) and the local credential store.dsh plugin --profile web add github:zznobzz/dsh-qwen-sub-oauth
The bundle activates live through HMR — no restart needed on a standard profile. (If your host runs with HMR disabled, restart the profile once.)
On first activation the plugin starts the device flow and logs a link such as:
[qwen-sub-oauth] авторизация: https://chat.qwen.ai/authorize?user_code=XXXX-XXXX&client=cli (код XXXX-XXXX)
Open it in a browser (you must already be signed in to chat.qwen.ai), approve the code, and wait for авторизация завершена in the log — or just ask the assistant to show the login link, it relays the live URL from its system prompt. Then run /qwen-setup to register the route. In the GUI, /qwen-login reprints the pending link or starts a new one, /qwen-status shows the current state.
Pick Qwen (подписка OAuth) in the model selector and choose qwen3.8-max, qwen3.8-flash or qwen4-max.
/qwen-login # pending verification link + code, or a fresh flow
/qwen-status # authorized? when does the access token expire?
/qwen-setup # add the provider route to llm-pi-ai again
- insert:
- id: qwen-sub-oauth
name: dsh-qwen-sub-oauth
config:
autoLogin: true # start the device flow on activation when not signed in
configureRoute: true # register the pi-ai route when it is absent
intervalMs: 600000 # token refresh tick
If you prefer to declare the route yourself, disable configureRoute and add it to your profile patch:
- id: llm-pi-ai
name: "@deepseek-ai/dsh-llm-pi-ai"
config:
providers:
qwen-sub-oauth:
displayName: Qwen (OAuth subscription)
api: openai-completions
baseURL: https://api.qwen.ai/compatible-mode/v1
apiKeyEnv: QWEN_SUB_OAUTH_TOKEN
models:
- id: qwen3.8-max
name: Qwen3.8 Max
contextWindow: 1000000
maxTokens: 32768
| Step | Request |
|---|---|
| Device code | POST https://auth.qwen.ai/api/oauth/device/code — client_id=qwen-code-cli, scope="model:invoke profile:read" |
| User approves | https://chat.qwen.ai/authorize?user_code=…&client=cli (the advertised /device URI has no SPA route) |
| Token | POST https://auth.qwen.ai/api/oauth/token — grant_type=urn:ietf:params:oauth:grant-type:device_code |
| Refresh | POST https://auth.qwen.ai/api/oauth/token — grant_type=refresh_token |
| Profile | GET https://auth.qwen.ai/api/oauth/userinfo |
| Model calls | POST https://api.qwen.ai/compatible-mode/v1/chat/completions with Authorization: Bearer <access_token> |
A User-Agent of the QwenCode/… shape is mandatory: Aliyun WAF answers 405 and an HTML stub to default HTTP-client agents.
MISSING_CREDENTIAL / PROXY_TOKEN_MISSING — no token in the store: run /qwen-login.invalid_grant during refresh — the refresh token was revoked: rerun /qwen-login (delete QWEN_SUB_OAUTH_REFRESH first if the plugin still considers you signed in).405 plus HTML instead of JSON — a request went out without the QwenCode/… User-Agent./authorize link this plugin prints. The device URI that the token endpoint advertises has no route in the deployed SPA; /authorize?user_code=…&client=cli is what Qwen Code itself opens./qwen-setup; if it reports a configuration error, add the provider block manually or restart the profile.dsh plugin --profile web remove dsh-qwen-sub-oauth
Remove the qwen-sub-oauth provider block from your profile patch and unset the stored credentials if you want the tokens gone.
$DSH_HOME/.credentials.yaml, mode 0600); nothing is written into configuration.client_id=qwen-code-cli is the public Qwen Code CLI client. Using its tokens from a third-party client is a grey area of Qwen's terms of service; quotas follow your subscription plan.MIT licensed.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: llm-provider、deepseek-harness。