npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

autotel-bedrock

v2.0.2

Published

Amazon Bedrock facts for autotel's canonical gen_ai.* spans: model-id normalisation for inference profiles and ARNs, cloud.region, and a Bedrock price table

Readme

autotel-bedrock

Amazon Bedrock facts for autotel's canonical gen_ai.* spans.

autotel-genai emits gen_ai.* spans for every AI SDK call against Amazon Bedrock (gen_ai.provider.name = aws.bedrock, the model id, token usage, input and output messages) from the observer alone:

import { registerTelemetry } from 'ai';
import { autotelTelemetry } from 'autotel-genai/observer';

registerTelemetry(autotelTelemetry());

This package adds the Bedrock facts that no OpenTelemetry convention covers and no generic price table knows.

What this package adds

import { init } from 'autotel';
import { registerTelemetry } from 'ai';
import { autotelTelemetry } from 'autotel-genai/observer';
import {
  bedrockCompatibility,
  bedrockProviderAttributes,
  BEDROCK_PRICING,
} from 'autotel-bedrock';

init({
  service: 'payments-bot',
  spanEnrichers: [bedrockCompatibility({ region: 'eu-west-1' })],
});

registerTelemetry(
  autotelTelemetry({
    pricing: BEDROCK_PRICING,
    providerAttributes: bedrockProviderAttributes,
  }),
);

One model, three spellings

Bedrock accepts the same model as a foundation-model id, a cross-region inference profile, or an inference-profile ARN:

anthropic.claude-sonnet-4-5-20250929-v1:0
eu.anthropic.claude-sonnet-4-5-20250929-v1:0
arn:aws:bedrock:eu-west-1:123456789012:inference-profile/eu.anthropic.claude-sonnet-4-5-20250929-v1:0

Dashboards group by gen_ai.request.model and Datadog / Langfuse price by it, so a profile or ARN splits one model into several rows and drops the cost (cost_estimate_status:skipped_unsupported_model_pricing). The enricher rewrites gen_ai.request.model / gen_ai.response.model to the foundation id and keeps the rest as their own attributes:

| Attribute | Value | | -------------------------------------- | ------------------------------------------- | | gen_ai.request.model | anthropic.claude-sonnet-4-5-20250929-v1:0 | | aws.bedrock.model.id_raw | the id as the request spelled it | | aws.bedrock.model.arn | the ARN, when one was used | | aws.bedrock.inference_profile.region | eu, us, global… | | aws.bedrock.model.vendor | anthropic, amazon, meta, zai… | | cloud.provider / cloud.region | aws / the option or AWS_REGION |

Pass normalizeModel: false to keep the requested spelling and add the extra attributes only. Spans from other providers pass through untouched.

Register it under spanEnrichers. spanProcessors replaces the pipeline autotel builds, including the destinations you configured.

Stop reason and guardrails

The AI SDK folds Bedrock's stop reasons into its own (guardrail_intervened and content_filtered both become content-filter; malformed_tool_use and model_context_window_exceeded become other), and its lifecycle events omit the guardrail trace. bedrockProviderAttributes records both:

registerTelemetry(
  autotelTelemetry({
    pricing: BEDROCK_PRICING,
    providerAttributes: bedrockProviderAttributes,
  }),
);

| Attribute | Value | | ---------------------------------- | --------------------------------------------------------- | | aws.bedrock.stop_reason | end_turn, max_tokens, guardrail_intervened… | | aws.bedrock.guardrail.intervened | true when the guardrail stopped generation | | aws.bedrock.guardrail.id | from the trace, so set guardrailConfig.trace: 'enabled' |

gen_ai.response.finish_reasons keeps the AI SDK's unified value, so a dashboard built on it keeps working. An intervention is a policy outcome: the span's status stays unset, and guardrail.intervened / total is one query.

Bedrock-only pricing

BEDROCK_PRICING is a table for autotelTelemetry({ pricing }) covering the models that exist only behind Bedrock: Nova, Llama, Mistral, DeepSeek, GLM. Bedrock bills Anthropic models at Anthropic's rates, and autotel-genai prices those by family, so they are not listed here.

Keys match the way autotel-genai/cost resolves ids (exact, then prefix, tried again after each region and vendor prefix is peeled), so eu.amazon.nova-pro-v1:0 resolves via amazon.nova-pro.

The prices are list prices at the time of writing, a convenience default rather than a billing source of truth. Spread and override what you use:

autotelTelemetry({
  pricing: {
    ...BEDROCK_PRICING,
    'zai.glm-4.7-flash': { inputPer1M: 0.5, outputPer1M: 2 },
  },
});

Runnable example: apps/example-bedrock, a Lambda handler around an AI SDK tool-loop agent, run in-process against Bedrock.

Already covered elsewhere

| Signal | Comes from | | ---------------------------------------- | -------------------------------------- | | gen_ai.provider.name = aws.bedrock | autotel-genai provider normalisation | | Anthropic model cost on Bedrock | autotel-genai/cost family pricing | | Lambda spans, cold starts, X-Ray context | autotel-aws/lambda | | Datadog / Langfuse ingestion | autotel-backends, autotel-langfuse |