Skip to content

feat: add Amazon Bedrock support and guided ai setup#24

Merged
dubscode merged 2 commits intomainfrom
feat/ai-bedrock-setup
Mar 8, 2026
Merged

feat: add Amazon Bedrock support and guided ai setup#24
dubscode merged 2 commits intomainfrom
feat/ai-bedrock-setup

Conversation

@dubscode
Copy link
Contributor

@dubscode dubscode commented Mar 8, 2026


🥞 DubStack

Copilot AI review requested due to automatic review settings March 8, 2026 21:02
@vercel
Copy link

vercel bot commented Mar 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
dubstack Skipped Skipped Mar 8, 2026 10:22pm

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Amazon Bedrock as a third AI provider in DubStack (alongside Gemini and AI Gateway) and introduces a guided interactive setup wizard (dub ai setup). It also adds two productivity commands (dub docs, dub repo) and refactors AI provider resolution into a centralized module with strict precedence.

Changes:

  • Centralized AI provider resolution into src/lib/ai-provider.ts, supporting Gemini, AI Gateway, and Bedrock with repo-local provider/model config, env var fallbacks, and auto-detection
  • Added guided AI setup wizard (dub ai setup), dub config ai-provider, dub config ai-model commands, and Bedrock support in dub ai env
  • Added dub docs and dub repo browser-opening commands with cross-platform opener logic and GitHub remote URL normalization

Reviewed changes

Copilot reviewed 41 out of 43 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/cli/src/lib/ai-provider.ts New centralized AI provider resolution with Gemini/Gateway/Bedrock support and reasoning options
packages/cli/src/lib/ai-provider.test.ts Tests for provider resolution, precedence, and provider options
packages/cli/src/lib/config.ts Extended DubConfig with provider field (selected + per-provider model overrides)
packages/cli/src/lib/config.test.ts Tests for provider config normalization and persistence
packages/cli/src/lib/browser.ts New cross-platform URL opener (macOS/Linux)
packages/cli/src/lib/browser.test.ts Tests for browser opener
packages/cli/src/lib/external-links.ts Constant for docs URL
packages/cli/src/lib/github.ts Added getRepositoryWebUrl and openRepositoryInBrowser with SSH/HTTPS normalization
packages/cli/src/lib/github.test.ts Tests for repository URL resolution
packages/cli/src/lib/ai-metadata.ts Refactored to use centralized resolveAiProvider, added providerConfig param
packages/cli/src/lib/ai-metadata.test.ts Updated tests to pass providerConfig
packages/cli/src/commands/ai-setup.ts New guided setup wizard with provider/model/scope selection
packages/cli/src/commands/ai-setup.test.ts Tests for guided setup flow
packages/cli/src/commands/ai-env.ts Extended with Bedrock env vars, activation commands, and process env application
packages/cli/src/commands/ai-env.test.ts Tests for Bedrock env writes and activation
packages/cli/src/commands/config.ts Added configAiProvider and configAiModel commands
packages/cli/src/commands/config.test.ts Tests for provider/model config commands
packages/cli/src/commands/ai.ts Refactored to use centralized resolveAiProvider and buildAiProviderOptions
packages/cli/src/commands/ai.test.ts Added Bedrock test, updated error message expectations
packages/cli/src/commands/ai-resolve.ts Refactored to use centralized provider resolution
packages/cli/src/commands/ai-resolve.test.ts Updated mock config to include provider fields
packages/cli/src/commands/create.ts Added Bedrock deps, passes providerConfig
packages/cli/src/commands/submit.ts Added Bedrock deps, passes providerConfig
packages/cli/src/commands/submit.test.ts Updated mock config helper to include all fields
packages/cli/src/commands/flow.ts Added Bedrock deps, passes providerConfig
packages/cli/src/commands/docs.ts New dub docs command
packages/cli/src/commands/docs.test.ts Test for docs command
packages/cli/src/commands/repo.ts New dub repo command
packages/cli/src/commands/repo.test.ts Test for repo command
packages/cli/src/index.ts Wired up docs, repo, ai-provider, ai-model, ai setup commands and Bedrock env options
packages/cli/package.json Added @ai-sdk/amazon-bedrock, @aws-sdk/credential-providers, @inquirer/input, @inquirer/password, @inquirer/select
packages/cli/evals/dub-flow-metadata.eval.ts Updated eval to pass providerConfig
pnpm-lock.yaml Lockfile updates for new dependencies
README.md Updated docs with Bedrock, dub docs, dub repo, provider config
QUICKSTART.md Updated quickstart with guided setup and Bedrock examples
apps/docs/content/docs/guides/ai-assistant.mdx Expanded guide with providers, precedence, setup details
apps/docs/content/docs/getting-started/quickstart.mdx Updated quickstart with Bedrock
apps/docs/content/docs/commands/docs.mdx New docs command reference
apps/docs/content/docs/commands/repo.mdx New repo command reference
apps/docs/content/docs/commands/meta.json Added docs/repo to command nav
apps/docs/content/docs/commands/create.mdx Updated AI mode docs
apps/docs/content/docs/commands/submit.mdx Updated provider configuration note
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dubscode dubscode merged commit 336e77c into main Mar 8, 2026
7 checks passed
@dubscode dubscode deleted the feat/ai-bedrock-setup branch March 8, 2026 23:50
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.

2 participants