Files
OmniRoute/tests
diegosouzapw 92fc61374a fix(oauth): align codebuddy-cn OAuth User-Agent with chat/usage (#12702)
OAuth device-code auth/poll and token-refresh for codebuddy-cn presented
CLI/2.63.2 CodeBuddy/2.63.2 while chat-completion and usage/quota requests
presented CLI/2.108.1 CodeBuddy/2.108.1 for the same account. A 45-minor-
version-apart client fingerprint across auth vs. chat calls is exactly the
kind of internally-inconsistent signal an anti-abuse WAF flags as anomalous
(Tencent gateway code 11128 'request illegal').

Centralize the version string into CODEBUDDY_CN_USER_AGENT (exported from
src/lib/oauth/constants/oauth.ts) and reference it from the chat registry
entry and the usage handler so all three surfaces can never drift apart
again. Adds a permanent regression test asserting the OAuth, chat and
usage User-Agent headers all match.
2026-09-10 15:22:15 -03:00
..