Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

fix(qwen): add x-request-id header to device code request (#1197)

tombii5049cc6e1d09
diff --git a/src/lib/oauth/services/qwen.ts b/src/lib/oauth/services/qwen.ts
index 547059ef82..699952dcf8 100644
--- a/src/lib/oauth/services/qwen.ts
+++ b/src/lib/oauth/services/qwen.ts
@@ -1,4 +1,5 @@
import open from "open";
+import { randomUUID } from "node:crypto";
import { QWEN_CONFIG } from "../constants/oauth";
import { getServerCredentials } from "../config/index";
import { generatePKCE } from "../utils/pkce";
@@ -24,6 +25,7 @@ export class QwenService {
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Accept: "application/json",
+ "x-request-id": randomUUID(),
},
body: new URLSearchParams({
client_id: this.config.clientId,