Repository navigation
KI-Aufrufe begrenzen (#343) - #345
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Walkthrough free-text summary shows the 429 message instead of the generic "unavailable" text; env vars in compose files and .env.prod.example; docs (DE/EN) and changelog; e2e for a throttled rephrase. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- wordcloud_ai no longer counted (presenter toggles it automatically) - rejection logged at WARNING; invalid rates fall back to the default - Retry-After rounded up; staff bypass tested for ai_vision Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #343
Per-user rate limits for all staff-triggered AI endpoints.
What's in it
common/throttling.py), per signed-in user, staff exempt:ai— generation (start/retry, one hit per job, not per chunk), distractors, rephrase, proofread, matrix/mindmap AI, word-cloud optimize, free-text summary/evaluation, AI run report. Default 120/hour (AI_THROTTLE_RATE).ai_vision— AI alt-text suggestion. Default 30/hour (AI_VISION_THROTTLE_RATE).offdisables a scope; invalid values fall back to the default with a warning (no 500).initial()); status/polling and cancel/review endpoints untouched. Not counted: participant-triggered AI (self-check grading, live word cloud incl. its presenter on/off toggle) — bounded by votes and server-side single-flight.detail(„Sie haben die KI gerade sehr oft genutzt. Bitte versuchen Sie es in N Minuten erneut.“, singular-aware) andRetry-After(rounded up); every AI UI shows it (the walkthrough free-text summary no longer swallows it).abstimmbar.ai(scope + user id, no content)..env.prod.example; deployment docs DE/EN (incl. per-process cache note), CHANGELOG.Verification (isolated stack)
common.tests_throttling13/13 (every throttled endpoint rejected before the model, staff bypass both scopes,off, invalid rates, singular message, Retry-After, word cloud not counted, log)tsc -bOK; e2eai-throttle.spec.ts1/1🤖 Generated with Claude Code