Brandon
1973c557e5
fix(ai): drop empty data-driven enums from assistant function schemas ( #3016 )
...
* fix(ai): drop empty data-driven enums from assistant function schemas
Enum values in tool schemas are built from family data (account names,
categories, merchants, tags, tickers). A family with none of these gets
enum: [], which is invalid JSON Schema. OpenAI tolerates it, but strict
OpenAI-compatible providers reject the entire request, breaking chat for
fresh families until they create a tag or merchant.
Prune empty enums in build_schema, falling back to a plain string. One
choke point covers every function and both consumers: chat tool
definitions for all providers, and the /mcp endpoint's tools/list.
* fix(ai): address review feedback on enum pruning
Stop recursion at populated enum values: enum members are literal
values, not subschemas, so a literal like enum: [{ enum: [] }] must be
preserved verbatim rather than rewritten.
Also cover PREVIEW_FUNCTION_CLASSES in the registry regression test by
enabling the preview preference on the test user, with a guard assertion
so the test fails if preview functions ever silently drop out.
2026-08-14 02:59:59 +02:00
..
2026-07-26 07:40:25 +02:00
2026-07-04 03:27:59 +02:00
2026-06-02 21:44:57 +02:00
2026-07-30 02:29:13 +02:00
2026-07-25 20:11:25 +02:00
2026-08-14 02:59:59 +02:00
2026-07-25 20:14:56 +02:00
2026-07-25 05:59:32 +02:00
2026-08-04 23:55:18 +02:00
2026-05-27 23:58:00 +02:00
2026-05-13 18:13:48 +02:00
2026-07-30 02:29:13 +02:00
2026-05-13 18:13:48 +02:00
2026-05-30 00:12:54 +02:00
2026-07-17 06:35:57 +02:00
2026-07-30 02:29:13 +02:00
2026-06-20 21:43:20 +02:00
2026-07-25 03:35:35 +02:00
2026-07-04 03:22:53 +02:00
2026-08-01 08:44:30 +02:00
2026-07-30 02:29:13 +02:00
2026-08-01 08:27:59 +02:00
2026-07-30 03:05:14 +02:00
2026-08-11 23:21:08 +02:00
2026-06-08 21:45:35 +02:00
2026-07-14 01:33:35 +02:00
2026-05-26 22:48:23 +02:00
2026-05-12 23:45:19 +02:00
2026-06-03 00:37:21 +02:00
2026-06-27 00:57:03 +00:00
2026-07-30 02:29:13 +02:00
2026-08-01 08:47:50 +02:00
2026-06-18 20:18:18 +02:00
2026-06-30 07:35:14 +02:00
2026-06-30 07:35:14 +02:00
2026-07-08 08:08:10 +02:00
2026-07-30 02:29:13 +02:00
2026-07-17 22:49:31 +02:00
2026-05-30 23:27:18 +02:00
2026-07-30 02:29:13 +02:00
2026-06-30 07:37:14 +02:00
2026-07-04 08:24:31 +02:00
2026-07-17 07:22:50 +02:00
2026-07-25 04:47:58 +02:00
2026-08-04 23:33:01 +02:00
2026-08-12 07:19:14 +02:00
2026-06-09 23:02:26 +02:00
2026-07-08 09:00:49 +02:00
2026-07-08 09:00:49 +02:00
2026-06-18 12:28:32 +02:00
2026-07-26 07:40:25 +02:00
2026-07-26 07:40:25 +02:00
2026-08-05 19:55:15 +02:00
2026-06-19 17:07:09 +02:00
2026-08-10 07:20:55 +02:00
2026-07-30 01:13:02 +02:00
2026-07-17 06:57:54 +02:00
2026-07-25 18:54:37 +02:00
2026-08-01 20:57:43 +02:00
2026-07-30 02:29:13 +02:00
2026-05-09 21:55:20 +02:00
2026-06-03 00:37:21 +02:00
2026-06-19 16:54:37 +02:00
2026-07-25 04:54:30 +02:00
2026-07-25 04:54:30 +02:00
2026-06-01 22:02:01 +02:00
2026-08-05 19:47:34 +02:00
2026-06-20 20:33:09 +02:00
2026-07-30 02:29:13 +02:00
2026-06-20 20:33:09 +02:00
2026-06-08 21:35:12 +02:00
2026-08-11 23:21:08 +02:00
2026-07-14 03:16:28 +02:00
2026-08-11 23:21:08 +02:00
2026-08-11 23:21:08 +02:00
2026-08-11 23:21:08 +02:00
2026-05-13 20:07:00 +02:00
2026-05-19 13:37:10 +02:00
2026-05-30 00:22:25 +02:00
2026-07-25 04:54:30 +02:00
2026-06-11 09:04:56 +02:00
2026-06-02 21:44:57 +02:00
2026-06-02 21:44:57 +02:00
2026-06-26 06:47:38 +02:00
2026-08-11 23:49:43 +02:00
2026-08-12 20:35:13 +02:00
2026-07-21 05:50:40 +02:00
2026-06-25 05:44:44 +02:00
2026-05-13 18:13:48 +02:00
2026-05-13 18:13:48 +02:00
2026-08-01 08:51:08 +02:00
2026-08-01 08:51:08 +02:00
2026-07-25 05:04:30 +02:00
2026-08-12 23:55:05 +02:00
2026-06-25 05:44:44 +02:00
2026-05-13 18:13:48 +02:00
2026-05-18 20:49:28 +02:00
2026-07-25 03:35:35 +02:00
2026-07-26 07:40:25 +02:00
2026-05-17 16:55:01 +02:00
2026-05-31 16:24:01 +02:00
2026-07-08 08:08:10 +02:00
2026-06-04 19:53:52 +02:00
2026-05-31 22:17:56 +02:00
2026-08-04 23:03:12 +02:00
2026-07-25 05:04:30 +02:00
2026-07-26 01:38:31 +02:00
2026-08-14 02:58:40 +02:00
2026-06-30 06:55:29 +02:00
2026-06-30 07:26:23 +02:00
2026-08-13 06:43:31 +02:00
2026-05-12 23:45:19 +02:00
2026-05-12 23:45:19 +02:00
2026-07-25 03:35:35 +02:00
2026-07-25 05:04:30 +02:00
2026-06-04 11:48:44 +02:00
2026-07-25 05:04:30 +02:00
2026-07-25 04:59:29 +02:00
2026-05-17 09:52:49 +02:00
2026-08-01 08:39:04 +02:00
2026-06-27 00:57:03 +00:00
2026-06-27 00:57:03 +00:00
2026-07-17 07:39:11 +02:00
2026-07-14 01:39:26 +02:00
2026-05-12 00:22:37 +02:00
2026-05-12 00:22:37 +02:00
2026-07-15 19:47:42 +02:00
2026-06-11 20:26:40 +02:00
2026-07-08 08:08:10 +02:00
2026-05-12 12:18:17 +02:00
2026-07-25 05:04:30 +02:00
2026-06-14 22:09:02 +02:00
2026-05-12 00:00:49 +02:00
2026-07-17 23:00:18 +02:00
2026-07-04 08:24:31 +02:00
2026-07-25 05:04:30 +02:00
2026-06-04 23:11:43 +02:00
2026-05-17 09:52:49 +02:00
2026-07-25 03:35:35 +02:00
2026-07-26 07:40:25 +02:00
2026-07-26 07:40:25 +02:00
2026-07-25 04:47:58 +02:00
2026-07-08 09:00:49 +02:00
2026-07-08 09:00:49 +02:00
2026-06-03 00:04:32 +02:00
2026-07-26 07:40:25 +02:00
2026-07-26 07:40:25 +02:00
2026-07-25 05:04:30 +02:00
2026-05-14 21:56:49 +02:00
2026-07-17 23:00:18 +02:00
2026-06-19 17:07:09 +02:00
2026-07-25 04:47:58 +02:00
2026-06-25 05:38:06 +02:00
2026-07-25 03:35:35 +02:00
2026-07-31 02:20:03 +02:00
2026-07-31 02:20:03 +02:00
2026-05-17 09:52:49 +02:00
2026-05-09 21:55:20 +02:00
2026-05-17 09:52:49 +02:00
2026-06-04 11:48:44 +02:00
2026-07-25 03:35:35 +02:00
2026-08-12 23:55:05 +02:00
2026-05-13 20:07:00 +02:00
2026-05-12 23:45:19 +02:00
2026-07-25 04:54:30 +02:00
2026-07-25 04:54:30 +02:00
2026-05-13 20:07:00 +02:00
2026-08-04 23:03:12 +02:00
2026-08-05 19:47:34 +02:00
2026-07-04 03:13:39 +02:00
2026-06-20 20:33:09 +02:00
2026-06-20 20:33:09 +02:00
2026-07-26 07:18:23 +02:00
2026-07-14 03:16:28 +02:00
2026-07-14 03:16:28 +02:00
2026-06-16 08:32:17 +02:00