Skip to content

Add rate limit headers to API responses #7

@willamhou

Description

@willamhou

Description

API responses should include standard rate limit headers so SDK clients can handle throttling gracefully.

Headers to Add

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1711720800

Where to Look

  • src/lib/api-guard.ts — existing API middleware (auth, key validation)
  • Rate limit info may come from the credit/usage system

Scope

Start with the main endpoints: /api/context/load, /api/parse, /api/search.

Difficulty

Intermediate — touches middleware layer, but well-scoped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions