Repository navigation
fix(sdk): leave inference destination checks to OpenShell - #13260
Merged
Merged
Conversation
NemoClaw validated the addresses of inference endpoints it hands to OpenShell, duplicating OpenShell's destination checks and rejecting destinations it supports, such as host.openshell.internal. Those endpoints now get only URL shape checks (validate_endpoint_url); the gateway, catalog discovery, and the Ollama proxy's upstream, which NemoClaw connects to itself, keep the full policy. The travel example defaults its sandbox endpoint to host.openshell.internal.
cv
enabled auto-merge (squash)
October 15, 2026 11:33
Contributor
This was referenced Oct 15, 2026
cv
added a commit
that referenced
this pull request
Oct 15, 2026
Closes #13236. Part of #13131. ## Failure When an inference server's certificate came from a CA the control host doesn't trust, such as an organization's internal CA, catalog checks reported "inference endpoint could not be reached from the control host". That pointed operators at the network instead of the certificate, and nothing said how to fix it. This affects plan's catalog reads, onboarding suggestions, and `openshell_external_inference_server`. ## Decision Keep trust where it already lives, and say so clearly: - **Inference traffic:** the OpenShell gateway and sandboxes carry it, and at the pinned revision OpenShell has no per-provider CA setting; its images' trust stores decide. A NemoClaw-side CA setting would let NemoClaw's checks pass while OpenShell's traffic fails, so this adds none. - **NemoClaw's own checks** already use the control host's system trust store, which honors `SSL_CERT_FILE`. - **A specific error:** the catalog reader now recognizes a rejected certificate in the request's error chain. It reports "the inference server's certificate is not trusted by the control host; add its CA to the system trust store or set SSL_CERT_FILE to a bundle that includes it". The check walks nested I/O errors, whose `source()` skips the error each one wraps. Every caller of the catalog reader gets the new message. - **Docs:** `docs/inference.md` gains "Trust a Custom Certificate Authority", covering both places that need the CA. Two lines in `docs/inference.md` and `docs/usage.md` still stated NemoClaw's old address rule for uncredentialed HTTP endpoints, which #13260 removed; they now say OpenShell decides which destinations a sandbox can reach. ## Validation - New test `an_untrusted_certificate_names_how_to_trust_it` serves a self-signed certificate. It failed before the change with the generic unreachable reason. - `cargo ci` passes locally: 1529 unit tests, 145 lifecycle tests. - `fern check`: 0 errors, and the same single warning as before.
Closed
8 tasks
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 #13232. Part of #13131.
Failure
NemoClaw applied its own address rule to every inference endpoint it handed to OpenShell: plain HTTP only to a literal loopback or private IP, no link-local, unspecified, or multicast address, and no metadata host. OpenShell already validates destinations when sandboxes connect, against the address each one resolves to. NemoClaw's rule duplicated that, and contradicted it by rejecting destinations OpenShell supports by design: its gateway-host alias
host.openshell.internal, exactly declared private hosts, and container-network names.One gap is real: as far as I can tell, OpenShell substitutes credentials into plain-HTTP requests without checking the scheme or whether the destination is public (
openshell-supervisor-network,proxy.rs, at the pinned revision). Following the decision on #13232, NemoClaw doesn't add validation OpenShell doesn't perform, so this PR doesn't keep a narrower rule for that case.Decision
nemoclaw_backend::validate_endpoint_urlchecks only an endpoint's shape: a parseable HTTP or HTTPS URL with a host; no credentials, query, or fragment, which keeps secrets out of state; and no characters OpenTofu would interpolate.nemoclaw-openshell, external providers in YAML, managed services' published endpoints, the Ollama proxy's published endpoint, and onboarding's endpoint answer.validate_endpoint, which is the shape check plus the existing policy: the gateway endpoint, catalog discovery from the user's machine, and the Ollama proxy's upstream.docs/provider.md, and the travel example say OpenShell checks inference destinations. The example now defaults its sandbox endpoint tohttp://host.openshell.internal:11434/v1.Validation
http://host.openshell.internal:11434/v1,http://ollama:11434/v1, andhttp://inference.example.com/v1without pinning IPs;validate_endpoint_urlaccepts them whilevalidate_endpointstill rejects them, and both reject credentials, queries,file:URLs, and interpolation;cargo cipasses locally: 1540 unit tests and 144 lifecycle tests.