Skip to content

fix: keep Deep Research follow-ups on the current question - #617

Merged
sng-asyncfunc merged 1 commit into
AsyncFuncAI:mainfrom
dajiaohuang:fix/deep-research-follow-up-topic
Oct 28, 2026
Merged

sng-asyncfunc merged 1 commit into
AsyncFuncAI:mainfrom
dajiaohuang:fix/deep-research-follow-up-topic

Conversation

@dajiaohuang

Copy link
Copy Markdown
Contributor

What changed

Deep Research continuations currently scan conversation history from the beginning, so a follow-up question can be replaced with the topic of an earlier completed turn. Resolve the client's exact Continue the research prompt to the most recent user research question instead. Match that prompt exactly so an ordinary question containing “continue” and “research” is not treated as an automatic continuation.

Adds synthetic unit coverage for a follow-up after a completed turn, exact continuation-prompt recognition, empty-topic behavior, and trimming the selected latest question. This addresses the behavior described in #589; the relevant earliest-message scan was still present in the inspected main source.

Validation

  • py -3.13 -m pytest tests/backend/services/test_deep_research.py -q — 4 passed.
  • py -3.13 -m py_compile api/services/deep_research.py api/services/research.py tests/backend/services/test_deep_research.py — passed.
  • git diff --check — passed.

All validation uses synthetic messages only. No model/provider, embedding, external repository/document, or live service was used.

@sng-asyncfunc
sng-asyncfunc merged commit cdd19ca into AsyncFuncAI:main Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants