-
Notifications
You must be signed in to change notification settings - Fork 2k
Python: Introducing support for Bedrock-hosted models (Anthropic, Cohere, etc.) #2610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
eavanvalkenburg
merged 13 commits into
microsoft:main
from
duttastunil:feature/bedrock-2524-latest
Dec 19, 2025
Merged
Changes from 3 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6105502
Pushing the bedrock related changes to the new branch after addressin…
9f3c3e7
2524 Addressed the second round review comments
e5d190a
2524 Addressed few more minor comments on the PR
7f68bf6
resolving the merge conflict
duttastunil a3bd7d5
2524 resolved the uv.lock conflicts
budgetboardingai 020792d
2524 resolved the merged conflcit and rebased with the main branch
budgetboardingai 5dd9ee4
2524 addressed more comments
budgetboardingai fce8cc9
2524 removed the print statement to fix the checks failure
budgetboardingai 701174c
Merge pull request #5 from duttastunil/main
duttastunil d77f76d
2524 resolved the CI failure issues
budgetboardingai cdcf099
2524 fixing the CI breaks
budgetboardingai e4af30d
2524 Addressed the review comment
budgetboardingai ba3744a
2524 resolved conflict
budgetboardingai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) Microsoft Corporation. | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Get Started with Microsoft Agent Framework Bedrock | ||
|
|
||
| Install the provider package: | ||
|
|
||
| ```bash | ||
| pip install agent-framework-bedrock --pre | ||
| ``` | ||
|
|
||
| ## Bedrock Integration | ||
|
|
||
| The Bedrock integration enables Microsoft Agent Framework applications to call Amazon Bedrock models with familiar chat abstractions, including tool/function calling when you attach tools through `ChatOptions`. | ||
|
|
||
| ### Basic Usage Example | ||
|
|
||
| See the [Bedrock chat client sample](../../samples/bedrock_chatclient/README.md) for a runnable end-to-end script that: | ||
|
|
||
| - Loads credentials from the `BEDROCK_*` environment variables | ||
| - Instantiates `BedrockChatClient` | ||
| - Sends a simple conversation turn and prints the response | ||
15 changes: 15 additions & 0 deletions
15
python/packages/bedrock/agent_framework_bedrock/__init__.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Copyright (c) Microsoft. All rights reserved. | ||
|
|
||
| import importlib.metadata | ||
|
|
||
| from ._chat_client import BedrockChatClient | ||
|
|
||
| try: | ||
| __version__ = importlib.metadata.version(__name__) | ||
| except importlib.metadata.PackageNotFoundError: | ||
| __version__ = "0.0.0" | ||
|
|
||
| __all__ = [ | ||
| "BedrockChatClient", | ||
| "__version__", | ||
| ] |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.