From cca6f6f2db4ba1803756446b628e3b037014ef49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=AE=E0=AE=A9=E0=AF=8B=E0=AE=9C=E0=AF=8D=E0=AE=95?= =?UTF-8?q?=E0=AF=81=E0=AE=AE=E0=AE=BE=E0=AE=B0=E0=AF=8D=20=E0=AE=AA?= =?UTF-8?q?=E0=AE=B4=E0=AE=A9=E0=AE=BF=E0=AE=9A=E0=AF=8D=E0=AE=9A=E0=AE=BE?= =?UTF-8?q?=E0=AE=AE=E0=AE=BF?= Date: Mon, 13 Jan 2025 17:09:35 +0530 Subject: [PATCH] Allow extra config Resolves https://github.com/All-Hands-AI/OpenHands/issues/6147 --- openhands/core/config/app_config.py | 3 +-- openhands/core/config/llm_config.py | 1 - openhands/core/config/sandbox_config.py | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/openhands/core/config/app_config.py b/openhands/core/config/app_config.py index 8c3e495fd0d9..f7bde886af53 100644 --- a/openhands/core/config/app_config.py +++ b/openhands/core/config/app_config.py @@ -79,7 +79,7 @@ class AppConfig(BaseModel): file_uploads_allowed_extensions: list[str] = Field(default_factory=lambda: ['.*']) runloop_api_key: SecretStr | None = Field(default=None) cli_multiline_input: bool = Field(default=False) - + show_workspace_contents: bool = Field(default=True) override_UI_settings: bool = Field(default=False) custom_instructions: str = Field(default='') @@ -88,7 +88,6 @@ class AppConfig(BaseModel): defaults_dict: ClassVar[dict] = {} - model_config = {'extra': 'forbid'} def get_llm_config(self, name='llm') -> LLMConfig: """'llm' is the name for default config (for backward compatibility prior to 0.8).""" diff --git a/openhands/core/config/llm_config.py b/openhands/core/config/llm_config.py index f7be683c4c57..0e43557bdfe7 100644 --- a/openhands/core/config/llm_config.py +++ b/openhands/core/config/llm_config.py @@ -94,7 +94,6 @@ class LLMConfig(BaseModel): use_group: str | None = Field(default=None) - model_config = {'extra': 'forbid'} def model_post_init(self, __context: Any): """Post-initialization hook to assign OpenRouter-related variables to environment variables. diff --git a/openhands/core/config/sandbox_config.py b/openhands/core/config/sandbox_config.py index 8c7307cb1276..6a42bf318e15 100644 --- a/openhands/core/config/sandbox_config.py +++ b/openhands/core/config/sandbox_config.py @@ -70,4 +70,3 @@ class SandboxConfig(BaseModel): persist_sandbox: bool = True port: int = 63710 - model_config = {'extra': 'forbid'}