Decode provider reasoning and cache usage details
This commit is contained in:
3
types.go
3
types.go
@@ -568,6 +568,8 @@ type TokenUsage struct {
|
||||
PromptTokens int `json:"prompt_tokens"`
|
||||
// CompletionTokens is the reported generated-token count.
|
||||
CompletionTokens int `json:"completion_tokens"`
|
||||
// ReasoningTokens is the reported reasoning subset of completion tokens.
|
||||
ReasoningTokens int `json:"reasoning_tokens"`
|
||||
// TotalTokens is the reported total-token count.
|
||||
TotalTokens int `json:"total_tokens"`
|
||||
// CachedTokens is the reported cached-input-token count.
|
||||
@@ -697,6 +699,7 @@ type GenerateResponse struct {
|
||||
type TokenUsagePresence struct {
|
||||
PromptTokens bool `json:"prompt_tokens"`
|
||||
CompletionTokens bool `json:"completion_tokens"`
|
||||
ReasoningTokens bool `json:"reasoning_tokens"`
|
||||
TotalTokens bool `json:"total_tokens"`
|
||||
CachedTokens bool `json:"cached_tokens"`
|
||||
CacheWriteTokens bool `json:"cache_write_tokens"`
|
||||
|
||||
Reference in New Issue
Block a user