Skip to content

docs(sandbox): document SDK-only path and add curl/OpenAI SDK tabs for the proxy - #391

Merged
krrish-berri-2 merged 2 commits into
mainfrom
claude/sandbox-sdk-tabs
Jun 23, 2026
Merged

docs(sandbox): document SDK-only path and add curl/OpenAI SDK tabs for the proxy#391
krrish-berri-2 merged 2 commits into
mainfrom
claude/sandbox-sdk-tabs

Conversation

@krrish-berri-2

@krrish-berri-2 krrish-berri-2 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to litellm-docs#385. The merged page only covered the proxy path for the code interpreter interceptor, so an SDK reader had to guess how to wire the callback. Two additions:

SDK section under ## Responses API code interpreter interceptor: a single Python block showing register_sandbox_tools(...) + litellm.callbacks = [CodeInterpreterInterceptionLogger(enabled_providers=["openai"], sandbox_tool_name="my-e2b")] + litellm.aresponses(model="openai/gpt-5", tools=[{"type": "code_interpreter", ...}], input=...). No proxy needed; the interceptor swaps the native code_interpreter tool for litellm_code_execution, runs the emitted code through the phase 1 sandbox primitive, and continues the agentic loop.

Tabs in proxy step 4: the "Call /v1/responses" step now shows curl and OpenAI SDK side by side, so an OpenAI SDK reader pointed at localhost:4000/v1 gets a copy-paste-able call. LiteLLM-SDK-pointed-at-proxy was dropped from this tab set since the standalone SDK section above covers the LiteLLM SDK case without the proxy hop.

Test plan

@vercel

vercel Bot commented Jun 22, 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 12:53am

Request Review

A reader using the LiteLLM SDK directly does not need a proxy to route code_interpreter to a sandbox; they only need to register the tool, install the interceptor as a callback, and call litellm.aresponses with the native code_interpreter tool. Adds an SDK section above the proxy walkthrough showing register_sandbox_tools + litellm.callbacks = [CodeInterpreterInterceptionLogger(...)] + litellm.aresponses, and drops the LiteLLM-SDK-pointed-at-proxy tab from the curl/OpenAI SDK tabs in step 4 since the SDK path now has its own section.
@krrish-berri-2 krrish-berri-2 changed the title docs(sandbox): add OpenAI SDK and LiteLLM SDK tabs to the responses call step docs(sandbox): document SDK-only path and add curl/OpenAI SDK tabs for the proxy Jun 23, 2026
@krrish-berri-2
krrish-berri-2 merged commit 8393ca0 into main Jun 23, 2026
2 checks passed
@krrish-berri-2
krrish-berri-2 deleted the claude/sandbox-sdk-tabs branch June 23, 2026 01:54
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