Files
hermes-agent/hermes_cli
Ben bff47eee48 fix: HERMES_PORTAL_BASE_URL env var ignored during Nous login
_login_nous() was passing pconfig.portal_base_url (hardcoded production
URL) as a fallback when no --portal-url CLI flag was given. This meant
_nous_device_code_login() received a truthy portal_base_url argument
and never reached the env var fallback chain.

Users setting HERMES_PORTAL_BASE_URL or NOUS_PORTAL_BASE_URL in .env
to point at a staging portal were silently ignored — login always went
to production.

Fix: pass None when no CLI flag is provided, letting the downstream
function properly check env vars before falling back to the default.

Fallback chain is now:
1. --portal-url CLI arg
2. HERMES_PORTAL_BASE_URL env var
3. NOUS_PORTAL_BASE_URL env var
4. DEFAULT_NOUS_PORTAL_URL (production)

Same fix applied to inference_base_url for consistency.
2026-04-07 15:48:16 +10:00
..