Skip to content

Releases: scttfrdmn/throttle

Release list

v0.1.0

Choose a tag to compare

@scttfrdmn scttfrdmn released this 12 Aug 17:28

throttle turns a spending budget into a continuously adjusting rate limit for AI usage. Give it an amount and a period; it measures what you actually spend, tells you whether you are ahead or behind pace, and decides whether the next request fits.

What's in v0.1

  • Arbitrary budget periods — monthly, quarterly, a grant term, or one-off dates — with pacing, banking of underspend, bounded borrowing against the future, and configurable rollover.
  • Hierarchical sub-budgets, where a child's spend counts against every ancestor and no ancestor can be overrun through a child.
  • Reservations with leases: estimate → reserve → execute → reconcile, atomic across processes in SQLite, so two machines cannot both spend the last dollar. throttle recover and throttle reconcile repair what a crashed process left half-finished.
  • AWS BedrockConverse and ConverseStream, governed while preserving the SDK's own request and response types.
  • Bedrock Agents Classic — a turn is accounted as a compound of its steps, each priced against the model that actually ran, rather than as one opaque call.
  • AgentCore — governed runtime invocation at the edge of the call.
  • Dimensional usage and priced quotes — cost is derived from the provider's reported usage against a pricing catalog with provenance and effective dates. Money is integer microdollars end to end; there is no float in the accounting.
  • Honest unknowns — a call whose cost cannot be determined is recorded as unknown, never as $0.00, and a total containing one is shown as a floor ($812.41+).
  • A local read-only dashboard on 127.0.0.1, which materializes nothing it reads.
  • Declarative configurationthrottle config check, diff, and apply. Nothing durable changes because throttle started or read a file; a budget definition changes only when you ask.
  • No telemetry to anyone. throttle stores your spend locally and reports it to you.

Install

go install github.com/scttfrdmn/throttle/cmd/throttle@v0.1.0

Or download an archive below, verify it against SHA256SUMS, and put the binary on your PATH. Then:

throttle init          # writes a starter config, and nothing else
throttle config check
throttle config apply
throttle status

Provider support today

AWS Bedrock — Converse, ConverseStream, Agents Classic, and AgentCore. Direct OpenAI, Anthropic, and Gemini adapters do not exist yet. The budget engine imports no provider SDK, so adding one is adapter work rather than a redesign.

Known limitations

  • Bedrock is the only provider integration.
  • Delayed AgentCore cost ingestion — attributing session-granular runtime charges that arrive after the fact — is not implemented.
  • The dashboard's /api/… endpoints are internal and unversioned; they are not a supported integration API yet.
  • Managed agent invocations cannot be stopped at an exact internal dollar boundary, because the AWS APIs do not offer that control. throttle governs at the invocation boundary and reports the overrun honestly.

Apache-2.0.