feat: add Amazon Bedrock support and guided ai setup#24
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
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-modelcommands, and Bedrock support indub ai env - Added
dub docsanddub repobrowser-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.
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.
🥞 DubStack