feat: ship streaming disabled by default — opt-in via config

Streaming is now off by default for both CLI and gateway. Users opt in:

CLI (config.yaml):
  display:
    streaming: true

Gateway (config.yaml):
  streaming:
    enabled: true

This lets early adopters test streaming while existing users see zero
change. Once we have enough field validation, we flip the default to
true in a subsequent release.
This commit is contained in:
teknium1
2026-03-16 07:44:42 -07:00
parent fc4080c58a
commit c0b88018eb
3 changed files with 7 additions and 3 deletions

5
cli.py
View File

@@ -1017,6 +1017,9 @@ class HermesCLI:
self.show_reasoning = CLI_CONFIG["display"].get("show_reasoning", False)
self.verbose = verbose if verbose is not None else (self.tool_progress_mode == "verbose")
# streaming: stream tokens to the terminal as they arrive (display.streaming in config.yaml)
self.streaming_enabled = CLI_CONFIG["display"].get("streaming", False)
# Streaming display state
self._stream_buf = "" # Partial line buffer for line-buffered rendering
self._stream_started = False # True once first delta arrives
@@ -1719,7 +1722,7 @@ class HermesCLI:
checkpoint_max_snapshots=self.checkpoint_max_snapshots,
pass_session_id=self.pass_session_id,
tool_progress_callback=self._on_tool_progress,
stream_delta_callback=self._stream_delta,
stream_delta_callback=self._stream_delta if self.streaming_enabled else None,
)
# Apply any pending title now that the session exists in the DB
if self._pending_title and self._session_db: