Skip to content

test(bedrock): expect an authentication error when the AWS profile is missing in the bearer token test - #54044

Merged
mateo-berri merged 1 commit into
mainfrom
litellm_flakeheal_20261123_test_bearer_only_sdk_sync_async_requests_do
Nov 24, 2026
Merged

mateo-berri merged 1 commit into
mainfrom
litellm_flakeheal_20261123_test_bearer_only_sdk_sync_async_requests_do

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Handwritten 1-3 sentence description

An integration test for Bedrock bearer tokens has failed in the last two scheduled runs on main because it still expected a missing AWS profile to come back as a connection error. Since #53362 the gateway reports that case as an authentication error on purpose, so callers stop retrying a login problem. The test now expects the authentication error, with the same message check and no product change

Details

Link to Devin session: https://app.devin.ai/sessions/45b545a61eaf40c9945d955acf8478cb
Open in Devin Desktop: https://app.devin.ai/desktop/session/45b545a61eaf40c9945d955acf8478cb?variant=devin
Requested by: @mateo-berri

TLDR

Problem this solves:

How it solves it:

  • Expect litellm.AuthenticationError with the same config profile .* could not be found match
  • No other assertion changes, no product code changes

Relevant issues

Failing job: https://github.com/BerriAI/litellm/actions/runs/45303623789/job/138141974988

litellm.exceptions.AuthenticationError: litellm.AuthenticationError: BedrockException Invalid Authentication - The config profile (integration-profile-must-not-be-read) could not be found

The first red scheduled run is at 0aa3a92, the first one that contains #53362 (9a09c65). The run before it at 5fc0c58 is green

Screenshots / Proof of Fix

E2E exception at 0eb9dab: test-only change to one expected exception class, run on the local integration rig (Postgres, Redis, owned services per worker, no retries) with INTEGRATION_WORKERS=2 uv run --no-sync python tests/integration/run.py providers <node>, the fewest workers at which the runner starts its own services

  1. origin/main, the test: 1 failed, with the CI error above
  2. This branch, the test: 1 passed, five runs in a row
  3. This branch, whole file tests/integration/providers/test_bedrock_auth_wire.py: 3 passed
  4. Mutation: with the 401 mapping in _map_aws_credential_error temporarily disabled, the test fails with litellm.APIConnectionError; reverted

Type

✅ Test

… missing in the bearer token test

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

@mateo-berri mateo-berri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@mateo-berri
mateo-berri enabled auto-merge (squash) November 24, 2026 03:11
@veria-ai

veria-ai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

No security issues were found in this pull request.

Reviews

@mateo-berri
mateo-berri merged commit fad16ba into main Nov 24, 2026
40 checks passed
@mateo-berri
mateo-berri deleted the litellm_flakeheal_20261123_test_bearer_only_sdk_sync_async_requests_do branch November 24, 2026 03:17
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.

1 participant