docs(sandbox): add opensandbox provider and chat completions interception - #403
Conversation
…erception Adds the opensandbox backend alongside e2b and documents the code interpreter interceptor on /v1/chat/completions in addition to /v1/responses. Reorders the page so the interceptor sits up front since it is the main entry point for most users. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
New post covering the code_interpreter interceptor as a drop-in replacement for OpenAI's hosted code interpreter, with E2B and OpenSandbox as backends. Same OpenAI client contract, execution runs in a sandbox the user controls. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: faa28fe80c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| -H "Authorization: Bearer sk-1234" \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "model": "gpt-4o-mini", |
There was a problem hiding this comment.
Use a model alias that the proxy config defines
The proxy config in this section registers only model_name: gpt-5, but this chat example (and the OpenAI SDK chat tab below) sends model: gpt-4o-mini. With the documented config as written, LiteLLM Proxy will reject the request as an unknown model before the code-interpreter interception can run. Either add a gpt-4o-mini model entry to the config or use the configured gpt-5 alias in the chat examples.
Useful? React with 👍 / 👎.
|
|
||
| ```yaml | ||
| sandbox_tools: | ||
| - sandbox_tool_name: my-opensandbox |
There was a problem hiding this comment.
Keep the interceptor pointed at the OpenSandbox tool
The surrounding proxy config still sets code_interpreter_interception_params.sandbox_tool_name: my-e2b, so if users follow the instruction to “swap the sandbox_tools entry” and create only my-opensandbox here, the interceptor will look up a tool name that no longer exists and won't use the OpenSandbox credentials. Keep the tool name unchanged or show updating the interception params to my-opensandbox as part of the swap.
Useful? React with 👍 / 👎.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Summary
Updates docs/sandbox.md for two upstream LiteLLM changes.
BerriAI/litellm#31024 adds
provider=\"opensandbox\"alongsidee2b. The new section under "Provider setup" covers theOPEN_SANDBOX_API_BASE/OPEN_SANDBOX_API_KEYenv vars (no localhost fallback; key optional for local no-auth servers), the egress-deny default withallow_internet_access/network_policyescape hatches, and the REST lifecycle the provider drives.BerriAI/litellm#31027 extends the code interpreter interceptor to
/v1/chat/completions. The SDK section now has Responses / Chat tabs, the chat sample showslitellm.acompletionwithmax_agentic_loops, and the proxy "Call" section grows to four tabs (Responses + Chat, curl + OpenAI SDK each). A trailing snippet shows how to swap the proxy'ssandbox_toolsblock over to OpenSandbox.The interceptor section is also moved up so it sits right after the feature table, since it is the main entry point most users want; direct sandbox SDK usage drops below it.
Test plan
npm run startrenders the page cleanly at http://localhost:3010/docs/sandbox