refactor(onboard): extract provider menu builder#5165
Conversation
|
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 as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR extracts inference provider menu construction from inline logic in ChangesInference Provider Menu Centralization
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)
Comment |
PR Review AdvisorFindings: 0 needs attention, 0 worth checking, 0 nice ideas Consider writing more tests for
This is an automated advisory review. A human maintainer must make the final merge decision. |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Auto-dispatched E2E: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
Vitest E2E Scenario RecommendationRequired Vitest E2E scenarios: Dispatch required Vitest E2E scenarios:
Full Vitest E2E advisor summaryVitest E2E Scenario AdvisorBase: Required Vitest E2E scenarios
Optional Vitest E2E scenarios
Relevant changed files
|
|
❌ Brev E2E (full): FAILED on branch |
Selective E2E Results — ✅ All requested jobs passedRun: 27300503612
|
|
Validation update for head This supersedes the stale Brev E2E failure comment from run https://github.com/NVIDIA/NemoClaw/actions/runs/27299932077. That run was from the pre-fix smoke-harness head and is no longer representative of the PR. Current state:
Local validation also passed for Biome format/lint on touched files, Remaining GitHub blocker is expected branch protection / human review ( |
|
Stack update: opened draft PR #5171, What moved:
Coverage added:
Local validation on head
Known local environment note: full |
…nu-merge-update # Conflicts: # test/e2e/test-onboard-inference-smoke.sh
Selective E2E Results — ✅ All requested jobs passedRun: 27329386311
|
Summary
Extracts onboarding inference-provider menu composition from
src/lib/onboard.tsinto a focusedprovider-menuhelper. This keepssetupNimresponsible for live detection and provider dispatch while making provider menu ordering and agent-specific entries unit-testable.Related Issue
Refs #3802
Changes
src/lib/onboard/provider-menu.tsto build the inference provider option list from already-detected host/provider state.src/lib/onboard/provider-menu.test.tscoverage for base ordering, local provider entries, Model Router placement, Hermes Provider availability, and Windows-host Ollama menu behavior.src/lib/onboard.tswithbuildInferenceProviderMenu(...)without changing provider-selection branches.test-onboard-inference-smoke.shroot-registry stub so messaging hook registry imports keep their realMessagingHookRegistryclass.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesnpm run docsbuilds without warnings (doc changes only)Local verification run:
npx @biomejs/biome format --write src/lib/onboard.ts src/lib/onboard/provider-menu.ts src/lib/onboard/provider-menu.test.tsnpx @biomejs/biome lint src/lib/onboard.ts src/lib/onboard/provider-menu.ts src/lib/onboard/provider-menu.test.tsnpm run build:clinpx vitest run src/lib/onboard/provider-menu.test.ts src/lib/onboard/vllm-menu.test.ts src/lib/onboard/ollama-install-menu.test.tsnpm run typecheck:clinpx vitest run test/onboard.test.tsnpx prek run shfmt shellcheck --files test/e2e/test-onboard-inference-smoke.shbash test/e2e/test-onboard-inference-smoke.shgit diff --checkLocal caveat:
npx prek run --all-filesandnpm test -- --exclude test/release-latest-tag.test.tsboth reachedtest/release-latest-tag.test.tsand failed there because fixture commits inherit the local missing SSH signing key (No private key found for public key /home/cvillela/.ssh/git-signing-key.pub). No release-tag test files were changed.Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit