fix: idempotent provider/sandbox upsert + per-provider credential vault#5
Open
mafueee wants to merge 6 commits intofeat/multi-claw-managementfrom
Open
fix: idempotent provider/sandbox upsert + per-provider credential vault#5mafueee wants to merge 6 commits intofeat/multi-claw-managementfrom
mafueee wants to merge 6 commits intofeat/multi-claw-managementfrom
Conversation
…lt\n\n- Add ensureProvider() helper that handles gateway type-change rejection\n by delete+recreate instead of failing on updateProvider\n- Add ensureSandbox() helper that handles UNIQUE constraint by\n delete+recreate\n- Add per-provider credential vault (~/.nemoclaw/credentials.json)\n so API keys persist across provider switches and redeployments\n- Update all 3 deployment code paths (onboard, claws, inference config)\n to use ensureProvider/ensureSandbox and auto-fill from vault\n- InferenceConfig UI now sends apiKey on save\n- Add isValidApiKey() helper (was referenced but never defined)\n- Update grpc-client tests for new exports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves three critical deployment failures and implements persistent API key management.
Fixed Issues
Provider Type Conflict —
updateProviderrejected when provider type was included.ensureProvider()now handles this idempotently: checks existing type, omitstypeon updates, and does delete+recreate when type changes.Unsupported Inference Provider —
setClusterInferencewas passing raw provider names instead of mapped types. Fixed to usemapProviderToGrpcTypeconsistently.Sandbox UNIQUE Constraint —
createSandboxfailed when sandbox already existed.ensureSandbox()catches the UNIQUE constraint error and does delete+recreate.API Key Persistence — Added per-provider credential vault at
~/.nemoclaw/credentials.json. Users configure each provider's key once; all future deploys auto-fill from the vault.Files Changed
gui/server/lib/grpcClient.jsensureProvider()andensureSandbox()helpersgui/server/index.jsgui/server/routes/claws.jsensureProvider/ensureSandboxgui/src/components/inference/InferenceConfig.tsxapiKeyon save for vault persistencegui/src/api/client.tsapiKeytoInferenceConfigDatainterfacetest/grpc-client.test.jsensureProvider/ensureSandboxto exports checkREADME.mdTesting