Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions docs/ai-coder/ai-gateway/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Loading