You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] token-plan preset sends Singapore Personal Edition keys to Beijing #206
The installed bailian-protocol setup guidance and the built-in token-plan profile use this Base URL:
https://token-plan.cn-beijing.maas.aliyuncs.com
Token Plan Personal Edition is Singapore-only. A valid Personal Edition key is therefore rejected by the Beijing host with HTTP 401 InvalidApiKey, which looks like a bad credential rather than a region mismatch.
Configure a valid Token Plan Personal Edition key in the token-plan profile.
Leave the profile's supplied Beijing Base URL unchanged.
Run a text request or query the OpenAI-compatible model endpoint.
No credential values are included in this report.
Expected
For Token Plan Personal Edition, the profile or setup guidance should select the Singapore Token Plan host, or require an explicit region choice that prevents a Singapore-only key from being sent to Beijing.
Singapore host with the same key: authentication succeeds and the request reaches the plan quota check (HTTP 429 insufficient_quota when the weekly allowance is exhausted)
The 401 → authenticated quota response comparison isolates the region preset as the cause.
Suggested resolution
Please make the Token Plan profile region-aware. At minimum:
document that Personal Edition uses ap-southeast-1;
avoid materializing the Beijing Base URL for an international Personal Edition login; and
report a region/profile mismatch more clearly than a generic invalid-key diagnosis when possible.
Thanks for the detailed report — this was a real region mismatch, not a bad key.
This is fixed in CLI 1.26.0 (via #208). On bl auth login --api-key …, Token Plan keys (sk-sp-*) are validated against both the Beijing and Singapore Token Plan endpoints, and we persist the base_url that actually accepts the key instead of always materializing the Beijing preset.
Please:
Upgrade to 1.26.0 (or newer)
Re-run login so the saved profile is rewritten:
bl auth login --api-key <your-token-plan-key>
Confirm with bl auth status that base_url is https://token-plan.ap-southeast-1.maas.aliyuncs.com for Personal Edition
If you already logged in on 1.25.x with the Beijing URL saved, upgrading alone is not enough — you need to re-login once.
Closing this as fixed in 1.26.0. If anything still fails after re-login, please reopen with the (masked) bl auth status --output json output.
Activity
hopelynd commentedon Sep 18, 2026
Thanks for the detailed report — this was a real region mismatch, not a bad key.
This is fixed in CLI 1.26.0 (via #208). On
bl auth login --api-key …, Token Plan keys (sk-sp-*) are validated against both the Beijing and Singapore Token Plan endpoints, and we persist thebase_urlthat actually accepts the key instead of always materializing the Beijing preset.Please:
1.26.0(or newer)bl auth statusthatbase_urlishttps://token-plan.ap-southeast-1.maas.aliyuncs.comfor Personal EditionIf you already logged in on 1.25.x with the Beijing URL saved, upgrading alone is not enough — you need to re-login once.
Closing this as fixed in 1.26.0. If anything still fails after re-login, please reopen with the (masked)
bl auth status --output jsonoutput.