fix(core): remove mcp tool call timeout (#35043)
This commit is contained in:
parent
6555df912a
commit
1aae92c42a
2 changed files with 4 additions and 4 deletions
|
|
@ -8,7 +8,7 @@ export class Timeout extends Schema.Class<Timeout>("ConfigV2.MCP.Timeout")({
|
|||
description: "Maximum time in milliseconds to establish and initialize the MCP server.",
|
||||
}),
|
||||
request: PositiveInt.pipe(Schema.optional).annotate({
|
||||
description: "Maximum time in milliseconds to wait for each MCP request after initialization.",
|
||||
description: "Maximum time in milliseconds to wait for MCP catalog/list requests after initialization.",
|
||||
}),
|
||||
}) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ export const connect = Effect.fnUntraced(function* (
|
|||
client.request(
|
||||
{ method: "prompts/get", params: { name: input.name, arguments: input.args ?? {} } },
|
||||
GetPromptResultSchema,
|
||||
{ signal, timeout: requestTimeout, resetTimeoutOnProgress: true, onprogress: () => {} },
|
||||
{ signal },
|
||||
),
|
||||
catch: (error) => (error instanceof Error ? error : new Error(String(error))),
|
||||
}).pipe(
|
||||
|
|
@ -249,8 +249,8 @@ export const connect = Effect.fnUntraced(function* (
|
|||
client.callTool(
|
||||
{ name: input.name, arguments: input.args ?? {} },
|
||||
CallToolResultSchema,
|
||||
// The SDK only sends a progress token when onprogress is present, which enables timeout resets.
|
||||
{ signal, timeout: requestTimeout, resetTimeoutOnProgress: true, onprogress: () => {} },
|
||||
// Keep progress tokens available without imposing a client timeout on tool execution.
|
||||
{ signal, resetTimeoutOnProgress: true, onprogress: () => {} },
|
||||
),
|
||||
catch: (error) => (error instanceof Error ? error : new Error(String(error))),
|
||||
}).pipe(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue