AWS Bedrock
Examples use Python. Beakpoint works with any language that OpenTelemetry supports.
Required AWS Bedrock Attributes
The following cost calculation tags are required for traces originating from AWS Bedrock API calls.
Always Required Fields
These fields are always required for Beakpoint to calculate Bedrock costs:
| Attribute Name | Example Value | Allowed Values |
|---|---|---|
gen_ai.system | aws.bedrock | aws.bedrock (must be this exact value) |
gen_ai.request.model | anthropic.claude-sonnet-4-20250514-v1:0 | Any valid Bedrock model ID |
gen_ai.usage.input_tokens | 512 | Non-negative integer |
gen_ai.usage.output_tokens | 128 | Non-negative integer |
Optional Enrichment Attributes
These fields are optional but improve cost accuracy when provided:
| Attribute Name | Example Value | Description |
|---|---|---|
gen_ai.response.model | anthropic.claude-sonnet-4-20250514-v1:0 | The exact model version returned in the response. Used as a fallback if gen_ai.request.model is absent. |
gen_ai.provider.name | aws.bedrock | OTel semconv v1.37.0+ standardized attribute (replaces gen_ai.system). Use this for new instrumentation; Beakpoint accepts both, but prefers gen_ai.provider.name when present. |
cloud.provider | aws | Provider identification. |
Model ID Handling
Bedrock model IDs follow the format [region.]provider.model-name[-date]-v{version}[:{variant}]. Beakpoint automatically parses these to extract the underlying provider and model for pricing lookup. Pass the model ID exactly as Bedrock provides it — no normalization is needed on your part.
For details on how model IDs are parsed, see GenAI Cost Tracking — AWS Bedrock Model ID Parsing.
Models from providers that Beakpoint already prices directly (Anthropic, OpenAI, Mistral, Meta, Cohere) use the same pricing whether called through Bedrock or through the provider's direct API. Bedrock does not add a per-token surcharge for these models.
Bedrock-Exclusive Models
The following models are available only through AWS Bedrock. Prices represent cost per 1 million input or output tokens, respectively.
| Provider | Model | Display Name | Input ($/M) | Output ($/M) |
|---|---|---|---|---|
| amazon | nova-pro | Amazon Nova Pro | $0.80 | $3.20 |
| amazon | nova-lite | Amazon Nova Lite | $0.06 | $0.24 |
| amazon | nova-micro | Amazon Nova Micro | $0.035 | $0.14 |
| meta | llama4-maverick-17b-128e-instruct | Llama 4 Maverick | $0.20 | $0.60 |
| meta | llama4-scout-17b-16e-instruct | Llama 4 Scout | $0.15 | $0.30 |
| mistral | mistral-large-2411 | Mistral Large | $2.00 | $6.00 |
| mistral | mistral-small-2501 | Mistral Small | $0.10 | $0.30 |
| cohere | command-r-plus | Command R+ | $2.50 | $10.00 |
| cohere | command-r | Command R | $0.15 | $0.60 |
Models from other providers (Anthropic Claude, OpenAI GPT) are also available on Bedrock and are priced using the same rates as the direct API. See the Anthropic Claude and OpenAI reference pages for those prices.
Python Example
The quickest way to emit the required attributes is with the opentelemetry-instrumentation-botocore package, which includes Bedrock extensions:
pip install opentelemetry-instrumentation-botocore
from opentelemetry.instrumentation.botocore import BotocoreInstrumentor
import boto3
# Instrument before creating the client. For full TracerProvider setup including
# _GenAiSystemProcessor, see the Track LLM Costs guide (referenced at the end).
BotocoreInstrumentor().instrument()
client = boto3.client("bedrock-runtime")
response = client.invoke_model(
modelId="anthropic.claude-sonnet-4-20250514-v1:0",
contentType="application/json",
accept="application/json",
body='{"messages": [{"role": "user", "content": "Hello!"}], "max_tokens": 4096, "anthropic_version": "bedrock-2023-05-31"}',
)
The instrumentation automatically sets gen_ai.system, gen_ai.request.model, gen_ai.usage.input_tokens, and gen_ai.usage.output_tokens on each span.
For full setup instructions, including how to configure the OpenTelemetry exporter for Beakpoint, see the Track LLM Costs guide.