feat (sandbox): decouple sandbox provider config from agent config - #1707
Closed
ananthsub wants to merge 1 commit into
Closed
feat (sandbox): decouple sandbox provider config from agent config#1707ananthsub wants to merge 1 commit into
ananthsub wants to merge 1 commit into
Conversation
Sandbox providers are now defined as named blocks in their own config files (e.g. nemo_gym/sandbox/providers/opensandbox/configs/opensandbox.yaml) that agents reference by name (sandbox_provider: sandbox). Swapping providers becomes swapping one config path in +config_paths, with no edits to the agent config. - Add resolve_provider_config to resolve a sandbox name (or an inline single-key mapping) to a single provider config. - Make mini_swe_agent_2's config provider-neutral and resolve the reference at runtime. - Document single / swap / multiple-sandbox usage, including distinct instance names for mixing providers or running two configs of the same provider type. Refs NVIDIA-NeMo#1377 Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
Contributor
Author
This was referenced Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #1377 addressing the config-usability feedback (thread): the inline
sandbox_provider:block welded provider connection/lifecycle config (and its secret) into the agent config, making it hard to swap providers.This decouples the two. A sandbox is now a named block —
<name>: { <provider>: {config} }defined in its own provider config file, and an agent points at it by name (e.g.sandbox_provider: sandbox). The framework only ever resolves a name → one provider config.sandboxblock; the agent defaults tosandbox_provider: sandbox.sandbox, so swapping providers is swapping one+config_pathsentry.Changes
nemo_gym.sandbox.resolve_provider_config: resolves a sandbox name from the merged config or an inline single-key mapping to a single{provider: config}dict forcreate_provider.nemo_gym/sandbox/providers/opensandbox/configs/opensandbox.yamldefining the namedsandboxblock (provider connection/create/probe/operations).responses_api_agents/mini_swe_agent_2provider-neutral:sandbox_provideraccepts a name (default) or inline mapping; the reference is resolved at runtime. Renamedmini_swe_agent_opensandbox.yaml→mini_swe_agent_2.yaml.This PR does not add specific parse-time validation for the sandbox providers, so misconfigurations are still discovered at runtime. If needed, we can add a top-level named-block for the sandbox providers in the config for early validation to run against.
Refs #1377
Test plan
uv run pytest tests/unit_tests/test_sandbox.py tests/unit_tests/test_opensandbox_provider.py responses_api_agents/mini_swe_agent_2/tests/GlobalConfigDictParser: agent + provider YAMLs merge, thesandboxblock survives, andsandbox_provider: sandboxresolves to the opensandbox config