Skip to main content
The Python SDK uses LiteLLM under the hood for unified provider access. LiteLLM is included as a dependency, so no additional provider packages are needed.

Installation

LiteLLM is installed automatically with Tracia and handles all provider communication.

OpenAI

Environment Variable

Usage

Streaming

Anthropic

Environment Variable

Usage

Streaming

Google

Environment Variable

Usage

Streaming

Provider Override

The SDK automatically detects the provider based on the model name. For custom or fine-tuned models not in the built-in list, specify the provider explicitly:

API Key Override

Override the environment variable for a specific request:
This is useful for:
  • Multi-tenant applications with per-customer API keys
  • Testing with different API keys
  • Using organization-specific keys

Error Handling by Provider

Provider Comparison

Amazon Bedrock hosts models from multiple vendors (Amazon, Anthropic, Meta, Mistral, etc.). Feature support depends on the specific model. See the Bedrock page for details.