Skip to content

Models missing when calling /models #172

@rizvir

Description

@rizvir

Describe the bug
As of a few hours ago, Claude 4 wasn't appearing in the list of models when calling api/v1/models in ap-southeast-2. It turns out that the list_bedrock_models() function wasn't using pagination, leading to some models being cut off.

Please complete the following information:

  • Which API you used: /models

To Reproduce

Enable all models in ap-southeast-2, then try doing a GET on api/v1/models, you will see some models missing.

You can verify that maxResults=1000 is also not working via boto3 on the Python prompt:

>>> response = bedrock.bedrock_client.list_inference_profiles(maxResults=1000, typeEquals="SYSTEM_DEFINED")
>>> profile_list = [p["inferenceProfileId"] for p in response["inferenceProfileSummaries"]]
>>> profile_list
['apac.anthropic.claude-3-sonnet-20240229-v1:0', 'apac.anthropic.claude-3-5-sonnet-20240620-v1:0', 'apac.anthropic.claude-3-haiku-20240307-v1:0', 'apac.anthropic.claude-3-5-sonnet-20241022-v2:0', 'apac.anthropic.claude-3-7-sonnet-20250219-v1:0', 'apac.amazon.nova-micro-v1:0', 'apac.amazon.nova-lite-v1:0', 'apac.amazon.nova-pro-v1:0']
>>>

vs the expected output:

>>> profile_list = []
>>> paginator = bedrock_client.get_paginator('list_inference_profiles')
>>> for page in paginator.paginate(maxResults=1000, typeEquals="SYSTEM_DEFINED"):
...     summaries = page.get("inferenceProfileSummaries", [])
...     profile_list.extend(p["inferenceProfileId"] for p in summaries)
...
>>> print(profile_list)
['apac.anthropic.claude-3-sonnet-20240229-v1:0', 'apac.anthropic.claude-3-5-sonnet-20240620-v1:0', 'apac.anthropic.claude-3-haiku-20240307-v1:0', 'apac.anthropic.claude-3-5-sonnet-20241022-v2:0', 'apac.anthropic.claude-3-7-sonnet-20250219-v1:0', 'apac.amazon.nova-micro-v1:0', 'apac.amazon.nova-lite-v1:0', 'apac.amazon.nova-pro-v1:0', 'apac.anthropic.claude-sonnet-4-20250514-v1:0']

I am raising a PR to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions