Skip to content

bedrock list-foundation-models: --by-provider rejects valid provider names containing "." (e.g. "Z.AI") #10599

Description

@agasthik

Describe the bug

aws bedrock list-foundation-models --by-provider rejects provider names that contain a period, even though the Bedrock API itself returns such provider names. For example, Z.AI is a valid providerName in the response, but it cannot be used as a --by-provider filter value.

The byProvider input is validated against the regex [A-Za-z0-9- ]{1,63}, which does not permit .. This is stricter than the set of provider names the service actually emits, so any provider whose name contains a dot cannot be filtered server-side.

Steps to reproduce

$ aws bedrock list-foundation-models --region us-east-1 --by-provider "Z.AI"
An error occurred (ValidationException) when calling the ListFoundationModels operation: 1 validation error detected: Value at 'byProvider' failed to satisfy constraint: Member must satisfy regular expression pattern: [A-Za-z0-9- ]{1,63}

Yet the service returns models with exactly this provider name:

$ aws bedrock list-foundation-models --region us-east-1 --query "modelSummaries[?providerName=='Z.AI'].[modelId,providerName]"
[
    [ "zai.glm-4.7-flash", "Z.AI" ],
    [ "zai.glm-4.7",       "Z.AI" ],
    [ "zai.glm-5",         "Z.AI" ]
]

Expected behavior

--by-provider "Z.AI" should return the Z.AI models, since Z.AI is a provider name the API returns. The byProvider validation pattern should accept any value the service can emit as a providerName (i.e. allow .).

Workaround

Filter client-side with --query instead of the server-side --by-provider flag:

aws bedrock list-foundation-models --region us-east-1 --query "modelSummaries[?providerName=='Z.AI']"

Note

This likely originates in the Bedrock service API model (the byProvider constraint), not the CLI client itself — the CLI simply passes the value through and surfaces the service's ValidationException. Filing here per the aws-cli issue process; please route to the Bedrock service team if that's the correct owner.

Environment

  • aws-cli reproduced against bedrock list-foundation-models, region us-east-1
  • Provider affected: Z.AI (any provider name containing .)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bedrockbugThis issue is a bug.p2This is a standard priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions