brick30llc-ctrl
0ff164701d
fix(sse): trust finish_reason over reasoning-ratio heuristic in response quality validation ( #12262 )
...
* fix(sse): trust finish_reason:length/max_tokens over the reasoning-ratio heuristic in response quality validation
A truncated response with empty content and reasoning_content present was
only rejected by validateResponseQuality() when reasoning consumed >=90%
of completion_tokens. A response truncated at a lower ratio (e.g. 63%)
passed through as "valid" even though the caller received no usable
content and finish_reason was explicitly "length" (or the alternate
"max_tokens" naming some providers use) -- an unambiguous truncation
signal the validator wasn't reading. Reproduced live against
nvidia/nemotron-3-super-120b-a12b: content:null, finish_reason:length,
reasoning_tokens 645/1024 (63%).
Trust finish_reason directly when it's reported, falling back to the
existing token-ratio heuristic only when it isn't. Does not affect the
deliberate-tiny-probe case (e.g. max_tokens:1 connectivity pings) --
those never produce reasoning_content, so the branch this change is in
doesn't run for them.
* docs(changelog): add fragment for #12262
---------
Co-authored-by: brick30llc-ctrl <admin@brick30.com >
2026-09-01 11:02:05 -03:00
..
2026-07-13 09:12:40 -03:00
2026-08-30 11:10:02 -03:00
2026-08-26 20:49:27 -03:00
2026-08-25 18:54:20 -03:00
2026-08-29 08:10:40 -03:00
2026-08-25 05:30:52 -03:00
2026-08-27 22:14:45 -03:00
2026-08-25 05:30:52 -03:00
2026-08-29 08:10:13 -03:00
2026-08-26 20:49:48 -03:00
2026-08-25 05:30:52 -03:00
2026-08-25 05:30:52 -03:00
2026-08-26 20:49:34 -03:00
2026-08-25 05:30:52 -03:00
2026-08-25 05:30:52 -03:00
2026-08-25 05:30:52 -03:00
2026-08-25 05:30:52 -03:00
2026-08-25 05:30:52 -03:00
2026-08-25 05:30:52 -03:00
2026-08-25 05:30:52 -03:00
2026-08-25 05:30:52 -03:00
2026-08-25 07:18:58 -03:00
2026-08-25 05:30:52 -03:00
2026-08-25 05:30:52 -03:00
2026-08-25 05:30:52 -03:00
2026-08-26 20:50:09 -03:00
2026-08-24 19:57:24 -03:00
2026-08-24 20:04:11 -03:00
2026-08-24 20:10:08 -03:00
2026-08-25 01:37:45 -03:00
2026-08-27 00:05:47 -03:00
2026-08-26 20:49:42 -03:00
2026-08-25 20:31:34 -03:00
2026-08-25 20:31:57 -03:00
2026-08-25 20:34:05 -03:00
2026-08-25 13:51:27 -03:00
2026-08-29 08:10:17 -03:00
2026-08-26 20:50:15 -03:00
2026-08-25 13:51:56 -03:00
2026-08-25 13:52:23 -03:00
2026-08-26 20:50:02 -03:00
2026-08-25 13:12:02 -03:00
2026-08-26 08:11:05 -03:00
2026-08-26 20:49:55 -03:00
2026-08-25 18:54:09 -03:00
2026-08-25 19:48:29 -03:00
2026-08-26 08:11:22 -03:00
2026-08-25 19:49:00 -03:00
2026-08-26 17:40:22 -03:00
2026-08-25 19:48:49 -03:00
2026-08-26 08:10:51 -03:00
2026-08-26 08:10:47 -03:00
2026-08-26 08:10:24 -03:00
2026-08-26 08:10:08 -03:00
2026-08-26 08:10:04 -03:00
2026-08-26 17:40:14 -03:00
2026-08-26 08:09:43 -03:00
2026-08-26 08:09:38 -03:00
2026-08-26 08:09:34 -03:00
2026-08-29 15:27:39 -03:00
2026-08-29 08:10:21 -03:00
2026-08-26 09:22:06 -03:00
2026-08-26 09:22:15 -03:00
2026-08-26 17:40:02 -03:00
2026-08-26 09:22:18 -03:00
2026-08-26 09:22:22 -03:00
2026-08-26 09:22:26 -03:00
2026-08-26 09:22:11 -03:00
2026-08-26 09:25:25 -03:00
2026-08-26 17:41:15 -03:00
2026-08-26 17:58:35 -03:00
2026-08-28 11:14:24 -03:00
2026-08-28 09:40:13 -03:00
2026-08-30 02:27:54 -03:00
2026-08-29 08:10:26 -03:00
2026-08-28 04:42:14 -03:00
2026-08-28 11:14:43 -03:00
2026-08-28 11:14:33 -03:00
2026-08-28 04:38:48 -03:00
2026-08-28 14:21:44 -03:00
2026-08-28 09:31:08 -03:00
2026-08-30 09:09:20 -03:00
2026-08-28 04:54:00 -03:00
2026-08-28 06:52:46 -03:00
2026-08-30 04:07:06 -03:00
2026-08-31 14:16:41 -03:00
2026-08-28 11:19:18 -03:00
2026-08-29 08:10:29 -03:00
2026-08-27 22:14:42 -03:00
2026-08-29 08:10:33 -03:00
2026-08-27 22:15:06 -03:00
2026-08-28 11:13:54 -03:00
2026-08-29 08:10:37 -03:00
2026-08-28 11:14:12 -03:00
2026-08-28 12:37:32 -03:00
2026-08-28 14:21:44 -03:00
2026-08-28 11:14:03 -03:00
2026-08-29 15:27:49 -03:00
2026-08-30 11:09:44 -03:00
2026-08-30 05:28:46 -03:00
2026-08-28 15:43:53 -03:00
2026-08-28 14:21:44 -03:00
2026-08-28 11:13:47 -03:00
2026-08-28 11:13:33 -03:00
2026-08-28 11:13:19 -03:00
2026-08-28 11:13:08 -03:00
2026-08-28 15:49:42 -03:00
2026-08-28 15:49:32 -03:00
2026-08-28 15:49:22 -03:00
2026-08-28 15:51:37 -03:00
2026-08-28 15:49:14 -03:00
2026-08-29 15:27:53 -03:00
2026-08-29 19:52:06 -03:00
2026-08-28 16:11:38 -03:00
2026-08-28 16:26:32 -03:00
2026-08-28 16:26:32 -03:00
2026-08-28 16:26:32 -03:00
2026-08-28 16:19:07 -03:00
2026-08-30 05:28:07 -03:00
2026-08-30 05:27:57 -03:00
2026-08-30 05:29:26 -03:00
2026-08-29 15:27:44 -03:00
2026-08-30 11:09:22 -03:00
2026-08-29 19:51:59 -03:00
2026-08-30 11:09:37 -03:00
2026-08-30 11:16:18 -03:00
2026-08-30 11:29:21 -03:00
2026-08-30 11:16:18 -03:00
2026-08-30 11:24:19 -03:00
2026-08-30 19:40:14 -03:00
2026-08-30 11:44:18 -03:00
2026-09-01 00:46:46 -03:00
2026-09-01 00:51:38 -03:00
2026-09-01 11:02:05 -03:00
2026-08-31 14:10:33 -03:00
2026-08-26 08:09:21 -03:00
2026-08-26 08:10:55 -03:00
2026-08-25 05:30:52 -03:00
2026-08-25 05:30:52 -03:00
2026-08-30 11:10:47 -03:00
2026-08-25 13:11:58 -03:00
2026-08-25 13:12:50 -03:00
2026-08-25 05:30:52 -03:00
2026-08-25 05:30:52 -03:00
2026-08-25 05:30:52 -03:00
2026-09-01 00:47:29 -03:00
2026-08-25 13:12:15 -03:00
2026-08-25 13:11:45 -03:00
2026-08-25 13:12:18 -03:00
2026-08-30 11:10:06 -03:00
2026-08-25 21:08:29 -03:00
2026-08-28 04:35:30 -03:00
2026-08-28 06:56:55 -03:00
2026-08-25 21:12:50 -03:00
2026-08-25 13:12:38 -03:00
2026-08-25 13:12:34 -03:00
2026-08-29 02:42:13 -03:00
2026-08-29 09:28:03 -03:00
2026-08-28 18:18:33 -03:00