Live smoke test showed /v1/chat/completions replies open with the Steward's <think> block (Open WebUI convention) — without stripping, the device would speak the internal monologue aloud. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
11 lines
398 B
Python
11 lines
398 B
Python
from desklock_gateway.tatlock import strip_reasoning
|
|
|
|
|
|
def test_strip_reasoning_removes_think_block() -> None:
|
|
raw = "<think>\nDELEGATE: none\nREASON: simple\n</think>\nGood evening. I am Tatlock."
|
|
assert strip_reasoning(raw) == "Good evening. I am Tatlock."
|
|
|
|
|
|
def test_strip_reasoning_passthrough_without_think() -> None:
|
|
assert strip_reasoning("Just an answer.") == "Just an answer."
|