Skip to content

Releases: johngbl/qwenproxy

v1.6.6

Choose a tag to compare

@github-actions github-actions released this 22 Oct 16:11
7fe751d

🛠️ Bug Fixes

  • fix(quota,streaming,mutex): uncap quota rotation across pool, fix inFlightAccountInits mutex race, and stop fake assistant error deltas
    • Uncap quotaRotationsLeft in src/routes/chat/streaming.ts from hardcoded 6 to totalConfiguredAccounts - 1, enabling pools with 7+ accounts to rotate across all accounts on membership_limit
    • Never inject fake assistant content with finish_reason: 'stop' for network/transient stream errors in src/routes/chat/streaming.ts, preventing fake error banners in client history and allowing clean SDK retries
    • Register inFlightAccountInits synchronously in src/services/playwright.ts, eliminating concurrent 120s mutex timeouts and personalization sync failures
    • Add unit tests for uncapped quota rotation and stream error notice handling in src/tests/pool-quota-failover.test.ts and src/tests/stream-error-notice.test.ts
    • Bump version to 1.6.6

Full Changelog: v1.6.5...v1.6.6

v1.6.5

Choose a tag to compare

@github-actions github-actions released this 20 Oct 18:55
6abc790

🛠️ Bug Fixes

  • fix(headers,mutex,usage,tools): enforce ISO-8859-1 headers, harden mutex against double-grant, and fix usage retrocede
    • Fix Issue #6: use formatAsciiTimezone and sanitizeHeaderForFetch to guarantee HTTP headers never contain code points > 255 on non-English locales (Cyrillic/CJK), preventing window.fetch TypeError
    • Fix Issue #7 Part 1: add epoch generation counter to Mutex in src/core/mutex.ts to make late release() handles inert after stale force-release, preventing double-grant
    • Fix Issue #7 Part 2: accept both Qwen (input_tokens) and OpenAI (prompt_tokens) usage shapes in src/routes/chat/helpers.ts
    • Fix Issue #7 Part 3: stop overwriting prompt_tokens with local heuristic estimate in src/services/context-meter.ts to prevent token counts from retroceding across turns
    • Fix Issue #7 Part 4: auto-retry missing tool calls when the model hesitates with 'Tool X does not exists.' in src/tools/tool-call-heuristics.ts and src/routes/chat/streaming.ts
    • Add unit test suites: timezone-ascii.test.ts, mutex-epoch.test.ts, apply-upstream-usage.test.ts, tool-call-heuristics.test.ts
  • fix(logging): silence routine SessionKeeper token refresh spam from stdout
    • Demote routine 'access token expiring soon; silently refreshing' from console.log to logger.debug
    • Keep stdout clean and prevent thousands of repetitive heartbeat lines over long-running proxy deployments
    • Emit logger.warn only if a silent background token refresh fails
  • fix(auth): prevent double-refresh loop in SessionKeeper and auto-refresh restored expired sessions
    • Invalidate and sync cookieCaches on token refresh and reduce COOKIE_CACHE_TTL from 15m to 1m
    • Pass forceFresh=true in SessionKeeper so it evaluates real browser cookies rather than stale 15m memory cache, eliminating the 3-minute double-refresh loop
    • Proactively refresh expired tokens when restoring standby sessions from SQLite, preventing 401s and 120s re-auth/captcha delays
    • Add unit test coverage in src/tests/auth-playwright.test.ts
  • fix(concurrency): add stale stream slot sweeper and correct stop_reason on token truncation
    • Add sweepStaleAccountStreamSlots in src/services/qwen.ts to auto-release leaked stream slots (>30m) and unblock waiting queues, eliminating phantom full-load lockouts
    • Correct Anthropic stop_reason precedence in src/routes/anthropic/translate.ts to max_tokens on finish_reason: length (and end_turn on content_filter) even when tool_calls are present
    • Align non-streaming Responses usage mapping in src/routes/responses/adapter.ts with streaming path, reading output_tokens_details.reasoning_tokens
    • Add unit test coverage in src/tests/stale-stream-slot-sweeper.test.ts, src/tests/anthropic.test.ts, and src/tests/responses-api.test.ts
    • Bump version to 1.6.5

Full Changelog: v1.6.4...v1.6.5

v1.6.4

Choose a tag to compare

@github-actions github-actions released this 15 Oct 17:02
35c3377

📦 Other Changes

  • chore(release): bump version to 1.6.4 and fix mutex deadlocks and stream header stalls
    • Prevent false stuck-mutex recovery during header capture by exempting headers, refresh, and profile-reset locks
    • Give getPlaywrightBasicHeaders adequate mutex wait timeout (headers timeout + 30s) and eliminate duplicate refresh calls
    • Remove artificial 30s mutex timeout in withQwenBrowserPage, aligning with full page operation timeout
    • Treat browser stream ended before response headers as network-like error in retry policy
    • Bump version to 1.6.4 in package.json and src/core/version.ts

Full Changelog: v1.6.3...v1.6.4

v1.6.3

Choose a tag to compare

@github-actions github-actions released this 08 Oct 03:17
c0ff00b

🛠️ Bug Fixes

  • fix(resilience): auto-reinit evicted pages on demand, immune personalization from false 300s cooldown, and protect recently active contexts
    • ensureAccountPageAvailable in withAccountPage re-initializes evicted contexts on demand instead of failing with Playwright page unavailable
    • captureQwenHeaders boots standby accounts automatically on refresh instead of throwing page unavailable
    • Move PersonalizationSyncError precedence ahead of isAccountInitializationError in retry-policy to guarantee Invariant 9 (zero cooldown)
    • Guard evictIdlePlaywrightContextsToLimit from killing accounts active within the last 30s to prevent race condition crashes

📦 Other Changes

  • chore(release): bump version to 1.6.3
    • Bump version in package.json, package-lock.json, and src/core/version.ts to 1.6.3
    • Auto-reinit evicted contexts on demand in withAccountPage and captureQwenHeaders
    • Enforce strict zero cooldown on personalization failures in retry-policy
    • Guard context eviction from race conditions on active accounts

Full Changelog: v1.6.2...v1.6.3

v1.6.2

Choose a tag to compare

@github-actions github-actions released this 07 Oct 21:25
a367c67

🚀 Features & Enhancements

  • feat(resilience): detect in-band plain text overload messages and dismiss age confirmation modal
    • Add isOverloadMessage detector in src/utils/overload-detector.ts with guards against code blocks and tool calls
    • Transparently intercept plain text overload apologies in streaming and non-streaming modes before client emission
    • Quarantine overloaded account with 5-minute cooldown and auto-retry on next pool account
    • Add .age-confirmation-modal and multilingual Continue button selectors to clearVisibleChallenge in Playwright
    • Add comprehensive test suite in src/tests/overload-detector.test.ts
  • feat(auth): add passwordless email OTP login via CLI and TUI, and scale personalization stability
    • Add passwordless email OTP authentication flow (startEmailOtpLogin, verifyEmailOtpLogin, cancelEmailOtpLogin)
    • Support passwordless accounts in src/core/accounts.ts and SQLite database
    • Add OTP option [O] and interactive verification code prompt in CLI login (src/login.ts)
    • Add Tab toggle between Password and Passwordless OTP modes in TUI Accounts view modal
    • Scale personalization sync deadlines from 45s/60s to 90s/120s for massive prompts (750k chars + 58 tools)
    • Eliminate redundant GET round-trips before/after POST in syncQwenRequestPersonalization
    • Prevent destructive context teardown on slow page operations when page is still alive
    • Add automated test suite for OTP login in src/tests/otp-login.test.ts

🛠️ Bug Fixes

  • fix(retry): preserve structured quota codes in isOverloadError to prevent false cooldowns
  • fix(tui): fix right panel action hover row alignment and eliminate white input hover/truncation in add modal
    • Align right panel action button hover and click rows (16-21) to match visual layout after Cota Hoje row addition
    • Expand Add Account modal width to 76 chars to prevent (Tab: ...) button line truncation
    • Remove disruptive white background hover on text input placeholders in modal
    • Add stable padding to right panel and modal buttons to prevent horizontal text shifting on hover

📦 Other Changes

  • ci: decouple release from docker build and replace stalling azure ubuntu mirror in dockerfile
    • Change release job dependency to needs: [check] so npm publishing and GitHub release are not blocked by docker mirror timeouts\n- Replace azure.archive.ubuntu.com mirror with archive.ubuntu.com in Dockerfile to prevent slow apt downloads\n- Increase docker job timeout to 25m
  • ci: set cancel-in-progress to true and add 15m job timeouts
    • Prevent older runs on main from blocking newer pipeline dispatches\n- Set 15m timeout on check and docker jobs to prevent runner hangs

Full Changelog: v1.6.1...v1.6.2

v1.6.1

Choose a tag to compare

@github-actions github-actions released this 05 Oct 21:37
19f97de

🛠️ Bug Fixes

  • fix(resilience): guard process teardowns, scale reasoning timeout, and handle internal/WAF stream errors
    • Add installProcessTeardownGuards to catch benign CDP session closed and Network.setCacheDisabled ProtocolErrors across CLI entrypoints
    • Extend saveStorageState timeout to 10s and attach .catch to prevent unhandled promise rejections on context close
    • Close Playwright context per-account immediately in delete-chats loop to prevent eviction collisions
    • Increase REASONING_MODEL_TIMEOUT default from 180s to 300s (5 min) matching deep-thinking requirements and avoiding false etimedout
    • Explicitly classify internal_error in retry-policy to force fresh chat and account rotation with backoff
    • Send preventative upstream /stop before re-acquiring stream on failure to free Qwen backend resources
    • Enable failover rotation on repeated WAF anti-bot challenge so multi-account pool completes request

📦 Other Changes

  • chore(release): bump version to 1.6.1
    • Bump version in package.json, package-lock.json, and src/core/version.ts to 1.6.1\n- Includes process teardown crash guards, 300s reasoning timeout, internal_error and anti-bot retry enhancements

Full Changelog: v1.6.0...v1.6.1

v1.6.0

Choose a tag to compare

@github-actions github-actions released this 03 Oct 06:03
61fb431

🚀 Features & Enhancements

  • feat(metrics): support model aliases in daily quota weight calculation
    • Map client model aliases (e.g. claude-3-7-sonnet, gpt-4o, haiku) to corresponding Qwen tiers before computing daily quota weight
    • Added unit tests for alias weight resolution in src/tests/daily-usage.test.ts
  • feat(metrics): calibrate exact empirical model weights for daily quota percentage
    • Model weights relative to 500k standard baseline: Max (280k = ~1.7857x), Plus (500k = 1.0x), Omni (620k = ~0.8065x)
    • Persist weighted_tokens in SQLite account_daily_usage
    • Calculate account and pool usage percentages with mathematical accuracy based on real-world test limits
    • Verified with unit tests in src/tests/daily-usage.test.ts
  • feat(metrics): add real-time daily token usage tracking and visual progress bars in TUI
    • Track daily prompt and completion tokens in SQLite (account_daily_usage) keyed by UTC date
    • Auto-reset quota counter every day at 00:00 UTC (21:00 BRT) without cron jobs or restarts
    • Display real-time account and pool usage percentages and progress bars in TUI Status & Accounts views
    • Expose pool daily usage metrics in /health and Prometheus
    • Calibrate empirical daily token limits: ~250k tokens (Max), ~500k tokens (Plus), ~600k tokens (Omni)
    • Invariant guarantee: Purely observational monitoring; never throttles or blocks requests locally

🛠️ Bug Fixes

  • fix(pool): scale quota failover budget to support large multi-account pools
    • Scale maxAccountSwitches with configured account pool size (up to 6 switches)
    • Separate quotaRotationsLeft from generic retriesLeft in streaming.ts so real quota limits (membership_limit / RateLimited) do not exhaust stream retry budget
    • Preserve stream retry budget for transient network errors while smoothly hopping multiple quota-exhausted accounts
    • Add regression test in src/tests/pool-quota-failover.test.ts (870 total tests passing)
  • fix(resilience): debounce session keeper, avoid false re-auth, and extend deadline during captcha
    • Debounce proactive token check in keepAlivePlaywrightAccount to at most once per 60s per account
    • Check isPageLoggedIn and silent token refresh when navigation check times out in refreshHeadersInternal before triggering slow form re-auth
    • Extend acquireDeadline by 30s dynamically when Baxia captcha slider recovery is actively solving, preventing timeout-aborts during valid challenge resolution
    • Verified with 869/869 passing tests
  • fix(auth): preserve refreshToken in SQLite and coalesce concurrent personalization sync
    • Use SQL COALESCE in saveAuthSession to never overwrite existing 30-day refreshToken with NULL
    • Proactively persist localStorage refreshToken during captureQwenHeaders and refreshHeadersInternal
    • Coalesce concurrent in-flight syncQwenRequestPersonalization calls into a single shared Promise
    • Attempt silent in-page refreshAccountToken in triggerSend before falling back to full UI login
    • Await inFlightAccountInits in getBasicHeaders to prevent spurious 60s mutex timeouts during startup
    • Add reproduction tests for refreshToken preservation and personalization in-flight dedup (864 total tests passing)

📦 Other Changes

  • chore(release): bump version to 1.6.0
    • Bump package.json and package-lock.json to 1.6.0
    • Update cachedVersion in src/core/version.ts to v1.6.0
    • Includes real-time daily quota metrics, pool failover scaling, token weights, and resilience fixes

Full Changelog: v1.5.3...v1.6.0

v1.5.3

Choose a tag to compare

@github-actions github-actions released this 28 Sep 20:59
3f72536

🛠️ Bug Fixes

  • fix(auth): auto-heal expired tokens in completion fetch and retry on same account
    • Classify "unauthorized" (case-insensitive) and "token has expired" as QwenSessionExpiredError in parseQwenJsonError
    • Auto-heal in-place in createQwenStreamInternal via refreshAccountToken without escalating to 502
    • Enable same-account token refresh and retry in tryCreateStreamWithRetry when session expiration occurs
    • Bump version to 1.5.3

Full Changelog: v1.5.2...v1.5.3

v1.5.2

Choose a tag to compare

@github-actions github-actions released this 28 Sep 20:25
129d796

🚀 Features & Enhancements

  • feat(pool): limit startup warm pool to 4 accounts and initialize remaining standby on demand

📦 Other Changes

  • chore(release): bump version to 1.5.2

Full Changelog: v1.5.1...v1.5.2

v1.5.1

Choose a tag to compare

@github-actions github-actions released this 28 Sep 03:29
5fe66f3

🚀 Features & Enhancements

  • feat(parser): add bidirectional synonym matching across coding agent toolsets
  • feat(tools): ground system prompt in , add coding tool aliases, and fix auto-retry condition
    • Wrap tool definitions within tags matching Qwen Nous-Hermes pre-trained attention
    • Add dynamic two-tool diversity example and explicit negative constraint against hallucinated tools (bash, edit, sh, terminal)
    • Add transparent tool aliasing (execute_command <- bash/sh/terminal, replace_in_file <- edit/str_replace) with parameter mapping (cmd -> command, file_path -> path)
    • Fix auto-retry condition in streaming to check successfulToolCallsCount === 0 so unaliased undeclared calls trigger [SYSTEM CORRECTION]
    • Verified against test suite (860 tests passing) and real OpenCode execution

🛠️ Bug Fixes

  • fix(auth): import isAccountHeadersReady in playwright.ts
  • fix(auth): eliminate false session expired in isPageLoggedIn, guarantee UI login submission, and bypass redundant header capture

📦 Other Changes

  • chore(release): bump version to 1.5.1
  • refactor(parser): remove speculative synonym groups in favor of casing normalization and auto-retry
  • refactor(prompt): remove negative tool prohibitions and specific tool names for universal positive guidelines

Full Changelog: v1.5.0...v1.5.1