Commit Graph
3 Commits
Author SHA1 Message Date
bhethermanandClaude Sonnet 5 291f526a84 Disambiguate play_music vs queue_music by verb, not content type
queue_music's tool description explains at length that playlists/
albums/artists auto-play instead of queueing, and the small model was
using that as a signal to route ANY playlist/genre request through
queue_music -- even ones that said "play". Verified: "play jazz in
the bedroom" called queue_music 0/5 reps before this change (and in
the opaque-ID room variant), 5/5 play_music after, with no
regressions across the rest of the suite (199/200, 39/40 reliable).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-05 14:01:44 -04:00
bhethermanandClaude Sonnet 5 2ed1ca1e99 Fix cold-start play_media failure and swap reversed room IDs
The Spotify integration only exposes the media_player.play_media
service once it has an active playback context, which doesn't exist
yet on a cold start; the fixed 2s delay after select_source wasn't
long enough in that case even though it always worked once something
had already played. Poll supported_features for the PLAY_MEDIA bit
(up to 8s) before calling play_media instead of guessing a fixed delay.

Also swap the Living Room/Bedroom source_list ID mapping in both the
prompt (for display) and the functions (for select_source) -- it was
backwards.

Adds a test-harness regression case exercising the opaque Spotify
Connect device IDs the source_list actually reports.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-05 13:40:40 -04:00
bhetherman 7249919006 Add tool-call disambiguation test harness for search_spotify/control_playback
Validate / Validate with HACS (push) Canceled after 0s
Validate / Validate with Hassfest (push) Canceled after 0s
Renders the Extended OpenAI Conversation prompt/function definitions and
checks the model's first tool-call choice against test phrases, bypassing
Home Assistant.
2026-08-31 00:46:53 -04:00