refactor(hermes_cli): proxy_cli — _step/_refuse helpers replace 7 repeated print blocks

This commit is contained in:
Teknium
2026-09-02 20:44:48 -07:00
parent cbf945e42e
commit 6eb50ac8d5
2 changed files with 44 additions and 59 deletions
+2 -4
View File
@@ -50,16 +50,14 @@ class XAIGrokAdapter(UpstreamAdapter):
pool = self._load_pool()
if pool is None or not pool.has_credentials():
raise RuntimeError(
"No xAI OAuth credentials found. Run "
"`hermes auth add xai-oauth --type oauth` first."
"No xAI OAuth credentials found. Run `hermes auth add xai-oauth --type oauth` first."
)
entry = pool.select()
if entry is None:
raise RuntimeError(
"No available xAI OAuth credentials found. Run "
"`hermes auth reset xai-oauth` or re-authenticate with "
"`hermes auth add xai-oauth --type oauth`."
"`hermes auth reset xai-oauth` or re-authenticate with `hermes auth add xai-oauth --type oauth`."
)
self._pool = pool