Skip to main content
The Responses tool union includes OfCodeExecution. This delegates code execution to a provider-hosted environment. It does not execute code inside your Go application or configure the SDK’s separate sandbox service. With a compatible model and ctx:

Container configuration

The container union accepts a provider container ID or a configuration object. Container settings, file access, memory limits, and reuse are provider-specific. Do not assume a container identifier can be used across providers, accounts, or arbitrary later sessions. The model decides whether to call the tool. Output can include code-interpreter call items, generated files/images, and a final assistant answer. Inspect completed items and errors rather than interpreting the presence of an enabled tool as successful execution.

Choose an execution boundary

Use provider-hosted execution for supported model-assisted analysis. Use sandbox tools when your application needs to supply its own execution environment. Use a workflow JavaScript node for synchronous JSON transformation within a configured graph; it is not a shell or container runtime.