Skip to content

Add Bedrock as provider for SDK#77

Merged
sd-st merged 46 commits intoanthropics:nextfrom
JPVenson:feature/bedrock_rebase
Feb 4, 2026
Merged

Add Bedrock as provider for SDK#77
sd-st merged 46 commits intoanthropics:nextfrom
JPVenson:feature/bedrock_rebase

Conversation

@JPVenson
Copy link
Contributor

Adds Bedrock implementation for usage with api.

Notes:
Only the Model invoke and streaming endpoint is currently supported

this is the successor pr for #61

@JPVenson JPVenson force-pushed the feature/bedrock_rebase branch from 553f202 to 27aa449 Compare December 18, 2025 22:51
@sd-st
Copy link
Collaborator

sd-st commented Jan 20, 2026

FYI this has a failing lint and build

@JPVenson
Copy link
Contributor Author

@sd-st fixed

Copy link
Collaborator

@sd-st sd-st left a comment

Choose a reason for hiding this comment

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

I did an initial skim; just wondering if we can use more of the AWS library instead of rolling out own

@JPVenson JPVenson requested a review from sd-st January 24, 2026 01:32
Copy link
Collaborator

@sd-st sd-st left a comment

Choose a reason for hiding this comment

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

One last NIT. Also going to test this out locally

@JPVenson JPVenson requested a review from sd-st January 29, 2026 20:50
Copy link
Collaborator

@sd-st sd-st left a comment

Choose a reason for hiding this comment

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

Just some minor comments which I can commit, and I'm going to give this a test locally to make sure it works!

@sd-st
Copy link
Collaborator

sd-st commented Feb 4, 2026

Works, merging! Thanks for this (:

@sd-st sd-st merged commit c54884b into anthropics:next Feb 4, 2026
3 checks passed
@sd-st sd-st mentioned this pull request Feb 4, 2026
stainless-app bot added a commit that referenced this pull request Feb 5, 2026
* chore(readme): remove beta warning now that we're in ga

* chore(internal): codegen related update

* chore(readme): remove beta warning now that we're in ga

* chore(internal): codegen related update

* Fix IChatClient usage deltas to be considered cumulative (#99)

* chore(internal): codegen related update

* fix(ci): don't throw an error about missing lsof

* chore(internal): version bump

* feat(api): migrate sending message format in output_config rather than output_format

* chore(internal): update `actions/checkout` version

* feat(client): add `ToString` to `ApiEnum`

* chore(internal): simplify imports

* feat(client): add Equals and ToString to params

* chore(internal): add copy constructor tests

* chore: change visibility of QueryString() and AddDefaultHeaders

* feat(client): add `ToString` and `Equals` methods

* codegen metadata

* chore(internal): improve HttpResponse qualification

* fix(client): handle unions containing unknown types properly

* chore(client): improve example values

* Update Anthropic Foundry Identity Token Credential (#55)

* Changes from PR 55

* Lint fix

* fix: replace deprecated Assert.IsAssignableFrom with Assert.IsType

* feat(api): add support for Structured Outputs in the Messages API

* Allow MEAI User Agent tracking for IChatClient (#91)

* fix: use Properties initializer for InputSchema in IChatClient extensions (#83)

* chore(ci): Add Claude Code GitHub Workflow (#273)

* "Claude PR Assistant workflow"

* "Claude Code Review workflow"

* fix: use Properties initializer for InputSchema in IChatClient extensions

The InputSchema constructor was being passed properties as rawData,
which caused them to be serialized at the top level of the JSON object
instead of under a "properties" key. This resulted in invalid JSON Schema
that failed Anthropic API validation with error:
"tools.0.custom.input_schema: JSON schema is invalid"

The fix uses property initializer syntax to correctly populate the
Properties property, ensuring the schema is valid JSON Schema draft 2020-12.

Also updates tests to expect the corrected schema format.

Fixes #82

* Remove added workflows

---------

Co-authored-by: dtmeadows <dmeadows@stainless.com>

* Add MEAI User-Agent for IChatClient implementation

* Fix failing UT for new schema properties pattern

* Add MEAI user agent + UT for betaservice

* Address PR comments

* Use FrozenDictionary for MEAI headers and fix User-Agent test assertions

* Add missing System.Linq using for ToArray extension method

* Fix User-Agent tests to verify single header with multiple values

* Fix lint issues: use collection expressions and simplify regex

---------

Co-authored-by: Matt Brailsford <me@mattbrailsford.com>
Co-authored-by: dtmeadows <dmeadows@stainless.com>

* fix formatting (#101)

* chore(internal): ignore stainless-internal artifacts

* chore(internal): add sse tests

* feat(client): add common response headers to `HttpResponse`

* fix(client): improve union equality method

* chore(ci): remove claude-code-review workflow

Co-authored-by: Claude Code (/Users/davidmeadows/stainless/stainless) <noreply@anthropic.com>

* fix the build (#106)

* lint fix (#107)

* Add Bedrock as provider for SDK (#77)

* SSE implementation

* Add aws cred store

* Adapt AWS authentication

* Fix Streaming for bedrock

* Add nuget stubs

* Lint files

* Update code comments

* Add support for netstandard to bedrock
Removed Async streaming implementation

* Format code

* Cleanup code

* make mr linter happy

* Fix net9 specific optimizations

* Apply review comments

* Fix linting issues

* applied review comments

* Remove argument check

* Remove unused code

* Adapt method header NetStandard switch

* lint code

* Fix merge conflicts from source

* Apply review comments

* Removed unused method

* Apply code review changes

* Add bedrock example

* rename event stream helper

* linting

* remove incorrectly added example project

* fix build

* Fix tests

* fix build and lint

* apply review comments

* revert merge conflict issue

* lint

* Split examples into multiple projects for bedrock, anthropic and foundry

* apply review comments

* Remove bedrock from general testing loop as currently unsupported by test tool

* Update Examples

* lint

* Cleanup examples

* update comment

* update exception

* Update src/Anthropic.Bedrock/LocalShims.cs

* combine if statements

* fix lint?

---------

Co-authored-by: Stephen <stephen@stainless.com>

* feat(api): manual updates

* fix: update beta service to use output_config.format (#110)

output_format is depracated in favour of output_config.format. Update api call configuration to reflect this change
update test to reflect this change

* fix build (#111)

* chore: release main

---------

Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
Co-authored-by: Matt Brailsford <me@mattbrailsford.com>
Co-authored-by: dtmeadows <dmeadows@stainless.com>
Co-authored-by: Stephen <stephen@stainless.com>
Co-authored-by: Claude Code (/Users/davidmeadows/stainless/stainless) <noreply@anthropic.com>
Co-authored-by: JPVenson <github@jpb.email>
Co-authored-by: Andrea Sciutto <sciutand@gmail.com>
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.

3 participants