• Administrator's avatar
    V1.2: restore thinking in Open WebUI via delta.reasoning_content (clean mode) · 099e63bb
    Administrator authored
    V1.1's clean default removed the <!--mock:...--> marker chunks, which was also the only thinking channel — Open WebUI lost the Thought timeline. V1.2 restores it through the standard reasoning channel (DeepSeek/o1 convention):
    
    - clean mode now emits the 6 thinking beats as delta.reasoning_content chunks (reasoning-only deltas, never mixed with content)
    
    - non-stream message gains message.reasoning_content (newline-joined stage labels)
    
    - marker mode (mock_markers: true) is byte-for-byte unchanged for the preview UI
    
    Verified on Server 52: Open WebUI v0.10.2 accumulates reasoning_content into type:reasoning items (middleware.py update_assistant_message_from_stream) and renders them as a collapsible 'Thought' block; LiteLLM passes reasoning_content through for openai/ models (merge/strip only under non-default merge_reasoning_content_in_choices).
    
    Tests: 31 passing, incl. test_stream_default_thinking_via_reasoning and non-stream reasoning_content assertions. verify_litellm_stream.sh + verify_openwebui.sh now assert reasoning survival through the proxy.
    099e63bb