From 1da298e7554bab0f7a631a44fed12692d668c024 Mon Sep 17 00:00:00 2001 From: Kujtim Hoxha Date: Mon, 21 Apr 2025 07:20:09 +0200 Subject: fix anthropic --- internal/llm/provider/anthropic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/llm/provider') diff --git a/internal/llm/provider/anthropic.go b/internal/llm/provider/anthropic.go index 86f483f64..03d96fb24 100644 --- a/internal/llm/provider/anthropic.go +++ b/internal/llm/provider/anthropic.go @@ -59,7 +59,7 @@ func newAnthropicClient(opts providerClientOptions) AnthropicClient { func (a *anthropicClient) convertMessages(messages []message.Message) (anthropicMessages []anthropic.MessageParam) { for i, msg := range messages { cache := false - if len(messages)-3 > i { + if i > len(messages)-3 { cache = true } switch msg.Role { -- cgit v1.2.3