Class SessionExecuteParams.AgentConfig.ExecutionModel
-
- All Implemented Interfaces:
public final class SessionExecuteParams.AgentConfig.ExecutionModelModel configuration object or model name string (e.g., 'openai/gpt-5-nano') for tool execution (observe/act calls within agent tools). If not specified, inherits from the main model configuration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceSessionExecuteParams.AgentConfig.ExecutionModel.VisitorAn interface that defines how to map each variant of ExecutionModel to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<ModelConfig>modelConfig()final Optional<String>string()final BooleanisModelConfig()final BooleanisString()final ModelConfigasModelConfig()final StringasString()final Optional<JsonValue>_json()final <T extends Any> Taccept(SessionExecuteParams.AgentConfig.ExecutionModel.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final SessionExecuteParams.AgentConfig.ExecutionModelvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static SessionExecuteParams.AgentConfig.ExecutionModelofModelConfig(ModelConfig modelConfig)final static SessionExecuteParams.AgentConfig.ExecutionModelofString(String string)-
-
Method Detail
-
modelConfig
final Optional<ModelConfig> modelConfig()
-
isModelConfig
final Boolean isModelConfig()
-
asModelConfig
final ModelConfig asModelConfig()
-
accept
final <T extends Any> T accept(SessionExecuteParams.AgentConfig.ExecutionModel.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.browserbase.api.core.JsonValue; import java.util.Optional; Optional<String> result = executionModel.accept(new ExecutionModel.Visitor<Optional<String>>() { @Override public Optional<String> visitModelConfig(ModelConfig modelConfig) { return Optional.of(modelConfig.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final SessionExecuteParams.AgentConfig.ExecutionModel validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofModelConfig
final static SessionExecuteParams.AgentConfig.ExecutionModel ofModelConfig(ModelConfig modelConfig)
-
ofString
final static SessionExecuteParams.AgentConfig.ExecutionModel ofString(String string)
-
-
-
-