Skip to content

test(bedrock): switch image gen live test off EOL Titan to Nova Canvas - #31937

Merged
mateo-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_fix_bedrock_titan_image_gen_eol
Jul 2, 2026
Merged

test(bedrock): switch image gen live test off EOL Titan to Nova Canvas#31937
mateo-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_fix_bedrock_titan_image_gen_eol

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Relevant issues

CI was failing on tests/image_gen_tests/test_bedrock_image_gen_unit_tests.py::test_amazon_titan_image_gen with

litellm.NotFoundError: BedrockException - {"message":"This model version has reached the end of its life. Please refer to the AWS documentation for more details."}

The test made a live Bedrock call to amazon.titan-image-generator-v2:0. Per the Amazon Bedrock model lifecycle table, Titan Image Generator G1 v2 has an EOL date of June 30, 2026, so as of July 2026 the call fails permanently in every region. v1 was already retired earlier, which is why the test had previously moved to v2

Changes

Point the live image-gen test at amazon.nova-canvas-v1:0, Amazon's current Bedrock image model, and rename the test to test_amazon_nova_canvas_image_gen. Nova Canvas is the model the reactivated CI account (888602223428) is entitled to for image generation (see the revert in #29326), it has cost-tracking pricing in model_prices_and_context_window.json (output_cost_per_image 0.06), and its EOL date is September 30, 2026, so it exercises the same live transform + cost-tracking path the Titan test did

This keeps the test live and hitting the real Bedrock API rather than reverting to a mock

Pre-Submission checklist

  • I have added meaningful tests
  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Screenshots / Proof of Fix

This environment has no AWS credentials, so I could not run the live Nova Canvas call locally; CI runs against the reactivated account that is entitled to Nova Canvas image generation and will exercise it. The root cause is confirmed directly from the AWS model lifecycle doc:

- Amazon  Titan Image Generator G1 v2  amazon.titan-image-generator-v2:0  Regions: us-east-1, us-west-2  Legacy date: December 30, 2025  EOL date: June 30, 2026
- Amazon  Nova Canvas  amazon.nova-canvas-v1:0  Regions: ap-northeast-1, eu-west-1, us-east-1  Legacy date: March 30, 2026  EOL date: September 30, 2026

Type

✅ Test

Link to Devin session: https://app.devin.ai/sessions/a29c3cb0287344c380f488a20576beba
Requested by: @mateo-berri

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@mateo-berri mateo-berri self-assigned this Jul 2, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@greptile-apps

greptile-apps Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR replaces the EOL amazon.titan-image-generator-v2:0 live test with an equivalent live test targeting amazon.nova-canvas-v1:0, fixing a CI failure caused by the Titan model reaching its end-of-life on June 30, 2026.

  • The renamed test test_amazon_nova_canvas_image_gen makes an identical live Bedrock call with cost-tracking assertions, just pointing at the new model.
  • No production code is changed; only the test function name and model_id string are updated.

Confidence Score: 4/5

The change is a minimal, isolated swap of a model ID in one test; no production code is affected and the test logic is otherwise identical to what it replaced.

The renamed test continues to make a real HTTP call to Bedrock inside tests/image_gen_tests/, the same violation the original Titan test had. The rest of the file uses mocked responses for this exact reason. The live call can intermittently fail in environments without AWS credentials and may not run cleanly for contributors who clone the repo locally.

tests/image_gen_tests/test_bedrock_image_gen_unit_tests.py — the live-call test at the bottom of the file should either be mocked or relocated to tests/e2e/

Important Files Changed

Filename Overview
tests/image_gen_tests/test_bedrock_image_gen_unit_tests.py Renames test_amazon_titan_image_gen to test_amazon_nova_canvas_image_gen and swaps the model ID from the EOL Titan v2 to Nova Canvas v1:0. The test continues to make a live Bedrock network call, which is not permitted in this folder per project rules.

Comments Outside Diff (1)

  1. tests/image_gen_tests/test_bedrock_image_gen_unit_tests.py, line 530-544 (link)

    P1 Live network call outside the allowed folder

    This test calls litellm.image_generation against the real Bedrock endpoint (aws_region_name="us-east-1") without any mocking. The repository rule restricts live network calls to tests/e2e/; only mock tests are permitted in tests/image_gen_tests/. The previous Titan test had the same issue, and this PR carries that pattern forward into the Nova Canvas replacement. To comply, either mock the Bedrock HTTP response (as other unit tests in this file do) or move the live test to tests/e2e/.

    Rule Used: What: prevent any tests from being added here that... (source)

Reviews (1): Last reviewed commit: "test(bedrock): switch image gen live tes..." | Re-trigger Greptile

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@mateo-berri
mateo-berri self-requested a review July 2, 2026 05:57

@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 merged commit 912ca62 into litellm_internal_staging Jul 2, 2026
119 of 120 checks passed
@mateo-berri
mateo-berri deleted the litellm_fix_bedrock_titan_image_gen_eol branch July 2, 2026 05:57
Rodrigo-Palma pushed a commit to Rodrigo-Palma/litellm that referenced this pull request Jul 3, 2026
BerriAI#31937)

Co-authored-by: mateo <mateo@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
mateo-berri pushed a commit that referenced this pull request Jul 11, 2026
#31937)

Backport of #31937 to stable/1.91.x.
Cherry-picked from 912ca6255c02e0532e4bd44e93b0eb2107f5bd5c (litellm_internal_staging).
Fixes the base-level image_gen_testing failure on this line: amazon.titan-image-generator-v2:0 reached end of life on Bedrock.
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