lwhfxmoss

OAuth sleeper sidecar plugin for Sub2API

10
1
85% credibility
Found May 17, 2026 at 11 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Python
AI Summary

This is a helper tool for people who run Sub2API (a service that manages AI API accounts). It automatically watches OAuth accounts for OpenAI and Anthropic, and when an account is about to hit its usage limit, it safely marks that account as 'sleeping' until the limit resets. This prevents accounts from getting suspended for overuse. The plugin runs alongside Sub2API, reads from the same database, and can be configured through a simple web dashboard. It does not call any AI services directly — it only reads usage data that's already stored and updates rate-limit status fields.

How It Works

1
🔍 You discover a smarter way to manage AI accounts

You're running Sub2API to manage multiple AI service accounts, and you're worried about some accounts hitting their usage limits unexpectedly.

2
📦 You find this helpful plugin

The plugin automatically watches your OAuth accounts and puts them to sleep before they get suspended, then wakes them up when the limit resets.

3
🔌 You connect it to your existing setup

You run the plugin as a sidecar next to your Sub2API. It reads from your database and knows which accounts need attention.

4
⚙️ You choose your comfort level

You set a threshold like 90% — when any account reaches that usage, the plugin automatically marks it as sleeping until the reset window passes.

5
You watch it work automatically, or check the dashboard
Automatic mode

The plugin scans every minute (or whatever you set) and handles everything for you

🖥️
Manual check

You open the admin page to see which accounts are sleeping, view events, and adjust settings anytime

6
🛡️ Your accounts stay healthy

Accounts that are about to hit their limit get safely paused before they cause problems, and they automatically wake up when the reset time arrives.

Peace of mind achieved

No more surprises — your AI accounts are managed automatically, and you can always check the dashboard to see what's happening.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 11 to 10 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is sub2api-oauth-sleeper-plugin?

This is a Python sidecar that proactively marks OAuth accounts as rate-limited when their usage hits a configurable threshold. It watches OpenAI and Anthropic accounts in your Sub2API PostgreSQL database and flips the rate_limit flags before official limits are hit, so your users see clean errors instead of surprise failures. The plugin ships with a web admin panel, REST API endpoints for scripting, and a background scanner that runs on a configurable interval.

Why is it gaining traction?

The hook here is proactive versus reactive rate limiting. Instead of waiting for a 429 from the AI provider, this plugin catches exhaustion ahead of time based on the usage windows Sub2API already tracks. It works entirely by reading and writing database fields -- no API keys touched, no source code modified. The verification loop that tests whether rate limiting actually worked and rolls back false marks is a nice operational safety net. Both OpenAI and Anthropic OAuth are supported with their respective usage windows.

Who should use this?

Internal platform teams running Sub2API for OAuth-based AI access who want to automate rate limit management before users hit errors. DevOps managing high-volume or multi-tenant setups where accounts have varying reset windows will get the most value. If you need visibility into which OAuth accounts are approaching exhaustion and automatic enforcement of limits, this fits.

Verdict

A narrowly focused tool that solves a real operational pain for Sub2API operators. The documentation is thorough and the deployment model is clear, but with only 10 stars and limited community feedback, this is an early-stage project. Credibility score of 0.85% reflects that niche status. Start with a test database before connecting to production, and do not expose the admin panel without authentication on untrusted networks. Fine for small-to-medium deployments; for larger scale, evaluate whether Sub2API's built-in options cover your needs first.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.