Duc Nguyen
e3dad3c60c
fix(tts): unify voice resolution — dashboard settings affect tts tool ( #1175 )
...
The dashboard /tts page writes to system_configs[tts.<provider>.voice],
but the LLM-invoked tts tool was only checking args > agent OtherConfig
> builtin_tool_tenant_configs[tts].default_voice_id. Two different
storage locations → the user's chosen voice was ignored, Edge defaulted
to en-US-AriaNeural even when "HoaiMy" (vi-VN-HoaiMyNeural) was set
correctly in the dashboard.
Add system_configs as a 4th-level fallback so the dashboard becomes
the single source of truth.
- TtsTool gains SetSystemConfigStore(s) setter
- resolveVoiceAndModel takes providerName + looks up
tts.<provider>.voice/model when no higher-precedence source set
- effectiveProvider resolved BEFORE voice/model so the right key is hit
- Wired at gateway boot in cmd/gateway.go (after pgStores ready)
- 4 unit tests covering: fallback, arg precedence, no-store, empty provider
Verified against production trace 019e6036-44bb-703b-85fa-dee34f7ab2c0
where the tts tool was called with provider=edge, no voice arg, and
defaulted to English instead of the configured Vietnamese voice.
2026-07-18 00:22:48 +07:00
..
2026-06-11 13:49:58 +01:00
2026-04-18 12:17:23 +07:00
2026-03-06 18:51:11 +07:00
2026-04-09 21:15:19 +07:00
2026-05-18 20:33:40 +07:00
2026-04-09 21:15:19 +07:00
2026-05-22 20:53:01 +07:00
2026-05-24 11:27:02 +07:00
2026-05-24 11:27:02 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-03-10 00:09:15 +07:00
2026-06-25 10:23:55 +07:00
2026-04-27 12:00:14 +07:00
2026-05-28 18:17:49 +07:00
2026-07-17 22:51:16 +07:00
2026-04-09 21:15:19 +07:00
2026-07-10 22:25:45 +07:00
2026-06-21 14:00:36 +07:00
2026-07-10 01:24:39 +07:00
2026-07-09 04:24:19 +07:00
2026-04-09 23:15:08 +07:00
2026-07-04 21:57:14 +07:00
2026-05-28 18:30:34 +07:00
2026-07-07 09:53:02 +07:00
2026-05-28 18:30:34 +07:00
2026-05-28 18:30:34 +07:00
2026-06-12 15:17:57 +07:00
2026-07-07 01:21:12 +07:00
2026-03-31 23:14:39 +07:00
2026-07-10 22:25:45 +07:00
2026-07-10 22:25:45 +07:00
2026-07-10 22:25:45 +07:00
2026-07-10 22:25:45 +07:00
2026-04-18 14:53:42 +07:00
2026-04-14 18:28:31 +07:00
2026-07-07 09:53:02 +07:00
2026-07-07 10:52:17 +07:00
2026-07-10 22:25:45 +07:00
2026-07-10 22:25:45 +07:00
2026-07-08 20:53:19 +07:00
2026-04-15 20:40:25 +07:00
2026-04-20 08:49:38 +07:00
2026-04-12 19:03:47 +07:00
2026-04-10 20:52:28 +07:00
2026-03-27 09:28:42 +07:00
2026-05-18 21:43:03 +07:00
2026-07-10 22:25:45 +07:00
2026-05-24 11:13:03 +07:00
2026-06-12 09:48:01 +07:00
2026-06-12 15:01:38 +07:00
2026-06-12 14:42:48 +07:00
2026-07-10 22:25:45 +07:00
2026-07-15 09:56:43 +07:00
2026-05-31 13:08:24 +07:00
2026-05-31 13:08:24 +07:00
2026-07-13 08:25:59 +07:00
2026-06-24 14:03:00 +07:00
2026-07-15 09:56:43 +07:00
2026-02-22 14:58:07 +07:00
2026-02-22 14:58:07 +07:00
2026-05-11 15:41:27 +07:00
2026-07-03 20:23:47 +07:00
2026-07-15 08:24:31 +07:00
2026-03-19 13:35:57 +07:00
2026-03-19 13:35:57 +07:00
2026-04-15 11:24:57 +07:00
2026-07-15 00:25:07 +07:00
2026-03-19 13:35:57 +07:00
2026-03-27 09:28:42 +07:00
2026-03-27 09:28:42 +07:00
2026-03-27 09:28:42 +07:00
2026-03-31 11:45:16 +07:00
2026-07-10 22:25:45 +07:00
2026-05-24 15:57:21 +07:00
2026-07-09 04:54:15 +07:00
2026-07-07 01:21:12 +07:00
2026-07-07 01:21:12 +07:00
2026-06-24 15:26:26 +07:00
2026-07-08 23:23:08 +07:00
2026-02-22 14:58:07 +07:00
2026-04-04 06:58:15 +07:00
2026-04-19 15:00:07 +07:00
2026-07-18 00:22:48 +07:00
2026-07-05 12:26:42 +07:00
2026-07-05 12:26:42 +07:00
2026-03-11 07:27:38 +07:00
2026-07-03 20:23:47 +07:00
2026-04-09 21:15:19 +07:00
2026-06-12 09:48:01 +07:00
2026-03-07 00:46:29 +07:00
2026-06-21 14:29:51 +07:00
2026-04-09 21:15:19 +07:00
2026-06-12 09:48:01 +07:00
2026-03-06 18:51:11 +07:00
2026-06-12 10:40:59 +07:00
2026-06-12 10:40:59 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-06-21 14:29:51 +07:00
2026-06-12 14:57:09 +07:00
2026-06-12 14:50:33 +07:00
2026-06-12 10:38:53 +07:00
2026-06-12 10:38:53 +07:00
2026-06-12 10:38:53 +07:00
2026-04-16 15:49:50 +07:00
2026-04-09 21:15:19 +07:00
2026-04-16 15:49:50 +07:00
2026-04-16 15:49:50 +07:00
2026-06-12 09:48:01 +07:00
2026-06-12 09:48:01 +07:00
2026-06-12 09:48:01 +07:00
2026-06-12 09:48:01 +07:00
2026-06-12 09:48:01 +07:00
2026-06-12 09:48:01 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-04-09 21:15:19 +07:00
2026-03-07 20:51:39 +07:00
2026-04-13 10:59:27 +07:00
2026-04-13 10:59:27 +07:00