Skip to content

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

Draft
marc-vercel wants to merge 3 commits into
mainfrom
sandbox-support-image
Draft

feat(sandbox,vercel/sandbox): support new image parameter#232
marc-vercel wants to merge 3 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 25, 2026 3:10pm
sandbox-cli Ready Ready Preview, Comment, Open in v0 Jun 25, 2026 3:10pm
sandbox-sdk-ai-example Ready Ready Preview, Comment, Open in v0 Jun 25, 2026 3:10pm
workflow-code-runner Ready Ready Preview, Comment, Open in v0 Jun 25, 2026 3:10pm

Comment thread packages/vercel-sandbox/src/sandbox.ts Outdated
WithFetchOptions,
): Promise<Sandbox & AsyncDisposable> {
"use step";
if (

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we check this on a type level? we should be able to override the method definition

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 4f23798

Note that it was not straightforward and I had to add more code than I expected, but IMO this looks better than before. Nice catch!

Comment thread packages/sandbox/src/commands/create.ts Outdated
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.

2 participants