Skip to content

fix(config): redirect platforms.<name>.<display_setting> to display.platforms.<name>.<setting> (#71047) - #78111

Open
zoser69 wants to merge 1 commit into
NousResearch:mainfrom
zoser69:fix/config-set-platforms-display-redirect-71047
Open

fix(config): redirect platforms.<name>.<display_setting> to display.platforms.<name>.<setting> (#71047)#78111
zoser69 wants to merge 1 commit into
NousResearch:mainfrom
zoser69:fix/config-set-platforms-display-redirect-71047

Conversation

@zoser69

@zoser69 zoser69 commented Aug 4, 2026

Copy link
Copy Markdown

Summary

Fixes Problem A of #71047: hermes config set platforms.<name>.<display_setting> <value> writes to a key the runtime never reads, so the edit appears to succeed while having no effect.

Root cause: the gateway reads per-platform display settings (streaming, show_reasoning, tool_progress, …) from display.platforms.<name>.<setting> (see gateway/display_config.py::resolve_display_setting), while the top-level platforms.<name> block holds only connection config (token, extra, channel_overrides). set_config_value wrote the dotted path verbatim, so platforms.telegram.streaming landed in the connection block and was silently ignored by the loader.

This mirrors the existing set-time alias/redirect pattern already in set_config_value (model.api_base → model.base_url, bare model → model.default).

Fix

In hermes_cli/config.py::set_config_value, before the write, redirect a platforms.<name>.<setting> key to display.platforms.<name>.<setting> only when <setting> is a known per-platform display setting (gateway.display_config.OVERRIDEABLE_KEYS). Real connection keys (token, extra, channel_overrides, …) are left untouched. The gateway.display_config import is lazy/try-guarded to avoid a circular import (gateway/config.py already imports hermes_cli.config) and to keep the CLI working in minimal installs where gateway is not importable.

Scope

This PR addresses only Problem A (the config-set duplicate/mis-targeted key). Problem B (Telegram streaming resend duplication) is a separate runtime issue and intentionally out of scope here, per the triage recommendation to keep the fix focused.

Test plan

  • Added tests/hermes_cli/test_config_set_platforms_redirect.py:
    • platforms.telegram.streaming falsedisplay.platforms.telegram.streaming: false (bool-coerced), and no stray streaming key under the top-level platforms.telegram connection block.
    • platforms.telegram.show_reasoning / platforms.discord.tool_progress redirect correctly.
    • A real connection key (platforms.telegram.token) is not redirected.
    • When no top-level platforms block exists, the redirect does not invent one — it writes only display.platforms....
hermes config set platforms.telegram.streaming false
# (note: per-platform display setting — saved as display.platforms.telegram.streaming)
✓ Set display.platforms.telegram.streaming = False in ~/.hermes/config.yaml

Closes #71047 (Problem A)

…latforms.<name>.<setting>

Problem A of NousResearch#71047: 'hermes config set platforms.telegram.streaming false'
wrote to a key the gateway never reads. The connection config
(gateway/config.py) reads only token/extra/overrides from the top-level
platforms.<name> block, while per-platform display settings (streaming,
show_reasoning, tool_progress, ...) are resolved from
display.platforms.<name>.<setting> (gateway/display_config.py).

Redirect a platforms.<name>.<setting> key to
display.platforms.<name>.<setting> only when <setting> is a known per-platform
display setting (gateway.display_config.OVERRIDEABLE_KEYS), leaving real
connection keys (token, extra, channel_overrides, ...) untouched. The
gateway.display_config import is lazy/try-guarded to avoid a circular import
and to keep the CLI working where gateway is not importable.

Adds tests/hermes_cli/test_config_set_platforms_redirect.py covering the
redirect, connection-key non-redirect, and the no-stray-top-level-platforms
case.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard area/config Config system, migrations, profiles sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: config set duplicates top-level key + Telegram streaming+reply_to_mode='first' duplicates final message

2 participants