Model switch losing credentials causing 401 errors
Cluster 36915 · hermes cli · Bug. Data as of
1 open item. Fix merged in #162894 on 3 Dec 2026. Check it covers your case.
The short answer
- Known?
- Yes. 5 related items grouped here, 1 issue already closed.
- Fix event
- A fix was merged to main in PR #162894. Check it covers your case. No release data is tracked. Fix link checked: 3 Dec 2026.
- Tracker
- The maintainers' tracker marks this
partially resolved, deciding PR #162894. That is separate from the fix event.
Next step: read #162894, then check whether your report is the one still open.
Read #162894Pick up a Lab taskA bug where switching models (especially within the same provider) causes API keys to be dropped or overwritten with empty values, resulting in 401 authentication errors. Multiple fix attempts address preserving existing credentials during model resolution and switching.
Open issues1
- Issue#36915/model switch throws 401 AuthError on valid key (OpenCode Go + deepseek-v4-pro)
Open PRs0
Fixes on record
-
#162894 A /model switch keeps the credential of the route it lands on (salvage #126534, #154392, #56489, #44521)
files:
gateway/run.py,gateway/run_agent_cache.py,gateway/run_turn_prepare.py,hermes_cli/cli_agent_setup_mixin.py,hermes_cli/cli_model_switch_mixin.py,hermes_cli/model_switch.py,hermes_cli/model_switch_providers.py,hermes_cli/web_server_config.py,tests/gateway/test_session_model_override_credential_pool.py,tests/hermes_cli/test_gateway_model_switch_cli.py,tests/hermes_cli/test_model_alias_credentials.py,tests/hermes_cli/test_model_alias_save_relaunch.py,tests/hermes_cli/test_model_switch_cold_init.py,tests/hermes_cli/test_model_switch_same_provider_credential.py,tests/hermes_cli/test_model_switch_vendor_credentials.py
2 PRs closed without merging
From the close comments: done elsewhere 1 · duplicate 1
Closed issues · 1
- Closed#44490[Bug]: Same-provider model switch on opencode-go produces empty api_key → 401
How this cluster was grouped
-
Link evidence (
partly structural links): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text. - Members outside that structural core may belong to a different underlying problem.
-
Pairwise link density
0.34: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36.1.00means every pair is linked.