Fix default endpoint URLs to use host.docker.internal#1645
Merged
akwasigroch merged 1 commit intomainfrom Apr 15, 2026
Merged
Conversation
Update default endpoint URLs for Ollama, vLLM, and LiteLLM proxy to use host.docker.internal instead of localhost/0.0.0.0, since the backend runs in Docker and cannot reach host services via localhost. Also improve helper text to explain why the non-obvious hostname is needed.
| helperText={ | ||
| provider?.type_value === 'ollama' | ||
| ? 'The URL where Ollama is running (default: http://host.docker.internal:11434)' | ||
| ? 'When Rhesis runs in Docker, use host.docker.internal instead of localhost to reach Ollama on your machine' |
There was a problem hiding this comment.
Improvement: These helpers (and the new defaults) are Docker-centric, but when running Rhesis outside Docker host.docker.internal may not resolve. Consider mentioning the non-Docker case too (e.g., “If running Rhesis locally, use http://localhost:…”), and adding the same Docker hint for vllm for consistency.
| ollama: 'http://host.docker.internal:11434', | ||
| vllm: 'http://localhost:8000', | ||
| litellm_proxy: 'http://0.0.0.0:4000', | ||
| vllm: 'http://host.docker.internal:8000', |
There was a problem hiding this comment.
Question: Any concern about host.docker.internal not resolving on some Linux setups (outside your provided docker-compose that uses extra_hosts: host-gateway)? If so, we might want a note in docs/UI or an env-based default fallback to localhost when not in Docker.
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.
Purpose
When Rhesis backend runs inside Docker,
localhostand0.0.0.0in endpoint URLs refer to the container itself, not the host machine. Users running Ollama, LiteLLM, or vLLM on their host needhost.docker.internalto reach those services from inside the container. The previous defaults were inconsistent — Ollama already usedhost.docker.internal, but vLLM usedlocalhostand LiteLLM used0.0.0.0.What Changed
localhost:8000→host.docker.internal:8000) and LiteLLM proxy (0.0.0.0:4000→host.docker.internal:4000) to usehost.docker.internal, matching OllamaTesting
host.docker.internal