3c5684275c
## Summary - Fixes `Sandbox.create()` failing in self-hosted environments because `sandboxHeaders` were not propagated to `EnvdApiClient` - Spreads `sandboxHeaders` (`E2b-Sandbox-Id`, `E2b-Sandbox-Port`) into the headers passed to the envd API client Closes #1158 Based on #1159 by @ajuijas ## Test plan - [ ] Verify sandbox creation works in self-hosted environments - [ ] Verify sandbox headers are correctly passed to EnvdApiClient <!-- CURSOR_SUMMARY --> --- > [!NOTE] > <sup>[Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) is generating a summary for commit f78d8b53196ced16dc48916720f02a1cb957884b. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Signed-off-by: ajuijas <ijas.ahmd.ap@gmail.com> Co-authored-by: ajuijas <ijas.ahmd.ap@gmail.com>
What is E2B?
E2B is an open-source infrastructure that allows you to run AI-generated code in secure isolated sandboxes in the cloud. To start and control sandboxes, use our JavaScript SDK or Python SDK.
Run your first Sandbox
1. Install SDK
npm i @e2b/code-interpreter
2. Get your E2B API key
E2B_API_KEY=e2b_***
3. Execute code with code interpreter inside Sandbox
import { Sandbox } from '@e2b/code-interpreter'
const sbx = await Sandbox.create()
await sbx.runCode('x = 1')
const execution = await sbx.runCode('x+=1; x')
console.log(execution.text) // outputs 2
4. Check docs
Visit E2B documentation.
5. E2B cookbook
Visit our Cookbook to get inspired by examples with different LLMs and AI frameworks.
