@@ -283,6 +283,8 @@ const ChatMessageSchema = z.object({
283283 contexts : z . array ( ChatContextSchema ) . optional ( ) ,
284284 commands : z . array ( z . string ( ) ) . optional ( ) ,
285285 userTimezone : z . string ( ) . optional ( ) ,
286+ /** Per-turn model effort dial; forwarded verbatim to the worker. */
287+ effort : z . enum ( [ 'low' , 'medium' , 'high' , 'xhigh' , 'max' ] ) . optional ( ) ,
286288 /**
287289 * Contract ChatRequest.clientCapabilities: what this caller can execute client-side.
288290 * PRESENT = explicit declaration (empty array → no client pickup, dispatch runs
@@ -350,6 +352,7 @@ type UnifiedChatBranch =
350352 fileAttachments ?: UnifiedChatRequest [ 'fileAttachments' ]
351353 userPermission ?: string
352354 userTimezone ?: string
355+ effort ?: 'low' | 'medium' | 'high' | 'xhigh' | 'max'
353356 workflowId : string
354357 workflowName ?: string
355358 workspaceId ?: string
@@ -390,6 +393,7 @@ type UnifiedChatBranch =
390393 fileAttachments ?: UnifiedChatRequest [ 'fileAttachments' ]
391394 userPermission ?: string
392395 userTimezone ?: string
396+ effort ?: 'low' | 'medium' | 'high' | 'xhigh' | 'max'
393397 desktopLocalFilesystem ?: boolean
394398 browser ?: boolean
395399 terminalCapable ?: boolean
@@ -874,6 +878,7 @@ async function resolveBranch(params: {
874878 implicitFeedback : payloadParams . implicitFeedback ,
875879 userPermission : payloadParams . userPermission ,
876880 userTimezone : payloadParams . userTimezone ,
881+ effort : payloadParams . effort ,
877882 desktopLocalFilesystem : payloadParams . desktopLocalFilesystem ,
878883 browser : payloadParams . browser ,
879884 terminalCapable : payloadParams . terminalCapable ,
@@ -932,6 +937,7 @@ async function resolveBranch(params: {
932937 chatId : payloadParams . chatId ,
933938 userPermission : payloadParams . userPermission ,
934939 userTimezone : payloadParams . userTimezone ,
940+ effort : payloadParams . effort ,
935941 desktopLocalFilesystem : payloadParams . desktopLocalFilesystem ,
936942 browser : payloadParams . browser ,
937943 terminalCapable : payloadParams . terminalCapable ,
@@ -1324,6 +1330,7 @@ export async function handleUnifiedChatPost(req: NextRequest) {
13241330 fileAttachments : body . fileAttachments ,
13251331 userPermission : userPermission ?? undefined ,
13261332 userTimezone : body . userTimezone ,
1333+ effort : body . effort ,
13271334 workflowId : branch . workflowId ,
13281335 workflowName : branch . workflowName ,
13291336 workspaceId : branch . workspaceId ,
@@ -1348,6 +1355,7 @@ export async function handleUnifiedChatPost(req: NextRequest) {
13481355 fileAttachments : body . fileAttachments ,
13491356 userPermission : userPermission ?? undefined ,
13501357 userTimezone : body . userTimezone ,
1358+ effort : body . effort ,
13511359 desktopLocalFilesystem : body . desktopCapabilities ?. localFilesystem === true ,
13521360 browser : body . desktopCapabilities ?. browser === true ,
13531361 terminalCapable : body . desktopCapabilities ?. terminal === true ,
0 commit comments