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

# LLM backend

> Choose the model backend — this decision drives your infrastructure requirements.

ⓘINFO

**Setup wizard → Step 4 (LLM backend).** The wizard asks which backend to use; this page explains the trade-offs and **how to get the API key** for each option — have it ready before you run the wizard.

This is the decision that determines infrastructure requirements before anything else. Make it first; everything else depends on it.

## What you need first

* [ ] A chosen backend (table below)
* [ ] If you pick **Claude API**: an Anthropic API key with credit
* [ ] If you pick **Bedrock**: model access enabled in your AWS region

## The four options

| Option | Data residency | Extra compute | Per-token cost | Quality | Best for |
| - | - | - | - | - | - |
| **\[A] Ollama (in-cluster)** | Fully in-VPC | 1 node, 8 CPU / 16 GB RAM | \$0 | Good (`llama3.1:8b`) | Regulated industries, strict residency |
| **\[B] Ollama (external)** | Your infra | None new | \$0 | Good (`llama3.1:8b`) | Teams already running Ollama |
| **\[C] Claude API** | Metadata to Anthropic | None — API calls | \~\$20–50/mo | Excellent (`claude-sonnet-4-6`) | Quality-first teams |
| **\[D] AWS Bedrock** | In-AWS-region | None — API calls | \~\$20–50/mo | Excellent (`claude-sonnet-4-6`) | AWS-native, IAM-first teams |

ⓘINFO

You can change backend later — a single Helm upgrade on the Kubernetes paths (see "Switching LLM backend" in [Troubleshooting](https://sariva.mintlify.site/troubleshooting.md)), or an `.env` / `docker-compose.yml` edit plus `docker compose up -d` on the [VM path](https://sariva.mintlify.site/deploy/vm-docker-cc.md).

## What each choice writes to `values.yaml`

`values.yaml` is the Helm **install-time** config file the [setup wizard](https://sariva.mintlify.site/install-setup/wizard.md) generates for you (alongside `config/customer_config.yaml`, the runtime config) — you don't hand-write it. On the [Linux VM (Docker) path](https://sariva.mintlify.site/deploy/vm-docker-cc.md) there is no `values.yaml`: the same choice lands in `docker-compose.yml` (an Ollama selection adds the `sariva-ollama` sidecar service) and `.env` (the `ANTHROPIC_API_KEY` line for Claude API; Bedrock uses the host's ambient AWS credentials). It's useful to see what your LLM choice produces:

```yaml [A] Ollama (in-cluster) theme={null}
llm:
  backend: ollama
  model: llama3.1:8b
  ollama_base_url: ""          # blank = use in-cluster Ollama
ollama:
  enabled: true
  model: llama3.1:8b
  storageSize: 20Gi
  storageClass: gp3
```

```yaml [B] Ollama (external) theme={null}
llm:
  backend: ollama
  model: llama3.1:8b
  ollama_base_url: "http://ollama.internal:11434"
ollama:
  enabled: false
```

```yaml [C] Claude API theme={null}
llm:
  backend: claude
  model: claude-sonnet-4-6
ollama:
  enabled: false
```

```yaml [D] AWS Bedrock theme={null}
llm:
  backend: bedrock
  model: anthropic.claude-sonnet-4-6-20250514-v1:0
  aws_region: us-east-1        # must match your Bedrock region
ollama:
  enabled: false
```

**Option \[A]** — dedicate one worker node with at least 8 vCPU / 16 GiB to Ollama. First model pull takes 2–5 minutes; restarts are fast (cached on the PV). On the [VM path](https://sariva.mintlify.site/deploy/vm-docker-cc.md) there is no worker node: the wizard adds a `sariva-ollama` service to `docker-compose.yml` (image `ollama/ollama:latest`, models kept on the `ollama-models` volume), and the platform reaches it at `http://sariva-ollama:11434` with no extra configuration.

**Option \[C]** — capture an Anthropic API key with at least \$25 credit (console.anthropic.com → API Keys). Topic names, consumer-group names, and lag metrics are sent to Anthropic as part of agent reasoning — the data-residency trade-off for this option.

**Option \[D]** — attach this to the AWS identity the Sariva platform runs as, and verify access first. On EKS that is the pod's AWS identity role. On the [VM path](https://sariva.mintlify.site/deploy/vm-docker-cc.md) Bedrock uses the VM's own AWS credentials (an EC2 instance profile, or the environment) — no API key and no IRSA; on EC2, set the instance's IMDS hop limit to 2 so the container can reach the role, the same rule as [CloudWatch log scanning](https://sariva.mintlify.site/deploy/vm-docker-cc.md#cloudwatch-ec2-only).

```json theme={null}
{
  "Effect": "Allow",
  "Action": ["bedrock:InvokeModel", "bedrock:InvokeModelWithResponseStream"],
  "Resource": "arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-*"
}
```

```bash theme={null}
aws bedrock list-foundation-models --region us-east-1
```

## Continue the deployment path

> [card] [Next: Slack (optional)](https://sariva.mintlify.site/prerequisites/slack/overview.md)
>
> Optional. Configure Slack if you want chat or approval workflows.

> [card] [Back to the AWS EKS path](https://sariva.mintlify.site/deploy/aws-eks-cc.md)
>
> Return to the EKS path map to confirm where this step fits.

> [card] [Back to the VM path](https://sariva.mintlify.site/deploy/vm-docker-cc.md)
>
> Running on a Linux VM? Return to the VM checklist.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.