Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Commit 1da298e

Browse files
committed
fix anthropic
1 parent c40e684 commit 1da298e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/llm/provider/anthropic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func newAnthropicClient(opts providerClientOptions) AnthropicClient {
5959
func (a *anthropicClient) convertMessages(messages []message.Message) (anthropicMessages []anthropic.MessageParam) {
6060
for i, msg := range messages {
6161
cache := false
62-
if len(messages)-3 > i {
62+
if i > len(messages)-3 {
6363
cache = true
6464
}
6565
switch msg.Role {

internal/llm/tools/patch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func (p *patchTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error
169169
return NewTextErrorResponse(fmt.Sprintf("failed to parse patch: %s", err)), nil
170170
}
171171

172-
if fuzz > 0 {
172+
if fuzz > 3 {
173173
return NewTextErrorResponse(fmt.Sprintf("patch contains fuzzy matches (fuzz level: %d). Please make your context lines more precise", fuzz)), nil
174174
}
175175

0 commit comments

Comments
 (0)