fix: make browser control disabled by default

- Change default value of ENABLE_BROWSING to false in frontend settings
- Change default value of codeact_enable_browsing to false in agent config
- Update session initialization to default to disabled browsing
This commit is contained in:
openhands 2024-11-09 02:02:08 +00:00
parent 6c0b36271d
commit faf60d7246
3 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ export const DEFAULT_SETTINGS: Settings = {
LLM_API_KEY: "",
CONFIRMATION_MODE: false,
SECURITY_ANALYZER: "",
ENABLE_BROWSING: true,
ENABLE_BROWSING: false,
};
const validKeys = Object.keys(DEFAULT_SETTINGS) as (keyof Settings)[];
@ -73,7 +73,7 @@ export const getSettings = (): Settings => {
const apiKey = localStorage.getItem("LLM_API_KEY");
const confirmationMode = localStorage.getItem("CONFIRMATION_MODE") === "true";
const securityAnalyzer = localStorage.getItem("SECURITY_ANALYZER");
const enableBrowsing = localStorage.getItem("ENABLE_BROWSING") !== "false"; // Default to true if not set
const enableBrowsing = localStorage.getItem("ENABLE_BROWSING") === "true"; // Default to false if not set
return {
LLM_MODEL: model || DEFAULT_SETTINGS.LLM_MODEL,

View File

@ -19,7 +19,7 @@ class AgentConfig:
"""
function_calling: bool = True
codeact_enable_browsing: bool = True
codeact_enable_browsing: bool = False
codeact_enable_llm_editor: bool = False
codeact_enable_jupyter: bool = True
micro_agent_name: str | None = None

View File

@ -92,7 +92,7 @@ class Session:
# Get agent config and update browsing setting
agent_config = self.config.get_agent_config(agent_cls)
agent_config.codeact_enable_browsing = args.get('ENABLE_BROWSING', True)
agent_config.codeact_enable_browsing = args.get('ENABLE_BROWSING', False)
# override default LLM config
default_llm_config = self.config.get_llm_config()
default_llm_config.model = args.get(