Skip to content

anthropic: Allow configured models to opt into fast mode - #58225

Merged
bennetbo merged 4 commits into
zed-industries:mainfrom
Moeblack:anthropic-configured-model-fast-mode
Jul 10, 2026
Merged

anthropic: Allow configured models to opt into fast mode#58225
bennetbo merged 4 commits into
zed-industries:mainfrom
Moeblack:anthropic-configured-model-fast-mode

Conversation

@Moeblack

@Moeblack Moeblack commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

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

@cla-bot

cla-bot Bot commented Jun 1, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @Moeblack on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@zed-community-bot zed-community-bot Bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Jun 1, 2026
@Moeblack

Moeblack commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 1, 2026
@cla-bot

cla-bot Bot commented Jun 1, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@dinocosta dinocosta added the area:ai/anthropic Claude Code or Anthropic specific issues label Jun 2, 2026
@dinocosta

Copy link
Copy Markdown
Member

@Moeblack I might be missing something, but doesn't Zed already support fast model for these models? Using the latest stable release (1.4.4) I can see the toggle in the UI when selecting one of these models (Anthropic's Opus 4.6, 4.7, 4.8) , as well as confirm that it actually has a difference in speed, so I'm assuming it's working as intended.

@Moeblack

Moeblack commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

@Moeblack I might be missing something, but doesn't Zed already support fast model for these models? Using the latest stable release (1.4.4) I can see the toggle in the UI when selecting one of these models (Anthropic's Opus 4.6, 4.7, 4.8) , as well as confirm that it actually has a difference in speed, so I'm assuming it's working as intended.我可能遗漏了什么,但 Zed 不是已经支持这些模型的快速模式了吗?使用最新的稳定版本(1.4.4),我可以在选择这些模型(Anthropic 的 Opus 4.6、4.7、4.8)时在用户界面看到切换选项,并且确认速度确实存在差异,所以我认为它正在按预期工作。

@dinocosta
Actually, the models you mentioned are currently hard-coded in the project. I'm working on some other anthropic models... so I submitted this fix.

@bennetbo bennetbo added the area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features label Jul 10, 2026
@bennetbo
bennetbo enabled auto-merge July 10, 2026 14:52
@bennetbo

Copy link
Copy Markdown
Member

Thank you!

@bennetbo
bennetbo added this pull request to the merge queue Jul 10, 2026
Merged via the queue into zed-industries:main with commit bd2e879 Jul 10, 2026
36 checks passed
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…ies#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>
playdohface pushed a commit to playdohface/zed that referenced this pull request Aug 29, 2026
…ies#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai/anthropic Claude Code or Anthropic specific issues area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants