Skip to main content

ATOMCODE_USER_AGENT

Constant ATOMCODE_USER_AGENT 

Source
pub const ATOMCODE_USER_AGENT: &str = "atomcode/4.23.1";
Expand description

User-Agent identifier for every outbound HTTP request the app makes.

Lowercase atomcode/<version> is deliberate. The LLM gateway at api-ai.gitcode.com has a UA filter that silently hijacks any request whose UA starts with capital-A AtomCode and replies with a 200 + single SSE chunk containing the literal string “参数错误”, no [DONE] frame — which surfaces in the TUI as a 4-token assistant reply rather than an error. The other atomgit.com / gitcode.com endpoints (CodingPlan, user REST, self-update) accept either case, so normalising to lowercase avoids the LLM-path hijack without breaking the rest. Revisit once the gateway filter is removed upstream.