Documentation
¶
Overview ¶
Package ratelimit parses Anthropic rate-limit response headers and surfaces warnings when quota is running low. Mirrors src/services/claudeAiLimits.ts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
// Request quota
RequestsRemaining int
RequestsLimit int
// Token quota (combined input+output)
TokensRemaining int
TokensLimit int
// Input-token quota (separate bucket)
InputTokensRemaining int
InputTokensLimit int
}
Info holds parsed rate-limit state from a single response.
func Parse ¶
Parse reads the standard Anthropic rate-limit response headers. Missing or malformed headers are silently ignored.
func (Info) WarningMessage ¶
WarningMessage returns a non-empty string when any quota bucket is below 20% capacity. The caller should surface this in the status bar.
Click to show internal directories.
Click to hide internal directories.