Skip to content

Commit e76494e

Browse files
committed
modelerrors: remove unused deprecated wrappers
CalculateBackoff and SleepWithContext were deprecated in favor of backoff.Calculate and backoff.SleepWithContext. No callers use the modelerrors versions — all code imports pkg/backoff directly. Remove the deprecated wrappers to reduce API surface. Assisted-By: docker-agent
1 parent 53b9c8f commit e76494e

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

pkg/modelerrors/modelerrors.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -402,18 +402,6 @@ func ClassifyModelError(err error) (retryable, rateLimited bool, retryAfter time
402402
return isRetryableModelError(err), false, 0
403403
}
404404

405-
// CalculateBackoff returns the backoff duration for a given attempt (0-indexed).
406-
// Uses exponential backoff with jitter.
407-
//
408-
// Deprecated: Use [backoff.Calculate] directly.
409-
var CalculateBackoff = backoff.Calculate
410-
411-
// SleepWithContext sleeps for the specified duration, returning early if context is cancelled.
412-
// Returns true if the sleep completed, false if it was interrupted by context cancellation.
413-
//
414-
// Deprecated: Use [backoff.SleepWithContext] directly.
415-
var SleepWithContext = backoff.SleepWithContext
416-
417405
// FormatError returns a user-friendly error message for model errors.
418406
// Context overflow gets a dedicated actionable message; all other errors
419407
// pass through their original message.

0 commit comments

Comments
 (0)