feat: commandcode usage query via /alpha endpoints with Provider API key (v0.5.0)

- New config commandcode_api_key (user_... provider key, long-lived);
  when set, usage queries hit /alpha/billing/credits + /alpha/usage/summary
  with Bearer auth — no more 7-day session cookie rotation
- session_token kept as optional fallback (legacy /internal + cookie path)
- alpha credits lack opensourceMonthlyCredits; formatter tolerates
- alpha non-200 passes through status without echoing upstream body
This commit is contained in:
2026-09-23 17:13:01 +08:00
parent c2b8d89ba6
commit d7733552ee
8 changed files with 649 additions and 38 deletions
+1 -1
View File
@@ -918,7 +918,7 @@ const QuotaPageHTML = `<!DOCTYPE html>
<div>
<div class="brand-title">
用量配额
<span class="version-tag">v0.4.5</span>
<span class="version-tag">v0.5.0</span>
</div>
</div>
</div>