Skip to content

fix(inference): skip Hermes Provider host smoke check#4385

Open
shannonsands wants to merge 1 commit into
NVIDIA:mainfrom
NousResearch:ns322/fix-hermes-provider-smoke
Open

fix(inference): skip Hermes Provider host smoke check#4385
shannonsands wants to merge 1 commit into
NVIDIA:mainfrom
NousResearch:ns322/fix-hermes-provider-smoke

Conversation

@shannonsands
Copy link
Copy Markdown

@shannonsands shannonsands commented May 28, 2026

Summary

Skip the host-side direct OpenAI-compatible smoke probe for Hermes Provider onboarding. Hermes Provider OAuth stores the minted agent key in OpenShell provider storage, so probing the upstream endpoint with the ambient host OPENAI_API_KEY can falsely fail after successful OAuth.

Changes

  • Exclude hermes-provider from shouldSmokeOpenAiLikeOnboardRoute so onboarding relies on the OpenShell inference route instead of a host credential probe.
  • Add a regression test proving Hermes Provider is skipped while ordinary OpenAI-compatible providers still smoke-check.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Verification

  • npm run build:cli passes
  • npx vitest run src/lib/inference/onboard-probes.test.ts -t "host-smoke Hermes Provider" passes
  • npm run typecheck:cli passes
  • npx @biomejs/biome check src/lib/inference/onboard-probes.ts src/lib/inference/onboard-probes.test.ts passes
  • git diff --check passes
  • npm test was attempted locally; the changed probe suite passed, but the full run failed with unrelated host/tool timeout failures on this machine.
  • Pre-commit/pre-push hooks were attempted; lint/security/typecheck gates passed, but the CLI coverage hook hit the same local timeout instability and was bypassed for this draft push.
  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • make docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Test User test@example.com

Summary by CodeRabbit

  • Bug Fixes

    • Fixed inference validation for the Hermes OAuth provider to correctly handle provider-specific authentication without interference from ambient API keys.
  • Tests

    • Added test coverage for API key handling validation across different inference providers.

Review Change Stack

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 28, 2026

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
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

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: 5de164bd-7579-458d-bc0a-b2534a035e5e

📥 Commits

Reviewing files that changed from the base of the PR and between 1daf081 and aa5a273.

📒 Files selected for processing (2)
  • src/lib/inference/onboard-probes.test.ts
  • src/lib/inference/onboard-probes.ts

📝 Walkthrough

Walkthrough

The PR adds a special-case check in shouldSmokeOpenAiLikeOnboardRoute to return false for hermes-provider, preventing host-side inference smoke validation that could incorrectly fall back to ambient API keys. A corresponding unit test validates the expected behavior for both Hermes and OpenAI providers. Import order in the test file is adjusted for consistency.

Changes

Hermes Provider Smoke Test Bypass

Layer / File(s) Summary
Hermes provider special case in probe validation
src/lib/inference/onboard-probes.ts
Function shouldSmokeOpenAiLikeOnboardRoute returns false early for hermes-provider to skip smoke testing that relies on ambient OPENAI_API_KEY, since Hermes OAuth stores short-lived keys in provider storage.
Test and imports for Hermes probe behavior
src/lib/inference/onboard-probes.test.ts
New test case asserts shouldSmokeOpenAiLikeOnboardRoute returns false for hermes-provider and true for openai-api. Module imports reordered to place Vitest imports after Node built-ins.

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

fix, Integration: Hermes

Suggested reviewers

  • ericksoa
  • cv
  • jyaunches

Poem

🐰 Hermes hops with OAuth keys,
No ambient smoke tests, if you please,
Short-lived tokens stored with care,
The probe skips when Hermes is there! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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 directly addresses the main change: adding a special case to skip the host-side smoke check for Hermes Provider during onboarding.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@shannonsands shannonsands marked this pull request as ready for review May 28, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant