From 85e0422182678af753373c0227d8be8571bff037 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Mon, 16 Mar 2026 09:06:57 -0400 Subject: [PATCH] fix(lint): guard against overflow --- providers/anthropic/anthropic.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/providers/anthropic/anthropic.go b/providers/anthropic/anthropic.go index 89d14959a2b811ec7531f21b2d7ff58814be3e8d..1a7004205dff6fee51fbcfe930de854e78ca80b5 100644 --- a/providers/anthropic/anthropic.go +++ b/providers/anthropic/anthropic.go @@ -453,10 +453,11 @@ func anyToInt64(v any) (int64, bool) { case int64: return typed, true case uint: - if uint64(typed) > math.MaxInt64 { + u64 := uint64(typed) + if u64 > math.MaxInt64 { return 0, false } - return int64(typed), true + return int64(u64), true case uint8: return int64(typed), true case uint16: