Skip to content

Commit bd7e090

Browse files
committed
fix
1 parent 46ed61c commit bd7e090

4 files changed

Lines changed: 7 additions & 8 deletions

File tree

apps/sim/app/api/mcp/copilot/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ async function handleMcpRequestWithSdk(
517517
try {
518518
await transport.handleRequest(requestAdapter as any, responseCapture as any, parsedBody)
519519
await responseCapture.waitForHeaders()
520-
// Must exceed the longest possible tool execution (build = 5 min).
520+
// Must exceed the longest possible tool execution.
521521
// Using ORCHESTRATION_TIMEOUT_MS + 60 s buffer so the orchestrator can
522522
// finish or time-out on its own before the transport is torn down.
523523
await responseCapture.waitForEnd(ORCHESTRATION_TIMEOUT_MS + 60_000)
@@ -729,7 +729,7 @@ async function handleBuildToolCall(
729729
chatId,
730730
goRoute: '/api/mcp',
731731
autoExecuteTools: true,
732-
timeout: 300000,
732+
timeout: ORCHESTRATION_TIMEOUT_MS,
733733
interactive: false,
734734
abortSignal,
735735
})

apps/sim/app/api/v1/copilot/chat/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const RequestSchema = z.object({
1717
mode: z.enum(COPILOT_REQUEST_MODES).optional().default('agent'),
1818
model: z.string().optional(),
1919
autoExecuteTools: z.boolean().optional().default(true),
20-
timeout: z.number().optional().default(300000),
20+
timeout: z.number().optional().default(3_600_000),
2121
})
2222

2323
/**

apps/sim/lib/copilot/constants.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ export const REDIS_COPILOT_STREAM_PREFIX = 'copilot_stream:'
2424
// Timeouts
2525
// ---------------------------------------------------------------------------
2626

27-
/** Default timeout for the copilot orchestration stream loop (5 min). */
28-
export const ORCHESTRATION_TIMEOUT_MS = 300_000
27+
/** Default timeout for the copilot orchestration stream loop (60 min). */
28+
export const ORCHESTRATION_TIMEOUT_MS = 3_600_000
2929

30-
/** Timeout for the client-side streaming response handler (10 min). */
31-
export const STREAM_TIMEOUT_MS = 600_000
30+
/** Timeout for the client-side streaming response handler (60 min). */
31+
export const STREAM_TIMEOUT_MS = 3_600_000
3232

3333
/** TTL for Redis tool call confirmation entries (24 h). */
3434
export const REDIS_TOOL_CALL_TTL_SECONDS = 86_400

apps/sim/lib/copilot/orchestrator/tool-executor/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,6 @@ const SERVER_TOOLS = new Set<string>([
698698
'edit_workflow',
699699
'get_workflow_logs',
700700
'search_documentation',
701-
'search_online',
702701
'set_environment_variables',
703702
'make_api_request',
704703
'knowledge_base',

0 commit comments

Comments
 (0)