generated from amazon-archives/__template_MIT-0
-
Notifications
You must be signed in to change notification settings - Fork 234
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
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.
NeilMazumdar
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working