Skip to content

feat: add go sdk for code interpreter#257

Open
chengjoey wants to merge 1 commit intoe2b-dev:mainfrom
chengjoey:feat/go-sdk
Open

feat: add go sdk for code interpreter#257
chengjoey wants to merge 1 commit intoe2b-dev:mainfrom
chengjoey:feat/go-sdk

Conversation

@chengjoey
Copy link
Copy Markdown

add golang sdk like python/js

Signed-off-by: joey <zchengjoey@gmail.com>
(cherry picked from commit 01e1125)
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

Copy link
Copy Markdown

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

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: 01798ffa5a

ℹ️ 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 go/code_interpreter.go
reqCtx := ctx
var cancel context.CancelFunc
if timeout > 0 {
reqCtx, cancel = context.WithTimeout(ctx, timeout+s.connection.RequestTimeout)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Honor RunCodeOpts.RequestTimeout in RunCode

RunCodeOpts exposes a per-call RequestTimeout, but RunCode always derives its deadline from s.connection.RequestTimeout here. That means callers cannot override the HTTP timeout for an individual execution, and cases like Timeout = -1 can end up with no request deadline at all even when RequestTimeout is set in opts. This breaks the documented timeout contract and can cause unexpected hangs or premature timeouts depending on global config.

Useful? React with 👍 / 👎.

Comment thread go/sandbox.go
Comment on lines +95 to +99
APIKey: opts.APIKey,
AccessToken: opts.AccessToken,
Domain: opts.Domain,
Debug: opts.Debug,
RequestTimeout: opts.RequestTimeout,
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 Propagate traffic token into connection config

The sandbox connection is initialized from SandboxOpts without any way to populate TrafficAccessToken. Since direct Jupyter/context requests only send E2B-Traffic-Access-Token when connection.TrafficAccessToken is set, callers cannot authenticate those requests in environments that require the traffic token (resulting in 403s despite valid API credentials).

Useful? React with 👍 / 👎.

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.

1 participant