Skip to content

fix(honcho): CLI credential guard rejects self-hosted baseUrl configs#14881

Closed
sasha-id wants to merge 1 commit into
NousResearch:mainfrom
sasha-id:fix/honcho-cli-selfhosted-baseurl
Closed

fix(honcho): CLI credential guard rejects self-hosted baseUrl configs#14881
sasha-id wants to merge 1 commit into
NousResearch:mainfrom
sasha-id:fix/honcho-cli-selfhosted-baseurl

Conversation

@sasha-id

Copy link
Copy Markdown
Contributor

Summary

  • _resolve_api_key() in plugins/memory/honcho/cli.py only checks for apiKey / HONCHO_API_KEY, causing all CLI subcommands (hermes honcho identity --show, status, migrate, etc.) to bail with "No API key configured" on self-hosted instances that use baseUrl without an API key.
  • The SDK client (client.py) already handles this case correctly by using "local" as a placeholder — this fix brings the CLI guard in line with that behavior.
  • Returns "local" when baseUrl / base_url / HONCHO_BASE_URL is set but no API key is configured.

Test plan

  • Added 5 unit tests for _resolve_api_key covering: root key, host block key, baseUrl without key, HONCHO_BASE_URL env var, and empty config
  • All existing tests pass (pytest tests/honcho_plugin/test_cli.py -v)
  • Manually verified on self-hosted Honcho (Docker, localhost:8000) — hermes honcho identity --show now proceeds past the credential check

Platforms tested

  • macOS (Apple Silicon)
  • Linux (Debian, CT/LXC)

_resolve_api_key() only checks for apiKey / HONCHO_API_KEY, so all
CLI subcommands (identity --show, status, migrate, etc.) bail with
"No API key configured" on self-hosted instances that use baseUrl
without an API key.

Return "local" when baseUrl or HONCHO_BASE_URL is set, matching the
client.py behavior that already handles this case for the SDK.

Tested on: macOS, self-hosted Honcho (Docker, localhost:8000).
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/plugins Plugin system and bundled plugins comp/cli CLI entry point, hermes_cli/, setup wizard labels Apr 24, 2026
@sasha-id sasha-id closed this May 4, 2026
@sasha-id sasha-id deleted the fix/honcho-cli-selfhosted-baseurl branch May 4, 2026 16:15
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 comp/plugins Plugin system and bundled plugins 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.

2 participants