Skip to content

mirai73/bedrock-models

Repository files navigation

Bedrock Models Explorer Monorepo

Build Status License: MIT-0

A comprehensive toolkit for working with Amazon Bedrock foundation models, providing type-safe model IDs, cross-region inference utilities, and an interactive explorer.

Explore all available Bedrock models with our interactive web interface. Search by model name, filter by region, and find CRIS-enabled models.

Repository Structure

This is a monorepo managed with pnpm and turbo.

  • packages/python: Python library with model constants and CRIS utilities.
  • packages/typescript: TypeScript/JavaScript library with parity to the Python implementation.
  • docs: Source for the interactive Model Explorer website.
  • packages/shared: Shared data (bedrock_models.json) and generation scripts.

Features

  • Type-safe model IDs: Access all Bedrock model IDs as constants with full autocomplete support in Python and TypeScript.
  • Cross-Region Inference (CRIS): Automatically generate geo-prefixed or global model IDs.
  • Region Validation: Check model availability across AWS regions.
  • Auto-updated: Model data is refreshed weekly from the AWS Bedrock API.

Quick Start

Python

pip install bedrock-models
from bedrock_models import Models, cris_model_id

# Use model IDs with autocomplete
model_id = Models.ANTHROPIC_CLAUDE_SONNET_4_5_20250929
# Get regional CRIS ID
cris_id = cris_model_id(model_id, region="us-east-1")

# Qwen example
qwen_id = Models.QWEN_QWEN3_32B.cris("ap-southeast-1")

TypeScript / JavaScript

npm install bedrock-models
import { Models, crisModelId } from 'bedrock-models';

// Use model IDs with autocomplete
const modelId = Models.ANTHROPIC_CLAUDE_SONNET_4_5_20250929;
// Get regional CRIS ID
const crisId = crisModelId(modelId, 'us-east-1');

// Or use the fluent API
const fluentId = Models.ANTHROPIC_CLAUDE_SONNET_4_5_20250929.cris('us-east-1');

// Qwen example
const qwenId = Models.QWEN_QWEN3_32B.cris('ap-southeast-1');

Development

Prerequisites

Setup

# Install Node.js dependencies
pnpm install

# Build all packages
pnpm build

# Run tests
pnpm test

Regenerating Model Data

The model data is centralized in packages/shared/bedrock_models.json. To update it:

pnpm generate

This runs the Python script that fetches the latest models from AWS (requires AWS credentials).

License

MIT-0

About

A simple package that simplify working with Bedrock model id

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors