Repository navigation
Description
Description
Continuation of #2519. PR #2580 landed the wizard-side fix (stopped capturing host OPENAI_API_KEY for ollama-local, switched gateway config to NEMOCLAW_OLLAMA_PROXY_TOKEN), which resolved the original HTTP 401 symptom. However, the runtime credential-injection path in the routing proxy is still broken: the gateway routes ollama-local requests to :11435 but never injects NEMOCLAW_OLLAMA_PROXY_TOKEN as a Bearer header. On a clean machine with no OPENAI_API_KEY at all, the failure mode shifts from an explicit 401 to a silent hang — nemoclaw status reports healthy, the TUI spins indefinitely, and the sandbox logs show NET:FAIL [LOW] inference.local:443 every ~15s.
Reproduced by @hulynn on nemoclaw v0.0.31 (see verbatim repro below).
Scope vs. #2519
| Scope | Status |
|---|---|
Wizard captures host OPENAI_API_KEY and bleeds it into ollama-local bearer → HTTP 401 |
✅ Fixed by PR #2580 (closed as #2519) |
Gateway registers NEMOCLAW_OLLAMA_PROXY_TOKEN but does not inject it as Bearer when routing to :11435 → silent hang |
🔴 This issue |
Repro (from @hulynn, v0.0.31, verbatim)
[Repro] v0.0.31, no OPENAI_API_KEY, clean machine
Reproduced on nemoclaw v0.0.31 (Brev cloud, Ubuntu 22.04, A100-SXM4-80GB, Ollama v0.22.0, model qwen2.5:0.5b).
Trigger: No
OPENAI_API_KEYset. Wizard showsAPI key: (not required for ollama-local)— nothing stored incredentials.json. Onboard completes,nemoclaw statusreportsInference: healthy. TUI spins indefinitely, no response.Sandbox logs:
[openshell_router] routing proxy inference request endpoint=http://host.openshell.internal:11435/v1 path=/v1/chat/completions [sandbox] NET:FAIL [LOW] inference.local:443 ← repeats every ~15sHost:
$ curl http://localhost:11435/ HTTP 401 UnauthorizedThe gateway routes to
:11435but injects noAuthorizationheader.openshell provider get ollama-localshowsNEMOCLAW_OLLAMA_PROXY_TOKENas the credential key, but it is never injected asBearerwhen routing.
Environment
- NemoClaw: v0.0.31
- Platform: Brev cloud, Ubuntu 22.04, A100-SXM4-80GB
- Ollama: v0.22.0, model
qwen2.5:0.5b - No
OPENAI_API_KEYset in host env - Clean machine — no pre-existing
credentials.jsonentry forOPENAI_API_KEY
Expected Result
Routing proxy injects NEMOCLAW_OLLAMA_PROXY_TOKEN as Authorization: Bearer <token> on every ollama-local forward to :11435. Gateway-side Ollama proxy accepts the token. Agent calls succeed end-to-end.
Actual Result
nemoclaw status:Inference: healthy(the liveness probe athttp://127.0.0.1:11434/api/tagspasses because it hits Ollama directly, bypassing the gateway route).- TUI shows "kerfuffling" / "conjuring" indefinitely on any prompt.
- Sandbox logs show repeated
NET:FAIL [LOW] inference.local:443events. - Direct
curl http://localhost:11435/→HTTP 401 Unauthorized, confirming the:11435proxy validates a Bearer the routing proxy never sends.
Suspected Root Cause
The runtime routing proxy (openshell_router) does not read the provider's registered credentialEnv (now NEMOCLAW_OLLAMA_PROXY_TOKEN after PR #2580) and inject it as an Authorization: Bearer header when forwarding to :11435. Config says the right thing; the HTTP layer doesn't act on it.
Likely candidate paths to audit:
openshell_routercredential-injection middleware — confirm it resolvescredentialEnv→ env var → Bearer for all registered providers, not just ones with a non-nullcredentialEnvand a legacyOPENAI_API_KEY-style name.- Whether the
:11435proxy's expected token name matches what the gateway reads fromNEMOCLAW_OLLAMA_PROXY_TOKEN.
References
- Original issue: [Linux][Brev]Ollama-local provider returns HTTP 401 Unauthorized via inference.local — wizard caches OPENAI_API_KEY env var into credentials.json and not refreshable via env unset #2519 (closed against wizard-side 401 scope)
- Partial fix: PR fix(onboard): decouple local inference providers from OPENAI_API_KEY #2580 —
fix(onboard): decouple local inference providers from OPENAI_API_KEY - Diagnostic breadcrumb:
openshell provider get ollama-localconfirms credentialEnv is registered; sandbox logs confirm noAuthorizationheader on the outbound request.
Activity
jyaunches commentedon May 8, 2026
Closing this out — summary and follow-ups below. @hulynn — please drop a comment confirming you agree with this disposition, or reopen if your environment still reproduces after upgrading past v0.0.31.
What we confirmed
Executed the full
sandbox → openshell gateway → auth proxy (:11435) → Ollamapath viahttps://inference.local/v1/chat/completionsagainstmainHEAD (a4a9eb0cd) on an NVIDIA NVKS GPU runner on 2026-05-08: the assertion returnedPONGin 0.4 seconds. See run 25531094105, Phase 5b:So the exact failure mode this issue describes (silent hang + no
Authorization: Beareron the outbound:11435request) is not reproducible on currentmainin that environment.Why we're not bisecting v0.0.31
57 commits landed between
v0.0.31(2026-04-29) and currentmainthat touch the ollama / inference / onboard paths. Without a live repro environment and with the fix direction already captured as detection work, investing in a bisect for a bug that no longer reproduces is a poor trade. If @hulynn or anyone else still reproduces this on v0.0.36+ / latest, that's the signal to dig in — please reopen with a fresh repro in that case.What surfaced during investigation, tracked separately
Two sibling bugs identified during the #3198 deep-dive, both added to Sprint 4 - Spark Joy:
gpu-e2ejob has never run on a scheduled nightly — it was gated onvars.GPU_E2E_ENABLEDwhich was never set totrue. First run againstmaintoday (25531094105) passed the critical inference assertion but hung 17+ minutes in the destroy phase, which blocks enabling on schedule. re-enable e2e-gpu nightly test #3263 tracks fixing the destroy hang, re-enabling the gate, and adding guardrails so it can't silently go dark again.nemoclaw statusreportsInference: healthyby probing Ollama directly on:11434. The status probe bypasses both the auth proxy (:11435) and the gateway, so any break in those hops (including this exact issue's failure mode) still reports green. Independent of whether this issue's root cause is ever found, the false-positive probe is itself a bug. Change to a two-line probe (backend + auth proxy with Bearer) so future regressions in this path are visible atnemoclaw status/doctortime.Additionally, #3253 (filed independently by @hulynn today) tracks the onboard-time inference probe — an end-of-onboard
chat.completions.createround-trip that would catch this entire class of silent-config-bug failures before the user ever hits the TUI. That issue's scope is broader than just ollama-local (it covers Model Router, NIM, etc.) so item B from our original #3198 plan is folded into that issue rather than tracked here.Also closed stale community PR #1759 ("fix: verify local inference route during onboarding") — its underlying issue #1750 was closed as completed on 2026-04-16 without the PR merging, and #3253 supersedes it with broader scope.
Net: disposition on this issue
main, no affordable bisect.Closing. @hulynn please confirm you agree, or flag if you want the issue kept open until you've re-tested on a version past v0.0.31.
fix(status): probe ollama auth proxy alongside backend (#3265) (#3498)