Skip to content

Feature Request: Support Qwen Cloud / DashScope pay-as-you-go API balance and usage #3553

Description

@mvicari

Summary

Currently, CodexBar's Qwen Cloud provider (.qwencloud) exclusively tracks the individual Token Plan (Personal/Solo) via web console session cookies from home.qwencloud.com (reporting rolling 5-hour and 7-day rate windows).

However, many users access Qwen models (such as Qwen 2.5 / Qwen 3 Coder, Qwen-Max, and Qwen-Plus) via standard pay-as-you-go API keys (DashScope / Qwen Cloud API keys) billed against an account cash balance or credit card, rather than a fixed Token Plan subscription.

I would like CodexBar to support tracking pay-as-you-go account balance and spend for Qwen Cloud / DashScope accounts, similar to existing API balance providers like DeepSeek (deepseek) and Doubao (doubao).

Current Behavior

  • Enabling qwen-cloud requires web cookies from home.qwencloud.com and attempts to fetch zeldaHttp.apikeyMgr./tokenplan/personal/api/v2/* endpoints.
  • In QwenCloudProviderDescriptor.swift, supportsCredits and supportsTokenCost are hardcoded to false.
  • Accounts without an active Token Plan subscription cannot view their remaining account balance or API spend.

Expected Behavior

  1. Balance & Credit Display: Support displaying available account balance / prepaid credits for pay-as-you-go accounts.
  2. API-First Authentication: Allow configuring an API key (or Alibaba Cloud RAM / BSS OpenAPI credentials if the inference gateway lacks a direct balance endpoint) without requiring browser cookie imports.
  3. Graceful Handling: If an account has no Token Plan subscription but has a valid pay-as-you-go balance, show the balance instead of failing or reporting missing token plan data.

Relevant Context

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions