feat(quota-cooldown): handle xAI free usage exhaustion#335
Conversation
Extend the existing CPAMP-owned quota cooldown worker to exact xAI subscription:free-usage-exhausted 429 signals. Normalize xAI provider aliases, persist a dedicated cooldown owner, recover after the documented rolling 24-hour window, and preserve manual disables. Update panel copy and docs with test coverage for strict matching, aliases, ownership, and recovery.
|
All local merge-readiness gates are green (Manager Server full tests, worker race test, 728 web tests, type-check, lint, web/docs builds, clean Docker build, and container health smoke test). GitHub currently marks all workflows as |
Allow xAI auth files to resolve persisted quota cooldown records and add a regression test for the CPAMP xAI owner.
|
Follow-up pushed: |
Summary
Extend the existing CPAMP-owned quota cooldown worker to xAI/Grok's exact
subscription:free-usage-exhaustedHTTP 429 signal. Matching auth files are temporarily disabled and automatically restored after the documented rolling 24-hour recovery window, while manual disables remain untouched.Scope
Changes
xai,x-ai, andgrokprovider keys and match only the exact free-usage exhaustion code, including nested JSON error payloads.cpamp_xai_free_usageowner.User Impact
When quota cooldown is enabled, exhausted xAI/Grok free credentials leave the CPA selection pool after their first exact quota failure and return automatically after 24 hours. Regional permission errors, auth errors, generic rate limits, 5xx responses, and timeouts do not trigger this path.
Compatibility / Runtime Notes
USAGE_QUOTA_COOLDOWN_ENABLED/ Configuration switch. The feature remains disabled by default.Data / Security Notes
No auth tokens, raw error bodies, or credentials are persisted by this change. The existing
quota_cooldownstable stores auth file identity, provider, recovery time, owner, and prior disabled state. Actions continue to use CPA Management API authentication. No auth JSON fields are added or modified directly.Risk / Rollback
Risk level: Low
Rollback notes:
USAGE_QUOTA_COOLDOWN_ENABLEDor the matching Configuration switch to stop new automatic actions.cpamp_xai_free_usageremain auditable and can be handled by the pre-existing quota cooldown API.Verification
Commands / evidence:
Screenshots / Recordings
N/A. The existing Configuration card is retained; only its localized description changes to include xAI.
Docs
Related
Closes #334. Supersedes the closed exploratory PR #330.