From d5cf5a80daaf2dcd52370c914bb69452b9140294 Mon Sep 17 00:00:00 2001 From: TD Date: Wed, 9 Sep 2026 20:48:11 +0200 Subject: [PATCH] fix(voice): retry fly_route without a name when a small model echoes the route title --- src/voice/localVoice.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/voice/localVoice.js b/src/voice/localVoice.js index a3795ae..47d4c94 100644 --- a/src/voice/localVoice.js +++ b/src/voice/localVoice.js @@ -233,7 +233,12 @@ export class LocalVoiceController { this.setStatus('executing', `${call.name.replace(/_/g, ' ')}…`); this.holdRender(); try { - const result = await this.runner(call.name, call.args || {}, { isCurrent: () => true }); + let result = await this.runner(call.name, call.args || {}, { isCurrent: () => true }); + // Small models like to echo the route's title into fly_route; the tool + // only accepts saved names — retry once for "the newest route". + if (call.name === 'fly_route' && result?.ok === false && /No route matches/i.test(result.error || '') && call.args?.name) { + result = await this.runner('fly_route', { ...call.args, name: undefined }, { isCurrent: () => true }); + } return result ?? { ok: true, action: call.name }; } catch (error) { return { ok: false, action: call.name, error: String(error?.message || error).slice(0, 300) };