Trace2

LLM Backends

Comprehensive guide to configuring LLM backends in Trace2

LLM Backends

Trace2 supports multiple LLM backend systems for maximum flexibility.

Backend Options

LiteLLM (Default)

AutoGen

Configuration

Setting the Default Backend

import os
os.environ["TRACE_DEFAULT_LLM_BACKEND"] = "LiteLLM"  # or "AutoGen"

Provider Setup

OpenAI

[Add setup guide]

Anthropic

[Add setup guide]

Azure OpenAI

[Add setup guide]

Local Models

Advanced Topics

Caching

Rate Limiting

Error Handling

Cost Tracking

Troubleshooting

Next Steps