feat(xai): track SuperGrok weekly limit + API usage quota
Fetch OAuth quota from cli-chat-proxy billing, GetGrokCreditsConfig weekly window, and settings plan label so the dashboard matches grok.com usage.
This commit is contained in:
@@ -25,6 +25,15 @@ export default {
|
||||
clientId: "b1a00492-073a-47ea-816f-4c329264a828",
|
||||
tokenUrl: "https://auth.x.ai/oauth2/token",
|
||||
refreshUrl: "https://auth.x.ai/oauth2/token",
|
||||
// OAuth-only SuperGrok quota surfaces:
|
||||
// - url: monthly API usage allotment (JSON)
|
||||
// - creditsUrl: weekly SuperGrok limit (grpc-web)
|
||||
// - settingsUrl: plan label (subscription_tier_display)
|
||||
usage: {
|
||||
url: "https://cli-chat-proxy.grok.com/v1/billing",
|
||||
creditsUrl: "https://grok.com/grok_api_v2.GrokBuildBilling/GetGrokCreditsConfig",
|
||||
settingsUrl: "https://cli-chat-proxy.grok.com/v1/settings",
|
||||
},
|
||||
},
|
||||
models: [
|
||||
{ id: "grok-4", name: "Grok 4" },
|
||||
@@ -57,4 +66,7 @@ export default {
|
||||
endpoint: "https://api.x.ai/v1/responses",
|
||||
pricingUrl: "https://x.ai/api#pricing",
|
||||
},
|
||||
features: {
|
||||
usage: true,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user