Repository navigation
feat(qwencloud): add QwenCloud provider via the official CLI - #134
Conversation
QwenCloud (home.qwencloud.com) is Alibaba's international Qwen storefront, separate from DashScope Model Studio: its own console, its own API keys (sk- pay-as-you-go, sk-sp- Token Plan) and its own billing, so the existing qwen card cannot read it. There is no public read-only usage HTTP API, but the official QwenCloud CLI (OAuth device flow, usage:read scope) exposes subscription status and usage summary as JSON. The card shows the Token Plan monthly Credits bar with its reset date from `qwencloud subscription status` — the authoritative plan source, since `usage summary` reports the plan as unsubscribed for sk-sp- key traffic — plus the month's pay-as-you-go spend and the count of still-valid free-tier model quotas. Without a Token Plan the free tier or the PAYG spend leads the card. Alias: qwen-cloud. Signed-off-by: Geert Theys <[email protected]>
4e6e430 to
cb04234
Compare
PR bernardopg#134 added QwenCloud to the Portuguese README and provider docs, but the English README quota table still omitted it. Signed-off-by: Bernardo Pinto Gomes <[email protected]>
|
Thanks for the contribution, @gtheys! The QwenCloud implementation fits the project patterns well: thin stub, native adapter in Technical reviewPoints I checked:
Small fix I pushedI pushed a small docs fix to the PR branch ( Local validationIn addition to the green checks already on the PR, I ran locally on the current PR state:
If you get a chance, please take a look at the docs tweak and let me know if it looks good to you. If you want me to make any other refinement on the PR to speed up merge, I can handle it here. Thanks again! |
Problem
QwenCloud is Alibaba's international Qwen storefront — a separate account from DashScope Model Studio, which the existing
qwencard targets. It has its own console, its own API keys (sk-…pay-as-you-go,sk-sp-…Token Plan) and its own billing (Token Plan Credits, Coding Plan, free-tier quotas), so a QwenCloud account shows nothing but an auth check underqwen.Root cause
QwenCloud exposes no public read-only usage HTTP API. It does, however, ship an official CLI (
@qwencloud/qwencloud-cli) with an OAuth device-flow login carrying a read-onlyusage:readscope, which exposes the full account picture as JSON.What the card shows
qwencloud subscription status. This command is the authoritative plan source:usage summaryreports the plan as unsubscribed forsk-sp-key traffic (noted in the adapter).usage summary(plain reading,hasLimit: false).validvs listed.npm i -g @qwencloud/qwencloud-cli,qwencloud auth login).Alias:
qwen-cloud. Logo reusesqwen.svg(same Qwen brand, noted inSOURCES.md).Verified end-to-end against a live QwenCloud account on a Token Plan Pro subscription.
Test plan
tests/test-qwencloud.sh(new): fakeqwencloudCLI fixtures — Token Plan individual/team primary, PAYG/free-tier slot order, degraded responses, signed-out and missing-CLI errors, health readiness,qwen-cloudalias, stub entrypointscripts/check-metadata,scripts/check-changelog,scripts/check-dcobash -n+shellcheck -S warningonproviders/and the new testtests/test-*.shsuite greenqmllintexit 0Signed-off-by: Geert Theys [email protected]