Skip to main content
Tracia supports Amazon Bedrock via LiteLLM. No additional provider packages are needed. LiteLLM is included as a dependency.

Installation

pip install tracia

Environment Variables

Set your AWS credentials:
AWS_ACCESS_KEY_ID=your-access-key-id
AWS_SECRET_ACCESS_KEY=your-secret-access-key
AWS_REGION=us-east-1

Usage

Bedrock hosts models from multiple vendors. Use the full Bedrock model ID:

Amazon Nova

result = client.run_local(
    model="amazon.nova-lite-v1:0",
    messages=[
        {"role": "user", "content": "What are the benefits of cloud computing?"}
    ],
    temperature=0.7,
    max_output_tokens=500,
)

Anthropic Claude (via Bedrock)

result = client.run_local(
    model="anthropic.claude-sonnet-4-5-20250929-v1:0",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Explain quantum computing."},
    ],
    temperature=0.7,
    max_output_tokens=1000,
)

Meta Llama (via Bedrock)

result = client.run_local(
    model="meta.llama4-scout-17b-instruct-v1:0",
    messages=[
        {"role": "user", "content": "Write a haiku about programming."}
    ],
)

Streaming

stream = client.run_local(
    model="amazon.nova-lite-v1:0",
    messages=[{"role": "user", "content": "Write a poem about the cloud."}],
    stream=True,
)

for chunk in stream:
    print(chunk, end="")

Async Usage

result = await client.arun_local(
    model="amazon.nova-lite-v1:0",
    messages=[
        {"role": "user", "content": "What are the benefits of cloud computing?"}
    ],
)

Available Models

Bedrock provides access to models from multiple vendors:
VendorExample Model IDDescription
Amazonamazon.nova-lite-v1:0Amazon’s Nova family
Anthropicanthropic.claude-sonnet-4-5-20250929-v1:0Claude models via Bedrock
Metameta.llama4-scout-17b-instruct-v1:0Llama models via Bedrock
Mistralmistral.mistral-large-3-675b-instructMistral models via Bedrock
DeepSeekdeepseek.v3-v1:0DeepSeek models via Bedrock
Coherecohere.command-r-plus-v1:0Cohere models via Bedrock
See the AWS Bedrock documentation for the complete list of available models.