on main help sign in
small fixes
170c7adKujtim Hoxha
internal/llm/agent/mcp-tools.go+1−1
@@ -58,7 +58,7 @@ func runTool(ctx context.Context, c MCPClient, toolName string, input string) (t
58 toolRequest := mcp.CallToolRequest{}
58 toolRequest := mcp.CallToolRequest{}
59 toolRequest.Params.Name = toolName
59 toolRequest.Params.Name = toolName
60 var args map[string]any
60 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 {
62 return tools.NewTextErrorResponse(fmt.Sprintf("error parsing parameters: %s", err)), nil
62 return tools.NewTextErrorResponse(fmt.Sprintf("error parsing parameters: %s", err)), nil
63 }
63 }
64 toolRequest.Params.Arguments = args
64 toolRequest.Params.Arguments = args
internal/llm/provider/anthropic.go+2−2
@@ -213,7 +213,7 @@ func (a *anthropicClient) send(ctx context.Context, messages []message.Message,
213 return nil, retryErr
213 return nil, retryErr
214 }
214 }
215 if retry {
215 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))
217 select {
217 select {
218 case <-ctx.Done():
218 case <-ctx.Done():
219 return nil, ctx.Err()
219 return nil, ctx.Err()
@@ -351,7 +351,7 @@ func (a *anthropicClient) stream(ctx context.Context, messages []message.Message
351 return
351 return
352 }
352 }
353 if retry {
353 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))
355 select {
355 select {
356 case <-ctx.Done():
356 case <-ctx.Done():
357 // context cancelled
357 // context cancelled