fix: honour HERMES_LLM_BASE_URL env var when provider-specific base_url_env_var is absent - #34002
Closed
OmarB97 wants to merge 0 commit into
Closed
fix: honour HERMES_LLM_BASE_URL env var when provider-specific base_url_env_var is absent#34002OmarB97 wants to merge 0 commit into
OmarB97 wants to merge 0 commit into
Conversation
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
MeshBoard's stream-tap launcher creates a per-dispatch HERMES_HOME sandbox whose .env sets
HERMES_LLM_BASE_URLto a local proxy URL. Hermes was ignoring this becauseresolve_api_key_provider_credentials()only checked the provider's ownbase_url_env_var(e.g.OPENCODE_ZEN_BASE_URL), not the genericHERMES_LLM_BASE_URLfallback.When the provider-specific env var is unset, fall back to
HERMES_LLM_BASE_URLso the stream-tap proxy is actually used.What changed
hermes_cli/auth.py: In bothresolve_api_key_provider_credentials()andget_api_key_provider_status(), after checkingpconfig.base_url_env_var, also checkHERMES_LLM_BASE_URLas a fallback.How to review
HERMES_LLM_BASE_URLwhenenv_urlis empty.Evidence
Manual test with a sandbox
.envcontainingHERMES_LLM_BASE_URL=http://127.0.0.1:58017/v1:resolve_api_key_provider_credentials("opencode-zen")returnedbase_url="https://opencode.ai/zen/v1"base_url="http://127.0.0.1:58017/v1"Verification
python -m py_compile hermes_cli/auth.py)HERMES_LLM_BASE_URLis unsetRisks / gaps
Collaborators