Skip to content

feat(provider): add monthly spending limits - #1979

Open
SHLE1 wants to merge 1 commit into
TokenFlux:mainfrom
SHLE1:feat/provider-monthly-quota
Open

SHLE1 wants to merge 1 commit into
TokenFlux:mainfrom
SHLE1:feat/provider-monthly-quota

Conversation

@SHLE1

@SHLE1 SHLE1 commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Provider spending controls currently offer daily, weekly, and total limits. Add a monthly limit for API Key and Bedrock providers, with either a 30-day elapsed window or a fixed reset date, hour, and timezone. Fixed dates beyond a month's length reset on its final day and return to the configured date the following month.

Connect monthly limits to creation and editing, usage displays, scheduling snapshots and admission, transactional accounting and quota-crossing events, notifications, manual resets, and provider duplication. Configuration edits retain the latest usage counters. The settings use provider Extra fields. Document the reset and accounting rules in the routing and billing guide.

Validation:

  • Go tests for the provider, billing, scheduler cache, DTO, and gateway provider packages.
  • Formatting checks and the pre-push quick checks, including Go lint/tests and frontend lint, type checking, UI checks, and related tests.
  • PostgreSQL integration test packages compile. Their runtime tests were not run locally because the Docker daemon is unavailable.

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