boto3 icon indicating copy to clipboard operation
boto3 copied to clipboard

Unable to get all the Anthropic Model Pricing information from get_price_list_file_url Module

Open akhilnooney opened this issue 8 months ago • 1 comments

Describe the bug

When running the get_price_list_file_url module to retrieve Bedrock LLM pricing information, the JSON output appears incomplete. Specifically for Claude models, it only displays input token pricing without other critical pricing details. We've tested this across multiple AWS regions and observe the same incomplete pricing data in all regions. Is there an alternative module or method to obtain complete pricing information for all Bedrock models, including the latest ones?

Regression Issue

  • [ ] Select this option if this issue appears to be a regression.

Expected Behavior

The output should include comprehensive pricing information including:

  • Input token pricing
  • Output token pricing
  • Cache read pricing (if applicable)
  • Cache write pricing (if applicable)

Current Behavior

Specifically for Claude models, it only displays input token pricing without other critical pricing details.

We've tested this across multiple AWS regions and observe the same incomplete pricing data in all regions.

us-east-2.json

us-east-1.json

us-west-2.json

Reproduction Steps

from datetime import datetime import requests import boto3 print(boto3.version) client = boto3.client('pricing', region_name='us-east-1')

Step 1: List price lists for Amazon Bedrock

response = client.list_price_lists( ServiceCode='AmazonBedrock', # Changed from AmazonTextract to AmazonBedrock EffectiveDate=datetime(2025, 5, 1), RegionCode='us-east-2', CurrencyCode='USD' )

Check if we have any price lists

if 'PriceLists' in response and response['PriceLists']: # Step 2: Get the price list ARN from the response price_list_arn = response['PriceLists'][0]['PriceListArn'] print(f"\nFound price list ARN: {price_list_arn}")

# Step 3: Get the URL to download the price list file
file_url_response = client.get_price_list_file_url(
    PriceListArn=price_list_arn,
    FileFormat='json'
)

response = requests.get(file_url_response['Url']) pricing_data = response.json()

Possible Solution

No response

Additional Information/Context

No response

SDK version used

1.38.16

Environment details (OS name and version, etc.)

Sagemaker Studio

akhilnooney avatar May 14 '25 22:05 akhilnooney

Hello @akhilnooney, thank you for reaching out. I have replicated and have gotten the same issue. The output appears to be incomplete. I have reached out to the Pricing Service Team in regards to the API and for its response. I will update if there are any updates. If you have any questions, please do let us know., Thank you.

For Internal Tracking: P247540909

adev-code avatar Jun 03 '25 20:06 adev-code

Thankyou!!

akhilnooney avatar Jun 27 '25 18:06 akhilnooney

Hello any update on this?

claumazz avatar Aug 18 '25 15:08 claumazz

The Bedrock team has mentioned that it is not intended to make these prices available via the API. They are only meant for accounts that have been added to an allow-list. The true prices for these models that the vast majority of customers will be charged are listed on Bedrock pricing page and reside in Marketplace listings that the third party model provider controls. The Price List API does not pull from Marketplace and that has to be the source of record for any prices that are pulled programmatically. Closing this issue.

adev-code avatar Aug 22 '25 16:08 adev-code

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.

github-actions[bot] avatar Aug 22 '25 16:08 github-actions[bot]