fix(runtime): honour HERMES_LLM_BASE_URL in pool-based and explicit runtime resolution - #34044
Closed
OmarB97 wants to merge 2 commits into
Closed
fix(runtime): honour HERMES_LLM_BASE_URL in pool-based and explicit runtime resolution#34044OmarB97 wants to merge 2 commits into
OmarB97 wants to merge 2 commits into
Conversation
added 2 commits
May 28, 2026 11:26
The kimi worker added the fallback to hermes_cli/auth.py:resolve_api_key_provider_credentials() but the caller at runtime_provider.py:1163 already set base_url = pconfig.inference_base_url before creds were consulted — so the creds base_url was never used for non-kimi providers. Add the same HERMES_LLM_BASE_URL fallback at runtime_provider.py:1154 so env_url carries the proxy URL through to line 1163's base_url resolution. Refs meshboard task: stream-tap-runtime-provider-env-override
…tion The previous fix (auth.py + runtime_provider.py _resolve_explicit_runtime path) missed the pool-based code path in _resolve_runtime_from_pool_entry(). For providers like opencode-zen that resolve via the credential pool, the base_url was set from the pool entry's default without checking HERMES_LLM_BASE_URL. Add the override at line 306 (right after base_url is read from the pool entry) so the MeshBoard stream-tap proxy URL is honoured regardless of which resolution path is taken: explicit, named-custom, or pool. This is the actual code path exercised by MeshBoard dispatches, which use resolve_runtime_provider(requested='opencode-zen') → pool → _resolve_runtime_from_pool_entry. Refs meshboard task: stream-tap-runtime-provider-env-override
Contributor
Author
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.
What does this PR do?
Two runtime-resolution paths ignore the
HERMES_LLM_BASE_URLenvironment variable. When an operator points Hermes at a local proxy via that variable (e.g. a loopback proxy that captures/streams inference traffic), inference silently bypasses the proxy and goes straight to the provider's default upstream:_resolve_runtime_from_pool_entry()— the pool-based path used for mid-session/modelswitches — never consultedHERMES_LLM_BASE_URL._resolve_explicit_runtime()— honoured a provider's ownbase_url_env_varbut droppedHERMES_LLM_BASE_URLwhen a provider defined no such variable.Other resolution paths already honour
HERMES_LLM_BASE_URL; this brings the two remaining paths in line so the override is respected consistently. An explicitbase_url(from config or the pool entry) still takes precedence.Related Issue
N/A. Extracted as a focused, single-file change from #34023 at a reviewer's request — that PR shared a stacked branch and showed unrelated changes against
main.Type of Change
Changes Made
hermes_cli/runtime_provider.py_resolve_runtime_from_pool_entry(): whenHERMES_LLM_BASE_URLis set, use it asbase_url._resolve_explicit_runtime(): fall back toHERMES_LLM_BASE_URLwhen the provider defines nobase_url_env_var.(+15 lines, 1 file.)
How to Test
Both verified locally on this branch. An explicit per-model / pool-entry
base_urlstill wins over the env var.Checklist
Code
pytest tests/ -qand all tests pass