Files
hermes-agent/gateway
JonthanaHanh 5360886f54 fix(gateway): exclude Ollama Cloud from GLM truncation detection; propagate partial flag (#72316)
Two compounding bugs that cause WebUI to discard or misrender agent
responses when using GLM models on Ollama Cloud:

1. _is_ollama_glm_backend() matched "ollama" in base URL, which
   included Ollama Cloud (ollama.com). The hosted service correctly
   reports finish_reason and is not affected by the local Ollama
   stop-reason bug.  Exclude "ollama.com" before the substring check.

2. _handle_session_chat_stream() hardcoded "partial": False in the
   assistant.completed SSE event instead of reading result.get("partial").
   The WebUI could not detect truncation and rendered partial responses
   incorrectly (showing only the continuation instead of the full text).
   Read the partial flag from the agent result, matching the pattern
   used by other SSE paths in the same file.

Fixes #72316
2026-09-01 23:27:10 -07:00
..