mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-14 19:02:17 +03:00
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.