Model endpoints: treat container host aliases as local and name the HTTPS switch - #73
Open
oldeucryptoboi wants to merge 1 commit into
Open
oldeucryptoboi wants to merge 1 commit into
oldeucryptoboi wants to merge 1 commit into
Conversation
…TTPS switch A model server on the developer's machine (Ollama, LM Studio, a LiteLLM proxy) is reached from a container through host.docker.internal or one of its Lima and Podman equivalents. validate_base_url treated those as remote and rejected plain HTTP, so the worker crash-looped on "remote provider base URLs must use HTTPS" in the most common local setup. Loopback now includes host.docker.internal, gateway.docker.internal, host.lima.internal and host.containers.internal. The allowlist still applies to them. The error for a genuinely remote plain-HTTP endpoint names the two keys that relax the rule, and the configuration reference documents both. Closes cbtw-apac#69 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 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. Comment |
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.
Closes #69
Why
The standard developer setup, a model server on the host and the worker in Docker, reaches Ollama at
http://host.docker.internal:11434.validate_base_urltreated that host as remote and rejected plain HTTP, so the worker crash-looped onremote provider base URLs must use HTTPS. The switch existed but was undocumented and unnamed in the error.What
transport.py:is_local_hostname()coverslocalhost, loopback IPs, and the container-runtime aliaseshost.docker.internal,gateway.docker.internal,host.lima.internal,host.containers.internal. The host allowlist still applies to them.security.require_https_for_remote_endpointsandsecurity.allowed_base_url_hosts.docs/users/configuration/config-file-reference.md: new "Provider endpoint policy" section documenting both keys.tests/models/unit/test_transport_base_url.py.Checks
ruffclean on the touched files;python -m pytest packages/harborrag-adapters/tests/models481 passed.🤖 Generated with Claude Code