Skip to content

[bug] quick-router: leading please on web_search lookups falls through to the LLM #932

Description

@kurosawareiji7007-hub

Summary

web_search_request already strips a trailing please from the extracted query (covered by web_search_query_drops_trailing_please). A leading please was never stripped, so the start-anchored look-up / search prefixes miss equally natural polite forms and fall through to the LLM.

Repro (on main)

utterance on main expected
Please look up the best mesh router ABSTAIN web_search{query: the best mesh router}
Please search the web for matter support ABSTAIN web_search{query: matter support}
Please look up the best mesh router please ABSTAIN web_search{query: the best mesh router}
Please search online for ESP32 C6 ABSTAIN web_search{query: esp32 c6}

Look up the best mesh router please / Search the web for matter support already route today.

Root cause

The look-up / search prefix loop in web_search_request is start-anchored. Leading please keeps the string from matching any prefix, even though trailing politeness is already cleaned from the query.

Proposed fix

Strip a leading please at the top of web_search_request (before memory/remind abstains and the prefix loop), mirroring news (#908), time (#906), scene/routine (#894), and shopping-list (#843). Negatives stay off search (please help me); reminder forms stay off immediate web_search (please remind me to check the tesla stock price in 20 minutes).

Acceptance

  • Leading-please look-up / search forms route to web_search
  • Existing trailing-please query cleaning unchanged
  • Focused regression test fails on main, passes with the fix
  • No prompt growth; 4096 Jetson contract untouched

Labels / scope

Tool-dispatch correctness (deterministic quick-router). Same contribution bucket as #843 / #894 / #906 / #908.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions