{"agent":"claude","input":"Add rate limiting to this Django REST Framework API. Read pyproject.toml, tutorial/settings.py, tutorial/urls.py, snippets/urls.py, snippets/views.py, snippets/permissions.py, snippets/serializers.py, snippets/models.py, Procfile, app.json and .github/workflows/ci.yml first. Use DRF's own throttling, no new dependency: set DEFAULT_THROTTLE_CLASSES to AnonRateThrottle and UserRateThrottle with DEFAULT_THROTTLE_RATES of 100/hour for anon and 1000/hour for user; give SnippetViewSet a get_throttles override that applies a ScopedRateThrottle with scope snippet-write at 20/hour to POST, PUT, PATCH and DELETE, since Snippet.save runs Pygments; set NUM_PROXIES to 1 for the Heroku router. Keep LocMemCache and explain in the pull request what changes with several gunicorn workers. Write snippets/tests.py on APITestCase, with the real settings and cache.clear() in setUp, covering the 429 with Retry-After after the anon limit, the shared anon bucket across /snippets/ and /users/, the write scope for a signed-in user, and a forged X-Forwarded-For not resetting the bucket. Add uv run manage.py test to ci.yml. Run manage.py check, the tests and a spectacular schema export in the sandbox and open a pull request quoting the output.","resources":[{"url":"https://github.com/your-org/your-app"}]}