feat(web-tools): add configurable User-Agent

Assisted-by: Jo'Zahir:Qwen3.6-35B-A3B
This commit is contained in:
Mizarka
2026-04-22 09:11:57 +00:00
parent 7c21349828
commit ec2f0ccfdb
5 changed files with 37 additions and 11 deletions
+13 -2
View File
@@ -173,8 +173,19 @@ class SubagentManager:
allowed_env_keys=self.exec_config.allowed_env_keys,
))
if self.web_config.enable:
tools.register(WebSearchTool(config=self.web_config.search, proxy=self.web_config.proxy))
tools.register(WebFetchTool(proxy=self.web_config.proxy))
tools.register(
WebSearchTool(
config=self.web_config.search,
proxy=self.web_config.proxy,
user_agent=self.web_config.user_agent,
)
)
tools.register(
WebFetchTool(
proxy=self.web_config.proxy,
user_agent=self.web_config.user_agent,
)
)
system_prompt = self._build_subagent_prompt()
messages: list[dict[str, Any]] = [
{"role": "system", "content": system_prompt},