Repository navigation
feat: declare a paid tier's rate limits in a config file - #25
Merged
Merged
Conversation
…conf The built-in policies encode what each source publishes for everyone. A CourtListener membership raises 5/50/125 to 20/250/1,000, and the limiter refused calls the account was entitled to. An override replaces a source's budget windows only; spacing, session caps and backoff stay as built. An unreadable line stops the tool, and 'limits' marks every overridden source. Co-Authored-By: Claude Opus 5.5 (1M context) <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.
What
A source's budget windows can be overridden per account:
EVIDENCE_SEARCH_LIMITStakes the same text,;-separated, and wins over the file.Limiter.policy()and thelimitscommand both read the effective policy;limitsmarks an overridden source and says where the windows came from (windows_fromin--json).Why
The built-in policies encode what each source publishes for everyone. A CourtListener membership raises 5/50/125 to 20/250/1,000, and the limiter refused calls the account was entitled to.
Decisions
LimitsConfigError, exit 70) and never falls back. A typo that silently ran a paid account at the free rate, or the reverse, is the kind of quiet wrong answer this tool exists to prevent.EVIDENCE_SEARCH_LIMITS_FILEat an empty path so a developer's own file cannot change what the suite asserts.Tests
tests/test_limits_overrides.py, 13 cases: no override; file; variable over file; the limiter allows 20 and refuses the 21st; still stops at 5 without one; six malformed inputs raise; units and multiples; thelimitscommand output. Full suite: 275 passed, 2 xfailed.Independent of #24 (token file); the two touch different README passages.
🤖 Generated with Claude Code