mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 00:50:36 +08:00
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>