> ## Documentation index
> Fetch the complete documentation index at: https://rolter-ai-rolter.docs7.io/llms.txt
> Ask it with GET https://rolter-ai-rolter.docs7.io/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.

# Compatibility: Cross-Dialect Translation Settings

> The values Rolter applies when translating a request between the OpenAI and Anthropic wire formats — the Anthropic API version header and the default max_tokens.

Rolter accepts both the OpenAI and Anthropic wire formats and translates between them and whatever dialect the upstream provider speaks. A few values have no equivalent on the other side of that translation and have to come from somewhere: the compatibility policy is where they come from.

Edit it from **Settings → Compatibility** in the dashboard, or through the management API.

---

## Anthropic API version

Sent as the `anthropic-version` header on every request Rolter translates into the Anthropic dialect. It is forwarded **verbatim**, so it must be a dated release string such as `2023-06-01`.

Anything else is rejected up front, by both the dashboard and the API. A malformed version does not fail loudly at the point you save it — it fails every Anthropic call afterwards, with an opaque error from the upstream.

When no value is stored or configured, the default is the version recorded in Rolter's [specification registry](/api/specifications); a database-backed deployment that never saved this setting reads the default its migrations stored, which is the same version today. A native Anthropic request that sends its own `anthropic-version` keeps it; this value only fills the gap when there is none. Health probes and the provider connection test always send the recorded default rather than this setting: they check that the API answers and accepts the key, which no dated version changes.

---

## Default max tokens

Anthropic requires `max_tokens` on every request; OpenAI treats it as optional. When an OpenAI-shaped request that omits it is translated into the Anthropic dialect, this value fills the gap.

Valid range is 1–1000000. A request that sets `max_tokens` explicitly always wins — this is only the fallback.

---

## API

Reading is for a **superadmin** or a **security auditor** (a [deployment role](/security/rbac#deployment-roles)); updating is **superadmin only**. Every update is audited.

```bash
curl -H "Authorization: Bearer $ROLTER_ADMIN_TOKEN" \
  https://control.example.com/api/v1/compatibility-policy

curl -X PUT -H "Authorization: Bearer $ROLTER_ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"anthropic_version": "2023-06-01", "default_max_tokens": 4096}' \
  https://control.example.com/api/v1/compatibility-policy
```

The read response also carries `restart_required`, the list of fields that only take effect after a gateway restart. It is empty today — both fields reach the data plane through the snapshot — but the server owns the list, so the dashboard surfaces a notice whenever it is non-empty rather than hard-coding which fields those are.
