Skip to content

added context methods to the SDK + tests - #179

Merged
mishushakov merged 9 commits into
mainfrom
added-context-methods
Nov 26, 2025
Merged

mishushakov merged 9 commits into
mainfrom
added-context-methods

Conversation

@mishushakov

@mishushakov mishushakov commented Nov 25, 2025 •

Copy link
Copy Markdown
Member

Note

Adds list/remove/restart context APIs to JS/Python SDKs and server, updates contexts listing, and adds comprehensive tests.

  • SDK (JS & Python):
    • New Context APIs: listCodeContexts/list_code_contexts, removeCodeContext/remove_code_context, restartCodeContext/restart_code_context.
    • Wire up HTTP calls with request timeouts and error handling.
  • Server:
    • Endpoints: Add POST /contexts/{id}/restart and DELETE /contexts/{id}.
    • List Contexts: GET /contexts now returns a list excluding the default context.
  • Tests:
    • Add JS and Python (sync/async) tests for creating with/without options, listing, removing, and restarting contexts.
  • Release:
    • Changeset: minor bumps for @e2b/code-interpreter and @e2b/code-interpreter-python.

Written by Cursor Bugbot for commit 51b0d17. This will update automatically on new commits. Configure here.

@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.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread js/src/sandbox.ts Outdated
@mishushakov
mishushakov enabled auto-merge (squash) November 25, 2025 14:11

@jakubno jakubno left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Can you make the tests for restart, remove and list more specific? 🙏🏻

@mishushakov
mishushakov requested a review from jakubno November 25, 2025 18:17
Comment thread js/src/sandbox.ts
Comment thread js/tests/contexts.test.ts
Comment thread js/tests/contexts.test.ts
Comment thread js/tests/contexts.test.ts

@jakubno jakubno left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Won't this return some contexts multiple times, making the total count weird?

@mishushakov
mishushakov merged commit 66eabba into main Nov 26, 2025
9 checks passed
@mishushakov
mishushakov deleted the added-context-methods branch November 26, 2025 10:31
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