Upstream 404: Claude Code-hosted xAI OAuth Grok billing query
Quick fix
Upgrade to a version containing commit 15d5dbe to fix the Grok billing query for the hosted xAI OAuth Provider.
Symptom
Section titled “Symptom”上游返回 404。Upstream returned 404.
In CC Switch 3.18.0, the general usage template requests `https://api.x.ai/v1/user/balance` by default, but that endpoint does not apply to Grok OAuth Billing, so the upstream returns 404. After changing it to `https://cli-chat-proxy.grok.com/v1/billing`, the query may still fail because of same-origin validation in the `general` template, or because the `custom` template cannot obtain the hosted account's dynamic access token.
The original post records that this was fixed in commit `15d5dbe`, but does not provide the corresponding release version or implementation details. Manually entering an access token only works temporarily; it must be replaced after expiry.
Upgrade to or use a CC Switch version containing commit `15d5dbe`; the original post does not identify the release version for that commit.
If you have not upgraded, the original post provides no verified persistent workaround. Do not rely on manually entered OAuth access tokens that expire; follow the implementation details in the source issue.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
(No FAQ yet)
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.