Skip to content

fix: clear stale api keys when switching API-key providers - #14373

Closed
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/clear-stale-api-key-on-provider-switch-14134
Closed

LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/clear-stale-api-key-on-provider-switch-14134

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • clear stale inline model.api_key values when switching API-key providers in hermes model
  • keep provider/base URL updates while removing leftover credentials from the previous provider
  • add a regression test covering a switch from OpenRouter to a generic API-key provider

Testing

  • python3 -m pytest -o addopts= tests/hermes_cli/test_model_provider_persistence.py

Closes #14134.

@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 labels Apr 23, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

Likely duplicate of #14370 — same root cause (stale api_key on provider switch in hermes_cli/main.py), same target issue #14134. Also related to #8571.

@teknium1

Copy link
Copy Markdown
Collaborator

Closing — issue #14134 is resolved on current main, so this PR is no longer needed. Thanks for the contribution and analysis.

@teknium1 teknium1 closed this Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

[Bug]: api_key drift on provider switch — real Hermes bug

3 participants