Skip to content

Add Amazon Bedrock Provider #705

@chelojimenez

Description

@chelojimenez

Description

Help us add the Amazon Bedrock provider to our selection of local providers!

Image

Local providers are providers where users supply their own API keys to access models directly. There are also MCPJam provided models that run on our own infrastructure. The OpenAI provider is a good example of how a provider can be both. This issue focuses only on local providers

How to fix

Provider Information

Provider Name: Amazon Bedrock
AI SDK Package: @ai-sdk/amazon-bedrock
Documentation: https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock

  1. Add Package Dependency
  • Add the AI SDK provider package to server/package.json
  • Run npm install --legacy-peer-deps in the server/ directory
  1. Update Chat Helpers
  • Import the provider SDK in server/utils/chat-helpers.ts
  • Add a new case to the createLlmModel function switch statement
  1. Update Type Definitions
  • Add provider to ModelProvider type in shared/types.ts
  1. Add Model Definitions
  • Add model IDs to the Model enum in shared/types.ts
  • Add models to SUPPORTED_MODELS array in shared/types.ts
  1. Testing
  • Test model selection in the UI
  • Test chat functionality with the new provider
  • Verify API key validation works
  • Verify all listed models work correctly

Additional Configuration (if needed)

There's some providers like Ollama or LiteLLM that will require additional steps. Please check #653 for guidance

Reference Implementation

See #701 for Mistral implementation as a reference example.

Relevant files changed:

  • server/package.json - Added dependency
  • server/utils/chat-helpers.ts - Added provider integration
  • shared/types.ts - Added type definitions and models

First time contributing?

Please checkout our CONTRIBUTIONS.md for instructions on how to set up as a contributor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions