Documentation
¶
Index ¶
- Constants
- func Cost(model string, t Tokens, write1h int64, fast bool) (float64, bool)
- func Local(model string) bool
- func ReadCached() ([]byte, time.Time, error)
- func ReadTapped() ([]byte, time.Time, error)
- func Tap(r io.Reader) error
- type Day
- type Limits
- type LimitsClient
- type ModelPart
- type Part
- type Report
- type Scanner
- type SessionSpend
- type Slice
- type Spend
- type Split
- type Stats
- type Tokens
- type Window
Constants ¶
View Source
const PricesAsOf = "October 2026"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Day ¶
type LimitsClient ¶
type Report ¶
type Report struct {
Days []Day
Sessions map[string]*SessionSpend
Previous float64
First string
}
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
type SessionSpend ¶
type Slice ¶
type Slice [6]float64
Slice is one session's use of one model in one bucket, flat so a report of a thousand sessions stays small: dollars by token kind (input, output, cache read, cache write), then replies, then tokens.
type Spend ¶
type Spend struct {
Cost float64 `json:"cost"`
Models map[string]float64 `json:"models"`
Sessions map[string]*SessionSpend `json:"sessions"`
}
type Split ¶
type Stats ¶
type Stats struct {
Part
Models []ModelPart `json:"models"`
Subagents struct {
Part
Count int `json:"count"`
} `json:"subagents"`
Turns int `json:"turns"`
ToolCalls int `json:"toolCalls"`
Start time.Time `json:"start,omitzero"`
End time.Time `json:"end,omitzero"`
Wall int64 `json:"wallSeconds"`
Active int64 `json:"activeSeconds"`
Unpriced []string `json:"unpriced,omitempty"`
Local []string `json:"local,omitempty"`
PricesAt string `json:"pricesAsOf"`
}
type Tokens ¶
Click to show internal directories.
Click to hide internal directories.