Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /python /limit_request_rate /ctrl-gaurav_effGen.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Entity", | |
| "status": "present", | |
| "symbol": "chat", | |
| "file": "effgen/client/client.py", | |
| "lines": "230", | |
| "notes": "In-repo effGen client SDK; chat POSTs to the effGen server's /v1/chat/completions (client.py:256), which passes through the RateLimitMiddleware Enforcer; the client also retries/backs off on 429 (client.py:124)." | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "status": "present", | |
| "symbol": "__call__", | |
| "file": "effgen/api/middleware.py", | |
| "lines": "293", | |
| "notes": "__call__ of the pure-ASGI RateLimitMiddleware, registered via app.add_middleware in install_production_middleware (middleware.py:153), called from create_app (effgen/server/app.py:342). It keys on client IP, calls _check (middleware.py:302) and returns 429 with Retry-After when blocked; caveat: only installed when EFFGEN_RATE_LIMIT / --rate-limit is a positive integer (disabled by default)." | |
| }, | |
| { | |
| "role": "Limiter", | |
| "status": "present", | |
| "symbol": "_check", | |
| "file": "effgen/api/middleware.py", | |
| "lines": "269", | |
| "notes": "Called by the Enforcer __call__ at middleware.py:302; implements a fixed-window per-IP counter, comparing the bucket count against self.limit and returning (allowed, remaining, reset), updating the bucket on allow." | |
| }, | |
| { | |
| "role": "HistoryProvider", | |
| "status": "present", | |
| "symbol": "_buckets", | |
| "file": "effgen/api/middleware.py", | |
| "lines": "254", | |
| "notes": "In-memory dict client-ip -> [window_start, count] field of RateLimitMiddleware, read and updated inline by _check (middleware.py:269-291); no dedicated accessor method exists, so the field is cited. Per-process only." | |
| }, | |
| { | |
| "role": "PolicyProvider", | |
| "status": "present", | |
| "symbol": "_resolve_rate_limit", | |
| "file": "effgen/api/middleware.py", | |
| "lines": "26", | |
| "notes": "Called in install_production_middleware (middleware.py:150); resolves requests/minute from the create_app/CLI parameter or EFFGEN_RATE_LIMIT env var and passes it to RateLimitMiddleware, stored as self.limit (middleware.py:250) and used by _check. Single global policy (with probe-path exemptions at middleware.py:213)." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "chat_completions", | |
| "file": "effgen/api/openai_compat.py", | |
| "lines": "361", | |
| "notes": "Allowed requests are forwarded by __call__ via self.app(...) (middleware.py:320) to the routed handlers; chat_completions is the /v1/chat/completions handler of the router mounted in effgen/server/app_runner.py:490." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 2.67 kB
- Xet hash:
- fc73c62ed7293054b5f2262d15ea45bb3776715bd3066d0e18b04927dcbeba41
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.