@@ -287,6 +287,8 @@ const ChatMessageSchema = z.object({
287287 contexts : z . array ( ChatContextSchema ) . optional ( ) ,
288288 commands : z . array ( z . string ( ) ) . optional ( ) ,
289289 userTimezone : z . string ( ) . optional ( ) ,
290+ /** Per-turn model effort dial; forwarded verbatim to the worker. */
291+ effort : z . enum ( [ 'low' , 'medium' , 'high' , 'xhigh' , 'max' ] ) . optional ( ) ,
290292 /**
291293 * Contract ChatRequest.clientCapabilities: what this caller can execute client-side.
292294 * PRESENT = explicit declaration (empty array → no client pickup, dispatch runs
@@ -354,6 +356,7 @@ type UnifiedChatBranch =
354356 fileAttachments ?: UnifiedChatRequest [ 'fileAttachments' ]
355357 userPermission ?: string
356358 userTimezone ?: string
359+ effort ?: 'low' | 'medium' | 'high' | 'xhigh' | 'max'
357360 workflowId : string
358361 workflowName ?: string
359362 workspaceId ?: string
@@ -394,6 +397,7 @@ type UnifiedChatBranch =
394397 fileAttachments ?: UnifiedChatRequest [ 'fileAttachments' ]
395398 userPermission ?: string
396399 userTimezone ?: string
400+ effort ?: 'low' | 'medium' | 'high' | 'xhigh' | 'max'
397401 desktopLocalFilesystem ?: boolean
398402 browser ?: boolean
399403 terminalCapable ?: boolean
@@ -878,6 +882,7 @@ async function resolveBranch(params: {
878882 implicitFeedback : payloadParams . implicitFeedback ,
879883 userPermission : payloadParams . userPermission ,
880884 userTimezone : payloadParams . userTimezone ,
885+ effort : payloadParams . effort ,
881886 desktopLocalFilesystem : payloadParams . desktopLocalFilesystem ,
882887 browser : payloadParams . browser ,
883888 terminalCapable : payloadParams . terminalCapable ,
@@ -936,6 +941,7 @@ async function resolveBranch(params: {
936941 chatId : payloadParams . chatId ,
937942 userPermission : payloadParams . userPermission ,
938943 userTimezone : payloadParams . userTimezone ,
944+ effort : payloadParams . effort ,
939945 desktopLocalFilesystem : payloadParams . desktopLocalFilesystem ,
940946 browser : payloadParams . browser ,
941947 terminalCapable : payloadParams . terminalCapable ,
@@ -1372,6 +1378,7 @@ export async function handleUnifiedChatPost(req: NextRequest) {
13721378 fileAttachments : body . fileAttachments ,
13731379 userPermission : userPermission ?? undefined ,
13741380 userTimezone : body . userTimezone ,
1381+ effort : body . effort ,
13751382 workflowId : branch . workflowId ,
13761383 workflowName : branch . workflowName ,
13771384 workspaceId : branch . workspaceId ,
@@ -1396,6 +1403,7 @@ export async function handleUnifiedChatPost(req: NextRequest) {
13961403 fileAttachments : body . fileAttachments ,
13971404 userPermission : userPermission ?? undefined ,
13981405 userTimezone : body . userTimezone ,
1406+ effort : body . effort ,
13991407 desktopLocalFilesystem : body . desktopCapabilities ?. localFilesystem === true ,
14001408 browser : body . desktopCapabilities ?. browser === true ,
14011409 terminalCapable : body . desktopCapabilities ?. terminal === true ,
0 commit comments