Repository navigation
fix: Anthropic AWS wraps credential provider failures - #317
Closed
cunninghamcard-bit wants to merge 1 commit into
Closed
cunninghamcard-bit wants to merge 1 commit into
cunninghamcard-bit wants to merge 1 commit into
Conversation
@ai-sdk/anthropic-aws 2.0.63 rethrows a rejected credentialProvider as "AWS credential provider failed: <message>. Please ensure your credential provider returns valid AWS credentials ..." (anthropic-aws-provider.ts:151-160). aimux passed the producer's error on alone. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RoxcKU4zBD64Lri3e4Lrq5
This was referenced Oct 20, 2026
Contributor
Author
|
Folded into #318 together with the other Anthropic AWS fixes, so each vendor has one fix PR. This change is commit Generated by Claude Code |
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
Before: an Anthropic AWS credential producer (
AnthropicAwsAuth::SigV4with a future or async function) that failed was reported with its own error only:API call error: failed to resolve AWS credentials: STS denied.After: as in
@ai-sdk/anthropic-aws2.0.63, the error saysAWS credential provider failed: STS denied. Please ensure your credential provider returns valid AWS credentials with access_key_id and secret_access_key.(upstream:accessKeyId and secretAccessKey properties). Nothing is sent.Found while porting the upstream Anthropic AWS tests (
SigV4 path › wraps credential provider rejections with a guided message). Part of the #276 list.How it works today
What this PR changes
Tests (
tests/anthropic_aws_settings_test.rs):a_failing_credential_producer_is_reported_with_guidance; on master it fails withAPI call error: failed to resolve AWS credentials: STS denied. The upstream case is ported in the Anthropic AWS test PR.Docs: CHANGELOG
Fixed.Type of change
Checklist
cargo +1.99 fmt -p aimux-providers -- --checkpassescargo +1.99 clippy -p aimux-providers --lib --tests -- -D warningspassescargo +1.99 test -p aimux-providers --test anthropic_aws_settings_testpasses (8)scripts/check_provider_boundaries.shpassesNotes for reviewers
Stacked on #316 (missing SigV4 credentials). The message still arrives inside
AiMuxError::ApiCall, withfailed to resolve AWS credentials:before it: the sharedSigV4Fetchturns any credential failure into a transport error, for Bedrock and Polly too. Upstream throws a plainError. Changing that is a provider-utils change for all three AWS providers, not this fix; the upstream test checks the message and passes.Generated by Claude Code