mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
fix(hermes_cli): preserve unset-active dashboard xAI OAuth and cover token save modes
Use mark_provider_active_if_unset after dashboard token save, unsuppress device_code after TTS setup login, and lock default-active plus refresh active_provider contracts in tests.
This commit is contained in:
parent
fce06e909d
commit
f42be94049
3 changed files with 80 additions and 2 deletions
|
|
@ -908,6 +908,7 @@ def _run_xai_oauth_login_from_setup() -> bool:
|
|||
_is_remote_session,
|
||||
_save_xai_oauth_tokens,
|
||||
_xai_oauth_device_code_login,
|
||||
unsuppress_credential_source,
|
||||
)
|
||||
except Exception as exc:
|
||||
print_warning(f"xAI Grok OAuth helpers unavailable: {exc}")
|
||||
|
|
@ -926,6 +927,9 @@ def _run_xai_oauth_login_from_setup() -> bool:
|
|||
auth_mode="oauth_device_code",
|
||||
set_active=False,
|
||||
)
|
||||
# Mirror model/dashboard re-login: clear device_code suppression so
|
||||
# the pool can seed from the singleton after a prior `auth remove`.
|
||||
unsuppress_credential_source("xai-oauth", "device_code")
|
||||
return True
|
||||
except Exception as exc:
|
||||
print_warning(f"xAI Grok OAuth login failed: {exc}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue