fix(gateway): read multiplex_profiles from nested gateway section - #51372
Closed
davidgut1982 wants to merge 1 commit into
Closed
fix(gateway): read multiplex_profiles from nested gateway section#51372davidgut1982 wants to merge 1 commit into
davidgut1982 wants to merge 1 commit into
Conversation
load_gateway_config() only surfaced the top-level `multiplex_profiles` key into gw_data before calling GatewayConfig.from_dict(). A config.yaml that pinned the flag under the nested `gateway:` section -- the form written by `hermes config set gateway.multiplex_profiles true` -- was silently ignored, so the gateway loaded with multiplex_profiles=False. from_dict() already honors the nested fallback, but load_gateway_config() builds gw_data from top-level keys first, so the nested value never reached it. Read gateway.multiplex_profiles into gw_data when the top-level key is absent, mirroring the existing nested fallback for max_concurrent_sessions. Adds a load_gateway_config() regression test that writes a config.yaml with `gateway.multiplex_profiles: true` and asserts the loaded config has multiplex_profiles=True (fails without the fix). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 23, 2026
Closed
davidgut1982
marked this pull request as ready for review
June 23, 2026 14:08
tonydwb
approved these changes
Jun 23, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Targeted fix: load_gateway_config() now reads multiplex_profiles from the nested gateway: section (the form written by hermes config set gateway.multiplex_profiles true), not just the top-level key.
Looks Good
- Clean fix: adds a check for
multiplex_profilesin thegateway_sectiondict - Test verifies the nested form is correctly loaded
- 2 files changed, well-scoped
- The comment update explains why the nested form matters
Reviewed by Hermes Agent
This was referenced Jun 25, 2026
Closed
4 tasks
Contributor
|
Thanks for the focused fix. This is an automated hermes-sweeper review; the change has already been salvaged onto current
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes a config-loading bug where
gateway.multiplex_profiles: truewritten under the nestedgateway:section ofconfig.yamlwas silently ignored, so the gateway loaded withmultiplex_profiles=False.This is the form written by
hermes config set gateway.multiplex_profiles true, so the documented CLI path to enable profile multiplexing did not actually take effect when set that way.Related Issue
Fixes #
Type of Change
Root cause
gateway/config.py—load_gateway_config()(around themultiplex_profilesblock, ~line 851):load_gateway_config()buildsgw_datafrom the top-level keys ofconfig.yamland then callsGatewayConfig.from_dict(gw_data).from_dict()does honor the nestedgateway.multiplex_profilesfallback — but only against the dict it is handed. Sinceload_gateway_config()only copied the top-levelmultiplex_profileskey intogw_data, the nested value never reachedfrom_dict(), and the flag defaulted toFalse.The sibling
max_concurrent_sessionsalready had a nested-gateway:fallback in this same block;multiplex_profileswas missing the equivalent.Changes Made
gateway/config.py: inload_gateway_config(), readgateway.multiplex_profilesintogw_datawhen the top-level key is absent, mirroring the existing nested fallback formax_concurrent_sessions.tests/gateway/test_config.py: addTestLoadGatewayConfig::test_multiplex_profiles_from_nested_gateway_section— writes aconfig.yamlwithgateway.multiplex_profiles: true, callsload_gateway_config(), and assertscfg.multiplex_profiles is True.How to Test
pytest tests/gateway/test_config.py::TestLoadGatewayConfig::test_multiplex_profiles_from_nested_gateway_section -vconfig.pychange the test FAILS (assert False is True—multiplex_profiles=False); with it the test PASSES.pytest tests/gateway/test_config.py -q→ 70 passed.Existing coverage gap:
tests/gateway/test_multiplex_phase0.pyonly exercisesGatewayConfig.from_dict, neverload_gateway_config()with a YAML file — which is exactly where this bug lived.Checklist
Code
fix(gateway):)🤖 Generated with Claude Code