mirror of
https://github.com/zed-industries/zed.git
synced 2026-10-19 11:04:06 +00:00
docs: Document Bedrock custom endpoints (#64103)
# Objective `endpoint_url` was not mentioned anywhere in the gateway docs for the Bedrock provider, so there was no way to discover that it exists, that it only redirects the Converse API, or that the built-in GPT and Grok models are Mantle models that ignore it and go to AWS regardless. ## Solution - Describe the solution used to achieve the objective above. Document the setting, the Converse-only scope, and the `available_models` workaround for gateways that expose the Converse API but not an OpenAI-compatible one -- including that model names there are sent verbatim without a cross-region inference prefix. Separately, it might be nice to describe how the Mantle models can be redirected using custom `anthropic_compatible` or `openai_compatible` providers, since Mantle implements the Messages, Responses, and Chat Completions routes. ## Testing >- Did you test these changes? If so, how? Yes, I tested the documented config and confirmed that the model is displayed in the model picker and that when selected the request is sent to the gateway. I am using Tailscale Aperture in this environment, and it captures and logs the entire request and response. >- Are there any parts that need more testing? I don't think so. >- How can other people (reviewers) test your changes? Is there anything specific they need to know? You'll need a gateway and access to AWS Bedrock, or evaluate the source and the tests. Tailscale Aperture is remarkably easy to set up as a gateway. >- If relevant, what platforms did you test these changes on, and are there any important ones you can't test? I don't think the platform is relevant, but I was testing Zed on Windows, with WSL. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A --------- Co-authored-by: Loren Gordon <8457307+lorengordon@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
This commit is contained in:
parent
df48a139ce
commit
5f08939a5d
1 changed files with 42 additions and 0 deletions
|
|
@ -252,6 +252,48 @@ Add models that are not yet built into Zed with `available_models`. Use the Bedr
|
|||
|
||||
`name` is sent to Bedrock as the model ID. Use the full ID, including a geo prefix or ARN when the model requires one (for example `us.anthropic.claude-sonnet-4-7` or `us.xai.grok-4.6`). Set `supports_tools` and `supports_images` for models that support those features. Set `thinking` to `true` to enable thinking, or to an object with `"adaptive": true`, optional `"has_xhigh": true`, and optional `budget_tokens`. Leave `default_temperature` unset for models that reject the temperature field, such as xAI and MoonshotAI models.
|
||||
|
||||
### Bedrock Custom Endpoints {#bedrock-custom-endpoints}
|
||||
|
||||
To send Bedrock Converse requests to a proxy or gateway instead of AWS, set `endpoint_url`:
|
||||
|
||||
```json [settings]
|
||||
{
|
||||
"language_models": {
|
||||
"bedrock": {
|
||||
"endpoint_url": "https://gateway.example.com/bedrock",
|
||||
"region": "us-east-1",
|
||||
"authentication_method": "api_key"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
[Mantle models](#bedrock-mantle-models), including the built-in GPT-5.6, GPT-5.5, GPT-5.4, and Grok 4.3 models and any models in `mantle_available_models`, are called through a different service with a different request shape, so they ignore `endpoint_url` and go to AWS.
|
||||
|
||||
If your gateway serves one of those models over the Converse API, add it as a [custom Bedrock model](#bedrock-custom-models) so Zed calls it through `endpoint_url`. Use the model ID your gateway expects as `name`:
|
||||
|
||||
```json [settings]
|
||||
{
|
||||
"language_models": {
|
||||
"bedrock": {
|
||||
"endpoint_url": "https://gateway.example.com/bedrock",
|
||||
"available_models": [
|
||||
{
|
||||
"name": "us.openai.gpt-5.6-luna",
|
||||
"display_name": "GPT-5.6 Luna (Gateway)",
|
||||
"max_tokens": 1000000,
|
||||
"max_output_tokens": 128000,
|
||||
"supports_tools": true,
|
||||
"supports_images": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Don't use an ID that a Mantle model already uses as `name`, whether it's built in (such as `gpt-5.6-luna`) or listed in `mantle_available_models`. A Mantle model with the same ID replaces the custom model, so requests go to AWS instead of your gateway.
|
||||
|
||||
### Bedrock Mantle Models {#bedrock-mantle-models}
|
||||
|
||||
Some models, such as the GPT-5.6 family (Sol, Terra, and Luna), GPT-5.5, GPT-5.4, and Grok 4.3, aren't available through Bedrock's Converse API and are only reachable through `bedrock-mantle`, AWS's OpenAI-compatible inference endpoint. Zed routes these models through `bedrock-mantle` automatically; they appear alongside the rest of the Bedrock models in the model picker once you're authenticated, with no extra configuration required.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue