mirror of
https://github.com/Rarebuffalo/securelens-backend.git
synced 2026-06-19 07:00:30 +00:00
spoof User-Agent for Agent Router calls to bypass unauthorized client detection
This commit is contained in:
@@ -53,6 +53,10 @@ async def call_ai(
|
||||
|
||||
if api_base:
|
||||
kwargs["api_base"] = api_base
|
||||
if "agentrouter.org" in api_base.lower():
|
||||
kwargs["extra_headers"] = {
|
||||
"User-Agent": "claude-code/0.2.9",
|
||||
}
|
||||
|
||||
if json_mode:
|
||||
kwargs["response_format"] = {"type": "json_object"}
|
||||
|
||||
Reference in New Issue
Block a user