Summary
The deterministic quick-router extracts the wrong get_weather location when a weather query ends with an "in the " phrase: weather in Denver in the morning routes to location:"morning" instead of location:"Denver".
Steps to reproduce
- Route
what's the weather in denver in the morning through genie_core::tools::quick::route (the path genie-ctl chat / the BFCL quick-router harness use).
- Inspect the emitted
get_weather tool call.
Expected behavior
{"name":"get_weather","arguments":{"location":"denver","forecast":false}}
Same city as the already-correct what's the weather in denver tonight (-> location:"denver").
Actual behavior
{"name":"get_weather","arguments":{"location":"morning","forecast":false}}
extract_location_after_marker in crates/genie-core/src/tools/quick.rs splits with rsplit_once(" in ") (the last " in "). The trailing "in the morning" phrase carries its own " in ", which wins the split, so the location becomes "the morning" -> "morning". The post-split trailing-qualifier trim handles single-word / this <time> suffixes (" tonight", " this morning", ...) but never sees this case because the wrong span was already selected. Affects in the morning / in the afternoon / in the evening / in the night for both the weather and forecast phrasings.
Not a duplicate of the existing trailing-time work
Reproduces on current main (0d8904e). Distinct from:
Hardware
Non-Jetson (x86_64 dev / cross-build host) - pure deterministic-router logic, no hardware-specific surface.
GenieClaw version / commit
0d8904e (main)
Additional context
Tool-dispatch argument-correctness bug (the kind BFCL local-LLM tool-call scoring measures): only the location argument is wrong. A location-less weather in the morning should abstain rather than emit the time word as a bogus location.
Summary
The deterministic quick-router extracts the wrong
get_weatherlocation when a weather query ends with an "in the " phrase:weather in Denver in the morningroutes tolocation:"morning"instead oflocation:"Denver".Steps to reproduce
what's the weather in denver in the morningthroughgenie_core::tools::quick::route(the pathgenie-ctl chat/ the BFCL quick-router harness use).get_weathertool call.Expected behavior
{"name":"get_weather","arguments":{"location":"denver","forecast":false}}Same city as the already-correct
what's the weather in denver tonight(->location:"denver").Actual behavior
{"name":"get_weather","arguments":{"location":"morning","forecast":false}}extract_location_after_markerincrates/genie-core/src/tools/quick.rssplits withrsplit_once(" in ")(the last" in "). The trailing"in the morning"phrase carries its own" in ", which wins the split, so the location becomes"the morning"->"morning". The post-split trailing-qualifier trim handles single-word /this <time>suffixes (" tonight"," this morning", ...) but never sees this case because the wrong span was already selected. Affectsin the morning/in the afternoon/in the evening/in the nightfor both theweatherandforecastphrasings.Not a duplicate of the existing trailing-time work
Reproduces on current
main(0d8904e). Distinct from:will it rain in <city>branch (marker" for "), not the generalweather in <city>path (marker" in ").Hardware
Non-Jetson (x86_64 dev / cross-build host) - pure deterministic-router logic, no hardware-specific surface.
GenieClaw version / commit
0d8904e(main)Additional context
Tool-dispatch argument-correctness bug (the kind BFCL local-LLM tool-call scoring measures): only the
locationargument is wrong. A location-lessweather in the morningshould abstain rather than emit the time word as a bogus location.