Skip to content

ui: Add request timeout for MCP tool calls#23138

Merged
allozaur merged 2 commits into
ggml-org:masterfrom
allozaur:21368-mcp-tool-calling-timeout
May 16, 2026
Merged

ui: Add request timeout for MCP tool calls#23138
allozaur merged 2 commits into
ggml-org:masterfrom
allozaur:21368-mcp-tool-calling-timeout

Conversation

@allozaur
Copy link
Copy Markdown
Contributor

@allozaur allozaur commented May 16, 2026

Overview

Adds default 5 minute timeout configuration to tool calls + new settings tab — MCP / /mcp with this setting as a numeric field.

Close #21368

Additional information

Requirements

Copilot AI review requested due to automatic review settings May 16, 2026 10:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a per-request timeout to MCP tool calls in the WebUI, fixing the issue where long-running tool calls were canceled after the SDK's default ~60 second timeout instead of honoring the configured 5-minute DEFAULT_MCP_CONFIG.requestTimeoutSeconds.

Changes:

  • Adds a requestTimeoutMs field to the MCPConnection type so each established connection carries its effective request timeout.
  • Populates requestTimeoutMs on the connection object from serverConfig.requestTimeoutMs (falling back to the default 5 minutes).
  • Passes timeout: connection.requestTimeoutMs to client.callTool so the MCP SDK uses the configured timeout instead of its built-in default.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
tools/ui/src/lib/types/mcp.d.ts Adds requestTimeoutMs field to the MCPConnection interface.
tools/ui/src/lib/services/mcp.service.ts Sets requestTimeoutMs on the connection (with default fallback) and forwards it as the timeout option to callTool.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ggerganov
Copy link
Copy Markdown
Member

Is this setting configurable in the WebUI settings?

@allozaur
Copy link
Copy Markdown
Contributor Author

Is this setting configurable in the WebUI settings?

nope, but I can add it :)

@allozaur allozaur requested a review from a team as a code owner May 16, 2026 11:19
@allozaur allozaur requested a review from ServeurpersoCom May 16, 2026 11:21
@allozaur allozaur merged commit 0253fb2 into ggml-org:master May 16, 2026
6 checks passed
@allozaur allozaur deleted the 21368-mcp-tool-calling-timeout branch May 16, 2026 13:21
xxmustafacooTR pushed a commit to xxPlayground/llama-cpp-turboquant that referenced this pull request May 16, 2026
* feat: Add request timeout for MCP tool calls in llama-ui

* feat: MCP Settings tab with max timeout setting
kgrama pushed a commit to kgrama/llama.cpp that referenced this pull request May 19, 2026
* feat: Add request timeout for MCP tool calls in llama-ui

* feat: MCP Settings tab with max timeout setting
rsenthilkumar6 pushed a commit to rsenthilkumar6/llama.cpp that referenced this pull request May 19, 2026
* feat: Add request timeout for MCP tool calls in llama-ui

* feat: MCP Settings tab with max timeout setting
ArberSephirotheca pushed a commit to ArberSephirotheca/llama.cpp that referenced this pull request May 19, 2026
* feat: Add request timeout for MCP tool calls in llama-ui

* feat: MCP Settings tab with max timeout setting
baramofme pushed a commit to baramofme/llama-cpp-turboquant that referenced this pull request May 23, 2026
* feat: Add request timeout for MCP tool calls in llama-ui

* feat: MCP Settings tab with max timeout setting
srossitto79 pushed a commit to srossitto79/llama.cpp that referenced this pull request May 23, 2026
* feat: Add request timeout for MCP tool calls in llama-ui

* feat: MCP Settings tab with max timeout setting
winstonma pushed a commit to winstonma/llama.cpp that referenced this pull request May 27, 2026
* feat: Add request timeout for MCP tool calls in llama-ui

* feat: MCP Settings tab with max timeout setting
fewtarius pushed a commit to fewtarius/llama.cpp that referenced this pull request May 30, 2026
* feat: Add request timeout for MCP tool calls in llama-ui

* feat: MCP Settings tab with max timeout setting
Jcfunk added a commit to Jcfunk/llama.cpp that referenced this pull request Jun 2, 2026
* turboquant/HEAD: (82 commits)
  docs(readme): credit Google's original TurboQuant + explain the '+'
  docs(readme): fix turbo ladder ordering + cite K-compression paper
  docs(readme): reorder KV configs as a ladder + 'start light' guidance
  docs(readme): add Chronara to deployments + AtomicChat link
  docs: restructure README — professional layout, deployments, paper links
  docs: tighten README — add turbo2, missing features, paper links
  docs: keep upstream README, prepend fork-specific summary
  docs: replace upstream README with fork-specific summary
  fix(xxd.cmake): handle missing input file (not just empty)
  fix(ci): 4 cross-vendor -Werror failures + defensive xxd.cmake
  cmake : fix LLAMA_BUILD_UI logic (ggml-org#23190)
  fix(ggml-cuda): HIP nodiscard + MUSA cudaMemcpyToSymbol alias
  fix(turbo-quant): add forward declaration for turbo_cpu_fwht_inverse
  fix(metal): set ne12/ne13/r2/r3 function constants in mul_mm_tq_rotated pipeline
  webui: support video files as input (ggml-org#22830)
  server: (router) alloc tmp buffer on heap (ggml-org#23159)
  server: skip device enumeration in router mode to avoid creating CUDA primary context (ggml-org#23137)
  vulkan: removed duplicate #include <memory> in headers (ggml-org#23144)
  ui: Add request timeout for MCP tool calls (ggml-org#23138)
  sync : ggml
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misc. bug: WebUI: WebUI MCP tool calling timeout

4 participants