fix(vercel): use python3.13 runtime in Vercel Sandbox Python examples#4835
Open
Elisabeth Rulke (erulkey) wants to merge 1 commit into
Open
fix(vercel): use python3.13 runtime in Vercel Sandbox Python examples#4835Elisabeth Rulke (erulkey) wants to merge 1 commit into
Elisabeth Rulke (erulkey) wants to merge 1 commit into
Conversation
Contributor
|
Thanks for opening a docs PR, Elisabeth Rulke (@erulkey)! When it's ready for review, please add the relevant reviewers:
|
The Vercel Sandbox Python examples call Sandbox.create() with no runtime,
which defaults to node24 (Vercel's JavaScript runtime), then run Python.
Following them as written fails: python/pip/uv are only present on the
python3.13 runtime.
Reproduced live (langchain-vercel-sandbox 0.0.1 + vercel 0.5.9):
Sandbox.create() -> node24
backend.execute("python --version") => "bash: python: command not found", exit 127
Sandbox.create(runtime="python3.13")
backend.execute("python --version") => "Python 3.13.1", exit 0
Adds runtime="python3.13" to the 7 Vercel Python snippets. The JS example
already sets runtime: "node24" and runs TypeScript, so it is unaffected.
f037511 to
62ffacf
Compare
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.
What
The Vercel Sandbox Python examples create the sandbox with
Sandbox.create()and noruntime, which defaults tonode24(Vercel's JavaScript runtime). The same examples then run Python (python --version, "run pytest", etc.), so following them as written fails.Repro (live)
Running the example verbatim with
langchain-vercel-sandbox0.0.1 +vercel0.5.9:With the one-line change:
Per Vercel's docs,
python3.13is the only runtime that shipspython/pip/uv; thenode*runtimes shipnpm/pnpmonly (runtimes docs). Vercel's own Python example usesruntime: "python3.13".Change
Adds
runtime="python3.13"to the 7 Vercel Python snippets:src/oss/python/integrations/sandboxes/vercel.mdx(2)src/oss/deepagents/sandboxes.mdx(3)src/snippets/sandboxes-basic-tabs-py.mdx(1)src/snippets/deepagents-sandbox-basic-py.mdx(1)The JS example already sets
runtime: "node24"and runs TypeScript (verified:node hello.tsworks on node24), so it's unaffected.