Skip to main content

Module billing

Module billing 

Source
Expand description

Who pays for the calls of an agent visdom starts through the AI Gateway: the project (its gateway key, today’s behaviour) or the developer’s own Claude subscription. A choice inside gateway mode, not a mode of its own.

Structs§

ResolvedBilling
Who pays, and who said so.

Enums§

Billing
Who pays for the agent’s calls through the gateway.
BillingSource
Where the billing of a session was set.
BillingUse
What the billing means for a session in mode with agent.

Constants§

BILLING_ENV
The environment variable that names who pays.

Functions§

billing_use
Whether billing can be used in mode with agent. subscription needs the gateway (hooks have no gateway key to pay or not pay with) and Claude Code; under a direct policy the setting is simply unused.
configured_billing
Who pays: --billing, then VISDOM_GATEWAY_BILLING (a blank one is not set, an unknown value is an error), then the repository config, then the user config (user_file names it), then the project.
parse_billing
Parse a billing value as the command line and the config files spell it.