Skip to content

docs(sandbox): add opensandbox provider and chat completions interception - #403

Merged
krrish-berri-2 merged 6 commits into
mainfrom
claude/fervent-sammet-0e6e47
Jun 23, 2026
Merged

docs(sandbox): add opensandbox provider and chat completions interception#403
krrish-berri-2 merged 6 commits into
mainfrom
claude/fervent-sammet-0e6e47

Conversation

@krrish-berri-2

Copy link
Copy Markdown
Contributor

Summary

Updates docs/sandbox.md for two upstream LiteLLM changes.

BerriAI/litellm#31024 adds provider=\"opensandbox\" alongside e2b. The new section under "Provider setup" covers the OPEN_SANDBOX_API_BASE / OPEN_SANDBOX_API_KEY env vars (no localhost fallback; key optional for local no-auth servers), the egress-deny default with allow_internet_access / network_policy escape 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 shows litellm.acompletion with max_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's sandbox_tools block 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 start renders the page cleanly at http://localhost:3010/docs/sandbox
  • Tabs switch between Responses and Chat Completions on both SDK and proxy sections
  • All anchor links inside the page still resolve

…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>
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Jun 23, 2026 8:35pm

Request Review

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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread docs/sandbox.md
-H "Authorization: Bearer sk-1234" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment thread docs/sandbox.md

```yaml
sandbox_tools:
- sandbox_tool_name: my-opensandbox

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

krrish-berri and others added 3 commits June 23, 2026 12:50
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>
@krrish-berri-2
krrish-berri-2 enabled auto-merge (squash) June 23, 2026 20:33
@krrish-berri-2
krrish-berri-2 merged commit cf381f0 into main Jun 23, 2026
2 checks passed
@krrish-berri-2
krrish-berri-2 deleted the claude/fervent-sammet-0e6e47 branch June 23, 2026 20:35
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