Skip to content

fix(search): bound external provider requests - #2217

Open
RerankerGuo wants to merge 1 commit into
MemTensor:mainfrom
RerankerGuo:fix/internet-search-request-timeouts
Open

fix(search): bound external provider requests#2217
RerankerGuo wants to merge 1 commit into
MemTensor:mainfrom
RerankerGuo:fix/internet-search-request-timeouts

Conversation

@RerankerGuo

Copy link
Copy Markdown
Contributor

Description

The Google Custom Search and Bocha search clients issued external HTTP requests without a timeout. A stalled provider could therefore hold a retrieval worker indefinitely and delay or exhaust the search pipeline.

This change applies a 30-second request timeout to both provider clients. Existing error handling remains unchanged: request failures still return the providers current empty-result fallback.

Related Issue (Required): N/A — network-boundary regression reproduced on current main.

Type of change

  • Bug fix (non-breaking)

How Has This Been Tested?

  • Before: both new tests failed because the actual requests.get/post calls omitted timeout.
  • After: .venv/bin/pytest tests/memories/textual/test_internet_search_timeouts.py -q (2 passed).
  • Ruff check and format pass for all three changed files.

Impact

  • Breaking change: no
  • Affected modules: Google Custom Search and Bocha search clients
  • Dependencies/API schema: unchanged

@Memtensor-AI Memtensor-AI added area:memory 记忆存储、检索、更新、召回逻辑 status:in-progress Someone or AI is working on it | 人工或 AI 正在处理 labels Aug 5, 2026
@Memtensor-AI

Copy link
Copy Markdown
Collaborator

🤖 Open Code Review

Target: PR #2217
Task: a8c020c93955b90b
Base: main
Head: fix/internet-search-request-timeouts

OpenCodeReview: No comments generated. Looks good to me.

Generated by cloud-assistant via Open Code Review.

@Memtensor-AI

Copy link
Copy Markdown
Collaborator

✅ Automated Test Results: PASSED

All tests passed (2/2 executed). memos_python_core/changed-repo-python: 2/2. Duration: 5s

Branch: fix/internet-search-request-timeouts

@Memtensor-AI Memtensor-AI added status:ready Ready for implementation; waiting for assignee or AI dispatch | 可进入实现,等待认领或派发 and removed status:in-progress Someone or AI is working on it | 人工或 AI 正在处理 labels Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:memory 记忆存储、检索、更新、召回逻辑 status:ready Ready for implementation; waiting for assignee or AI dispatch | 可进入实现,等待认领或派发

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants