max_budget_usd

command
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Example: cap total session spend with WithMaxBudgetUSD. The SDK observes usage_update notifications, tracks cumulative cost, and calls Session.Cancel when the budget is exceeded.

Run with `go run ./examples/max_budget_usd`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL