Skip to content

Commit

Permalink
fix remote runtime url type
Browse files Browse the repository at this point in the history
  • Loading branch information
enyst committed Jan 27, 2025
1 parent b745025 commit d6f7166
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion openhands/core/config/sandbox_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class SandboxConfig(BaseModel):
This should be a JSON string that will be parsed into a dictionary.
"""

remote_runtime_api_url: str = Field(default='http://localhost:8000')
remote_runtime_api_url: str | None = Field(default='http://localhost:8000')
local_runtime_url: str = Field(default='http://localhost')
keep_runtime_alive: bool = Field(default=False)
rm_all_containers: bool = Field(default=False)
Expand Down
4 changes: 4 additions & 0 deletions openhands/runtime/impl/remote/remote_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ def __init__(
'debug',
'Setting workspace_base is not supported in the remote runtime.',
)
if self.config.sandbox.remote_runtime_api_url is None:
raise ValueError(
'remote_runtime_api_url is required in the remote runtime.'
)

self.runtime_builder = RemoteRuntimeBuilder(
self.config.sandbox.remote_runtime_api_url,
Expand Down

0 comments on commit d6f7166

Please sign in to comment.