fix(onboard): skip endpoint validation for sandbox-internal hostnames#2995
Conversation
host.openshell.internal and host.docker.internal only resolve from
inside the OpenShell sandbox network. Running curl probes against
these URLs from the host always fails with exit 6 ("Could not resolve
host"), blocking onboard even though the endpoint is reachable at
runtime.
Detect these hostnames in probeOpenAiLikeEndpoint and return an
ok:true result with a note instead of probing. The caller logs the
note so the user knows validation was skipped. preferredInferenceApi
falls through as null, which getSandboxInferenceConfig already
defaults to openai-completions — the most universally supported API
for local models (vLLM, Ollama).
Fixes #893.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Widen EndpointValidationResult to api: string | null so the type matches the skipped-probe return value from probeOpenAiLikeEndpoint - Coerce null api → "openai-completions" in both OpenAI-like validators so downstream callers never receive null - nim-local was probing against getLocalProviderBaseUrl (host.openshell .internal) instead of getLocalProviderValidationBaseUrl (127.0.0.1); align it with the standalone vllm path which already uses the validation URL Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds detection for sandbox-only hostnames (e.g., host.docker.internal, host.openshell.internal) and short-circuits OpenAI-like endpoint probing to return success without running curl. Propagates nullable probe API through validation, prints probe notes when present, and prefers local NIM validation base URL where applicable. ChangesSandbox-Internal URL Detection & Probe Short-Circuiting
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Review rate limit: 8/10 reviews remaining, refill in 10 minutes and 18 seconds. Comment |
ericksoa
left a comment
There was a problem hiding this comment.
Reviewed current head 300f599. The change is scoped to sandbox-internal OpenAI-compatible endpoint validation, keeps normal localhost/external URL probes intact, defaults skipped probes back to chat completions, and includes focused probe tests. GitHub validation is green.
Summary
host.openshell.internalandhost.docker.internalonly resolve from inside the OpenShell sandbox network. Probing them from the host always fails with curl exit 6 ("Could not resolve host"), blockingnemoclaw onboardeven though the endpoint is reachable at runtime.isSandboxInternalUrl()to detect these hostnames inprobeOpenAiLikeEndpointand return anok: trueresult with anoteinstead of running the curl probe.onboard.tslog the note (prefixed with ℹ) so users know validation was skipped rather than silently pretending it passed.preferredInferenceApipropagates asnull, whichgetSandboxInferenceConfigalready defaults toopenai-completions— the most universally supported API for local models (vLLM, Ollama).Fixes #893.
Before / After
Before:
After:
Test plan
onboard-inference-probes.test.tscoveringisSandboxInternalUrland the skipped-probe return value for bothhost.openshell.internalandhost.docker.internalnpm test— 181 test files, 3158 tests, all pass🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes