You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(mcp-adapters): preserve timeout from RunnableConfig in MCP tool calls
The timeout value from RunnableConfig was being lost when calling MCP tools because ensureConfig() converts it to an AbortSignal and removes the numeric timeout field. This prevented the MCP SDK from receiving explicit timeout values.
Changes:
- Store original timeout in metadata.__lc_originalTimeoutMs in ensureConfig()
- Retrieve and pass numeric timeout to MCP SDK RequestOptions in _callTool()
- Add integration test verifying per-call timeout is properly honored
This ensures MCP tools respect timeouts passed through RunnableConfig, allowing callers to override default timeouts on a per-call basis.
0 commit comments