Skip to content
Open
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
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1361,9 +1361,10 @@ The region is resolved from `AWSRegion`, `AWS_REGION`, `AWS_DEFAULT_REGION`,
or the standard AWS config chain. The base URL is resolved from `BaseURL`,
`AWS_BEDROCK_BASE_URL`, or
`https://bedrock-mantle.{region}.api.aws/openai/v1`.
The `/openai/v1` prefix is intentional; Bedrock's generic `/v1` route is a
different API surface and is not interchangeable with the OpenAI-compatible
route.
The default Mantle base URL remains `/openai/v1`, which AWS documents for OpenAI
model families. Some other Mantle model families use `/v1` instead; see
[Mantle API roots](bedrock/README.md#mantle-api-roots) and the AWS model card for
your deployment before overriding `BaseURL`.

To select a named profile:

Expand Down
16 changes: 16 additions & 0 deletions bedrock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ Use the `bedrock` package to configure the normal OpenAI client for Amazon Bedro

Runtime hostnames use the correct suffix for the selected AWS partition. Canonical Runtime, FIPS, and dual-stack `BaseURL` overrides automatically select the endpoint family when `Endpoint` is omitted. Canonical AWS hosts must use HTTPS and match the configured region and endpoint. Custom or proxy hosts default to the Mantle signer; set `EndpointRuntime` explicitly when a custom host requires Runtime signing.

### Mantle API roots

Amazon Bedrock exposes more than one OpenAI-compatible API root on `bedrock-mantle`, and the route depends on the model family. OpenAI model pages such as [GPT-5.5](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-55.html) document `/openai/v1`, while other model pages such as [Kimi K2.5](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-moonshot-ai-kimi-k2-5.html) document `/v1`. `EndpointMantle` keeps `/openai/v1` as its default for backwards compatibility; choosing `EndpointMantle` does not automatically select a route from the model name.
Comment thread
fscfede-beep marked this conversation as resolved.

When the AWS model card for a deployment documents `/v1`, set the Mantle `BaseURL` explicitly:

```go
bedrock.Config{
Endpoint: bedrock.EndpointMantle,
AWSRegion: "us-east-1",
BaseURL: "https://bedrock-mantle.us-east-1.api.aws/v1",
}
```

See the AWS model card for the model you are using before choosing the route. For example, AWS documents `https://bedrock-mantle.<region>.api.aws/openai/v1` for GPT-5.5 and `https://bedrock-mantle.<region>.api.aws/v1` for Kimi K2.5.

## Runtime Chat Completions

```go
Expand Down