Files
DeepTutor/web/lib
游标卡尺 efe575f0a1 fix(web): treat null supported_reasoning_efforts as missing (#2732) (#2733)
The non-admin /api/settings/llm-options path publishes
supported_reasoning_efforts: null for models without
codex_supported_reasoning_levels. supportedReasoningEffortValues guarded
with `!== undefined`, so null reached reasoningEffortOptionsFromSupportedLevels
where values.map threw, tripping the chat page error boundary for learners.

Guard with Array.isArray so a null/non-array value falls back to the
provider/model tables like an absent field, matching the admin path's
semantics. Widen the option field to string[] | null and add a regression
test covering null, the missing-field equivalence, and the empty-list case.

Co-authored-by: ZQR1101 <278034003+ZQR1101@users.noreply.github.com>
2026-11-26 19:52:59 +08:00
..
2026-09-24 09:59:56 +08:00
2026-09-02 04:09:11 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-21 02:30:40 +08:00
2026-09-02 04:09:11 +08:00
2026-09-21 02:30:40 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-08-17 11:22:26 +08:00
2026-09-03 01:38:54 +08:00
2026-08-17 11:22:26 +08:00
2026-09-21 02:30:40 +08:00
2026-09-02 04:09:11 +08:00
2026-09-06 13:46:29 +08:00
2026-09-02 04:09:11 +08:00
2026-09-06 13:46:29 +08:00
2026-09-21 02:30:40 +08:00
2026-09-21 02:30:40 +08:00
2026-09-24 09:59:56 +08:00
2026-09-22 21:36:27 +08:00
2026-09-06 13:46:29 +08:00
2026-09-03 01:38:54 +08:00
2026-09-24 09:59:56 +08:00
2026-08-20 14:15:53 +08:00
2026-09-06 13:46:29 +08:00
2026-09-24 09:59:56 +08:00
2026-09-21 02:30:40 +08:00
2026-09-06 13:46:29 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00
2026-09-21 02:30:40 +08:00
2026-09-02 04:09:11 +08:00
2026-09-21 02:30:40 +08:00
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00
2026-09-02 04:09:11 +08:00
2026-09-06 13:46:29 +08:00
2026-10-04 21:35:00 +08:00
2026-08-20 14:15:53 +08:00
2026-09-03 01:38:54 +08:00