feat(sandbox): provider configs contribute default sandbox metadata - #1709
Merged
Conversation
2 tasks
2 tasks
hemildesai
force-pushed
the
ansubramania/sandbox-provider-default-metadata
branch
from
June 26, 2026 22:13
9f0f847 to
f12573d
Compare
hemildesai
previously approved these changes
Jun 27, 2026
hemildesai
force-pushed
the
ansubramania/sandbox-provider-default-metadata
branch
from
June 27, 2026 05:22
f12573d to
ce62566
Compare
hemildesai
previously approved these changes
Jun 27, 2026
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 #1377 Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
A sandbox block may carry an optional `default_metadata` key whose entries are merged into each sandbox's spec metadata (SandboxSpec.metadata), with the agent's own sandbox_spec.metadata taking precedence. This keeps provider-identifying tags with the provider config instead of the provider-neutral agent config. - Add resolve_provider_metadata and exclude reserved keys (default_metadata) from resolve_provider_config. - mini_swe_agent_2 merges provider default_metadata into the sandbox spec metadata. - Restore sandbox-api: opensandbox-sdk via the opensandbox provider config. Refs #1377 Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
hemildesai
force-pushed
the
ansubramania/sandbox-provider-default-metadata
branch
from
June 29, 2026 16:50
ce62566 to
185c034
Compare
Signed-off-by: Hemil Desai <hemild@nvidia.com>
Signed-off-by: Hemil Desai <hemild@nvidia.com>
hemildesai
approved these changes
Jun 29, 2026
hemildesai
previously approved these changes
Jun 29, 2026
Signed-off-by: Hemil Desai <hemild@nvidia.com>
Signed-off-by: Hemil Desai <hemild@nvidia.com>
hemildesai
previously approved these changes
Jun 29, 2026
Signed-off-by: Hemil Desai <hemild@nvidia.com>
hemildesai
approved these changes
Jun 29, 2026
…provider-default-metadata Signed-off-by: Kajal Jain <kajalj@nvidia.com>
…provider-default-metadata Signed-off-by: Kajal Jain <kajalj@nvidia.com>
kajalj22
pushed a commit
that referenced
this pull request
Jun 30, 2026
## Summary Stacked on top of #1709. Addresses the open review thread on #1377 ([here](#1377 (comment))) asking to support an entry-points configuration so users can plug in their own providers. Adds a `nemo_gym.sandbox_providers` entry point group. A separate package can publish a sandbox provider that becomes available on install/import — no edits to the registry: ```toml [project.entry-points."nemo_gym.sandbox_providers"] my_provider = "my_pkg.provider:MyProvider" ``` Lookup precedence is **explicit `register_provider` > built-in loaders > entry points**; discovery is cached. `list_providers()` now unions all three sources. ### Changes - `nemo_gym/sandbox/providers/registry.py`: add `ENTRY_POINT_GROUP`, cached `_entry_point_loaders()`, and fold entry points into `get_provider_class` / `list_providers`. - Unit test for discovery + built-in precedence (mocked entry points). - README: document registering a custom provider via entry points. Refs #1377 ## Test plan - [x] `uv run pytest tests/unit_tests/test_sandbox.py tests/unit_tests/test_opensandbox_provider.py` (23 passed, 11 skipped) - [x] `uv run ruff check` clean --------- Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
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
Stacked on top of #1708.
Lets a sandbox provider config contribute default sandbox metadata* so provider-identifying tags live with the provider rather than the provider-neutral agent config. A sandbox block may carry an optional
default_metadatakey:Its entries are merged into each sandbox's
SandboxSpec.metadata; the agent's ownsandbox_spec.metadataoverrides them on conflict.This restores the
sandbox-api: opensandbox-sdklabel that #1708 dropped from the agent config, now sourced from the provider config instead.Changes
nemo_gym.sandbox.resolve_provider_metadata; exclude reserved keys (default_metadata) fromresolve_provider_config.mini_swe_agent_2merges providerdefault_metadatainto the sandbox spec metadata at runtime.default_metadata: { sandbox-api: opensandbox-sdk }to the opensandbox provider config; document it in the README.resolve_provider_metadataand the agent merge path.Refs #1377
Test plan
uv run pytest tests/unit_tests/test_sandbox.py responses_api_agents/mini_swe_agent_2/tests/test_app.py(38 passed, 10 skipped)uv run ruff check+ruff format --checkcleanGlobalConfigDictParser(provider key + default_metadata)