Skip to content

fix(inference): raise Gemini health probe budget (Fixes #10260) - #10311

Open
deepujain wants to merge 10 commits into
NVIDIA:mainfrom
deepujain:fix/10260-gemini-health-probe-budget
Open

fix(inference): raise Gemini health probe budget (Fixes #10260)#10311
deepujain wants to merge 10 commits into
NVIDIA:mainfrom
deepujain:fix/10260-gemini-health-probe-budget

Conversation

@deepujain

@deepujain deepujain commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Gives Gemini probes enough output budget for reasoning before acknowledgement while preserving ordinary and model-specific budgets across health, onboarding, retry, and sandbox readiness paths.

Fixes #10260

Changes

  • Centralize provider reply-budget ownership.
  • Preserve the 256-token Gemini budget through native, optimized, and timeout-retry paths.
  • Preserve DeepSeek V4 Pro's model-specific 8192-token budget.
  • Keep the 95-second readiness wrapper outside the 90-second request deadline.
  • Update command documentation and execute the generated shell-to-curl boundary in tests.

Verification

  • npm run build:cli, the nested nemoclaw build, and npm run validate:pr passed for commit 503b9bf2a against main fa08360a2.
  • The nine focused suites passed 296 tests with 1 intentional skip.
  • All ten commits are GitHub SSH-verified and DCO-signed.
  • GitHub reports the branch is 0 commits behind main.
  • No secrets or credentials are committed.

Remaining external blocker

Maintainer review requests credential-backed live proof through the real Hermes inference.local route. The repository currently has no Gemini live E2E lane or GEMINI_API_KEY workflow wiring to extend. Maintainer infrastructure and credentials are required for that proof.

Signed-off-by: Deepak Jain deepujain@gmail.com

@copy-pr-bot

copy-pr-bot Bot commented Aug 25, 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 Aug 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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: 454ea1b9-2ae4-46b8-8a05-ac7962bd96e9

📥 Commits

Reviewing files that changed from the base of the PR and between 6831ed2 and 69ac357.

📒 Files selected for processing (16)
  • docs/reference/commands.mdx
  • src/lib/actions/sandbox/inference-invocation-probe.test.ts
  • src/lib/actions/sandbox/inference-invocation-probe.ts
  • src/lib/actions/sandbox/start.test.ts
  • src/lib/actions/sandbox/status-inference.test.ts
  • src/lib/actions/sandbox/status-snapshot-inference-health.test.ts
  • src/lib/inference/health.test.ts
  • src/lib/inference/health.ts
  • src/lib/inference/max-tokens-field.test.ts
  • src/lib/inference/max-tokens-field.ts
  • src/lib/inference/onboard-probe-reply-budget.test.ts
  • src/lib/inference/onboard-probes.test.ts
  • src/lib/inference/onboard-probes.ts
  • src/lib/inference/openai-probe-models.ts
  • src/lib/onboard/inference-selection-validation.test.ts
  • src/lib/onboard/inference-selection-validation.ts
🚧 Files skipped from review as they are similar to previous changes (9)
  • src/lib/inference/onboard-probes.test.ts
  • src/lib/actions/sandbox/status-snapshot-inference-health.test.ts
  • src/lib/inference/max-tokens-field.test.ts
  • src/lib/inference/health.ts
  • src/lib/inference/health.test.ts
  • src/lib/actions/sandbox/start.test.ts
  • src/lib/actions/sandbox/status-inference.test.ts
  • src/lib/inference/max-tokens-field.ts
  • src/lib/actions/sandbox/inference-invocation-probe.ts

Included review availability: Your plan provides up to 12 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

Inference probes now use provider-specific reply-token budgets, including 256 tokens for Gemini. Sandbox request and readiness timeouts increase to 90 and 95 seconds. Health and onboarding tests verify payloads, retries, response validation, and documentation consistency.

Changes

Inference probe budgets

Layer / File(s) Summary
Shared budget and payload construction
src/lib/inference/max-tokens-field.ts, src/lib/inference/openai-probe-models.ts, src/lib/inference/*test.ts
Adds centralized provider budget resolution. Gemini uses 256 tokens. Other providers retain existing defaults, including DeepSeek V4 Pro’s 8192-token fallback.
Health and sandbox probe propagation
src/lib/inference/health.ts, src/lib/actions/sandbox/inference-invocation-probe.ts, src/lib/inference/health.test.ts, src/lib/actions/sandbox/*test.ts, docs/reference/commands.mdx
Propagates provider budgets through health and sandbox probes. Uses a 90-second request timeout and 95-second readiness timeout. Validates Gemini response content.
Onboarding budget wiring and validation
src/lib/inference/onboard-probes.ts, src/lib/inference/onboard-probe-reply-budget.test.ts, src/lib/onboard/inference-selection-validation.ts, src/lib/onboard/inference-selection-validation.test.ts
Propagates budgets through standard, retry, optimized, and smoke-validation onboarding paths. Preserves explicit model-specific budgets and adds Gemini request coverage.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to 69ac3

Gemini inference probes now receive a larger reply budget while malformed or empty responses remain rejected. No current merge-blocking risk is identified.

Sequence Diagram(s)

sequenceDiagram
  participant Onboarding
  participant BudgetResolver
  participant ProbePayload
  participant GeminiAPI
  Onboarding->>BudgetResolver: resolve provider and reply budget
  BudgetResolver-->>Onboarding: return 256 for gemini-api
  Onboarding->>ProbePayload: build Chat Completions request
  ProbePayload->>GeminiAPI: send max_tokens: 256
  GeminiAPI-->>Onboarding: return probe response
Loading

Suggested reviewers: apurvvkumaria, brandonpelfrey

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Most changes support provider-specific Gemini probe budgets, but the PR also increases the readiness timeout from 30 seconds to 95 seconds and introduces a 90-second request timeout. The linked issue … Remove the readiness and request timeout changes, or provide explicit issue requirements and justification showing why the timeout changes are necessary for issue #10260.
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 16 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy issue #10260 by assigning Gemini probes a 256-token reply budget while retaining 16 tokens for other providers. The implementation covers host and in-sandbox health probes, retries…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: increasing the Gemini inference health probe budget. It is concise and includes the related issue reference.
Full details: Out of Scope Changes check

Explanation

Most changes support provider-specific Gemini probe budgets, but the PR also increases the readiness timeout from 30 seconds to 95 seconds and introduces a 90-second request timeout. The linked issue requires a higher Gemini output budget and states that timeout validation remains unchanged. These timeout changes are not supported by the stated issue objective.

Full details: Docstring Coverage

Explanation

Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 16 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@deepujain
deepujain force-pushed the fix/10260-gemini-health-probe-budget branch from ce2df2e to 4e8c3d3 Compare August 25, 2026 23:47

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed exact head 4e8c3d3.

Approved. The accepted QA issue #10260 establishes scope, and the implementation is the smallest provider-specific correction: Gemini chat-completions health probes receive a 256-token output ceiling, while every non-Gemini path retains the 16-token probe. Host and in-sandbox probes agree, and malformed, empty, error-envelope, credential, timeout, endpoint, and response-size behavior remains fail-closed.

Security review:

  1. Secrets and credentials: PASS — credentials remain in the existing trusted auth-config or OpenShell route boundary and are not added to argv or diagnostics.
  2. Input validation and sanitization: PASS — response bodies still require a structurally valid Chat Completions result; null-only Gemini content remains unhealthy.
  3. Authentication and authorization: PASS — existing Bearer/auth-config and recorded-gateway authority are unchanged.
  4. Dependencies: PASS — no dependency changes.
  5. Error handling and logging: PASS — response and credential values are not surfaced in returned diagnostics.
  6. Cryptography and data protection: PASS — not applicable; no cryptographic operations changed.
  7. Configuration and security headers: PASS — endpoint, headers, timeout, and response-size limits are unchanged.
  8. Security testing: PASS — the exact focused suite passed 90/90 and covers the Gemini payload plus strict invalid-response rejection.
  9. Holistic security posture: PASS — no SSRF, network-policy, sandbox, privilege, or credential-custody surface is widened.

Files reviewed: src/lib/actions/sandbox/inference-invocation-probe.ts and test, src/lib/inference/health.ts and test, and src/lib/inference/max-tokens-field.ts. All three commits are GitHub Verified. No actionable findings.

This approval does not waive merge gates: NVIDIA external-contributor vetting still must authorize the normal workflows, required CI must pass, and the failed PR Review Advisor infrastructure run should be rerun or explicitly handled by a maintainer.

@deepujain
deepujain force-pushed the fix/10260-gemini-health-probe-budget branch from 4e8c3d3 to 553c51e Compare August 28, 2026 07:07
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@deepujain
deepujain force-pushed the fix/10260-gemini-health-probe-budget branch from 553c51e to 71d7167 Compare August 28, 2026 13:46
@wscurran wscurran added area: inference Inference routing, serving, model selection, or outputs area: providers Inference provider integrations and provider behavior bug-fix PR fixes a bug or regression labels Aug 28, 2026
@deepujain
deepujain force-pushed the fix/10260-gemini-health-probe-budget branch from 71d7167 to d9875ed Compare August 28, 2026 22:35
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@deepujain
deepujain force-pushed the fix/10260-gemini-health-probe-budget branch 3 times, most recently from d3800aa to 4a77d52 Compare August 30, 2026 04:37
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@deepujain
deepujain force-pushed the fix/10260-gemini-health-probe-budget branch from 4a77d52 to cceae79 Compare August 30, 2026 22:03

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P1 gate blocker] Refresh this branch on current main before merge.

Exact-head rereview of cceae798e55728552c1eeac1448c3410a52ec8d7 found the five-file patch byte-for-byte identical to the previously approved 4a77d521cdebb4ac918939d24d67b0f29611df53; no code or security regression was introduced. npm run build:cli, npm run typecheck:cli, diff hygiene, and 110 focused CLI assertions pass. All nine exact-head Advisor artifacts report no finding, CodeRabbit has no current actionable thread, both replacement commits are GitHub Verified, and both carry Signed-off-by declarations.

The current head was rebuilt on 1f90124e0f416139cbcc9745b6c236adc62f4433, but main advanced to 8708e19b1ff01590ab1147341dadb5f0c7b921e8 when #10515 merged before this CI run. The governance check intentionally evaluates BASE_SHA..HEAD_SHA, so this exact head deterministically fails three growth assertions on base-only files outside the five-file PR diff. This is not an infrastructure-only rerun candidate.

Impact: the current head is blocked and cannot satisfy the green-gate requirement. Smallest safe fix: rebase the unchanged five-file patch onto current main, preserve signed and Verified commits, and let normal DCO, CodeQL, required CI, and governance checks rerun. Regression evidence: the growth guard and every required gate must be green on the resulting exact head.

Nine-category security verdict: PASS secrets/credentials, input validation/sanitization, authentication/authorization, dependencies, error handling/logging, cryptography/data protection, configuration/security headers, security testing, and holistic security posture. No source-line blocker was found; this request is solely for the deterministic current-base gate failure.

@deepujain
deepujain force-pushed the fix/10260-gemini-health-probe-budget branch 4 times, most recently from 353b97d to 87bfed5 Compare August 31, 2026 05:59
Comment thread src/lib/inference/max-tokens-field.ts Outdated
Comment thread src/lib/actions/sandbox/inference-invocation-probe.ts Outdated
Comment thread src/lib/inference/health.ts Outdated

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed exact head 87bfed5c7c55bf6f7a4f13cf7c1790392c8bce8b.

The accepted QA issue #10260 establishes scope, and the runtime behavior remains narrow: Gemini gets a 256-token probe budget while strict response validation, credential custody, fixed endpoints, bounded output, and non-Gemini budgets remain intact. The detached exact-head build and CLI typecheck pass; 91 focused CLI assertions pass; diff hygiene is clean. Both rewritten commits are GitHub Verified and carry Signed-off-by declarations. CodeRabbit has no current actionable thread.

REQUEST_CHANGES is for the three exact-line current-head Advisor findings: centralize the provider-to-budget policy, pass the override through the existing Chat Completions payload owner instead of reparsing generated curl argv, and correct the inaccurate budget rationale. Smallest fixes and required regressions are in the inline comments. I did not authorize NVIDIA runner workflows while code blockers remain.

Nine-category security verdict:

  1. Secrets/credentials: PASS — no credential is added to argv, payload logs, or sandbox commands.
  2. Input validation/sanitization: PASS — malformed, error-envelope, and empty Gemini replies remain unhealthy.
  3. Authentication/authorization: PASS — existing trusted auth-config and OpenShell route authority are unchanged.
  4. Dependencies/third-party: WARNING — no package change, but the new argv reparse duplicates the existing payload-builder capability.
  5. Error handling/logging: PASS — bounded response handling and redacted fixed diagnostics remain intact.
  6. Cryptography/data protection: PASS/N/A — no cryptographic operation changes.
  7. Configuration/security headers: PASS — endpoints, auth headers, response limit, and network policy are unchanged.
  8. Security testing: PASS — exact-head focused coverage is green; requested builder/resolver tests protect the remaining ownership fixes.
  9. Holistic posture: WARNING — duplicated provider-budget policy can let host and sandbox health behavior drift and recreate the false-unhealthy failure.

@deepujain
deepujain force-pushed the fix/10260-gemini-health-probe-budget branch from 9f9fb16 to 4c38d00 Compare August 31, 2026 07:21

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewing exact head 4c38d00. The three prior ownership/rationale findings are resolved, but two current blockers remain: the Gemini reply budget still does not reach the actual onboarding or optimized-validation smoke paths, and the sandbox regression inspects generated shell text instead of executing the request boundary.

Scope is accepted by #10260. All nine PR Review Advisor artifacts completed: Behavior, Architecture, and Operations converge on the onboarding gap; Test Design flags the source-shape regression; the other specialists found no additional blocker. CodeRabbit has no actionable current-head feedback. All three commits are GitHub Verified and include Signed-off-by declarations. Normal required CI, CodeQL, and DCO workflows are absent/skipped behind external-contributor validation, so this head cannot be approved yet.

Exact-head verification in an isolated detached worktree: npm ci prepare/build passed; CLI type-check passed; focused tests passed 166 with 1 skipped; source-shape scan and diff hygiene passed.

Security categories: secrets PASS; input validation PASS; authentication/authorization PASS; dependencies PASS; error handling/logging WARNING (valid Gemini onboarding can still abort false-unhealthy); cryptography/data protection PASS; configuration PASS; security testing FAIL (missing executed onboarding/sandbox boundary regression); holistic review FAIL until the split onboarding budget authority is removed.

Comment thread src/lib/inference/onboard-probes.ts Outdated
Comment thread src/lib/actions/sandbox/inference-invocation-probe.test.ts Outdated

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed exact head 69ac357ae6538b0c664a7d91ca2f0981dad9ff35 against current base 6831ed251641b6885939deef6dd34bf3e10266b0.

The rebase is patch-for-patch identical to the previously reviewed series. The prior source blockers remain resolved. Local exact-head validation passed 278 focused assertions (one platform skip); all 10 commits are Verified and signed off; CodeRabbit is clean; the nine-category source security review passed.

[P1] Required exact-head CI cannot run for this fork (maintainer-owned). The openshell-sdk-package job fails with “The reviewed OpenShell SDK is available only to same-repository pull requests,” and cli-tests then fails before its shards run. Impact: required CI cannot produce approval evidence for this head, even though the patch is locally clean. Smallest safe next action: a NemoClaw maintainer should port this already-reviewed, patch-equivalent change to a same-repository branch/PR with signed and GitHub-Verified history, or provide an approved trusted fork-compatible SDK packaging path. Regression proof: the OpenShell SDK package gate, CLI tests, DCO, CodeQL, and the required PR/E2E gates must all pass on that exact head and base.

This blocker is in the repository workflow boundary, not a changed source line, so there is no honest inline location to attach it to.

payload: {
model: input.model,
[resolveMaxTokensField(input.model)]: MIN_PROBE_REPLY_TOKENS,
[resolveMaxTokensField(input.model)]: resolveProbeReplyTokens(input.provider),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P1] Add runtime proof for the changed Gemini route

Impact: this changes the real Hermes status/start request through inference.local, but current tests replace curl or inject a successful executor. They can pass while OpenShell rejects the 256-token payload or the 95-second wrapper cancels the real request; the exact boundary from #10260 remains unproved.

Smallest safe fix: add or extend a credential-backed live E2E lane that onboards Hermes with gemini-api / gemini-2.5-flash and invokes normal status or start. Regression proof: observe a healthy result or zero exit through the actual inference.local route, fail with the former 16-token budget, and fail if the wrapper ends before the 90-second request deadline.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The requested credential-backed proof cannot be produced independently on this fork: the repository has no Gemini live E2E lane or GEMINI_API_KEY workflow wiring, and external-contributor workflows cannot access maintainer secrets. The exact request boundary is exercised with a controlled curl consumer, including the 256-token payload and 90/95-second deadline relationship. I am leaving this thread open for maintainer-owned credentialed validation rather than adding a lane that cannot execute.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Confirmed as an external validation blocker on current head 65a9ca8. The repository has no credential-backed Gemini live E2E lane or GEMINI_API_KEY workflow wiring to extend. I will not fabricate runtime evidence or add an unexecutable secret-dependent lane. The exact head passes validate:pr and exercises the shell-to-curl boundary locally; maintainer infrastructure is still required to prove the real inference.local route with Gemini credentials.

@deepujain
deepujain force-pushed the fix/10260-gemini-health-probe-budget branch from 69ac357 to d700948 Compare September 3, 2026 21:22

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed exact head d700948e5070688f878df28d63d4bbe56d33be5f against live base 3d754417b5f07f9ed61ff709c5bb107aaffff1dc.

The 10-commit patch series is patch-for-patch identical to the reviewed 69ac357a series. Local exact-head validation again passes 278 focused assertions with one platform skip; diff hygiene is clean; all commits are signed off and GitHub Verified; the source/security verdict remains PASS.

[P1] This refresh is already behind the live base. Its merge base is 6831ed25, not 3d754417. The trusted growth guard therefore compares base-only E2E changes as regressions and deterministically fails. Impact: this head cannot satisfy the current-base governance gate. Smallest safe fix: rebase the unchanged patch onto current main and preserve signed, Verified history. Regression proof: the growth guard must pass on the resulting exact head/base.

The existing P1 runtime-evidence blocker also remains: the real Hermes → inference.local → Gemini status/start path is still not covered; the current tests use fake curl or injected executors. Add or extend credential-backed live E2E coverage that proves the normal route with gemini-api / gemini-2.5-flash.

Finally, normal CI still cannot validate this fork because the trusted OpenShell SDK package is restricted to same-repository PRs. After the source/test blockers are resolved, a maintainer must port the patch to a compliant same-repository branch/PR, or approve a trusted fork-compatible packaging path, and obtain all required green gates on that exact head.

@deepujain

Copy link
Copy Markdown
Contributor Author

Addressed the exact-head merge-gate blocker by refreshing the unchanged patch onto current main at 6831ed251; exact head is d700948e5. Revalidated 278 focused assertions with one platform skip, typecheck, formatting, DCO, and GitHub-verified signatures. Normal fork workflows now require vetter approval on this new head.

@cjagwani

cjagwani commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Thanks—the branch is not on current main. Live main and the PR base are now 3d754417, while git merge-base 3d754417 d700948e is 6831ed25; this head therefore excludes #11001. That is why the trusted growth guard reports base-only Hermes Discord assertion differences.

Please refresh again after verifying the live base OID immediately before the push. That resolves only the current-base blocker; the Gemini live runtime-evidence requirement and the fork-only OpenShell SDK CI boundary remain.

@deepujain
deepujain force-pushed the fix/10260-gemini-health-probe-budget branch from d700948 to 65a9ca8 Compare September 3, 2026 22:08
payload: {
model: input.model,
[resolveMaxTokensField(input.model)]: MIN_PROBE_REPLY_TOKENS,
[resolveMaxTokensField(input.model)]: resolveProbeReplyTokens(input.provider),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P1] The current-base refresh fixes the growth gate, but this runtime proof is still missing.

Impact: tests replace curl or inject a successful executor, so they can pass while the real Hermes status/start request fails across OpenShell and inference.local—the exact boundary reported by #10260.

Smallest safe fix: add or extend credential-backed live E2E coverage for gemini-api / gemini-2.5-flash through the normal status or start path. Regression proof: observe healthy or zero exit through the actual inference.local route, fail with the former 16-token budget, and fail if the wrapper ends before the 90-second request deadline.

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed exact head 65a9ca82847a17a268506e74f99cc3c596744992 against current base 3d754417b5f07f9ed61ff709c5bb107aaffff1dc.

The current-base blocker is fixed and the codebase growth guard now passes. The refreshed series is behavior-equivalent to the previously reviewed patch. Local exact-head validation passes 278 focused assertions with one platform skip; diff hygiene is clean; all 10 commits are signed off and GitHub Verified; CodeRabbit is clean; and the nine-category source security review remains PASS.

[P1] The reported production boundary still lacks regression proof. The current tests replace curl, use a local fake HTTP server, or inject a successful executor. They therefore do not prove the real Hermes → normal start/status → OpenShell → https://inference.local → Gemini route from #10260. Impact: the suite can pass while the original Ready-sandbox failure still occurs. Smallest safe fix: add or extend credential-backed live E2E coverage for gemini-api / gemini-2.5-flash through the normal status or start path. Regression proof: observe a healthy/zero result through the actual route, fail with the former 16-token budget, and fail if the wrapper ends before the 90-second request deadline. The exact-line comment identifies the relevant runtime call site.

The same-repository CI boundary also remains maintainer-owned: this fork cannot obtain the trusted OpenShell SDK package. Once the runtime coverage is present, a maintainer must port the reviewed patch to a compliant same-repository branch/PR or approve a trusted fork-compatible packaging path, then obtain all required green gates on that exact head. The current-head PR Review Advisor run is still in progress.

@deepujain
deepujain force-pushed the fix/10260-gemini-health-probe-budget branch from 65a9ca8 to e0b5ca5 Compare September 4, 2026 02:33
@deepujain

Copy link
Copy Markdown
Contributor Author

Rebased the unchanged patch onto current main at 2afbb2f09; exact head is e0b5ca558. npm run validate:pr passes, and every commit has valid GitHub verification and DCO sign-off. The credential-backed Gemini runtime proof remains an external maintainer gate.

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed exact head e0b5ca5 against live base 2afbb2f.

The refreshed patch is behavior-equivalent to the previously reviewed series. Local exact-head verification passed the CLI and plugin builds, CLI typecheck, repository structural checks, strict docs build, diff hygiene, and 278 focused assertions with one platform skip. All 10 commits are signed off and GitHub Verified. CodeRabbit has no actionable current-head finding. After one infrastructure-only retry of confirmed provider-rate-limit failures, all nine PR Review Advisor specialists completed; no specialist found a current blocking source defect.

[P1] The reported production boundary still lacks exact-head live regression proof. The checked-in tests replace curl, use a local HTTP server, or inject an executor, so they do not prove the real Hermes start/status through OpenShell and https://inference.local to Gemini from #10260. The existing current exact-line thread remains the canonical blocker: #10311 (comment). Impact: the suite can pass while the original Ready-sandbox false-unhealthy failure remains. Smallest safe next action: an authorized maintainer must run credential-backed live validation for gemini-api / gemini-2.5-flash through the normal lifecycle path. Regression proof: healthy status through the actual route on this exact head, with the former 16-token budget and an outer deadline shorter than the 90-second request both demonstrated to fail.

[P2] Six required checks are absent on this fork: checks, check-hash, changes, commit-lint, dco-check, and E2E / PR Gate; package-openshell-sdk is skipped. An authorized maintainer must permit the normal external-contributor workflows or port the reviewed patch to a compliant same-repository branch, then obtain every required green gate on the same exact head.

Nine-category security verdict: PASS for secrets and credentials, input validation, authentication and authorization, dependencies, error handling and logging, cryptography and data protection, configuration, security testing of the checked-in boundaries, and holistic posture. The Advisor architecture note about future provider-extension ownership is nonblocking because it identifies no current contract failure. No contributor branch was modified.

@deepujain
deepujain force-pushed the fix/10260-gemini-health-probe-budget branch 2 times, most recently from 6e6e90b to 530375e Compare September 4, 2026 11:44
@deepujain

Copy link
Copy Markdown
Contributor Author

Rebased the unchanged patch onto current main d6e8543; exact head is 530375e. npm run validate:pr passes after rebuilding the nested workspace output. Current Advisor failures exhausted five provider retries with HTTP 429, no body, and zero review output; NVIDIA workflow approvals remain external. The credential-backed Gemini runtime proof remains blocked on a maintainer-provided secret-backed lane.

@deepujain

Copy link
Copy Markdown
Contributor Author

Latest PR commit 530375e now has all nine Advisor specialists, CodeRabbit, and source guardrails passing. The nested plugin build and npm run validate:pr also pass against main d6e8543. Credential-backed Gemini proof through the real inference.local route remains blocked on a maintainer-provided secret-backed lane, and fork workflows require NVIDIA vetter approval.

@deepujain

Copy link
Copy Markdown
Contributor Author

Resolved the commands.mdx rebase conflict by preserving current main retry documentation and the PR start-probe budget contract. Latest PR commit 54b686f passes npm run build:cli, CLI typecheck, 42 focused tests, the nested nemoclaw build, and npm run validate:pr. Eight Advisor specialists passed; Verification evidence timed out after 900 seconds with zero output, and credential-backed Gemini runtime proof still requires maintainer infrastructure.

@deepujain

Copy link
Copy Markdown
Contributor Author

Final base-churn refresh: rebased cleanly onto main 58732cf; exact head is abee088. npm run build:cli, the nested nemoclaw build, and npm run validate:pr pass. Credential-backed Gemini runtime proof remains maintainer-infrastructure gated.

@deepujain

Copy link
Copy Markdown
Contributor Author

Captured-tip refresh: rebased onto main d99d1dc; exact head 63edced passes npm run build:cli, the nested nemoclaw build, and npm run validate:pr. Credential-backed Gemini runtime proof remains maintainer-infrastructure gated.

Fixes NVIDIA#10260

Signed-off-by: Deepak Jain <deepujain@gmail.com>
Fixes NVIDIA#10260

Signed-off-by: Deepak Jain <deepujain@gmail.com>
Fixes NVIDIA#10260

Signed-off-by: Deepak Jain <deepujain@gmail.com>
Fixes NVIDIA#10260

Signed-off-by: Deepak Jain <deepujain@gmail.com>
Fixes NVIDIA#10260

Signed-off-by: Deepak Jain <deepujain@gmail.com>
Signed-off-by: Deepak Jain <deepujain@gmail.com>
Derive the Gemini reply budget inside probeOpenAiLikeEndpointOptimized
so onboarding callers only pass provider identity. Replace the mocked
smoke regression with real optimized HTTP payload assertions for Gemini
256, ordinary 16, and DeepSeek 8192 budgets.

Fixes NVIDIA#10260

Signed-off-by: Deepak Jain <deepujain@gmail.com>
Centralize onboarding reply-budget resolution and pass the resolved
budget through doubled-timeout chat-completions retries.

Fixes NVIDIA#10260

Signed-off-by: Deepak Jain <deepujain@gmail.com>
Keep the architecture budget aligned with the reduced dependency count.

Signed-off-by: Deepak Jain <deepujain@gmail.com>
Restore direct policy imports and document provider-specific budgets so
runtime behavior and operator guidance stay aligned.

Signed-off-by: Deepak Jain <deepujain@gmail.com>
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit 503b9bf. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

All previous runs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: inference Inference routing, serving, model selection, or outputs area: providers Inference provider integrations and provider behavior bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Linux/WSL][Inference] Gemini route health probe reports invalid response body for Ready Hermes sandbox

3 participants