Files
CLIProxyAPI/internal/runtime/executor
Luis Pater 9bce482522 fix(antigravity): reject invalid HTTP 200 responses in CountTokens
- Validate that HTTP 2xx CountTokens responses are valid JSON objects before checking in-band errors or token counts, returning 502 Bad Gateway on empty, HTML, malformed, or non-object bodies.
- Strictly parse numeric totalTokens as a non-negative int64 via strconv.ParseUint before translation, rejecting missing, fractional, negative, or overflowing values while preserving explicit zero counts.
- Add hermetic regression tests covering invalid HTTP 200 CountTokens responses across formats alongside valid zero and positive counts.

Closes: #7992
2026-11-24 10:41:12 +08:00
..