Skip to content

fix(status): probe ollama auth proxy alongside backend (#3265) - #3498

Merged
cv merged 5 commits into
mainfrom
fix/3265-status-probe-auth-proxy
May 14, 2026
Merged

cv merged 5 commits into
mainfrom
fix/3265-status-probe-auth-proxy

Conversation

@cjagwani

@cjagwani cjagwani commented May 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Closes #3265.

Behaviour matrix (auth proxy hop)

Proxy status Detail
200 healthy — both backend and proxy reachable
401 unauthorized (the #3198 signature: proxy reachable but bearer not accepted)
connection refused unreachable (proxy process died)
no persisted token line omitted (no Ollama onboarded; nothing to probe)

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates

Verification

  • npx prek run --files for the 5 touched files passes (typecheck + biome + commitlint + gitleaks)
  • 74 targeted unit tests pass: inference/local.test.ts (44, incl. 3 new + 2 updated), inference/health.test.ts (28), actions/sandbox/status.test.ts (2)
  • npm run typecheck:cli clean
  • Tests added: the three scenarios from nemoclaw status reports 'Inference: healthy' by probing Ollama directly on :11434 — bypasses auth proxy (:11435) and gateway #3265's "Test strategy" — backend 200 + proxy 200 / 401 / refused
  • No secrets, API keys, or credentials committed
  • Full local test-cli hook skipped due to 15 pre-existing 5s testTimeout flakes in unrelated files (onboard-probes, dns-proxy, cli, onboard, repro-2666 — none touch this PR's diff). CI will rerun.

Test plan

# Unit
npx vitest run --project cli src/lib/inference/local.test.ts
npx vitest run --project cli src/lib/inference/health.test.ts

# Manual (matches #3265 repro)
nemoclaw onboard --provider ollama-local ...
nemoclaw <name> status
# Should print:
#   Inference: healthy (http://127.0.0.1:11434/api/tags)
#   Inference (auth proxy): healthy (http://127.0.0.1:11435/api/tags)

# Simulate the #3198 signature by stopping the proxy or rotating the token,
# then re-run status — the `Inference (auth proxy):` line goes red and
# surfaces the 401 / unreachable detail; the backend line stays green.

Notes for reviewers

  • probeOllamaAuthProxyHealth is injectable via loadOllamaProxyTokenImpl and runCurlProbeImpl so tests fully mock the curl + token-load path.
  • The token loader (defaultLoadOllamaProxyToken) duplicates ~6 lines from inference/ollama/proxy.ts. An earlier draft extracted it to a shared token-store.ts module; rolled back to keep the PR strictly minimum-scope. Worth a follow-up cleanup if multiple consumers grow.
  • Doctor's Provider health check now has an additional Provider health (auth proxy) row for ollama-local.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Multi-hop inference health reporting with labeled subprobes and dedicated probes for local auth-proxy and in-sandbox gateway chains
    • Status output now shows qualified inference backend labels and prints all nested probe entries for clearer diagnostics
  • Bug Fixes

    • Consistent, readable probe lines for not-probed, healthy, and failed states with improved failure labels, details, and actionable hints
  • Tests

    • Added auth-proxy and in-sandbox gateway probe tests covering success, auth failure, unreachable, and exec-failure cases

Review Change Stack

`nemoclaw status` previously reported `Inference: healthy` for
`ollama-local` by probing Ollama directly on `127.0.0.1:11434`. That
endpoint is the backend — agents reach Ollama through the auth proxy
at `:11435`, so any break in the proxy (e.g. the bearer-injection
regression tracked in #3198) was hidden behind a green status line.

Adds a second probe to the Ollama auth proxy with the persisted
bearer token and surfaces it as an extra `Inference (auth proxy):`
line in both `status` and `doctor`. The backend probe and its
`Inference:` label are unchanged; the proxy probe is omitted when no
token has been persisted so users who never onboarded Ollama don't
see a "not applicable" line.

Behaviour matrix (proxy hop):
  - 200 → healthy
  - 401 → unauthorized (the #3198 signature)
  - connection refused → unreachable (proxy process died)
  - no persisted token → omitted

Unit tests cover the three documented scenarios in the issue's "Test
strategy" by mocking runCurlProbe.

Closes #3265.

Note for reviewers: skipped local test-cli hook (SKIP=test-cli) due
to 15 pre-existing 5s testTimeout flakes in unrelated files
(onboard-probes, dns-proxy, cli, repro-2666). My 74 targeted tests in
inference/local, inference/health, and actions/sandbox/status pass.
CI will rerun and flake triage stays separate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Test User <test@example.com>
@copy-pr-bot

copy-pr-bot Bot commented May 14, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5b7ce8f8-3ee9-4e4e-a0ec-4b7064f8f12c

📥 Commits

Reviewing files that changed from the base of the PR and between c09f8f1 and cb10802.

📒 Files selected for processing (1)
  • src/lib/actions/sandbox/status.ts
✅ Files skipped from review due to trivial changes (1)
  • src/lib/actions/sandbox/status.ts

📝 Walkthrough

Walkthrough

Implements staged, multi‑hop inference probes: adds probe labels and nested subprobes, probes the Ollama auth proxy with a persisted bearer when present, attaches subprobes to provider health, and updates status/doctor rendering and tests to show each probe separately.

Changes

Multi-hop Ollama auth-proxy health probing

Layer / File(s) Summary
Multi-hop health data model
src/lib/inference/local.ts, src/lib/inference/health.ts
LocalProviderHealthStatus and ProviderHealthStatus gain optional probeLabel and subprobes[]. LocalProviderHealthProbeOptions adds loadOllamaProxyTokenImpl and a default loader reads ~/.nemoclaw/ollama-proxy-token.
Auth-proxy health probe implementation
src/lib/inference/local.ts
New probeOllamaAuthProxyHealth() loads persisted token (or returns null), probes http://127.0.0.1:11435/api/tags with Bearer, and returns detailed LocalProviderHealthStatus for success, 401, unreachable, and other HTTP failures.
Attach auth-proxy subprobe to main provider health
src/lib/inference/local.ts
probeLocalProviderHealth() sets backend probeLabel, conditionally calls the auth-proxy probe for ollama-local, and attaches subprobes to the returned health object for both success and failure paths.
Unified health status conversion
src/lib/inference/health.ts
Added localToProviderHealth() that recursively maps probeLabel and subprobes into ProviderHealthStatus; probeProviderHealth() now returns the converted structure for local providers.
Status and doctor command rendering
src/lib/actions/sandbox/status.ts, src/lib/actions/sandbox/doctor.ts
Added printInferenceProbeLine() and pushInferenceHealthCheck() to render main probe and each subprobe as separate lines/checks; showSandboxStatus() and doctor logic now iterate and display all subprobes and optionally probe the sandbox gateway chain for local providers.
Sandbox gateway-chain probe
src/lib/actions/sandbox/process-recovery.ts, src/lib/actions/sandbox/process-recovery.test.ts
New probeSandboxInferenceGatewayHealth() executes an in-sandbox curl to https://inference.local/v1/models, parses HTTP status, and returns structured reachable/unreachable results; tests cover healthy, 401, unreachable (000), and exec-failure/null cases.
Auth-proxy and local probe tests
src/lib/inference/local.test.ts, test/cli.test.ts
Updated tests to inject loadOllamaProxyTokenImpl stub and added tests asserting healthy auth-proxy subprobe, 401 unauthorized subprobe detail, and unreachable subprobe detail; CLI test updated to expect backend-qualified inference label.

Sequence Diagram

sequenceDiagram
  participant ProbeCmd as "nemoclaw status/doctor"
  participant ProviderProbe as "probeProviderHealth"
  participant LocalProbe as "probeLocalProviderHealth"
  participant AuthProxyProbe as "probeOllamaAuthProxyHealth"
  participant Backend as "Ollama:11434"
  participant Proxy as "Auth Proxy:11435"

  ProbeCmd->>ProviderProbe: request provider health ("ollama-local")
  ProviderProbe->>LocalProbe: probe local provider
  LocalProbe->>Backend: GET /api/tags
  Backend-->>LocalProbe: 200 / error / timeout
  LocalProbe->>AuthProxyProbe: load token & probe proxy (if token)
  AuthProxyProbe->>Proxy: GET /api/tags with Bearer
  Proxy-->>AuthProxyProbe: 200 / 401 / timeout
  AuthProxyProbe-->>LocalProbe: subprobe ok/fail + detail
  LocalProbe-->>ProviderProbe: main + subprobes[]
  ProviderProbe-->>ProbeCmd: ProviderHealthStatus (with probeLabel, subprobes)
  ProbeCmd->>ProbeCmd: render main line and loop to render subprobes
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#3353: Related changes to Ollama-local inference health probing and auth-proxy reachability handling.

Suggested labels

fix, enhancement: inference

Suggested reviewers

  • ericksoa
  • cv

Poem

🐰 A proxy once hid on one-one-four-three-five,
A single probe let the false green survive.
Now backend and proxy take turns in the light—
two hops, two checks, truth finally in sight.
Hop on, report true health, and celebrate tonight.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding an Ollama auth proxy probe alongside the backend probe for status reporting.
Linked Issues check ✅ Passed The PR addresses all primary coding requirements from #3265: explicit backend and auth-proxy probes for ollama-local with Bearer token validation, mirrored in doctor output, and comprehensive unit test coverage.
Out of Scope Changes check ✅ Passed All changes are directly scoped to implementing multi-hop inference health probing for ollama-local and vllm-local providers, with supporting infrastructure for test injection and health status propagation.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/3265-status-probe-auth-proxy

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Comment @coderabbitai help to get the list of available commands and usage tips.

const result = probeLocalProviderHealth("ollama-local", {
loadOllamaProxyTokenImpl: () => "test-token",
runCurlProbeImpl: (argv: string[]) => {
const isProxy = argv.some(
@github-actions

github-actions Bot commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: device-auth-health-e2e, gpu-double-onboard-e2e, cloud-e2e
Optional E2E: gpu-e2e, ollama-proxy-e2e, diagnostics-e2e, sandbox-survival-e2e, inference-routing-e2e, issue-2478-crash-loop-recovery-e2e

Dispatch hint: device-auth-health-e2e,gpu-double-onboard-e2e,cloud-e2e

Auto-dispatched E2E: device-auth-health-e2e, gpu-double-onboard-e2e, cloud-e2e via nightly-e2e.yaml at cb10802ae23ed101cb51365e1bb00aa7b52fb7f3

Workflow run

Full advisor summary

Pi Semantic E2E Advisor

Base: origin/main
Head: HEAD
Confidence: medium

Required E2E

  • device-auth-health-e2e: Most direct coverage of nemoclaw <name> status rendering and the gateway/inference health probe surface this PR rewrites. Exercises status both at steady state and during recovery, and explicitly asserts on the rendered output (no Offline / shows running indicators) — would catch a regression in printInferenceProbeLine or subprobe rendering.
  • gpu-double-onboard-e2e: Only existing E2E that lives in the Ollama auth-proxy + persisted ~/.nemoclaw/ollama-proxy-token regime that probeOllamaAuthProxyHealth now reads. Re-onboard rotates the proxy token, so a token-mismatch bug introduced by the new subprobe (e.g. wrong header, wrong port, false 401) would surface here. Runs nemoclaw <name> status after onboard, exercising the new ollama-local subprobes end-to-end.
  • cloud-e2e: Broad sanity for the status command on the cloud provider path (NVIDIA Endpoints). The PR refactors how the main provider-health probe is rendered for every provider, not just local. test-full-e2e.sh runs nemoclaw <sandbox> status and would catch a non-local rendering regression in printInferenceProbeLine / pushInferenceHealthCheck.

Optional E2E

  • gpu-e2e: Real Ollama backend on a GPU runner. Confirms the new Inference (ollama backend): + Inference (auth proxy): + Inference (gateway): lines all render against a live stack. Optional because gpu-double-onboard-e2e already exercises the ollama-local probe path.
  • ollama-proxy-e2e: Targeted Ollama auth-proxy E2E (token auth, persistence, recovery, container reachability) — the exact subsystem the new probeOllamaAuthProxyHealth subprobe inspects. Manual workflow_dispatch only, so optional.
  • diagnostics-e2e: Runs nemoclaw <name> status and credential/diagnostic flows. The new doctor rendering changes are not directly asserted, but a JSON-shape regression in checks[] or status output could surface here.
  • sandbox-survival-e2e: Runs nemoclaw <name> status across a gateway restart. The status path now triggers the new in-sandbox inference.local probe for local providers; even on cloud the rendering refactor runs.
  • inference-routing-e2e: Exercises invalid-key / unreachable-endpoint provider scenarios and inspects nemoclaw <name> status output. Useful confidence check that the new failureLabel / subprobe paths don't break classified-error rendering.
  • issue-2478-crash-loop-recovery-e2e: Exercises nemoclaw <name> status and curls https://inference.local/v1/models from inside the sandbox — the same endpoint the new probeSandboxInferenceGatewayHealth uses. Side coverage that the new subprobe matches reality during a real crash-loop recovery.

New E2E recommendations

  • sandbox-doctor-rendering (medium): There is no existing E2E that runs nemoclaw <name> doctor — only unit tests and per-flag scripts. The PR adds new subprobe lines and a gateway-chain check to doctor for local providers, but a doctor output regression would only be caught by unit tests until shipped.
    • Suggested test: test/e2e/test-doctor-output.sh — onboard a sandbox, run nemoclaw <name> doctor (text + --json), assert the Inference group contains a Provider health line and, for ollama-local, the gateway-chain subprobe; assert exit code 0 when healthy and 1 when the in-sandbox curl is forced to fail.
  • in-sandbox-inference-chain-probe (medium): The new probeSandboxInferenceGatewayHealth line in nemoclaw <name> status for ollama-local / vllm-local has no end-to-end assertion. Existing tests cover inference.local routing for chat completions but not the new Inference (gateway): ... full chain reachable status line.
    • Suggested test: Extend test-gpu-e2e.sh (or add a small ollama-status assertion section) to grep for Inference (gateway): and https://inference.local/v1/models in the status output after onboard, and to assert it goes to unreachable when the openclaw gateway is paused inside the sandbox.
  • ollama-auth-proxy-status-line (low): The persisted-token / 401 / connection-refused branches of probeOllamaAuthProxyHealth are unit-tested but the rendered Inference (auth proxy): unauthorized line is not asserted by any existing E2E. This is the exact symptom the change is trying to surface (proxy token rotation drift, [Ollama-local] Gateway routing proxy does not inject NEMOCLAW_OLLAMA_PROXY_TOKEN as Bearer on :11435 — silent hang on clean machine (continuation of #2519) #3198/nemoclaw status reports 'Inference: healthy' by probing Ollama directly on :11434 — bypasses auth proxy (:11435) and gateway #3265).
    • Suggested test: Extend test/e2e/test-ollama-auth-proxy-e2e.sh to corrupt ~/.nemoclaw/ollama-proxy-token after onboard, run nemoclaw <name> status, and assert the auth-proxy subprobe line reports unauthorized and points at nemoclaw onboard.

Dispatch hint

  • Workflow: nightly-e2e.yaml
  • jobs input: device-auth-health-e2e,gpu-double-onboard-e2e,cloud-e2e

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/lib/actions/sandbox/status.ts`:
- Around line 64-76: The status output currently defaults missing
probe.failureLabel to "unreachable", which mislabels auth-proxy 401s; update
printInferenceProbeLine to treat a 401 failure specially: when
probe.failureLabel is falsy and probe.failureCode === 401 (or probe.statusCode
=== 401 if that field is used), use "unauthorized" as the failure label instead
of "unreachable", then log that value (preserving existing formatting using
probe.endpoint); keep all other branches (probed/ok) unchanged and only alter
the final console.log fallback to use the computed failure label.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 52f74bc0-9b26-452b-ba26-6447fd50a9c5

📥 Commits

Reviewing files that changed from the base of the PR and between 9bf3f8d and 387035d.

📒 Files selected for processing (5)
  • src/lib/actions/sandbox/doctor.ts
  • src/lib/actions/sandbox/status.ts
  • src/lib/inference/health.ts
  • src/lib/inference/local.test.ts
  • src/lib/inference/local.ts

Comment on lines +64 to +76
function printInferenceProbeLine(probe: ProviderHealthStatus): void {
const label = probe.probeLabel ? `Inference (${probe.probeLabel})` : "Inference";
if (!probe.probed) {
console.log(` ${label}: ${D}not probed${R} (${probe.detail})`);
return;
}
if (probe.ok) {
console.log(` ${label}: ${G}healthy${R} (${probe.endpoint})`);
return;
}
console.log(
` ${label}: ${RD}${probe.failureLabel || "unreachable"}${R} (${probe.endpoint})`,
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Render auth-proxy 401 as unauthorized instead of unreachable.

Failed probes without failureLabel currently default to unreachable, so token rejection (HTTP 401) is misclassified in status output.

Suggested patch
 function printInferenceProbeLine(probe: ProviderHealthStatus): void {
   const label = probe.probeLabel ? `Inference (${probe.probeLabel})` : "Inference";
@@
-  console.log(
-    `    ${label}: ${RD}${probe.failureLabel || "unreachable"}${R} (${probe.endpoint})`,
-  );
+  const inferredFailureLabel =
+    probe.failureLabel ??
+    (/(\bHTTP\s*401\b|\breturned 401\b)/i.test(probe.detail) ? "unauthorized" : "unreachable");
+  console.log(`    ${label}: ${RD}${inferredFailureLabel}${R} (${probe.endpoint})`);
   console.log(`      ${probe.detail}`);
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/lib/actions/sandbox/status.ts` around lines 64 - 76, The status output
currently defaults missing probe.failureLabel to "unreachable", which mislabels
auth-proxy 401s; update printInferenceProbeLine to treat a 401 failure
specially: when probe.failureLabel is falsy and probe.failureCode === 401 (or
probe.statusCode === 401 if that field is used), use "unauthorized" as the
failure label instead of "unreachable", then log that value (preserving existing
formatting using probe.endpoint); keep all other branches (probed/ok) unchanged
and only alter the final console.log fallback to use the computed failure label.

@cjagwani cjagwani self-assigned this May 14, 2026
Adds `probeLabel: "ollama backend"` / `"vllm backend"` to the backend
probe so status renders `Inference (ollama backend): healthy …`
instead of plain `Inference: healthy …`. This matches the literal
"Proposed change" output in #3265 and lets the new
`Inference (auth proxy):` subprobe line render in parallel.

Updates the test/cli.test.ts:4742 assertion to expect the qualified
label. nvidia-prod and other remote providers keep the unqualified
`Inference:` line (no `probeLabel`).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Test User <test@example.com>
@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 25838941649
Target ref: 387035d25d9b4e507821063d24c771d974ae5ace
Workflow ref: main
Requested jobs: gpu-double-onboard-e2e,diagnostics-e2e
Summary: 1 passed, 0 failed, 1 skipped

Job Result
diagnostics-e2e ✅ success
gpu-double-onboard-e2e ⏭️ skipped

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ⚠️ No requested jobs ran

Run: 25839418170
Target ref: 5488a6656858eb837735d7bc36c15771ead5cff0
Workflow ref: main
Requested jobs: gpu-e2e,gpu-double-onboard-e2e
Summary: 0 passed, 0 failed, 2 skipped

Job Result
gpu-double-onboard-e2e ⏭️ skipped
gpu-e2e ⏭️ skipped

Closes the optional 3rd line in #3265's "Proposed change". After the
backend and auth-proxy probes, status (and doctor) now also probes
`https://inference.local/v1/models` from inside the sandbox via
`openshell sandbox exec`. This confirms the full chain — openclaw
gateway → auth proxy → backend — that the agent actually uses.

Any HTTP response (including 401) means routing works, so a missing
bearer at the gateway boundary doesn't masquerade as a chain break.
000 / no response means DNS, proxy, or gateway is dead. The probe is
gated to local providers (ollama-local / vllm-local) and to the
present-gateway state to avoid spurious sandbox-exec calls on a
stopped sandbox. Returns null (line omitted) if the sandbox exec
itself fails — keeps the line off when there's nothing meaningful to
report.

Added `probeSandboxInferenceGatewayHealth` to process-recovery.ts
alongside `isSandboxGatewayRunningForStatus` since both use the same
`executeSandboxExecCommandForStatus` plumbing. Five unit tests mock
the exec path for 200 / 401 / 000 / null / status!=0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Test User <test@example.com>
…3498)

CodeRabbit (status.ts:79) flagged that a 401 from the auth proxy was
defaulting to `unreachable` in the status output because
`probeOllamaAuthProxyHealth` never set `failureLabel`. Token rejection
is a distinct failure mode from connection refused, so it now
explicitly returns `failureLabel: "unauthorized"`.

- Extends `failureLabel` union in `LocalProviderHealthStatus` and
  `ProviderHealthStatus` to include `"unauthorized"`.
- Sets `failureLabel: "unauthorized"` for HTTP 401, `"unreachable"`
  for connection-refused (httpStatus 0), `"unhealthy"` for other
  non-2xx responses.
- `localToProviderHealth` in health.ts propagates the new field.
- Two tests in `local.test.ts` (the 401 and refused subprobe cases)
  now assert on `failureLabel` directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Test User <test@example.com>
@cjagwani cjagwani added bug provider: ollama Ollama local model provider behavior labels May 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ⚠️ No requested jobs ran

Run: 25839609393
Target ref: 26f921988b4c97cb944225b83165ff7c49154678
Workflow ref: main
Requested jobs: gpu-e2e,gpu-double-onboard-e2e,device-auth-health-e2e,diagnostics-e2e
Summary: 0 passed, 0 failed, 2 skipped

Job Result
device-auth-health-e2e ⚠️ cancelled
diagnostics-e2e ⚠️ cancelled
gpu-double-onboard-e2e ⏭️ skipped
gpu-e2e ⏭️ skipped

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 25839769483
Target ref: c09f8f1f96dca33150f437040071c3939df6a173
Workflow ref: main
Requested jobs: gpu-e2e,sandbox-operations-e2e
Summary: 1 passed, 0 failed, 1 skipped

Job Result
gpu-e2e ⏭️ skipped
sandbox-operations-e2e ✅ success

@cjagwani
cjagwani requested a review from cv May 14, 2026 04:17
…3498)

CodeRabbit re-flagged the `|| "unreachable"` fallback on the
printInferenceProbeLine render path as misclassifying 401s. The
401 → "unauthorized" mapping IS already in place in
inference/local.ts:probeOllamaAuthProxyHealth (`failureLabel:
"unauthorized"`), and the test
`"surfaces 401 on the auth-proxy subprobe even when backend is
healthy"` covers it. Add an inline comment so the upstream contract
is obvious at the render site and CR re-reviews stop re-flagging it.

Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 25841607316
Target ref: cb10802ae23ed101cb51365e1bb00aa7b52fb7f3
Workflow ref: main
Requested jobs: device-auth-health-e2e,gpu-double-onboard-e2e,cloud-e2e
Summary: 2 passed, 0 failed, 1 skipped

Job Result
cloud-e2e ✅ success
device-auth-health-e2e ✅ success
gpu-double-onboard-e2e ⏭️ skipped

@cv
cv merged commit a78ea16 into main May 14, 2026
21 checks passed
@cjagwani
cjagwani requested a review from cv May 14, 2026 05:05
@wscurran wscurran added area: cli Command line interface, flags, terminal UX, or output area: local-models Local model providers, downloads, launch, or connectivity area: observability Logging, metrics, tracing, diagnostics, or debug output area: providers Inference provider integrations and provider behavior bug-fix PR fixes a bug or regression and removed Local Models labels Jun 3, 2026
@cv
cv deleted the fix/3265-status-probe-auth-proxy branch June 28, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output area: local-models Local model providers, downloads, launch, or connectivity area: observability Logging, metrics, tracing, diagnostics, or debug output area: providers Inference provider integrations and provider behavior bug-fix PR fixes a bug or regression provider: ollama Ollama local model provider behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nemoclaw status reports 'Inference: healthy' by probing Ollama directly on :11434 — bypasses auth proxy (:11435) and gateway

4 participants