> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracia.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Supported Models

> Embedding models supported by provider

The SDK automatically detects the provider based on the model name. Below is the complete list of supported embedding models.

<Note>
  Anthropic does not offer native embedding models. Use OpenAI, Google, or Amazon Bedrock for embeddings.
</Note>

## OpenAI

| Model                    | Dimensions | Description                                                                                         |
| ------------------------ | ---------- | --------------------------------------------------------------------------------------------------- |
| `text-embedding-3-small` | 1536       | Recommended for most use cases. Best balance of cost and performance.                               |
| `text-embedding-3-large` | 3072       | Higher quality embeddings with more dimensions. Supports `dimensions` parameter for reduced output. |
| `text-embedding-ada-002` | 1536       | Legacy model. Use `text-embedding-3-small` for new projects.                                        |

### Dimension Override

OpenAI's `text-embedding-3-small` and `text-embedding-3-large`, and Google's `text-embedding-004` support the `dimensions` parameter to reduce the output size:

```typescript theme={null}
// Reduce text-embedding-3-large from 3072 to 256 dimensions
const result = await tracia.runEmbedding({
  model: 'text-embedding-3-large',
  input: 'Hello world',
  dimensions: 256,
});

console.log(result.embeddings[0].values.length); // 256
```

## Google

| Model                | Dimensions | Description                           |
| -------------------- | ---------- | ------------------------------------- |
| `text-embedding-004` | 768        | Google's latest text embedding model. |

```typescript theme={null}
const result = await tracia.runEmbedding({
  model: 'text-embedding-004',
  input: 'Hello world',
});

console.log(result.embeddings[0].values.length); // 768
```

## Amazon Bedrock

| Model                          | Dimensions | Description                          |
| ------------------------------ | ---------- | ------------------------------------ |
| `amazon.titan-embed-text-v2:0` | 1024       | Amazon Titan Text Embeddings v2.     |
| `cohere.embed-english-v3`      | 1024       | Cohere Embed English v3 via Bedrock. |

```typescript theme={null}
const result = await tracia.runEmbedding({
  model: 'amazon.titan-embed-text-v2:0',
  input: 'Hello world',
});

console.log(result.provider); // 'amazon_bedrock'
```

<Note>
  Amazon Bedrock models require AWS credentials (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION`) to be set in your environment.
</Note>

## Voyage AI

| Model              | Dimensions | Description                                     |
| ------------------ | ---------- | ----------------------------------------------- |
| `voyage-3`         | 1024       | General-purpose embedding model.                |
| `voyage-3-large`   | 1024       | Higher quality, larger model.                   |
| `voyage-3-lite`    | 512        | Lightweight, lower cost.                        |
| `voyage-code-3`    | 1024       | Optimized for code retrieval and understanding. |
| `voyage-finance-2` | 1024       | Fine-tuned for financial documents.             |
| `voyage-law-2`     | 1024       | Fine-tuned for legal documents.                 |

```typescript theme={null}
const result = await tracia.runEmbedding({
  model: 'voyage-3',
  input: 'Hello world',
});

console.log(result.provider); // 'voyage'
```

<Note>
  Voyage AI requires a `VOYAGE_API_KEY` environment variable. Voyage is an embedding-only provider and cannot be used with `runLocal()`.
</Note>

## Using Custom Models

For embedding models not in the built-in list (fine-tuned or new releases), specify the provider explicitly:

```typescript theme={null}
const result = await tracia.runEmbedding({
  model: 'custom-embedding-model',
  provider: 'openai',
  input: 'Hello world',
});
```

<Warning>
  When using custom models, always specify the `provider` parameter to ensure the correct SDK is used.
</Warning>
