Documentation
¶
Overview ¶
Package credits reads the default model service's account balance without sending a completion or keeping a dollar amount on disk.
Index ¶
Constants ¶
const LowCreditsUSD = 0.50
LowCreditsUSD covers one worst-case turn on the shipped DeepSeek default: roughly $0.04 of input and $0.30 of output at its published limits, rounded up.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reading ¶
type Reading struct{ Known, Low, Expired bool }
Reading says whether the balance is known and below the one threshold — or, when the service refused the key as expired, that the key itself is the answer. An expired reading is Known and never Low: there is no balance to be low, and the free defaults would fail on the same key.
type Reason ¶
type Reason uint8
Reason names the event that asked for a balance. A launch or changed key is never debounced; repeated refusals and paid-model switches share a quiet span.
type Trigger ¶
type Trigger struct {
// contains filtered or unexported fields
}
Trigger permits one read at a time and coalesces bursts after it finishes.