#2928

fix(cli): Hermes setup now actually sends the Phaseo key, including on Windows

OpenDanielButler1wants to merge intofrom

phaseo setup hermes looked like it worked, but with current Hermes every request to Phaseo went out without a key. A real end-to-end test against Hermes found this, plus a second bug on Windows where the key went to a folder Hermes never reads.

What changed

  • Setup now sets Hermes' model.key_env to OPENAI_API_KEY, so Hermes sends the key to Phaseo. The previous value is recorded and restored on remove.
  • Setup asks Hermes where its .env is (hermes config env-path). If Hermes can't say, it falls back to HERMES_HOME, then %LOCALAPPDATA%\hermes on Windows and ~/.hermes elsewhere.
  • Running setup again moves a key that an earlier version wrote to the wrong file.
  • If one setting fails during removal, removal carries on, so the key still comes out of .env.
  • Messages show the real path, and the "Finish setup" step is now a real step: restart Hermes sessions.
  • The refusal message no longer gives manual steps that wouldn't work.
  • The README and the coding-assistants guide are updated in English and all 8 locales, with translation freshness recorded.

Why

  • Key not sent: Hermes only sends OPENAI_API_KEY to OpenAI's own hosts (a guard against leaking keys). For any other custom endpoint it needs model.key_env. Without it, Hermes' own resolver returned no-key-required as the key for api.phaseo.app.
  • Windows path: native Windows Hermes keeps its files in %LOCALAPPDATA%\hermes. Model settings were set through hermes config set, so they landed in the right place, but the key went to ~/.hermes/.env.

How

The key stays in OPENAI_API_KEY, inside the existing managed block. I also tried writing it as PHASEO_API_KEY, which Hermes would pick up from the host name. That works, but Hermes passes PHASEO_API_KEY through to commands its agent runs, while it strips OPENAI_API_KEY. So model.key_env is the safer choice. Hermes versions without model.key_env get a clear "run hermes update" error, and setup rolls back.

Before and after (real Hermes, isolated test folder)

CaseBeforeAfter
Key Hermes sends after setupno-key-requiredthe Phaseo key
Windows, HERMES_HOME unsetkey in ~/.hermes/.env, Hermes sends no keykey in %LOCALAPPDATA%\hermes\.env, Hermes sends it
Re-setup over a setup from the previous versionn/arecords model.key_env, moves the key if needed
Removerestores settingsrestores settings, including model.key_env; .env back to the original

Verification

  • pnpm --filter @phaseo/cli build and pnpm test: 170 pass, 0 fail, 3 skipped on Windows. The 3 new adapter tests use a fake hermes on PATH and run on Linux CI.
  • node scripts/translation-freshness.mjs check in apps/docs: pass.
  • End to end against Hermes a938f00 (editable install, isolated home, LOCALAPPDATA and HERMES_HOME, fake keys, no Phaseo API calls). Covered:
    • fresh setup and re-setup with a new key (block updated in place);
    • Hermes' own .env.example comments;
    • refusal of lines with backslashes and of a user's own OPENAI_API_KEY;
    • removal;
    • upgrade from the previous CLI build, with HERMES_HOME set and unset (the move).
  • Hermes' resolve_runtime_provider() confirmed the key it would send in each case.

Proved by reproducing the missing key against real Hermes, then watching Hermes send the Phaseo key after the fix (log in the Verification section).

Reviewed with sol-loop: 1 round with gpt-6.1-sol. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Activity

6
vercel[bot]1d ago

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated
phaseo ReadyPreviewOct 29, 2026 4:58pm UTC

coderabbitai[bot]1d ago

WARNING

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 21 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 50771caf-cdc0-4689-bb7e-56546dda3673
Commits

Reviewing files that changed from the base of the PR and between e05110665418a8223dd1ab2f8f0f3b903fc8c4ea and 18bab782b86b247c8626efb07fbfe37b3d2e40e9.

Files selected for processing: 14
  • .changeset/cli-hermes-key-env-windows-home.md
  • apps/docs/ar/v1/guides/integrations/coding-assistants.mdx
  • apps/docs/de/v1/guides/integrations/coding-assistants.mdx
  • apps/docs/es/v1/guides/integrations/coding-assistants.mdx
  • apps/docs/fr/v1/guides/integrations/coding-assistants.mdx
  • apps/docs/hi/v1/guides/integrations/coding-assistants.mdx
  • apps/docs/ja/v1/guides/integrations/coding-assistants.mdx
  • apps/docs/pt-BR/v1/guides/integrations/coding-assistants.mdx
  • apps/docs/translation-status.json
  • apps/docs/v1/guides/integrations/coding-assistants.mdx
  • apps/docs/zh-Hans/v1/guides/integrations/coding-assistants.mdx
  • packages/cli/phaseo/README.md
  • packages/cli/phaseo/src/integrations/adapters/hermes.ts
  • packages/cli/phaseo/tests/integrations.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

chatgpt-codex-connector[bot]1d ago

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

ReviewStatusCommitReview trigger
📝 Code Review🔄 Running since 2026-10-29T16:07:25.997242Zdb4fd8fPR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

github-actions[bot]1d ago

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None