fix(local): recognize unqualified hostnames as local endpoints#9248
Merged
benbarclay merged 2 commits intoJun 5, 2026
Merged
Conversation
Collaborator
9048858 to
8d467c1
Compare
Docker Compose service names (e.g. ollama, litellm, hermes-litellm) are unqualified hostnames with no dots. These are always local — they resolve via Docker DNS, /etc/hosts, or mDNS. Without this fix, the stale stream timeout fires on local LLM proxies, causing infinite reconnect loops. Closes NousResearch#7905
8d467c1 to
b9a7e8b
Compare
8 tasks
davidgut1982
pushed a commit
to davidgut1982/hermes-agent
that referenced
this pull request
Jun 5, 2026
…esearch#9248) Docker Compose service names (e.g. ollama, litellm, hermes-litellm) are unqualified hostnames with no dots. These are always local — they resolve via Docker DNS, /etc/hosts, or mDNS. Without this fix, the stale stream timeout fires on local LLM proxies, causing infinite reconnect loops. Closes NousResearch#7905
changman
pushed a commit
to changman/hermes-agent
that referenced
this pull request
Jun 10, 2026
…esearch#9248) Docker Compose service names (e.g. ollama, litellm, hermes-litellm) are unqualified hostnames with no dots. These are always local — they resolve via Docker DNS, /etc/hosts, or mDNS. Without this fix, the stale stream timeout fires on local LLM proxies, causing infinite reconnect loops. Closes NousResearch#7905
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?
Unqualified hostnames (no dots) are now recognized as local endpoints by
is_local_endpoint().Docker Compose service names (e.g.
ollama,litellm,hermes-litellm) are unqualified hostnames that resolve via Docker DNS,/etc/hosts, or mDNS. Without this fix, the stale stream timeout fires on local LLM proxies, causing infinite reconnect loops.Approach: added a check after the existing container suffix matching —
if host and "." not in host: return True.Related Issue
Closes #7905
Type of Change
Changes Made
is_local_endpoint()(in agent local endpoint detection): added unqualified-hostname check after the existing container suffix matchingtests/agent/test_local_stream_timeout.py::TestIsLocalEndpointcovering realistic Docker Compose service namesHow to Test
pytest tests/agent/test_local_stream_timeout.py::TestIsLocalEndpoint -v— all 20 tests pass (4 new + 16 existing)ollama,litellm,hermes-litellmPlatform: all platforms (primarily Docker/Podman environments).
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs