zeroclaw/scripts
Chum Yin db175c3690
[supersede #1545] feat(providers): implement Qwen OAuth quota tracking (#1746)
* feat(providers): implement Qwen OAuth quota tracking

Add static quota display for Qwen OAuth provider (portal.qwen.ai).
Qwen OAuth API does not return rate-limit headers, so this provides
a static quota indicator based on known OAuth free-tier limits.

Changes:
- Add QwenQuotaExtractor in quota_adapter.rs
  - Parses rate-limit errors for retry backoff
  - Registered for all Qwen aliases (qwen, qwen-code, dashscope, etc.)
- Add Qwen OAuth detection in quota_cli.rs
  - Auto-detects ~/.qwen/oauth_creds.json
  - Displays static quota: ?/1000 (unknown remaining, 1000/day total)
- Improve quota display formatting
  - Shows "?/total" when only total limit is known
- Add comprehensive test report and testing scripts
  - Full integration test report: docs/qwen-provider-test-report.md
  - Model availability, context window, and latency tests
  - Reusable test scripts in scripts/ directory

Test results:
- Available model: qwen3-coder-plus (verified)
- Context window: ~32K tokens
- Average latency: ~2.8s
- All 15 quota tests passing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit fa91b6a170)

* docs: satisfy markdownlint spacing in qwen docs

---------

Co-authored-by: ZeroClaw Bot <zeroclaw_bot@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-25 03:09:38 -05:00
..
ci ci: enforce unsafe debt audit and policy governance 2026-02-24 21:36:47 +08:00
release fix(ci): sync release publishing with GHCR and add runbook (#1087) 2026-02-20 07:10:09 -05:00
bootstrap.sh supersede: file-replay changes from #1317 2026-02-24 23:46:04 +08:00
install-release.sh supersede: replay changes from #1413 2026-02-25 10:22:35 +08:00
install.sh feat(installer): add guided zeroclaw installer and distro hardening (#887) 2026-02-20 04:34:14 -05:00
qwen_context_test.sh [supersede #1545] feat(providers): implement Qwen OAuth quota tracking (#1746) 2026-02-25 03:09:38 -05:00
qwen_latency_benchmark.sh [supersede #1545] feat(providers): implement Qwen OAuth quota tracking (#1746) 2026-02-25 03:09:38 -05:00
qwen_model_probe.sh [supersede #1545] feat(providers): implement Qwen OAuth quota tracking (#1746) 2026-02-25 03:09:38 -05:00
README_QWEN.md [supersede #1545] feat(providers): implement Qwen OAuth quota tracking (#1746) 2026-02-25 03:09:38 -05:00
recompute_contributor_tiers.sh chore(labeler): normalize module labels and backfill contributor tiers (#462) 2026-02-17 08:25:50 -05:00
test_dockerignore.sh feat: add AIEOS identity support and harden cron scheduler security 2026-02-14 13:26:08 -05:00