Skip to content

Add adaptive response-header rate limiting - #11

Merged
TDanks2000 merged 7 commits into
mainfrom
agent/header-rate-limit-plugin
Jul 18, 2026
Merged

Add adaptive response-header rate limiting#11
TDanks2000 merged 7 commits into
mainfrom
agent/header-rate-limit-plugin

Conversation

@TDanks2000

Copy link
Copy Markdown
Collaborator

What changed

  • Adds a provider-neutral createHeaderRateLimitPlugin.
  • Learns limit, remaining, reset time, and Retry-After values from response headers.
  • Pauses later requests only after the server reports an exhausted budget or explicit retry delay.
  • Supports Unix-second, Unix-millisecond, and relative-second reset headers.
  • Exposes a read-only state snapshot for wrapper diagnostics.
  • Keeps queued waits abortable and adds deterministic tests plus a minor Changeset.

Why

Static client-side budgets become inaccurate when an API temporarily lowers or changes its limits. Wrappers such as AniList can now follow the server's current headers without putting provider-specific behavior into the core runtime.

Validation

GitHub Actions will run the repository verification pipeline.

@TDanks2000
TDanks2000 marked this pull request as ready for review July 18, 2026 00:32
@TDanks2000
TDanks2000 merged commit e6bbd8d into main Jul 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant