Skip to content

MiniMax web/manual-cookie source fails with 404 on China mainland region #253

Closed

Description

@liujianhao1226-beep

Bug description

MiniMax usage cannot be fetched through the web/manual-cookie source on Windows. With the China mainland region selected, CodexBar always reports:

MiniMax billing returned status 404 Not Found

This appears to be caused by the MiniMax provider requesting the billing-history endpoint /account/amount, which returns 404 for the China mainland host. The request fails the entire provider refresh, even though the Coding Plan page itself is reachable.

Environment

  • OS: Windows
  • Win-CodexBar: 0.46.0
  • Provider: MiniMax
  • Region: China mainland (cn)
  • Source: Web
  • Cookie source: Manual

Reproduction

  1. Enable MiniMax in Settings -> Providers.
  2. Set region to China mainland.
  3. Set Cookie source to Manual and save a valid MiniMax session Cookie.
  4. Run:
codexbar-cli.exe diagnose --provider minimax --source web --pretty --no-color --web-timeout 30

Actual result

{
  "error": {
    "category": "unknown",
    "message": "MiniMax billing returned status 404 Not Found"
  }
}

Direct request results observed on the same machine:

  • https://platform.minimaxi.com/account/amount?page=1&limit=100&aggregate=false -> HTTP 404
  • https://platform.minimaxi.com/user-center/payment/coding-plan -> HTTP 200

The relevant implementation in v0.46.0 builds the cookie billing URL as {region.base_url}/account/amount and treats any non-2xx response as a provider failure:
https://github.com/nesszer/Win-CodexBar/blob/v0.46.0/rust/src/providers/minimax/mod.rs#L320-L346

Expected result

A 404 from the optional billing-history endpoint should not make the whole MiniMax provider unavailable. The provider should either:

  1. Fetch Coding Plan quota from the current remains endpoint and treat billing history as optional; or
  2. Fall back gracefully when billing history is unavailable.

The original CodexBar MiniMax documentation references the Coding Plan remains endpoint:
https://github.com/steipete/CodexBar/blob/main/docs/minimax.md

No Cookie, API key, or account identifier is included in this report.

Activity

  1. Finesssee commented on Aug 4, 2026

    @Finesssee
    Collaborator

    Thanks for the issue, I will fix it ASAP.

  2. Finesssee commented on Aug 4, 2026

    @Finesssee
    Collaborator

    Fixed in v0.47.0 — same root cause as #246, on the China host this time.

    The cookie/web path no longer depends on /account/amount. In 0.47.0 the provider first fetches quota from the coding-plan page (https://platform.minimaxi.com/user-center/payment/coding-plan?cycle_type=3 — the URL you confirmed returns 200), falls back to /v1/api/openplatform/coding_plan/remains on the platform host then www.minimaxi.com, and only attaches billing history afterwards as best-effort enrichment — a 404 there logs a warning instead of failing the refresh. Manual-cookie with region=cn takes exactly this path.

    Verify after upgrading: codexbar usage --provider minimax --source web (or the tray Update button) — you should see the Coding Plan usage instead of MiniMax billing returned status 404. The 0.47.0 winget package is in flight too: microsoft/winget-pkgs#412072.

    I can't live-verify against a CN-host session from here, so please confirm once on 0.47.0 — reopen this issue if anything still fails. Closing as fixed in 0.47.0.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions