Alexander Whitestone
8c712866c4
Forge CI / smoke-and-build (pull_request) Failing after 22s
fix(tools): validate handler return types at dispatch boundary
...
Fixes #297
Problem: Tool handlers that return dict/list/None instead of a
JSON string crash the agent loop with cryptic errors. No error
proofing at the boundary.
Fix: In handle_function_call(), after dispatch returns:
1. If result is not str → wrap in JSON with _type_warning
2. If result is str but not valid JSON → wrap in {"output": ...}
3. Log type violations for analysis
4. Valid JSON strings pass through unchanged
Tests: 4 new tests (dict, None, non-JSON string, valid JSON).
All 16 tests in test_model_tools.py pass.
2026-04-13 15:47:52 -04:00
..
2026-04-05 12:05:13 -07:00
2026-04-07 10:00:16 -04:00
2026-04-13 09:41:17 -04:00
2026-04-01 15:23:52 -07:00
2026-03-14 14:27:20 +03:00
2026-04-07 03:28:44 -07:00
2026-04-07 08:40:22 -04:00
2026-04-05 12:34:11 -07:00
2026-03-24 07:30:25 -07:00
2026-04-06 22:15:58 -07:00
2026-04-01 03:49:48 +00:00
2026-04-03 17:49:18 -07:00
2026-04-13 15:40:48 -04:00
2025-10-01 23:29:25 +00:00
2026-03-17 02:02:33 -07:00
2026-03-17 02:53:33 -07:00
2026-04-04 10:18:57 -07:00
2026-03-10 15:22:44 -07:00
2026-03-17 01:50:59 -07:00
2026-03-17 04:24:27 -07:00
2026-04-04 10:18:57 -07:00
2026-03-15 08:02:29 -07:00
2026-03-14 11:03:20 -07:00
2026-04-02 10:30:32 -07:00
2026-03-26 19:21:34 -07:00
2026-03-14 19:38:55 -07:00
2026-03-14 19:38:55 -07:00
2026-04-07 12:58:44 -04:00
2026-03-27 09:45:25 -07:00
2026-03-14 22:31:51 -07:00
2026-03-14 22:31:51 -07:00
2026-03-01 19:59:24 -08:00
2026-04-05 12:00:53 -07:00
2026-03-02 17:18:15 +11:00
2026-03-17 04:46:15 -07:00
2026-03-13 23:59:12 -07:00
2026-04-03 22:43:45 -07:00
2026-03-14 11:57:44 -07:00
2026-03-25 15:00:33 -07:00
2026-04-06 16:54:16 -07:00
2026-04-01 01:12:23 -07:00
2026-03-21 09:42:07 -07:00
2026-04-02 00:40:27 -07:00
2026-04-03 00:50:49 -07:00
2026-03-17 02:53:33 -07:00
2026-03-10 17:31:00 -07:00
2026-03-15 19:03:34 -07:00
2026-03-20 04:35:17 -07:00
2026-03-14 21:28:51 -07:00
2026-03-17 02:05:26 -07:00
2026-03-23 06:20:19 -07:00
2026-04-05 22:02:21 -07:00
2026-03-14 21:19:22 -07:00
2026-03-31 12:21:55 -07:00
2026-03-13 03:14:04 -07:00
2026-03-14 15:00:45 +03:00
2026-04-06 16:54:16 -07:00
2026-03-30 08:10:14 -07:00
2026-03-30 21:17:09 -07:00
2026-04-02 09:36:24 -07:00
2026-03-18 15:22:51 -07:00
2026-03-30 18:49:14 -07:00
2026-03-29 16:04:53 -07:00
2026-03-23 16:02:06 -07:00
2026-03-27 21:42:09 -07:00
2026-03-23 06:40:05 -07:00
2026-03-22 05:58:26 -07:00
2026-04-05 00:20:53 -07:00
2026-04-06 23:01:11 -07:00
2026-03-25 17:31:56 -07:00
2026-03-15 08:02:29 -07:00
2026-04-01 02:13:57 -07:00
2026-03-15 21:59:53 -07:00
2026-04-02 15:33:51 -07:00
2026-03-01 19:59:24 -08:00
2026-03-18 02:42:58 -07:00
2026-03-31 19:46:23 +00:00
2026-03-09 02:19:32 -07:00
2026-03-11 21:06:54 -07:00
2026-04-06 22:37:32 +00:00
2026-04-06 10:28:03 -07:00
2026-04-07 00:28:32 +00:00
2026-04-06 00:08:20 -07:00
2026-04-02 00:49:11 -07:00
2026-04-02 15:33:51 -07:00
2026-03-31 19:56:16 +00:00
2026-04-05 15:48:10 +00:00
2026-03-17 03:44:44 -07:00
2026-03-17 02:53:33 -07:00
2026-03-17 02:53:33 -07:00
2026-04-05 10:29:57 -07:00
2026-04-03 02:05:02 -07:00
2026-03-13 21:56:12 -07:00
2026-03-29 15:47:19 -07:00
2026-03-24 08:19:23 -07:00
2026-03-19 21:24:53 +01:00
2026-04-06 11:25:06 -07:00
2026-04-02 09:36:24 -07:00
2026-03-20 15:41:06 -04:00
2026-04-13 15:47:52 -04:00
2026-04-01 02:45:36 +00:00
2026-03-31 00:37:14 +00:00
2026-04-07 02:00:40 +00:00
2026-04-05 11:06:06 -07:00
2026-03-16 06:35:46 -07:00
2026-03-30 17:34:43 -07:00
2026-03-28 14:55:18 -07:00
2026-03-09 17:31:54 +03:00
2026-04-05 12:34:11 -07:00
2026-04-06 16:37:53 -07:00
2026-04-05 23:31:29 -07:00
2026-04-05 16:15:26 +00:00
2026-04-02 10:52:01 -07:00
2026-04-02 09:21:37 -07:00
2026-03-29 16:04:53 -07:00
2026-04-05 00:13:25 -07:00
2026-03-17 02:53:33 -07:00
2026-03-17 02:53:33 -07:00
2026-03-27 09:57:50 -07:00
2026-03-12 08:35:45 -07:00
2026-03-08 17:45:45 -07:00
2026-04-12 22:14:47 -04:00
2026-04-12 22:14:47 -04:00
2026-04-06 23:01:43 -07:00
2026-04-03 14:57:33 -07:00
2026-03-25 18:22:21 -07:00
2026-04-02 09:36:24 -07:00
2026-03-31 16:35:40 +00:00
2026-03-19 15:16:35 +01:00
2026-03-31 12:05:06 -07:00
2026-04-05 00:13:25 -07:00
2026-03-28 16:53:14 -07:00
2026-04-01 02:08:20 +00:00
2026-03-16 23:48:14 -07:00
2026-04-02 10:47:13 -07:00
2026-04-05 10:57:34 -07:00
2026-03-21 09:41:17 -07:00
2026-02-26 13:54:20 +03:00
2026-03-09 23:27:19 -07:00
2026-03-30 13:16:16 -07:00
2026-03-30 20:36:56 -07:00
2026-03-30 13:28:10 +09:00
2026-04-07 01:55:46 +00:00
2026-03-14 21:51:27 -07:00
2026-03-14 21:51:27 -07:00