Skip to content

fix(cli): sync use_gateway in _reconfigure_provider for tts, browser, and web#15669

Closed
nftpoetrist wants to merge 1 commit into
NousResearch:mainfrom
nftpoetrist:fix/15229-use-gateway-clean
Closed

fix(cli): sync use_gateway in _reconfigure_provider for tts, browser, and web#15669
nftpoetrist wants to merge 1 commit into
NousResearch:mainfrom
nftpoetrist:fix/15229-use-gateway-clean

Conversation

@nftpoetrist

Copy link
Copy Markdown
Contributor

What does this PR do?

_reconfigure_provider() updates cloud_provider/backend/tts.provider when switching tool providers via "hermes setup tools → Reconfigure", but did not update the matching use_gateway flag. _configure_provider() (the initial-setup path) sets use_gateway on all three tool categories. The omission in _reconfigure_provider leaves a stale value in config.yaml: switching from a Nous-managed provider (use_gateway=True) to a self-hosted one keeps use_gateway=True, continuing to route requests through the Nous gateway; switching the other way leaves use_gateway unset so the managed feature does not activate.

Fix: mirror _configure_provider's use_gateway = bool(managed_feature) assignment in the tts, browser, and web blocks of _reconfigure_provider. Symmetric across all three tool categories. No behavior change for any provider that does not set tts_provider, browser_provider, or web_backend.

Related Issue

Fixes #15229

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests
  • ♻️ Refactor
  • 🎯 New skill

Changes Made

  • hermes_cli/tools_config.py: add use_gateway sync in _reconfigure_provider() for tts, browser, and web blocks (+8 lines)
  • tests/hermes_cli/test_tools_config.py: parametrized regression test + stale-flag overwrite test (+29 lines)

How to Test

python3.11 -m pytest tests/hermes_cli/test_tools_config.py -v --override-ini="addopts=" -k "use_gateway"

Checklist

Code

  • Contributing Guide okundu
  • Conventional Commits
  • Duplicate PR yok
  • Sadece bu fix
  • pytest çalıştırıldı
  • Test eklendi
  • Platform: macOS

Documentation & Housekeeping

  • Docs güncellendi — N/A
  • cli-config.yaml.example — N/A
  • CONTRIBUTING.md/AGENTS.md — N/A
  • Cross-platform impact — N/A
  • Tool descriptions — N/A

… and web

_reconfigure_provider() updates cloud_provider/backend/tts.provider when
switching tool providers via "hermes setup tools → Reconfigure", but did
not update the matching use_gateway flag. _configure_provider() (the
initial-setup path) sets use_gateway on all three tool categories. The
omission in _reconfigure_provider leaves a stale value in config.yaml:
switching from a Nous-managed provider (use_gateway=True) to a self-hosted
one keeps use_gateway=True, continuing to route requests through the Nous
gateway; switching the other way leaves use_gateway unset so the managed
feature does not activate.

Fix: mirror _configure_provider's use_gateway = bool(managed_feature)
assignment in the tts, browser, and web blocks of _reconfigure_provider.
Symmetric across all three tool categories. No behavior change for any
provider that does not set tts_provider, browser_provider, or web_backend.

Fixes NousResearch#15229
@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 labels Apr 25, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #15349 (closed) — same fix for _reconfigure_provider missing use_gateway sync. Also related to #15229 and existing open PRs #10690, #5096, #8240, #14382 targeting the same session-info banner issue.

@nftpoetrist

Copy link
Copy Markdown
Contributor Author

#15349 was our own previous PR — closed intentionally to rebase onto current main after a merge conflict in tests/hermes_cli/test_tools_config.py. This PR is the rebased continuation.

#10690, #5096, #8240, and #14382 fix a different bug: the session-info banner in gateway/run.py reading the wrong context length. None of them touch hermes_cli/tools_config.py or _reconfigure_provider(). There is no overlap with this fix.

@teknium1

teknium1 commented May 4, 2026

Copy link
Copy Markdown
Contributor

Salvaged via #19633 onto current main - your commit authorship was preserved. Thanks!

@teknium1 teknium1 closed this May 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 type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two browser provider bugs: Camofox missing from registry + reconfigure flow leaks use_gateway

3 participants