Skip to content

Commit 170c7ad

Browse files
committed
small fixes
1 parent 7a62ab7 commit 170c7ad

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

internal/llm/agent/mcp-tools.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func runTool(ctx context.Context, c MCPClient, toolName string, input string) (t
5858
toolRequest := mcp.CallToolRequest{}
5959
toolRequest.Params.Name = toolName
6060
var args map[string]any
61-
if err = json.Unmarshal([]byte(input), &input); err != nil {
61+
if err = json.Unmarshal([]byte(input), &args); err != nil {
6262
return tools.NewTextErrorResponse(fmt.Sprintf("error parsing parameters: %s", err)), nil
6363
}
6464
toolRequest.Params.Arguments = args

internal/llm/provider/anthropic.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func (a *anthropicClient) send(ctx context.Context, messages []message.Message,
213213
return nil, retryErr
214214
}
215215
if retry {
216-
logging.WarnPersist("Retrying due to rate limit... attempt %d of %d", logging.PersistTimeArg, time.Millisecond*time.Duration(after+100))
216+
logging.WarnPersist(fmt.Sprintf("Retrying due to rate limit... attempt %d of %d", attempts, maxRetries), logging.PersistTimeArg, time.Millisecond*time.Duration(after+100))
217217
select {
218218
case <-ctx.Done():
219219
return nil, ctx.Err()
@@ -351,7 +351,7 @@ func (a *anthropicClient) stream(ctx context.Context, messages []message.Message
351351
return
352352
}
353353
if retry {
354-
logging.WarnPersist("Retrying due to rate limit... attempt %d of %d", logging.PersistTimeArg, time.Millisecond*time.Duration(after+100))
354+
logging.WarnPersist(fmt.Sprintf("Retrying due to rate limit... attempt %d of %d", attempts, maxRetries), logging.PersistTimeArg, time.Millisecond*time.Duration(after+100))
355355
select {
356356
case <-ctx.Done():
357357
// context cancelled

0 commit comments

Comments
 (0)