summaryrefslogtreecommitdiff
path: root/internal/config/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/config/config.go')
-rw-r--r--internal/config/config.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 94f3ec7..58de95c 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -69,6 +69,17 @@ type Config struct {
VAPIDEmail string `toml:"vapid_email"`
ClaudeConfigDir string `toml:"claude_config_dir"`
LocalModel LocalModel `toml:"local_model"`
+ Budget BudgetConfig `toml:"budget"`
+}
+
+// BudgetConfig configures rolling per-provider spend caps. With no providers
+// set, budget gating is disabled (nothing is blocked) — there is intentionally
+// no default cap; the user must opt in by configuring limits.
+type BudgetConfig struct {
+ // Window is the rolling lookback duration (e.g. "5h"); defaults to 5h.
+ Window string `toml:"window"`
+ // Provider5hUSD maps a provider (claude/gemini) to its USD cap within Window.
+ Provider5hUSD map[string]float64 `toml:"provider_5h_usd"`
}
func Default() (*Config, error) {