# anthropic: Allow configured models to opt into fast mode \(\#58225\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/bd2e879213ca90c0bd9a9d18194871e9484829ef)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: bd2e879213ca90c0bd9a9d18194871e9484829ef

Requested commit: bd2e879213ca90c0bd9a9d18194871e9484829ef

Commit: bd2e879213ca90c0bd9a9d18194871e9484829ef

Tree: e88cf7fd046f57ad79ca8d9c9686588cd21708a6

Author: Nakano Kenji

Committer: GitHub

## Message

```
anthropic: Allow configured models to opt into fast mode (#58225)

Adds support for enabling Anthropic fast mode on configured models.

Previously, Anthropic models configured through
`language_models.anthropic.available_models` were always marked as not
supporting fast mode, so `speed: "fast"` would be stripped before
sending requests even when the configured model supported Anthropic fast
mode.

This adds an optional `supports_fast_mode` field to configured Anthropic
models. When enabled, the model is marked as supporting fast mode and
the required Anthropic beta header is added automatically. Built-in
fast-mode model detection remains the fallback when the setting is
omitted.

Testing:
- `cargo fmt --package anthropic --package language_models --package
settings_content`
- `cargo test -p language_models available_model --lib`
- `cargo test -p anthropic from_listed_enables_fast_mode --lib`
- `cargo check -p language_models`
- Manual: verified in a local build that a configured Anthropic model
can send fast mode requests correctly.

Release Notes:

- agent: Allow specifying if fast mode is supported for custom anthropic
models

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
```

## Parents

- [503292376ed04fca814c8b4533b38f90863675fb](https://git.cafe/gitcafe/zed/commit/503292376ed04fca814c8b4533b38f90863675fb?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/bd2e879213ca90c0bd9a9d18194871e9484829ef?format=markdown)
