mirror of
https://github.com/vxcontrol/langchaingo.git
synced 2026-08-24 21:31:28 -04:00
058e344d90
WithMaxTokens above MaxInt32 wrapped: 3_000_000_000 became -1294967296 on the Vertex generation config (max output tokens, candidate count and top-k) and on the Converse inference config. The googleai adapter already saturated, so the same call succeeded there and failed on the sibling doors. The saturating conversion moves to internal/numutil so the three doors share one implementation. The Vertex generation config is extracted into a function so the conversion has a seam a test can reach. Not changed: the thinking-budget conversion in googleai, where GetTokens is already clamped to MaxReasoningTokens and cannot overflow. PAGI-132