From fbbaee3f935173e0c35ae35306f1f28f833d18e5 Mon Sep 17 00:00:00 2001 From: galsuchetzky-act Date: Wed, 25 Nov 2026 13:18:00 +0200 Subject: [PATCH] feat(bedrock): include Nova Pro in the foundation model catalog (#9426) The foundation-model seed had no Nova Pro, so GetFoundationModel answered ValidationException for amazon.nova-pro-v1:0. The catalog now carries it with the metadata its model card publishes: TEXT, IMAGE and VIDEO input, TEXT output, response streaming, ACTIVE lifecycle, and In-Region availability in us-east-1, us-gov-west-1, eu-west-2, ap-southeast-2, ap-southeast-3 and me-central-1. Its system-defined inference profiles are not seeded. Closes #9078 --- docs/services/bedrock.md | 7 +- src/main/resources/bedrock/model-catalog.yaml | 12 ++- .../BedrockNovaProCatalogIntegrationTest.java | 89 +++++++++++++++++++ 3 files changed, 104 insertions(+), 4 deletions(-) create mode 100644 src/test/java/io/floci/aws/services/bedrock/BedrockNovaProCatalogIntegrationTest.java diff --git a/docs/services/bedrock.md b/docs/services/bedrock.md index 7ffc9348db..1c67471453 100644 --- a/docs/services/bedrock.md +++ b/docs/services/bedrock.md @@ -120,11 +120,12 @@ those tags, as `TagResource` and `UntagResource` do. `ListFoundationModels` and `GetFoundationModel` read a fixed catalog, `bedrock/model-catalog.yaml`. System-defined inference profiles come from the same seed, while application inference profiles are created and stored by the Bedrock control plane. -The catalog is a seed rather than a mirror of AWS: a few real models (Amazon Nova Micro -and Nova Lite, Titan Text Embeddings V2, Llama 3.1 8B Instruct and Claude Sonnet 4.5) +The catalog is a seed rather than a mirror of AWS: a few real models (Amazon Nova Micro, +Nova Lite and Nova Pro, Titan Text Embeddings V2, Llama 3.1 8B Instruct and Claude Sonnet 4.5) with the modalities, streaming support, lifecycle status and Regional availability their [model cards](https://docs.aws.amazon.com/bedrock/latest/userguide/model-cards.html) publish, -and their US and EU system-defined inference profiles. +and selected US and EU system-defined inference profiles. Nova Pro is seeded for its +direct In-Region availability; its system-defined inference profiles are not seeded. The answers depend on the calling Region, as on AWS: diff --git a/src/main/resources/bedrock/model-catalog.yaml b/src/main/resources/bedrock/model-catalog.yaml index ea4d5a60ac..cab9f417ef 100644 --- a/src/main/resources/bedrock/model-catalog.yaml +++ b/src/main/resources/bedrock/model-catalog.yaml @@ -9,7 +9,8 @@ # A model is listed in a Region when the card shows it In-Region there (inRegion) or when one of # its inference profiles can be called from that Region. A profile is listed in a Region only # when that Region is one of its source Regions, and its models are the foundation models in the -# destination Regions the card gives for that source Region. Commercial Regions only. +# destination Regions the card gives for that source Region. Inference profiles are seeded in +# commercial Regions; foundation models follow each model card. foundationModels: - modelId: amazon.nova-micro-v1:0 @@ -31,6 +32,15 @@ foundationModels: inRegion: [us-east-1, us-east-2, us-west-2, eu-north-1, eu-west-2, ap-northeast-1, ap-southeast-2, ap-southeast-3, me-central-1] + - modelId: amazon.nova-pro-v1:0 + modelName: Nova Pro + providerName: Amazon + inputModalities: [TEXT, IMAGE, VIDEO] + outputModalities: [TEXT] + responseStreamingSupported: true + lifecycleStatus: ACTIVE + inRegion: [us-east-1, us-gov-west-1, eu-west-2, ap-southeast-2, ap-southeast-3, me-central-1] + - modelId: amazon.titan-embed-text-v2:0 modelName: Titan Text Embeddings V2 providerName: Amazon diff --git a/src/test/java/io/floci/aws/services/bedrock/BedrockNovaProCatalogIntegrationTest.java b/src/test/java/io/floci/aws/services/bedrock/BedrockNovaProCatalogIntegrationTest.java new file mode 100644 index 0000000000..ed2e3f6b7e --- /dev/null +++ b/src/test/java/io/floci/aws/services/bedrock/BedrockNovaProCatalogIntegrationTest.java @@ -0,0 +1,89 @@ +package io.floci.aws.services.bedrock; + +import io.floci.aws.testing.AwsTestClients; +import io.quarkus.test.junit.QuarkusTest; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; +import software.amazon.awssdk.regions.Region; +import software.amazon.awssdk.services.bedrock.BedrockClient; +import software.amazon.awssdk.services.bedrock.model.FoundationModelDetails; +import software.amazon.awssdk.services.bedrock.model.ValidationException; + +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +@QuarkusTest +class BedrockNovaProCatalogIntegrationTest { + + private static final String MODEL = "amazon.nova-pro-v1:0"; + private static final String ACCOUNT = "741623800022"; + + @Test + void novaProMetadataMatchesThePublishedModelCard() { + try (BedrockClient client = AwsTestClients.create(BedrockClient.builder(), ACCOUNT, Region.US_EAST_1)) { + FoundationModelDetails model = assertDoesNotThrow(() -> client.getFoundationModel(request -> request + .modelIdentifier(MODEL))).modelDetails(); + assertEquals("Nova Pro", model.modelName()); + assertEquals("Amazon", model.providerName()); + assertEquals(List.of("TEXT", "IMAGE", "VIDEO"), model.inputModalitiesAsStrings()); + assertEquals(List.of("TEXT"), model.outputModalitiesAsStrings()); + assertTrue(model.responseStreamingSupported()); + assertTrue(model.inferenceTypesSupportedAsStrings().contains("ON_DEMAND")); + assertTrue(client.listFoundationModels(request -> request.byProvider("Amazon")).modelSummaries() + .stream().anyMatch(summary -> MODEL.equals(summary.modelId()))); + } + } + + @Test + void existingNovaLiteVideoMetadataRemainsAvailable() { + try (BedrockClient client = AwsTestClients.create(BedrockClient.builder(), ACCOUNT, Region.US_EAST_1)) { + assertEquals(List.of("TEXT", "IMAGE", "VIDEO"), client.getFoundationModel(request -> request + .modelIdentifier("amazon.nova-lite-v1:0")).modelDetails().inputModalitiesAsStrings()); + } + } + + @Test + void unknownModelStillUsesTheAcceptedValidationError() { + try (BedrockClient client = AwsTestClients.create(BedrockClient.builder(), ACCOUNT, Region.US_EAST_1)) { + ValidationException error = assertThrows(ValidationException.class, () -> client.getFoundationModel(request -> request + .modelIdentifier("amazon.nonexistent-model-v1:0"))); + assertEquals(400, error.statusCode()); + } + } + @ParameterizedTest + @CsvSource({ + "us-east-1, aws", + "us-gov-west-1, aws-us-gov", + "eu-west-2, aws", + "ap-southeast-2, aws", + "ap-southeast-3, aws", + "me-central-1, aws" + }) + void novaProIsDiscoverableInEachPublishedDirectRegion(String region, String partition) { + try (BedrockClient client = AwsTestClients.create(BedrockClient.builder(), ACCOUNT, Region.of(region))) { + FoundationModelDetails model = client.getFoundationModel(request -> request.modelIdentifier(MODEL)) + .modelDetails(); + assertEquals("arn:" + partition + ":bedrock:" + region + "::foundation-model/" + MODEL, model.modelArn()); + assertEquals(List.of("ON_DEMAND"), model.inferenceTypesSupportedAsStrings()); + assertEquals("ACTIVE", model.modelLifecycle().statusAsString()); + assertTrue(client.listFoundationModels(request -> request.byProvider("Amazon").byInferenceType("ON_DEMAND")) + .modelSummaries().stream().anyMatch(summary -> MODEL.equals(summary.modelId()))); + } + } + + @Test + void novaProIsNotAdvertisedInAnUnservedPartition() { + try (BedrockClient client = AwsTestClients.create(BedrockClient.builder(), ACCOUNT, Region.CN_NORTH_1)) { + assertThrows(ValidationException.class, () -> client.getFoundationModel(request -> request.modelIdentifier(MODEL))); + assertTrue(client.listFoundationModels(request -> { }).modelSummaries().stream() + .noneMatch(summary -> MODEL.equals(summary.modelId()))); + } + } + + +}