Skip to content

fix(providers): promote weekly window to primary for Qwen Cloud - #284

Open
hellhole8 wants to merge 2 commits into
nesszer:mainfrom
hellhole8:fix/qwencloud-weekly-window
Open

fix(providers): promote weekly window to primary for Qwen Cloud#284
hellhole8 wants to merge 2 commits into
nesszer:mainfrom
hellhole8:fix/qwencloud-weekly-window

Conversation

@hellhole8

@hellhole8 hellhole8 commented Aug 14, 2026

Copy link
Copy Markdown

Summary

Fixes Qwen Cloud individual plans that expose only the weekly usage window
(per1WeekPercentage, no per5HourPercentage / legacy quota). Previously
snapshot_to_usage failed with "Qwen Cloud usage windows missing"; now the
weekly window is promoted to primary.

Behavior change

  • Weekly-only accounts now show the weekly percentage (e.g. 84.39%) instead
    of no data / error.
  • When both windows exist, weekly remains secondary (unchanged).
  • Added test weekly_only_shape_promotes_weekly_to_primary with real-world
    fixture.

Commands run

  • cargo test -p codexbar qwencloud — 9/9 pass
  • cargo fmt --all

Validation

Validated in the desktop app (debug build): provider now shows the weekly
84.39% window correctly.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@Finesssee

Copy link
Copy Markdown
Collaborator

Thanks for the PR, I will review it ASAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants