chore: use min()/max() builtins (Go 1.21+)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d457b74d80
commit
f45537b56c
1 changed files with 1 additions and 4 deletions
|
|
@ -35,10 +35,7 @@ func executeWithRateLimit(ctx context.Context, model, prompt string, runner func
|
|||
success, exitCode, runErr := runner()
|
||||
|
||||
// Record usage with conservative output estimate (actual tokens unknown from shell runner).
|
||||
outputEst := estTokens / 10
|
||||
if outputEst < 50 {
|
||||
outputEst = 50
|
||||
}
|
||||
outputEst := max(estTokens/10, 50)
|
||||
rl.RecordUsage(model, estTokens, outputEst)
|
||||
|
||||
if err := rl.Persist(); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue