Add AWS Bedrock provider support#169
Open
Amama-Fatima wants to merge 59 commits into
Open
Conversation
… when mcp tool is called
…del's requirements" This reverts commit b9f477c.
…ding to each model's requirements
…meta llama models
…r mistral models. nova model tool calling still needs fixes
…edrock remote pull
…e rigorous resting
…t errors after a tool call
…extracted helper functions to separate files for much neater code
…ova and extracted helper functions to separate files for much neater code
… legacy or does not support tool calling
…plicity mentioning that tool calling feature for this model not added yet
…rameters for correct tool calling
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
This PR adds AWS Bedrock as an AI provider in AIaW.
It introduces an AI SDK-compatible
aws-bedrockprovider that calls Bedrock models through the AWS SDK, converts AIaW/AI SDK prompts into Bedrock-specific request formats, normalizes Bedrock responses back into AI SDK response parts, and streams responses into the format expected by the existing chat UI.Demo video: AWS Bedrock support demo
Branch Notes
All AWS Bedrock model integration work is contained in this AWS Bedrock feature branch.
I have not integrated these changes into my fork’s main branch. My fork’s main branch has been kept up to date with the original repository, and I have regularly merged the latest main branch changes into this AWS Bedrock branch to keep the feature branch current with upstream.
What Changed
src/utils/aws-bedrock.ListFoundationModelsCommandListInferenceProfilesCommandus.*,eu.*,apac.*, andglobal.*.Tool Calling Support
This PR includes tool/plugin calling support for supported Bedrock model families.
The implementation handles provider-specific differences, including:
Tool-Calling Limitations
Some Bedrock models require a different Bedrock runtime/tool-use path than the one implemented in this PR. For those models, normal chat can still be used with tools/plugins disabled, but tool calling is intentionally blocked for now with a clear user-facing message.
This mainly affects some newer or nonstandard Mistral models such as Devstral, Ministral, Voxtral, and some Small/Instruct variants. Meta Llama tool usage is currently prompt-based rather than native Bedrock
toolConfig, so behavior may vary by model.Support for these model-specific tool-calling paths can be added in a future follow-up after their Bedrock runtime behavior is implemented and tested.
Notes
Some Bedrock models are intentionally filtered out because they are legacy, unavailable, non-chat, or unreliable for this integration.
Cohere-specific files are present from earlier work, but Cohere Bedrock models are not currently exposed in the supported model list or active routing. Cohere support can be added in the future.
Verification
AWS Bedrock documentation was referenced throughout the integration to account for model-family-specific request formats, streaming behavior, Converse API usage, inference profiles, and tool-calling differences.
I tested the supported Bedrock models and their tool-calling behavior using my own external MCP servers, as shown in the demo video. This helped validate real plugin/tool execution flows beyond simple text generation.
npm run build