Skip to content

v1.6.0

Choose a tag to compare

@github-actions github-actions released this 03 Oct 06:03
· 17 commits to main since this release
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