mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
feat(oauth): zed/trae/windsurf providers + harden callback proxies
- zed live model discovery; codebuddy-intl handler; remove duplicate workbuddy - split oauth providers.js into per-provider files (facade re-export) - fold 5 standard refresh providers into config-driven generic - hide trae/windsurf from registry (no tool calling support) - fix login-CSRF + SSRF on trae/windsurf/zed local callback proxies via loopback-origin guard + strict state validation + apiOrigins allowlist - move zed RSA private key transit to POST body; redact proxy logs Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
783e271c16
commit
8e04fe1734
@@ -198,6 +198,21 @@ export function parseGrokCliBilling(billing, user = null) {
|
||||
};
|
||||
}
|
||||
|
||||
// SuperGrok weekly shared-pool usage (subscription tier). creditUsagePercent is
|
||||
// the single total used %; productUsage is a breakdown legend, NOT independent
|
||||
// quotas — never split it into separate bars.
|
||||
const usedPct = unwrapVal(
|
||||
config.creditUsagePercent ?? config.credit_usage_percent ?? root.creditUsagePercent,
|
||||
NaN,
|
||||
);
|
||||
if (Number.isFinite(usedPct) && usedPct >= 0) {
|
||||
quotas["Weekly SuperGrok"] = makeQuota({
|
||||
used: Math.max(0, Math.min(100, usedPct)),
|
||||
total: 100,
|
||||
resetAt: periodEnd,
|
||||
});
|
||||
}
|
||||
|
||||
// Opportunistic richer credit envelopes (future / other account types)
|
||||
const creditBags = [
|
||||
root.credits,
|
||||
|
||||
Reference in New Issue
Block a user