fix(sandbox): add sandbox delete/stop/get passthrough config#63
Merged
Conversation
add sandbox delete/stop/get passthrough configurations Co-developed-by: Aone Copilot <noreply@alibaba-inc.com> Signed-off-by: Sodawyx <sodawyx@126.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds config (Config object) passthrough support to the sandbox delete, stop, and get operations in the high-level Sandbox API. Previously these methods ignored any user-provided config object, making them inconsistent with methods like create() that already supported config passthrough.
Changes:
Sandbox.stop_by_id,Sandbox.stop_by_id_async,Sandbox.delete_by_id, andSandbox.delete_by_id_asyncclass methods now accept an optionalconfigparameter and forward it to the underlying API client- Instance methods
stop(),stop_async(),delete(),delete_async(),get(), andget_async()now forwardself._configwhen calling their underlying class methods orconnect()/connect_async();create()andcreate_async()now also passconfigtocreate_sandbox/create_sandbox_async - New
TestSandboxConfigPassthroughtest class added to verify config is properly forwarded for all affected operations
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
agentrun/sandbox/sandbox.py |
Adds config param to stop_by_id* and delete_by_id* class methods; passes self._config through all relevant instance methods |
agentrun/sandbox/__sandbox_async_template.py |
Mirrors sandbox.py changes for the async template (source for codegen) |
tests/unittests/sandbox/test_sandbox.py |
New TestSandboxConfigPassthrough class with 12 tests covering config passthrough for stop, delete, get, and create operations, both sync and async |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
OhYee
approved these changes
Mar 6, 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.
add sandbox delete/stop/get passthrough configurations
Co-developed-by: Aone Copilot noreply@alibaba-inc.com
Fix bugs
Bug detail
Pull request tasks
Update docs
Reason for update
Pull request tasks
Add contributor
Contributed content
Content detail
Others
Reason for update