fix(core): use long mcp tool timeout
This commit is contained in:
parent
c0413cdefa
commit
b712f3bb27
1 changed files with 3 additions and 3 deletions
|
|
@ -32,7 +32,7 @@ import { InstallationVersion } from "../installation/version"
|
||||||
|
|
||||||
const DEFAULT_STARTUP_TIMEOUT = 30_000
|
const DEFAULT_STARTUP_TIMEOUT = 30_000
|
||||||
const DEFAULT_REQUEST_TIMEOUT = 30_000
|
const DEFAULT_REQUEST_TIMEOUT = 30_000
|
||||||
const TOOL_CALL_TIMEOUT = 2_147_483_647
|
const DEFAULT_TOOL_CALL_TIMEOUT = 100_000_000
|
||||||
|
|
||||||
type Transport = StdioClientTransport | StreamableHTTPClientTransport
|
type Transport = StdioClientTransport | StreamableHTTPClientTransport
|
||||||
|
|
||||||
|
|
@ -282,8 +282,8 @@ export const connect = Effect.fnUntraced(function* (
|
||||||
client.callTool(
|
client.callTool(
|
||||||
{ name: input.name, arguments: input.args ?? {} },
|
{ name: input.name, arguments: input.args ?? {} },
|
||||||
CallToolResultSchema,
|
CallToolResultSchema,
|
||||||
// The SDK does not support disabling request timeouts; use the setTimeout max.
|
// Human-driven tools can exceed the SDK default; use an effectively infinite timeout.
|
||||||
{ signal, timeout: TOOL_CALL_TIMEOUT, resetTimeoutOnProgress: true, onprogress: () => {} },
|
{ signal, timeout: DEFAULT_TOOL_CALL_TIMEOUT, resetTimeoutOnProgress: true, onprogress: () => {} },
|
||||||
),
|
),
|
||||||
catch: (error) => (error instanceof Error ? error : new Error(String(error))),
|
catch: (error) => (error instanceof Error ? error : new Error(String(error))),
|
||||||
}).pipe(
|
}).pipe(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue