33
44from browser_use_sdk .core .request_options import RequestOptions
55from browser_use_sdk .tasks .client import OMIT , AsyncClientWrapper , AsyncTasksClient , SyncClientWrapper , TasksClient
6+ from browser_use_sdk .tasks .types .create_task_request_vision import CreateTaskRequestVision
67from browser_use_sdk .types .supported_ll_ms import SupportedLlMs
78from browser_use_sdk .types .task_view import TaskView
89from browser_use_sdk .wrapper .parse import (
@@ -35,10 +36,11 @@ def create_task(
3536 metadata : typing .Optional [typing .Dict [str , typing .Optional [str ]]] = OMIT ,
3637 secrets : typing .Optional [typing .Dict [str , typing .Optional [str ]]] = OMIT ,
3738 allowed_domains : typing .Optional [typing .Sequence [str ]] = OMIT ,
39+ op_vault_id : typing .Optional [str ] = OMIT ,
3840 highlight_elements : typing .Optional [bool ] = OMIT ,
3941 flash_mode : typing .Optional [bool ] = OMIT ,
4042 thinking : typing .Optional [bool ] = OMIT ,
41- vision : typing .Optional [bool ] = OMIT ,
43+ vision : typing .Optional [CreateTaskRequestVision ] = OMIT ,
4244 system_prompt_extension : typing .Optional [str ] = OMIT ,
4345 request_options : typing .Optional [RequestOptions ] = None ,
4446 ) -> WrappedStructuredTaskCreatedResponse [T ]: ...
@@ -56,10 +58,11 @@ def create_task(
5658 metadata : typing .Optional [typing .Dict [str , typing .Optional [str ]]] = OMIT ,
5759 secrets : typing .Optional [typing .Dict [str , typing .Optional [str ]]] = OMIT ,
5860 allowed_domains : typing .Optional [typing .Sequence [str ]] = OMIT ,
61+ op_vault_id : typing .Optional [str ] = OMIT ,
5962 highlight_elements : typing .Optional [bool ] = OMIT ,
6063 flash_mode : typing .Optional [bool ] = OMIT ,
6164 thinking : typing .Optional [bool ] = OMIT ,
62- vision : typing .Optional [bool ] = OMIT ,
65+ vision : typing .Optional [CreateTaskRequestVision ] = OMIT ,
6366 system_prompt_extension : typing .Optional [str ] = OMIT ,
6467 request_options : typing .Optional [RequestOptions ] = None ,
6568 ) -> WrappedTaskCreatedResponse : ...
@@ -77,10 +80,11 @@ def create_task(
7780 metadata : typing .Optional [typing .Dict [str , typing .Optional [str ]]] = OMIT ,
7881 secrets : typing .Optional [typing .Dict [str , typing .Optional [str ]]] = OMIT ,
7982 allowed_domains : typing .Optional [typing .Sequence [str ]] = OMIT ,
83+ op_vault_id : typing .Optional [str ] = OMIT ,
8084 highlight_elements : typing .Optional [bool ] = OMIT ,
8185 flash_mode : typing .Optional [bool ] = OMIT ,
8286 thinking : typing .Optional [bool ] = OMIT ,
83- vision : typing .Optional [bool ] = OMIT ,
87+ vision : typing .Optional [CreateTaskRequestVision ] = OMIT ,
8488 system_prompt_extension : typing .Optional [str ] = OMIT ,
8589 request_options : typing .Optional [RequestOptions ] = None ,
8690 ) -> typing .Union [WrappedStructuredTaskCreatedResponse [T ], WrappedTaskCreatedResponse ]:
@@ -97,6 +101,7 @@ def create_task(
97101 metadata = metadata ,
98102 secrets = secrets ,
99103 allowed_domains = allowed_domains ,
104+ op_vault_id = op_vault_id ,
100105 highlight_elements = highlight_elements ,
101106 flash_mode = flash_mode ,
102107 thinking = thinking ,
@@ -105,7 +110,7 @@ def create_task(
105110 request_options = request_options ,
106111 )
107112
108- return WrappedStructuredTaskCreatedResponse [T ](id = res .id , schema = schema , client = self )
113+ return WrappedStructuredTaskCreatedResponse [T ](id = res .id , session_id = res . session_id , schema = schema , client = self )
109114
110115 else :
111116 res = super ().create_task (
@@ -118,6 +123,7 @@ def create_task(
118123 metadata = metadata ,
119124 secrets = secrets ,
120125 allowed_domains = allowed_domains ,
126+ op_vault_id = op_vault_id ,
121127 highlight_elements = highlight_elements ,
122128 flash_mode = flash_mode ,
123129 thinking = thinking ,
@@ -126,7 +132,7 @@ def create_task(
126132 request_options = request_options ,
127133 )
128134
129- return WrappedTaskCreatedResponse (id = res .id , client = self )
135+ return WrappedTaskCreatedResponse (id = res .id , session_id = res . session_id , client = self )
130136
131137 @typing .overload
132138 def get_task (
@@ -170,10 +176,11 @@ async def create_task(
170176 metadata : typing .Optional [typing .Dict [str , typing .Optional [str ]]] = OMIT ,
171177 secrets : typing .Optional [typing .Dict [str , typing .Optional [str ]]] = OMIT ,
172178 allowed_domains : typing .Optional [typing .Sequence [str ]] = OMIT ,
179+ op_vault_id : typing .Optional [str ] = OMIT ,
173180 highlight_elements : typing .Optional [bool ] = OMIT ,
174181 flash_mode : typing .Optional [bool ] = OMIT ,
175182 thinking : typing .Optional [bool ] = OMIT ,
176- vision : typing .Optional [bool ] = OMIT ,
183+ vision : typing .Optional [CreateTaskRequestVision ] = OMIT ,
177184 system_prompt_extension : typing .Optional [str ] = OMIT ,
178185 request_options : typing .Optional [RequestOptions ] = None ,
179186 ) -> AsyncWrappedStructuredTaskCreatedResponse [T ]: ...
@@ -191,10 +198,11 @@ async def create_task(
191198 metadata : typing .Optional [typing .Dict [str , typing .Optional [str ]]] = OMIT ,
192199 secrets : typing .Optional [typing .Dict [str , typing .Optional [str ]]] = OMIT ,
193200 allowed_domains : typing .Optional [typing .Sequence [str ]] = OMIT ,
201+ op_vault_id : typing .Optional [str ] = OMIT ,
194202 highlight_elements : typing .Optional [bool ] = OMIT ,
195203 flash_mode : typing .Optional [bool ] = OMIT ,
196204 thinking : typing .Optional [bool ] = OMIT ,
197- vision : typing .Optional [bool ] = OMIT ,
205+ vision : typing .Optional [CreateTaskRequestVision ] = OMIT ,
198206 system_prompt_extension : typing .Optional [str ] = OMIT ,
199207 request_options : typing .Optional [RequestOptions ] = None ,
200208 ) -> AsyncWrappedTaskCreatedResponse : ...
@@ -212,10 +220,11 @@ async def create_task(
212220 metadata : typing .Optional [typing .Dict [str , typing .Optional [str ]]] = OMIT ,
213221 secrets : typing .Optional [typing .Dict [str , typing .Optional [str ]]] = OMIT ,
214222 allowed_domains : typing .Optional [typing .Sequence [str ]] = OMIT ,
223+ op_vault_id : typing .Optional [str ] = OMIT ,
215224 highlight_elements : typing .Optional [bool ] = OMIT ,
216225 flash_mode : typing .Optional [bool ] = OMIT ,
217226 thinking : typing .Optional [bool ] = OMIT ,
218- vision : typing .Optional [bool ] = OMIT ,
227+ vision : typing .Optional [CreateTaskRequestVision ] = OMIT ,
219228 system_prompt_extension : typing .Optional [str ] = OMIT ,
220229 request_options : typing .Optional [RequestOptions ] = None ,
221230 ) -> typing .Union [AsyncWrappedStructuredTaskCreatedResponse [T ], AsyncWrappedTaskCreatedResponse ]:
@@ -232,14 +241,15 @@ async def create_task(
232241 metadata = metadata ,
233242 secrets = secrets ,
234243 allowed_domains = allowed_domains ,
244+ op_vault_id = op_vault_id ,
235245 highlight_elements = highlight_elements ,
236246 flash_mode = flash_mode ,
237247 thinking = thinking ,
238248 vision = vision ,
239249 system_prompt_extension = system_prompt_extension ,
240250 request_options = request_options ,
241251 )
242- return AsyncWrappedStructuredTaskCreatedResponse [T ](id = res .id , schema = schema , client = self )
252+ return AsyncWrappedStructuredTaskCreatedResponse [T ](id = res .id , session_id = res . session_id , schema = schema , client = self )
243253
244254 else :
245255 res = await super ().create_task (
@@ -252,14 +262,15 @@ async def create_task(
252262 metadata = metadata ,
253263 secrets = secrets ,
254264 allowed_domains = allowed_domains ,
265+ op_vault_id = op_vault_id ,
255266 highlight_elements = highlight_elements ,
256267 flash_mode = flash_mode ,
257268 thinking = thinking ,
258269 vision = vision ,
259270 system_prompt_extension = system_prompt_extension ,
260271 request_options = request_options ,
261272 )
262- return AsyncWrappedTaskCreatedResponse (id = res .id , client = self )
273+ return AsyncWrappedTaskCreatedResponse (id = res .id , session_id = res . session_id , client = self )
263274
264275 @typing .overload
265276 async def get_task (
0 commit comments