Skip to content

Commit b7ae777

Browse files
committed
Update exceeded logging
1 parent e618ed9 commit b7ae777

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cmd/eval/eval.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ func (h *evalCommandHandler) callModelWithRetry(ctx context.Context, req azuremo
353353
continue
354354
}
355355
}
356-
return "", fmt.Errorf("rate limit exceeded after %d attempts: %w", maxRetries+1, err)
356+
return "", fmt.Errorf("rate limit exceeded after %d attempts: %w", attempt+1, err)
357357
}
358358
// For non-rate-limit errors, return immediately
359359
return "", err
@@ -381,9 +381,6 @@ func (h *evalCommandHandler) callModelWithRetry(ctx context.Context, req azuremo
381381

382382
return strings.TrimSpace(content.String()), nil
383383
}
384-
385-
// This should never be reached, but just in case
386-
return "", errors.New("unexpected error calling model")
387384
}
388385

389386
func (h *evalCommandHandler) callModel(ctx context.Context, messages []azuremodels.ChatMessage) (string, error) {

0 commit comments

Comments
 (0)