Skip to content

feat(sandbox,vercel/sandbox): support new image parameter#232

Merged
marc-vercel merged 6 commits into
mainfrom
sandbox-support-image
Jun 29, 2026
Merged

feat(sandbox,vercel/sandbox): support new image parameter#232
marc-vercel merged 6 commits into
mainfrom
sandbox-support-image

Conversation

@marc-vercel

@marc-vercel marc-vercel commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Add support for the new image parameter.

CLI

Add a new image parameter for the sandbox create command. It cannot be used with --runtime. Example:

sandbox create --image `foo/bar`

SDK

SDK also supports this new parameter in the create command. Like the CLI, it cannot be used with the runtime parameter. Example:

Sandbox.create({
  image: 'foo/bar'
});

@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sandbox Ready Ready Preview, Comment, Open in v0 Jun 26, 2026 9:20am
sandbox-cli Ready Ready Preview, Comment, Open in v0 Jun 26, 2026 9:20am
sandbox-sdk-ai-example Ready Ready Preview, Comment, Open in v0 Jun 26, 2026 9:20am
workflow-code-runner Ready Ready Preview, Comment, Open in v0 Jun 26, 2026 9:20am

Comment thread packages/vercel-sandbox/src/sandbox.ts Outdated
Comment thread packages/sandbox/src/commands/create.ts Outdated
…ng runtime

Make the CLI `--runtime` flag optional (no built-in default) so an explicitly
provided runtime can be distinguished from the default. The handler now errors
when both `--image` and `--runtime` are given, matching the SDK's compile-time
mutual exclusivity, and applies the `node24` default only when neither is set.

Also remove stray blank lines in sandbox.ts and sandbox.test.ts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread packages/vercel-sandbox/README.md
Comment thread packages/vercel-sandbox/src/sandbox.ts
Comment thread packages/sandbox/src/commands/create.ts Outdated
Comment thread packages/vercel-sandbox/src/sandbox.ts Outdated
@marc-vercel marc-vercel marked this pull request as ready for review June 29, 2026 16:23
@marc-vercel marc-vercel merged commit 4e1c5d8 into main Jun 29, 2026
12 checks passed
@marc-vercel marc-vercel deleted the sandbox-support-image branch June 29, 2026 16:23
@github-actions github-actions Bot mentioned this pull request Jun 29, 2026
marc-vercel pushed a commit that referenced this pull request Jun 30, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## sandbox@3.3.0

### Minor Changes

- Support creating a sandbox from a custom image via the new `image`
option on `Sandbox.create` and the `--image` flag on `sandbox create` /
`sandbox run`. ([#232](#232))

### Patch Changes

- Updated dependencies
[[`4e1c5d868e66b9069a294ded3b2e20e08e0db10b`](4e1c5d8),
[`387675a3b46819e46362c359aed4b397065a180f`](387675a)]:
  - @vercel/sandbox@2.3.0
## @vercel/sandbox@2.3.0

### Minor Changes

- Support creating a sandbox from a custom image via the new `image`
option on `Sandbox.create` and the `--image` flag on `sandbox create` /
`sandbox run`. ([#232](#232))

### Patch Changes

- Single API call to run, wait and get logs of command
([#223](#223))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants