Skip to content

Commit 13bb474

Browse files
authored
feat(Session): add sandbox base, runtime container image to session settings (#7329)
1 parent 09aa62f commit 13bb474

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

openhands/server/session/session.py

+10
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@ async def initialize_agent(
9999
self.config.security.security_analyzer = (
100100
settings.security_analyzer or self.config.security.security_analyzer
101101
)
102+
self.config.sandbox.base_container_image = (
103+
settings.sandbox_base_container_image
104+
or self.config.sandbox.base_container_image
105+
)
106+
self.config.sandbox.runtime_container_image = (
107+
settings.sandbox_runtime_container_image
108+
if settings.sandbox_base_container_image
109+
or settings.sandbox_runtime_container_image
110+
else self.config.sandbox.runtime_container_image
111+
)
102112
max_iterations = settings.max_iterations or self.config.max_iterations
103113

104114
# This is a shallow copy of the default LLM config, so changes here will

openhands/server/settings.py

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ class Settings(BaseModel):
3333
enable_default_condenser: bool = False
3434
enable_sound_notifications: bool = False
3535
user_consents_to_analytics: bool | None = None
36+
sandbox_base_container_image: str | None = None
37+
sandbox_runtime_container_image: str | None = None
3638

3739
model_config = {
3840
'validate_assignment': True,

0 commit comments

Comments
 (0)