@@ -60,6 +60,16 @@ class AgentConfig < Stagehand::Internal::Type::BaseModel
6060 # @return [Boolean, nil]
6161 optional :cua , Stagehand ::Internal ::Type ::Boolean
6262
63+ # @!attribute execution_model
64+ # Model configuration object or model name string (e.g., 'openai/gpt-5-nano') for
65+ # tool execution (observe/act calls within agent tools). If not specified,
66+ # inherits from the main model configuration.
67+ #
68+ # @return [Stagehand::Models::ModelConfig, String, nil]
69+ optional :execution_model ,
70+ union : -> { Stagehand ::SessionExecuteParams ::AgentConfig ::ExecutionModel } ,
71+ api_name : :executionModel
72+
6373 # @!attribute mode
6474 # Tool mode for the agent (dom, hybrid, cua). If set, overrides cua.
6575 #
@@ -84,12 +94,14 @@ class AgentConfig < Stagehand::Internal::Type::BaseModel
8494 # @return [String, nil]
8595 optional :system_prompt , String , api_name : :systemPrompt
8696
87- # @!method initialize(cua: nil, mode: nil, model: nil, provider: nil, system_prompt: nil)
97+ # @!method initialize(cua: nil, execution_model: nil, mode: nil, model: nil, provider: nil, system_prompt: nil)
8898 # Some parameter documentations has been truncated, see
8999 # {Stagehand::Models::SessionExecuteParams::AgentConfig} for more details.
90100 #
91101 # @param cua [Boolean] Deprecated. Use mode: 'cua' instead. If both are provided, mode takes precedence
92102 #
103+ # @param execution_model [Stagehand::Models::ModelConfig, String] Model configuration object or model name string (e.g., 'openai/gpt-5-nano') for
104+ #
93105 # @param mode [Symbol, Stagehand::Models::SessionExecuteParams::AgentConfig::Mode] Tool mode for the agent (dom, hybrid, cua). If set, overrides cua.
94106 #
95107 # @param model [Stagehand::Models::ModelConfig, String] Model configuration object or model name string (e.g., 'openai/gpt-5-nano')
@@ -98,6 +110,22 @@ class AgentConfig < Stagehand::Internal::Type::BaseModel
98110 #
99111 # @param system_prompt [String] Custom system prompt for the agent
100112
113+ # Model configuration object or model name string (e.g., 'openai/gpt-5-nano') for
114+ # tool execution (observe/act calls within agent tools). If not specified,
115+ # inherits from the main model configuration.
116+ #
117+ # @see Stagehand::Models::SessionExecuteParams::AgentConfig#execution_model
118+ module ExecutionModel
119+ extend Stagehand ::Internal ::Type ::Union
120+
121+ variant -> { Stagehand ::ModelConfig }
122+
123+ variant String
124+
125+ # @!method self.variants
126+ # @return [Array(Stagehand::Models::ModelConfig, String)]
127+ end
128+
101129 # Tool mode for the agent (dom, hybrid, cua). If set, overrides cua.
102130 #
103131 # @see Stagehand::Models::SessionExecuteParams::AgentConfig#mode
0 commit comments