diff --git a/pkg/api/provider/anthropic/anthropic.go b/pkg/api/provider/anthropic/anthropic.go index 4da2ae3..e471959 100644 --- a/pkg/api/provider/anthropic/anthropic.go +++ b/pkg/api/provider/anthropic/anthropic.go @@ -353,7 +353,8 @@ func (c *AnthropicClient) CreateChatCompletionStream( block.Text += text output <- provider.Chunk{ Content: text, - TokenCount: 1, + // rough, anthropic performs some chunking + TokenCount: uint(len(strings.Split(text, " "))), } } case "input_json_delta":