Skip to content

feat(python-sdk): record_usage() and budget_check()#10

Merged
Shaivpidadi merged 1 commit intodevfrom
feat/1.4c-usage-budget-rebase
Apr 20, 2026
Merged

feat(python-sdk): record_usage() and budget_check()#10
Shaivpidadi merged 1 commit intodevfrom
feat/1.4c-usage-budget-rebase

Conversation

@Shaivpidadi
Copy link
Copy Markdown
Member

Replaces closed PR #7. Rebased onto dev.

- client.record_usage(org_id, user_id, tokens, model) → None
- client.async_record_usage() — async variant
- client.budget_check(org_id, user_id, estimated_tokens) → BudgetResult
- client.async_budget_check() — async variant
- BudgetResult: allowed, remaining_tokens, limit, warning_threshold_hit, reason
- 5 unit tests: correct payload, allowed/denied, warning threshold (< 10%)

Refs: GOV-38
@Shaivpidadi Shaivpidadi merged commit 9e4e84f into dev Apr 20, 2026
1 check passed
@Shaivpidadi Shaivpidadi deleted the feat/1.4c-usage-budget-rebase branch April 20, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant