package cost

// UsageDetail holds token counts from a provider response.
type UsageDetail struct {
	PromptTokens      int
	CompletionTokens  int
	CachedInputTokens int
	ReasoningTokens   int
	TotalTokens       int
}

func (u UsageDetail) UncachedInputTokens() int {
	uncached := u.PromptTokens - u.CachedInputTokens
	if uncached < 0 {
		return u.PromptTokens
	}
	return uncached
}
