Reject missing follow-up queries instead of fabricating research intent

This commit is contained in:
pewdiepie-archdaemon
2026-09-17 21:19:56 +00:00
parent deb955f812
commit 725078cb88
2 changed files with 14 additions and 13 deletions
+6 -2
View File
@@ -3459,9 +3459,13 @@ def preserve_requested_web_recency(name, args, *, user_text='', prior_search_int
user = str(user_text or '')
query = str(args.get('query') or '').strip()
if not query:
query = re.sub(r'\s+', ' ', user).strip().rstrip('?.!')
if prior_search_intents:
query += ' corroborating analysis authoritative sources'
raise ValueError(
'web_search requires an explicit query for a follow-up. Supply a '
'specific missing fact, entity, or corroboration question based on '
'the evidence already returned; do not repeat the original query.'
)
query = re.sub(r'\s+', ' ', user).strip().rstrip('?.!')
if not query:
return args
normalized = dict(args)