Commit graph

5 commits

Author SHA1 Message Date
Leon
c6ec3e91f3 fix(gateway): remove _show_reasoning cache, always resolve per-platform config
Remove GatewayRunner._show_reasoning field that was initialized once at
startup using only global display.show_reasoning config. All consumers
now resolve show_reasoning per-platform via resolve_display_setting(),
ensuring display.platforms.<platform>.show_reasoning overrides work
correctly for all platforms (especially WeCom).

Changes:
- Delete self._show_reasoning initialization in __init__
- Update _handle_reasoning_command to resolve per-platform on each call
- Update reasoning_callback wiring to resolve per-platform
- Update response prepend logic to resolve per-platform
- Remove fallback to cached self._show_reasoning

Fixes: WeCom reasoning display respects per-platform config

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 02:06:58 +08:00
Leon
5eb338a578 test: add per-platform show_reasoning resolution tests 2026-04-18 00:29:53 +08:00
Teknium
30ea423ce8
fix: unify reasoning_effort to config.yaml only, remove HERMES_REASONING_EFFORT env var
Gateway and cron had inconsistent reasoning_effort resolution:
- CLI: config.yaml only (correct)
- Gateway: config.yaml first, env var fallback
- Cron: env var first, config.yaml fallback

All three now read exclusively from agent.reasoning_effort in config.yaml.
Removed HERMES_REASONING_EFFORT env var support entirely — .env is for
secrets only, not behavioral config.
2026-04-08 03:36:44 -07:00
Teknium
62f8aa9b03
fix: MCP toolset resolution for runtime and config (#3252)
Gateway sessions had their own inline toolset resolution that only read
platform_toolsets from config, which never includes MCP server names.
MCP tools were discovered and registered but invisible to the model.

- Replace duplicated gateway toolset resolution in _run_agent() and
  _run_background_task() with calls to the shared _get_platform_tools()
- Extend _get_platform_tools() to include globally enabled MCP servers
  at runtime (include_default_mcp_servers=True), while config-editing
  flows use include_default_mcp_servers=False to avoid persisting
  implicit MCP defaults into platform_toolsets
- Add homeassistant to PLATFORMS dict (was missing, caused KeyError)
- Fix CLI entry point to use _get_platform_tools() as well, so MCP
  tools are visible in CLI mode too
- Remove redundant platform_key reassignment in _run_background_task

Co-authored-by: kshitijk4poor <kshitijk4poor@users.noreply.github.com>
2026-03-26 13:39:41 -07:00
Verne
52ba940c9b feat(gateway): add reasoning hot reload
Add a /reasoning command across gateway adapters so users can
inspect or change reasoning effort without editing config by hand.

Reload reasoning settings from config.yaml before each agent run,
including background tasks, so the next message picks up the new
value consistently.
2026-03-14 02:42:47 -07:00