gpt-oss:120b generates its answer AFTER the reasoning pass. With
think=false AND a JSON format set it returns EMPTY content and no
thinking at all. Karakeep sends exactly that, so every tagging job
failed in under a second with 'the model ignored our prompt and
didn't respond with the expected JSON: {}'.
Verified by curl through the router:
think=false -> content ''
think=true -> content '{"tags":["x"]}'
Fix: keep reasoning ON upstream and strip the 'thinking' field from
the reply instead, which is what a caller asking for no thinking
actually wants. Applies to the native forge path (which forwards the
body as-is) and the cloud mapping. Streaming is untouched: HA streams
and already handles the separate field.
Two Ollama entries — "Local only — private (fails if forge is down)"
(local-strict) and "Local preferred — falls back to OpenAI cloud"
(local-optimistic) — created/renamed headlessly with scripts/ha_ollama.py
(REST config flows + WebSocket renames; wait for the entry to be loaded
before opening a subentry flow; entities matched by subentry id).
Each proven by a real conversation through HA, and the difference proven
through HA against a throwaway dead-upstream instance published under a
temporary .services. name: strict → HA error, no cloud; optimistic → cloud
answer in ~1 s. All temporaries removed. Rick's pfSense rule (HA IP →
ingress) verified from HA's side; alias is NXDOMAIN publicly, so a loaded
entry proves internal resolution.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>