Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#16494·LibreChat

[Enhancement]: Configurable timeouts for the web-search reranker and image generation

Author: kevinpark1217Created Sep 29, 2026Updated Sep 29, 2026

What features would you like to see added?

Make two tool timeouts configurable. Both are fixed today, and self-hosted backends exceed them:

  1. Web search reranker: webSearch.rerankerTimeout (ms), next to the existing scraperTimeout.
  2. Image generation (image_gen_oai): IMAGE_GEN_OAI_TIMEOUT_MS and IMAGE_GEN_OAI_MAX_RETRIES, passed to the openai client as its timeout and maxRetries.

More details

Reranker. Each page's rerank is capped at 10 s (DEFAULT_RERANKER_TIMEOUT in @librechat/agents). Past that, the page keeps its first chunks unranked. A search sends all its pages to the reranker at once, so with a self-hosted one (e.g. llama.cpp's /v1/rerank) some pages run over: 7 of 33 page reranks across 7 searches in our tests. createSearchTool already accepts rerankerTimeout (LibreChat-AI/agents#284); LibreChat just never passes it.

yaml
webSearch:
  rerankerTimeout: 30000

Image generation. image_gen_oai (OpenAIImageTools.js) creates its openai client without timeout or maxRetries, so it gets the library defaults: 10 minutes and 2 retries. A local backend such as stable-diffusion.cpp renders one image at a time, minutes each. When a model requests several images in one turn, the later ones fail with Request timed out., and each retry re-sends the same generation.

Both are standard openai-node options. Its README: "Requests time out after 10 minutes by default. You can configure this with a timeout option" (Timeouts, Retries). LibreChat already accepts both for chat endpoints via addParams (knownOpenAIParams). The _MS suffix matches HTTP_REQUEST_TIMEOUT_MS.

Related: LibreChat-AI/agents#290 (the same reranker ask, on the library side) and #13986 (the same plumbing gap for other search options).

Which components are impacted by your request?

Plugins

Pictures

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Source: danny-avila/LibreChat

View original on GitHubView discussion on GitHub