I have a PR here for config within the Sandbox con...
# proj-sdk
s
I have a PR here for config within the Sandbox containers: https://github.com/All-Hands-AI/OpenHands-Server/pull/21. I have favored yaml over the environment variables / toml because: • Yaml is more well known and used than toml. • The API was actually already dependent on it. (Or at least I saw it when I did a
uv run pip freeze
) • We wont have the ambiguity when reading from environment variables. (Is that list comma separated, space separated, or something else?) • You can update the yaml file (Possibly within the Persisted Volume Claim or mounted workspace) without restarting the container. That said, I left one legacy environment variable for backward compatibility (
SESSION_API_KEY
). Thoughts? I know there are some strong feelings regarding environment variables / toml (@calm-artist-7206 / @chilly-france-44439 / @wooden-umbrella-84098)
c
I think we have some consensus here to use JSON instead of YAML? https://openhands-ai.slack.com/archives/C09FJAZSP9N/p1757598888398979
s
ok - json it is - that actually makes things easier
It means that if we need to generate this from anywhere like a deploy script we don't need a yaml dependency!
nod 1
c
one rationale is that we can simply model_dump and load so one fewer dependency 🙂
nod 1
c
JSON should just work. I see some issues here, and I don’t fully understand what exactly is this configuration doing • globals on import path - could we please totally kill them? • why is the server making its own configuration? Isn’t that the application configuration actually? I think one of the biggest problems in V0 is that we had two configuration systems working mostly in parallel, which lead to a lot of user confusion when they set something somewhere and then it’s not respected in the web server.
I would really love to think this over, before walking on the same path lolsob
s
I 100% agree with you about making sure we do this properly - I posted the PR and asked for your thought specifically for this reason. • The Agent Server SDK config is only for things for which there is no concept in the Agent SDK - for example`session_api_key`,
cors_origins
. I feel quite strongly that these do not belong in the Agent SDK • I suppose we could argue that the
conversation_path
and
workspace_path
belong in Agent SDK - but that does not really have the concept of a global config (and I'm not sure that it should?)
I think we need the flexibility to work inside and outside a sandbox - and to remember that different sandboxes may have different mount points
Outside the sandbox, storing in
~/.openhands/config.json
is fine
But in our K8 environment for example, there is a persistent volume claim at
/workspace
c
👆 actually, related to this, i wonder if it make sense for us to use
~
directly as the "workspace" inside sandbox & mount PV there lolsob
s
so anything outside that disappears any time you pause / resume
I like that idea, but did not want to change runtime api yet
c
might be helpful in persisting a lot of stuff in additional to openhands-related, like
~/.vscode
~/.venv
nod 1
s
I was hoping for a minimal set of changes that would allow this to move quickly
c
👍 we can create an issue and we can do that later
what would be the best repo to open this issue, openhands-server? or we will merge openhands-server in openhands later?
s
To summarize: This PR is "config from json with 2 exceptions for backward compatibility with our existing remote runtimes"
c
Do I understand correctly, the backwards compat things are the globals on import path?
I thought we said that get_impl is not here because server-sdk doesn’t have/need an extensibility mechanism, and yet we do need at least one for remote runtimes
I’m a bit confused!
Could we list in the PR what exactly does the remote runtime need? If it’s just a mount point difference, surely we can handle that