docs: document Bedrock mantle protocol (#27296)

Implements:
https://linear.app/codercom/issue/AIGOV-518/add-docs-for-bedrock-mantle
Follow-up to: https://github.com/coder/coder/pull/26745
This commit is contained in:
Yevhenii Shcherbina
2026-07-16 14:58:09 -04:00
committed by GitHub
parent 3dd9265fa6
commit 1453b4b1fc
2 changed files with 37 additions and 7 deletions
+36 -4
View File
@@ -86,10 +86,42 @@ to have restricted permissions at the time of writing (June 2026).
Bedrock providers serve Anthropic models hosted on AWS and authenticate
with AWS credentials rather than a registered API key. Configure:
- A **region** (or a full base URL when routing through a proxy or a
non-standard endpoint that does not follow the
`https://bedrock-runtime.<region>.amazonaws.com` format).
- The **model** and **small fast model** identifiers.
- A **protocol**, either `InvokeModel` or `Mantle`. It determines the
endpoint format and which of the fields below apply. See
[InvokeModel](#invokemodel) and [Mantle](#mantle).
- An **endpoint** in the format the protocol requires:
`https://bedrock-runtime.<region>.amazonaws.com` for InvokeModel or
`https://bedrock-mantle.<region>.api.aws/anthropic` for Mantle. The AWS
region is read from the endpoint host.
- The **model** and **small fast model** identifiers, for InvokeModel
only. Mantle providers do not set them; the client chooses the model on
each request and AI Gateway forwards it upstream.
#### InvokeModel
The legacy Bedrock runtime API. AI Gateway translates each request into
Bedrock's InvokeModel format and sends it to
`https://bedrock-runtime.<region>.amazonaws.com`. Still supported, but
Mantle is recommended for new deployments.
#### Mantle
The newer Anthropic-compatible Bedrock endpoint, recommended by AWS for new
deployments. AI Gateway serves Anthropic models through the native Messages
API, forwarding the request body **unchanged** and only applying AWS SigV4
signing with the provider's base identity.
To route Claude Code through a Mantle provider, run it in mantle mode with
client-side signing disabled so the gateway signs centrally:
```sh
export CLAUDE_CODE_USE_MANTLE=1
export CLAUDE_CODE_SKIP_MANTLE_AUTH=1
export ANTHROPIC_BEDROCK_MANTLE_BASE_URL="<your-deployment-url>/api/v2/ai-gateway/<provider-name>"
export ANTHROPIC_AUTH_TOKEN="<your-coder-api-token>"
```
#### AWS credentials
Do not attach API keys to a Bedrock provider.
@@ -573,9 +573,7 @@ export const ProviderForm: FC<ProviderFormProps> = ({
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="invoke-model">
InvokeModel (default)
</SelectItem>
<SelectItem value="invoke-model">InvokeModel</SelectItem>
<SelectItem value="mantle">Mantle</SelectItem>
</SelectContent>
</Select>