Add runtime size configuration feature (#5805)

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: amanape <83104063+amanape@users.noreply.github.com>
This commit is contained in:
Graham Neubig
2025-01-07 07:22:58 +09:00
committed by GitHub
parent 8cfcdd7ba3
commit 1f8a0180d3
12 changed files with 274 additions and 10 deletions

View File

@@ -57,6 +57,13 @@ async def store_settings(
# LLM key isn't on the frontend, so we need to keep it if unset
if settings.llm_api_key is None:
settings.llm_api_key = existing_settings.llm_api_key
# Update sandbox config with new settings
if settings.remote_runtime_resource_factor is not None:
config.sandbox.remote_runtime_resource_factor = (
settings.remote_runtime_resource_factor
)
await settings_store.store(settings)
return JSONResponse(

View File

@@ -15,3 +15,4 @@ class Settings:
llm_model: str | None = None
llm_api_key: str | None = None
llm_base_url: str | None = None
remote_runtime_resource_factor: int | None = None