iiusky
57f1b6cedc
fix(ai): avoid empty Claude system field rejected by Anthropic
...
Anthropic rejects requests whose system field is an empty string with
"system: text content blocks must be non-empty". The connection test
hardcoded an empty system, and regular completion/stream requests sent
an empty system_prompt when none was configured.
Add a claude_system_prompt() helper that substitutes a non-empty default
for empty or whitespace-only prompts, and apply it to all Claude request
sites. Covered by a unit test.
2026-06-16 18:52:02 +08:00
..
2026-06-16 13:55:44 +08:00
2026-06-10 18:30:14 +08:00
2026-06-16 14:43:28 +08:00
2026-06-16 10:23:49 +08:00
2026-06-16 00:55:32 +08:00
2026-06-16 00:55:32 +08:00
2026-06-16 15:16:09 +08:00
2026-06-16 10:23:49 +08:00
2026-06-15 18:55:22 +08:00
2026-06-08 00:58:42 +08:00
2026-06-16 00:55:32 +08:00
2026-06-15 22:43:05 +08:00
2026-06-15 22:43:05 +08:00
2026-06-16 13:25:49 +08:00
2026-06-15 13:14:59 +08:00
2026-06-16 18:52:02 +08:00
2026-06-16 10:23:49 +08:00
2026-06-16 10:23:49 +08:00
2026-06-16 16:20:04 +08:00
2026-06-06 23:22:29 +08:00
2026-06-16 00:55:32 +08:00
2026-05-25 23:21:47 +08:00
2026-06-16 18:41:54 +08:00
2026-05-25 23:21:47 +08:00
2026-06-13 16:00:47 +08:00
2026-06-15 16:59:01 +08:00
2026-05-23 01:28:52 +08:00
2026-06-15 14:23:40 +08:00
2026-06-04 23:20:15 +08:00
2026-05-10 14:18:20 +08:00
2026-06-11 21:41:37 +08:00
2026-06-15 18:55:22 +08:00
2026-06-16 00:55:32 +08:00
2026-06-14 22:58:05 +08:00
2026-06-08 20:09:27 +08:00
2026-06-11 17:29:40 +08:00
2026-06-04 17:20:13 +08:00
2026-06-15 13:14:59 +08:00
2026-06-14 22:58:05 +08:00
2026-06-16 16:20:04 +08:00
2026-06-16 00:55:32 +08:00
2026-06-11 22:35:00 +08:00
2026-06-16 00:55:32 +08:00
2026-06-16 10:23:49 +08:00
2026-06-14 22:58:05 +08:00
2026-06-10 19:53:36 +08:00
2026-06-06 23:22:29 +08:00
2026-06-06 23:22:29 +08:00
2026-06-13 20:23:36 +08:00
2026-06-15 14:18:40 +08:00
2026-06-13 18:39:12 +08:00
2026-06-13 17:27:58 +08:00
2026-06-06 23:22:29 +08:00
2026-06-08 17:07:17 +08:00
2026-06-12 12:29:46 +08:00
2026-05-22 15:41:33 +08:00
2026-06-15 18:55:22 +08:00
2026-06-16 18:03:37 +08:00
2026-06-12 17:14:05 +08:00
2026-05-30 19:15:37 +08:00
2026-05-29 17:25:52 +08:00