Skip to content

Feat/Add multiple provider keys in BYOK onboarding (task 5)#631

Merged
prakhar1605 merged 2 commits into
rowboatlabs:devfrom
prakhar1605:feat/byok-multiple-keys
Jun 22, 2026
Merged

Feat/Add multiple provider keys in BYOK onboarding (task 5)#631
prakhar1605 merged 2 commits into
rowboatlabs:devfrom
prakhar1605:feat/byok-multiple-keys

Conversation

@prakhar1605

Copy link
Copy Markdown
Collaborator

What

Lets users add multiple provider keys during BYOK onboarding. After saving a
provider, they can either finish or add another provider's key; all saved keys
persist together and their models are available in the chat picker. (Addresses
BYOK task 5. Builds on #629 — please review/merge that first.)

Why

Previously onboarding saved one provider and immediately advanced, so a user could
only configure a single provider during setup. Some users want several (e.g. an
Anthropic key for chat and a Gemini key as well).

How

  • The single-key path is unchanged: enter a key → "Test & Continue" → saves and
    advances in one click.
  • Refactored the save logic into a shared testAndSaveActiveProvider() helper with
    two wrappers: handleTestAndSaveLlmConfig (save + advance, unchanged behavior) and
    handleTestAndAddAnother (save + stay).
  • Added a connectedFlavors set tracking which providers have been saved this session;
    connected provider cards show a checkmark.
  • "Save & add another" saves the current provider, then switches the form to the next
    provider the user hasn't connected yet (so the form is fresh and the buttons re-enable
    for the next key).
  • The primary button becomes a plain "Continue" once at least one provider is connected,
    so the user can finish even from an empty form (no dead-end).
  • No backend change needed — repo.setConfig already merges each provider into the
    config's providers map without overwriting the others.

Files changed

  • apps/x/apps/renderer/src/components/onboarding/use-onboarding-state.ts
  • apps/x/apps/renderer/src/components/onboarding/steps/llm-setup-step.tsx

How to test

  1. Sign out of Rowboat (BYOK mode), reset onboarding.
  2. Pick Anthropic → enter key → "Save & add another". The Anthropic card shows a ✓,
    the form switches to a fresh provider, and the primary button reads "Continue".
  3. Pick Gemini (or another provider) → enter key → "Test & Continue" to finish.
  4. Verify ~/.rowboat/config/models.json → the providers map contains BOTH providers,
    each with its own key + models.
  5. Single-key path unchanged: enter one key → "Test & Continue" → finishes in one click.

Known follow-ups

@prakhar1605 prakhar1605 merged commit 6040c54 into rowboatlabs:dev Jun 22, 2026
2 checks passed
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