Class CodeExecutionTool20260120
-
- All Implemented Interfaces:
public final class CodeExecutionTool20260120Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCodeExecutionTool20260120.BuilderA builder for CodeExecutionTool20260120.
public final classCodeExecutionTool20260120.AllowedCallerSpecifies who can invoke a tool.
Values: direct: The model can call this tool directly. code_execution_20250825: The tool can be called from the code execution environment (v1). code_execution_20260120: The tool can be called from the code execution environment (v2 with persistence).
-
Method Summary
Modifier and Type Method Description final JsonValue_name()Name of the tool. final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("code_execution_20260120")final Optional<List<CodeExecutionTool20260120.AllowedCaller>>allowedCallers()final Optional<CacheControlEphemeral>cacheControl()Create a cache control breakpoint at this content block. final Optional<Boolean>deferLoading()If true, tool will not be included in initial system prompt. final Optional<Boolean>strict()When true, guarantees schema validation on tool names and inputs final JsonField<List<CodeExecutionTool20260120.AllowedCaller>>_allowedCallers()Returns the raw JSON value of allowedCallers. final JsonField<CacheControlEphemeral>_cacheControl()Returns the raw JSON value of cacheControl. final JsonField<Boolean>_deferLoading()Returns the raw JSON value of deferLoading. final JsonField<Boolean>_strict()Returns the raw JSON value of strict. final Map<String, JsonValue>_additionalProperties()final CodeExecutionTool20260120.BuildertoBuilder()final CodeExecutionTool20260120validate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static CodeExecutionTool20260120.Builderbuilder()Returns a mutable builder for constructing an instance of CodeExecutionTool20260120. -
-
Method Detail
-
_name
final JsonValue _name()
Name of the tool.
This is how the tool will be called by the model and in
tool_useblocks.Expected to always return the following:
JsonValue.from("code_execution")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("code_execution_20260120")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
allowedCallers
final Optional<List<CodeExecutionTool20260120.AllowedCaller>> allowedCallers()
-
cacheControl
final Optional<CacheControlEphemeral> cacheControl()
Create a cache control breakpoint at this content block.
-
deferLoading
final Optional<Boolean> deferLoading()
If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
-
strict
final Optional<Boolean> strict()
When true, guarantees schema validation on tool names and inputs
-
_allowedCallers
final JsonField<List<CodeExecutionTool20260120.AllowedCaller>> _allowedCallers()
Returns the raw JSON value of allowedCallers.
Unlike allowedCallers, this method doesn't throw if the JSON field has an unexpected type.
-
_cacheControl
final JsonField<CacheControlEphemeral> _cacheControl()
Returns the raw JSON value of cacheControl.
Unlike cacheControl, this method doesn't throw if the JSON field has an unexpected type.
-
_deferLoading
final JsonField<Boolean> _deferLoading()
Returns the raw JSON value of deferLoading.
Unlike deferLoading, this method doesn't throw if the JSON field has an unexpected type.
-
_strict
final JsonField<Boolean> _strict()
Returns the raw JSON value of strict.
Unlike strict, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final CodeExecutionTool20260120.Builder toBuilder()
-
validate
final CodeExecutionTool20260120 validate()
-
builder
final static CodeExecutionTool20260120.Builder builder()
Returns a mutable builder for constructing an instance of CodeExecutionTool20260120.
-
-
-
-