feat: claude web search tool 计费

This commit is contained in:
creamlike1024
2025-07-15 18:57:22 +08:00
parent 77da33de4f
commit 961bc874d2
4 changed files with 38 additions and 4 deletions

View File

@@ -324,8 +324,13 @@ func (c *ClaudeResponse) GetIndex() int {
}
type ClaudeUsage struct {
InputTokens int `json:"input_tokens"`
CacheCreationInputTokens int `json:"cache_creation_input_tokens"`
CacheReadInputTokens int `json:"cache_read_input_tokens"`
OutputTokens int `json:"output_tokens"`
InputTokens int `json:"input_tokens"`
CacheCreationInputTokens int `json:"cache_creation_input_tokens"`
CacheReadInputTokens int `json:"cache_read_input_tokens"`
OutputTokens int `json:"output_tokens"`
ServerToolUse *ClaudeServerToolUse `json:"server_tool_use"`
}
type ClaudeServerToolUse struct {
WebSearchRequests int `json:"web_search_requests"`
}