fix: align auth profile provider key with openclaw.json model config#1400
fix: align auth profile provider key with openclaw.json model config#1400Kash6 wants to merge 4 commits intoNVIDIA:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughBuild-time defaults and runtime propagation for the NemoClaw provider/model were changed from a hardcoded Changes
Sequence Diagram(s)sequenceDiagram
participant Builder as Docker Build
participant Container as Runtime Container
participant StartScript as nemoclaw-start.sh
participant OpenClaw as ~/.openclaw/openclaw.json
participant AuthFile as agents/main/agent/auth-profiles.json
Builder->>Container: Build image with ARGs (NEMOCLAW_PROVIDER_KEY=inference,\nNEMOCLAW_PRIMARY_MODEL_REF=inference/...)
Container->>StartScript: On container start, run start script
StartScript->>OpenClaw: Read/parse openclaw.json (models.providers)
alt providers present
OpenClaw-->>StartScript: return first provider key
else missing/unreadable
Note right of StartScript: fallback to "inference"
end
StartScript->>AuthFile: Write `${providerKey}:manual` auth profile\n(using NVIDIA_API_KEY for keyRef)
AuthFile-->>StartScript: Ack write
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 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 unit tests (beta)
Comment |
write_auth_profile() in nemoclaw-start.sh hardcoded provider: 'nvidia', but openclaw.json (generated at image build time) uses provider key 'inference' for NVIDIA providers via getSandboxInferenceConfig(). OpenClaw couldn't match credentials to the model config and fell back to Anthropic defaults. - nemoclaw-start.sh: read provider key from openclaw.json instead of hardcoding 'nvidia' - write-auth-profile.ts: same fix for the TypeScript variant - Dockerfile: align default NEMOCLAW_PROVIDER_KEY and NEMOCLAW_PRIMARY_MODEL_REF with getSandboxInferenceConfig() output Fixes NVIDIA#1332
059bab9 to
c71774d
Compare
|
✨ Thanks for submitting this pull request, which proposes a way to fix an auth configuration mismatch between nemoclaw-start.sh and openclaw.json. This could help ensure proper provider credential mapping, especially in DGX Spark environments. Possibly related open issues: |
|
@wscurran thanks for your acknowledgement, Can I get another review? Just updated with the latest branch and would like to merge this. |
Summary
write_auth_profile() in nemoclaw-start.sh hardcoded provider: 'nvidia', but openclaw.json (generated at image build time) uses provider key 'inference' for NVIDIA providers via getSandboxInferenceConfig(). OpenClaw couldn't match credentials to the model config and fell back to Anthropic defaults.
Related Issue
Fixes #1332
Changes
Type of Change
Testing
npx prek run --all-filespasses (or equivalentlymake check).npm testpasses.make docsbuilds without warnings. (for doc-only changes)Checklist
General
Code Changes
npx prek run --all-filesauto-fixes formatting (ormake formatfor targeted runs).Doc Changes
update-docsagent skill to draft changes while complying with the style guide. For example, prompt your agent with "/update-docscatch up the docs for the new changes I made in this PR."Signed-off-by: Akash akashmehta556@gmail.com
Summary by CodeRabbit
nvidiatoinferencein build and runtime configuration.