@pedrofariasx/qwenproxy 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pedrofariasx/qwenproxy",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Local OpenAI-compatible proxy API that routes requests to Qwen (chat.qwen.ai) via Playwright browser automation.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,7 +17,7 @@ function getClientHintsHeaders(): Record<string, string> {
17
17
  }
18
18
 
19
19
  function getRandomDelay(): number {
20
- return 200 + Math.floor(Math.random() * 600);
20
+ return 30 + Math.floor(Math.random() * 80);
21
21
  }
22
22
 
23
23
  export class RetryableQwenStreamError extends Error {
@@ -152,18 +152,7 @@ async function refillPoolForAccount(accountId: string) {
152
152
  let headers: Record<string, string>;
153
153
  try {
154
154
  const acctId = accountId === 'global' ? undefined : accountId;
155
- try {
156
- const { headers: fullHeaders } = await getQwenHeaders(false, acctId);
157
- headers = {
158
- cookie: fullHeaders['cookie'] || '',
159
- 'user-agent': fullHeaders['user-agent'] || '',
160
- 'bx-v': fullHeaders['bx-v'] || '',
161
- 'bx-ua': fullHeaders['bx-ua'] || '',
162
- 'bx-umidtoken': fullHeaders['bx-umidtoken'] || '',
163
- };
164
- } catch {
165
- headers = await getBasicQwenHeaders(acctId);
166
- }
155
+ headers = await getBasicQwenHeaders(acctId);
167
156
  } catch (err) {
168
157
  console.error(`[WarmPool] header fetch failed for ${accountId}:`, (err as Error).message);
169
158
  return;