Commit graph

416 commits

Author SHA1 Message Date
Marshall Bowers
a07d0f4d21
Assign meaningful names to some single-letter bindings (#51432)
This PR assigns meaningful names to some single-letter bindings we were
using to refer to the organization.

Release Notes:

- N/A
2026-03-12 22:49:17 +00:00
Tom Houlé
9fb57b0daf
language_model: Centralize LlmApiToken to a singleton (#51225)
The edit prediction, web search and completions endpoints in Cloud all
use tokens called LlmApiToken. These were independently created, cached,
and refreshed in three places: the cloud language model provider, the
edit prediction store, and the cloud web search provider. Each held its
own LlmApiToken instance, meaning three separate requests to get these
tokens at startup / login and three redundant refreshes whenever the
server signaled a token update was needed.

We already had a global singleton reacting to the refresh signals:
RefreshLlmTokenListener. It now holds a single LlmApiToken that all
three services use, performs the refresh itself, and emits
RefreshLlmTokenEvent only after the token is fresh. That event is used
by the language model provider to re-fetch models after a refresh. The
singleton is accessed only through `LlmApiToken::global()`.

I have tested this manually, and it token acquisition and usage appear
to be working fine.

Edit: I've tested it with a long running session, and refresh seems to
be working fine too.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2026-03-11 20:54:51 +01:00
Neel
175707f95c
open_ai: Support reasoning summaries in OpenAI Responses API (#50959)
Related to AI-79.

Release Notes:

- N/A
2026-03-09 13:51:22 +00:00
Piotr Osiewicz
97421c670e
Remove unreferenced dev dependencies (#51093)
This will help with test times (in some cases), as nextest cannot figure
out whether a given rdep is actually an alive edge of the build graph

Closes #ISSUE

Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A
2026-03-09 13:22:12 +01:00
John Tur
dde76cd5f8
Enable extended reasoning for Anthropic models in Copilot (#46540)
Fixes https://github.com/zed-industries/zed/issues/45668

https://github.com/microsoft/vscode-copilot-chat used as a reference for
headers and properties we need to set

| Before | After | 
| --- | --- |
| <img width="300"
src="https://github.com/user-attachments/assets/d112a9ef-52d2-42ff-a77b-4b4b15f950fe"
/>| <img width="300"
src="https://github.com/user-attachments/assets/0f1d7ae0-bee1-46f7-92ef-aea0fa6cde7a"
/> |

Release Notes:

- Enabled thinking mode when using Anthropic models with Copilot
2026-03-08 09:34:46 +00:00
Antoine Mathie
a3d9269567
ai: Add LMStudio API URL & API key support (#48309)
Hello,

This pull request aims to improve usage of lmstudio ai provider for
remote lmstudio nodes and support api key authentication.

This has been tested on my local network from a headless lms node. See
attached demo vid

Release Notes:

- lmstudio: Added support for specifying an API key via the UI


https://github.com/user-attachments/assets/7594cf49-3198-4171-b3e9-c3264cf35b6e

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-03-06 16:49:55 +00:00
Richard Feldman
3b3ffc022e
Add GPT-5.4 and GPT-5.4-pro BYOK models (#50858)
Add GPT-5.4 and GPT-5.4-pro as Bring Your Own Key model options for the
OpenAI provider.

**GPT-5.4** (`gpt-5.4`):
- 1,050,000 token context window, 128K max output
- Supports chat completions, images, parallel tool calls
- Default reasoning effort: none

**GPT-5.4-pro** (`gpt-5.4-pro`):
- 1,050,000 token context window, 128K max output
- Responses API only (no chat completions)
- Default reasoning effort: medium (supports medium/high/xhigh)

Also fixes context window sizes for GPT-5 mini and GPT-5 nano (272K →
400K) to match current OpenAI docs.

Closes AI-78

Release Notes:

- Added GPT-5.4 and GPT-5.4-pro as available models when using your own
OpenAI API key.
2026-03-05 23:40:03 -05:00
Marshall Bowers
0e5b4e1351
language_models: Defer fetching models for the Zed provider until fully signed-in (#50857)
This PR updates the model-fetching behavior for the Zed provider to wait
until the user is fully signed-in before we attempt to fetch the models.

We now subscribe to the `UserStore` and listen for the
`PrivateUserInfoUpdated` event. If we receive that event and the user is
not currently signed out, then we should be all set to fetch the models.

Closes CLO-424.

Release Notes:

- N/A
2026-03-05 15:06:45 -05:00
Tom Houlé
95adddf120
language_models: Avoid debug formatting in Copilot Chat, OpenAI errors (#50824)
See these screenshots:

<img width="832" height="564" alt="image"
src="https://github.com/user-attachments/assets/64d04fe7-4be7-4fbf-8536-b4b7a2ea62ed"
/>

<img width="836" height="1094" alt="image"
src="https://github.com/user-attachments/assets/247b215c-8e7e-4eff-8e08-b1b9ee8894b9"
/>

Release Notes:

- Fixed some error messages in OpenAI/Copilot Chat conversations that
were using the Debug representation.
2026-03-05 16:00:57 +01:00
Bennet Bo Fenner
ba220fc105
mistral: Enable streaming tool calls (#50793)
Release Notes:

- N/A
2026-03-05 08:59:05 +00:00
Bennet Bo Fenner
87bc2aac5c
Add support for streaming tool input to more providers (#50682)
To test:
- [x] Bedrock
- [x] Copilot Chat
- [x] Deepseek
- [x] Open AI
- [x] Open Router
- [x] Vercel
- [x] Vercel AI Gateway
- [x] xAI
- [x] Mistral

Release Notes:

- N/A
2026-03-04 17:36:25 +01:00
Richard Feldman
866ec42371
Remove deprecated Gemini 3 Pro Preview (#50503)
Gemini 3 Pro Preview has been deprecated in favor of Gemini 3.1 Pro.
This removes the `Gemini3Pro` variant from the `Model` enum and all
associated match arms, updates eval model lists, docs, and test
fixtures.

A serde alias (`"gemini-3-pro-preview"`) is kept on `Gemini31Pro` so
existing user settings gracefully migrate to the replacement model.

Closes AI-66

Release Notes:

- Removed deprecated Gemini 3 Pro Preview model; existing configurations
automatically migrate to Gemini 3.1 Pro.
2026-03-04 15:53:26 +00:00
Tom Houlé
a1d40370cf
cloud_api_client: Send the organization ID in LLM token requests (#50517)
This is already expected on the cloud side. This lets us know under
which organization the user is logged in when requesting an llm_api
token.

Closes CLO-337

Release Notes:

- N/A
2026-03-04 15:45:33 +01:00
Umesh Yadav
83fd8fa4df
language_models: Handle usage-only events with empty choices in OpenRouter (#50603)
Closes #50569

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Previously, OpenRouter responses containing only usage data (without any
choices) would cause an error. Now the mapper properly emits usage
updates
for these events without failing.

Release Notes:

- Fixed an error when OpenRouter returns a usage-only event with empty
choices.
2026-03-03 13:58:47 +00:00
dancer
0859cce2e5
Add Vercel AI gateway provider integration (#50207)
## Summary
- add a new `ai_gateway` language model provider in zed using the
openai-compatible chat completions path
- register ai gateway in provider wiring, settings schema, and default
settings
- add vercel ai gateway icon and provider list entry
- parse ai gateway model capabilities from tags (`tool-use`, `vision`)
and supported parameters
- clean up ai gateway oidc auth failures into a concise actionable error
message

Release Notes:

- Added Vercel AI Gateway as a new LLM provider in Zed.
2026-02-26 17:54:44 -05:00
Tom Houlé
6a749380aa
Add fast mode toggle in agent panel (#49714)
This is a staff only toggle for now, since the consequences of
activating it are not obvious and quite dire (tokens costs 6 times
more).

Also, persist thinking, thinking effort and fast mode in DbThread so the
thinking mode toggle and thinking effort are persisted.

Release Notes:

- Agent: The thinking mode toggle and thinking effort are now persisted
when selecting a thread from history.
2026-02-26 21:19:41 +01:00
Bennet Bo Fenner
a2e34cb7bf
agent: Implement streaming for edit file tool (#50004)
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-02-25 22:58:25 +00:00
Richard Feldman
a18b7727ee
Add GPT-5.3-Codex BYOK model under the OpenAI provider (#50122)
Adds `gpt-5.3-codex` as a built-in model under the OpenAI provider for
BYOK usage.

Model specs:
- 400,000 context window
- 128,000 max output tokens
- Reasoning token support (default medium effort)
- Uses the Responses API (like other codex models)
- Token counting falls back to the gpt-5 tokenizer

Closes AI-59

Release Notes:

- Added support for GPT-5.3-Codex as a bring-your-own-key model in the
OpenAI provider.
2026-02-25 16:29:01 -05:00
Tom Houlé
b085d847d5
language_models: Activate StreamEnded support in completion streams for Cloud provider (#49337)
Now that the cloud-side StreamEnded support has landed, enable it on the
Zed client:

- Send the
`x-zed-client-supports-stream-ended-request-completion-status` header so
cloud knows to send `StreamEnded` status events.
- Track whether `StreamEnded` was received during the stream.
- Emit `StreamEndedUnexpectedly` error when the stream closes without a
`StreamEnded` status, indicating the response was truncated.

Concretely, this means that the agent panel will now display an
abnormally terminated response stream for model calls through a Zed
subscription as an error instead of just stopping.

Release Notes:

- The agent panel now displays an abnormally terminated response stream
for model calls through a Zed subscription as an error instead of just
stopping.
2026-02-18 19:42:06 +01:00
Richard Feldman
5670e66fa7
Add support for Claude Sonnet 4.6 (#49386)
<img width="435" height="211" alt="Screenshot 2026-02-17 at 1 32 48 PM"
src="https://github.com/user-attachments/assets/136c188d-5001-4526-961e-9f7faccc5f7a"
/>


Add support for the new Claude Sonnet 4.6 model across the anthropic,
bedrock, and language_models crates. Includes base, thinking, and 1M
context variants.

Closes AI-39

Release Notes:

- Added BYOK support for Claude Sonnet 4.6
2026-02-17 18:45:12 +00:00
Shardul Vaidya
6f8023530c
bedrock: Model streamlining and cleanup (#49287)
Release Notes:

- Improved Bedrock error messages: region-locked models ask the user to
try a different region, rate limits and access errors are reported
cleanly instead of as raw API responses
- Streamlined Bedrock model list to 39 curated models
- Fixed API errors when using non-tool models in agent threads

---------

Co-authored-by: Ona <no-reply@ona.com>
2026-02-17 09:22:25 +00:00
Sathiyaraman M
6e33d838c9
copilot: Display cost multiplier for Github Copilot models (#44800)
### Description

Related Discussions: #44499, #35742, #31851

Display cost multiplier for GitHub Copilot models in the model selectors
(Both in Chat Panel and Inline Assistant)

<img width="436" height="800" alt="image"
src="https://github.com/user-attachments/assets/c9ebd8fa-4d55-4be8-b3e1-f46dbf1f0145"
/>


### Some technical notes

Although this PR's primary intent is to show the cost multiplier for
GitHub Copilot models alone, I have included some necessary plumbing to
allow specifying costs for other providers in future. I have introduced
an enum called `LanguageModelCostInfo` for showing cost in different
ways for different models. Now, this enum is used in `LanguageModel`
trait to get the cost info.

For now to begin with, in `LanguageModelCostInfo`, I have specified two
ways of pricing: Request-based (1 Agent request - GitHub Copilot uses
this) and Token-based (1M Input tokens / 1M Output tokens). I had
initially thought about adding a `Free` type, especially for Ollama but
didn't do it after realizing that Ollama has paid plans. Right now, only
the Request-based pricing is implemented and used for Copilot models.

Feel free to suggest changes on how to improve this design better.

Release Notes:

- Show cost multiplier for GitHub Copilot models

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-02-16 15:24:59 -03:00
Marshall Bowers
0e7d63348b
agent_ui: Ship thinking effort selection for Zed provider (#49274)
This PR removes the `cloud-thinking-effort` feature flag to ship the
thinking effort UI for the Zed provider.

Release Notes:

- Added support for controlling thinking effort levels with supported
models using the Zed provider.
2026-02-16 11:58:35 -05:00
David Turnbull
323b579578
bedrock: Add placeholder tool when summarising threads with tool history (#48863)
Bedrock Converse API requires toolConfig whenever messages have tool use
or result blocks. PR #33174 handled the case where tools are defined but
tool_choice is None. This change addresses another case: the tools array
is empty (e.g. thread summarisation) but messages still have tool blocks
from conversation history. A placeholder tool satisfies the requirement.

Testing:

Tested manually by:
1. Starting a conversation with Bedrock that uses tools
2. Triggering thread summarisation
3. Confirming summarisation now succeeds instead of failing with an API
error

Release Notes:

- Fixed Bedrock thread summarization failing when conversation had tools
2026-02-16 14:45:19 +00:00
Tom Houlé
93ead966c2
cloud_llm_client: Add StreamEnded and Unknown variants to CompletionRequestStatus (#49121)
Add StreamEnded variant so the client can distinguish between a stream
that the cloud ran to completion versus one that was interrupted (see
CLO-258). **That logic is to be added in a follow up PR**.

Add an Unknown fallback with #[serde(other)] for forward-compatible
deserialization of future variants.

The client advertises support via a new
x-zed-client-supports-stream-ended-request-completion-status header. The
server will only send the new variant if that header is passed. Both
StreamEnded and Unknown are silently ignored at the event mapping layer
(from_completion_request_status returns Ok(None)).

Part of CLO-264 and CLO-266; cloud-side changes to follow.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2026-02-16 15:39:47 +01:00
Xiaobo Liu
52a9b6c864
ollama: Remove backwards compatibility for Ollama tool call IDs (#49246)
Release Notes:

- N/A

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2026-02-16 14:33:29 +00:00
Bennet Bo Fenner
630aadbc05
Fix thinking models when using non-zed providers (#49117)
This PR #47407 broke thinking models for non-zed providers (Nightly
only) because we set `thinking_allowed` to `thinking_enabled`
(previously `true`)
[here](b671c8cdc5/crates/agent/src/thread.rs (L2400)).
The value of `thinking_enabled` eventually comes from the
`LanguageModel::supports_thinking` function, which returns `false` for
all models except the ones coming from Zed.
This PR implements `thinking_enabled` for other providers.

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A
2026-02-13 19:16:02 +01:00
Vianney le Clément de Saint-Marcq
7b569de35c
mistral: Add x-affinity header (#48584)
Mistral Vibe, the official coding agent from Mistral, sets the
x-affinity header to the session ID to enable prompt caching. This patch
implements the same mechanism, resulting in a faster agent loop.

Release Notes:

- Added prompt caching for Mistral AI.
2026-02-13 12:03:05 +00:00
Ian Chamberlain
49dee40073
agent: Skip empty assistant messages for Mistral provider (#47579)
This small change *may* help with #39211, #35025 or #39031 although I'm
not positive it will fix it entirely. At a minimum, it should prevent
sending invalid requests to the Mistral API, which return a 400 error
and can prevent the thread from progressing if it gets stuck in a retry
loop.

This should prevent sending a message like `{ "role": "assistant",
"content": "" }` if for some reason the thread contains a message with
an empty text content and no tool calls.

Some users (including myself) have encountered this with the Devstral 2
models, although it doesn't seem trivial to reproduce:
https://github.com/zed-industries/zed/issues/37021#issuecomment-3728902562

When it occurs, error logs look something like this:
```
2026-01-24T19:53:35-08:00 ERROR [crates/agent/src/thread.rs:984] invalid type: string "Failed to connect to Mistral API: 400 Bad Request {\"object\":\"error\",\"message\":\"Assistant message must have either content or tool_calls, but not none.\",\"type\":\"invalid_request_assistant_message\",\"param\":null,\"code\":\"3240\"}", expected struct EditFileToolOutput
2026-01-24T19:53:35-08:00 ERROR [crates/agent/src/thread.rs:984] invalid type: string "Failed to connect to Mistral API: 400 Bad Request {\"object\":\"error\",\"message\":\"Assistant message must have either content or tool_calls, but not none.\",\"type\":\"invalid_request_assistant_message\",\"param\":null,\"code\":\"3240\"}", expected struct EditFileToolOutput
2026-01-24T19:53:35-08:00 ERROR [crates/agent/src/thread.rs:984] invalid type: string "Failed to connect to Mistral API: 400 Bad Request {\"object\":\"error\",\"message\":\"Assistant message must have either content or tool_calls, but not none.\",\"type\":\"invalid_request_assistant_message\",\"param\":null,\"code\":\"3240\"}", expected struct EditFileToolOutput
```

Release Notes:

- Fixed agent sometimes sending invalid messages to Mistral API
2026-02-13 11:49:56 +00:00
gitarth
13a9386a29
language_models: Add image support for Bedrock (#47673)
Closes #N/A (no existing issue - implemented to enable image input for
Bedrock models)

This PR enables the "@" image mention feature for Bedrock models that
support vision capabilities.

**Changes:**
- Added `supports_images()` method to Bedrock `Model` enum
- Wired up image support in the Bedrock language model provider
- Added `MessageContent::Image` handling to convert base64 images to
Bedrock's expected format
- Added tool result image support

**Supported models:** Claude 3/3.5/4 family, Amazon Nova Pro/Lite, Meta
Llama 3.2 Vision, Mistral Pixtral

Release Notes:

- Added image input support for Amazon Bedrock models with vision
capabilities
2026-02-13 12:41:14 +01:00
Richard Feldman
0b8424a14c
Remove deprecated GPT-4o, GPT-4.1, GPT-4.1-mini, and o4-mini (#49082)
Remove GPT-4o, GPT-4.1, GPT-4.1-mini, and o4-mini from BYOK model
options in Zed before OpenAI retires these models.

These models are being retired by OpenAI (ChatGPT workspace support ends
April 3, 2026), so they have been removed from the available models list
in Zed's BYOK provider.

Closes AI-4

Release Notes:

- Removed deprecated GPT-4o, GPT-4.1, GPT-4.1-mini, and o4-mini models
from OpenAI BYOK provider
2026-02-13 04:54:22 +00:00
Santiago Bernhardt
2eb015d10b
Allow changing the context window size for Ollama (#44506)
Release Notes:

- Changed the way context window is set for ollama at the provider level
instead of per model.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2026-02-12 16:58:24 +00:00
Shardul Vaidya
5026280131
bedrock: Enable 1M context window (#48542)
Release Notes:

- Added `allow_extended_context` to the Bedrock settings which enables
1M context windows on models that support it

---------

Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-02-12 14:32:24 +00:00
Daniel Strobusch
22c16b690a
language_models: Handle empty tool call arguments consistently (#48958)
Normalize handling of empty tool call arguments across all LLM
providers. Many providers return empty strings for tool calls with no
arguments, which would previously fail JSON parsing.

- Created shared parse_tool_arguments() helper in provider/util.rs that
treats empty strings as empty JSON objects ({})
- Refactored 10 occurrences across 9 provider files to use the helper
- Ensures consistent behavior across all providers (anthropic, bedrock,
copilot_chat, deepseek, lmstudio, mistral, open_ai, open_router)

Closes: #48955

Release Notes:

- Fixed tool calls with no arguments failing when using certain LLM
providers
2026-02-12 14:05:41 +00:00
zapp88
8742889301
Add user picked model to be used as a default for open router provider when generating comments and thread summary (#47475)
Closes #37525

By default, thread summary uses default_fast_model (if set), otherwise
default_model, which resolves to openrouter/auto for openrouter
provider. This may cause the summary to be generated by a different
model than the one used by the agent, potentially leading — in cases
such as Claude Opus 4.5 — to summary costs exceeding main agent
execution costs.
The current logic in registry.rs prioritizes default_fast_model over
default_model, which overrides the user-selected model (assigned only to
default_model). Setting default_fast_model = None for the OpenRouter
provider preserves the fallback to openrouter/auto when no model is
chosen, while respecting the user's explicit model selection when one is
provided.

```rust
    pub fn set_default_model(&mut self, model: Option<ConfiguredModel>, cx: &mut Context<Self>) {
        match (self.default_model.as_ref(), model.as_ref()) {
            (Some(old), Some(new)) if old.is_same_as(new) => {}
            (None, None) => {}
            _ => cx.emit(Event::DefaultModelChanged),
        }
        self.default_fast_model = maybe!({
            let provider = &model.as_ref()?.provider;
            let fast_model = provider.default_fast_model(cx)?;
            Some(ConfiguredModel {
                provider: provider.clone(),
                model: fast_model,
            })
        }); // This sets default fast model (in our case openrouter/auto)
        self.default_model = model;  //This sets default_model to user selected model
    }
```

And latter on :
```rust
    pub fn thread_summary_model(&self) -> Option<ConfiguredModel> {
        #[cfg(debug_assertions)]
        if std::env::var("ZED_SIMULATE_NO_LLM_PROVIDER").is_ok() {
            return None;
        }

        self.thread_summary_model
            .clone()
            .or_else(|| self.default_fast_model.clone()) // We pick fast_model over default model here
            .or_else(|| self.default_model.clone())
    }
```
Which results in user choice being ignored.

Proposed behavior:

Use the model explicitly selected by the user in Zed agent
configuration.
If no model is specified, fall back to the configured default.

The resolution is to set in :  provider/open_router.rs
```rust
fn default_fast_model(&self, _cx: &App) -> Option<Arc<dyn LanguageModel>> {
     None
}
```
This will have a consequence of default_fast_model not being provided
and falling back to user choice - but once the fast model is set via for
example a configuration property - the default_fast_model is picked over
default_model

Release Notes:

- open_router: Use user's default model when comments and thread summary
2026-02-12 14:02:16 +00:00
Shardul Vaidya
1137b3c0f7
bedrock: Add Claude Opus 4.6 (#48525)
Release Notes:

- Added Claude Opus 4.6 and 4.6 Thinking with Cross region inference for
US, EU, and Global endpoints.

---------

Co-authored-by: Ona <no-reply@ona.com>
2026-02-09 09:19:51 +00:00
Mikayla Maki
85294063fc
Strip broken thinking blocks from Anthropic requests (#48548)
TODO:

- [x] Review code
- [x] Decide whether to keep ignored API tests

Release Notes:

- Fixed a bug where cancelling a thread mid-thought would cause further
anthropic requests to fail
- Fixed a bug where the model configured on a thread would not be
persisted alongside that thread
2026-02-07 04:21:58 +00:00
Marshall Bowers
afafb66f76
agent: Highlight latest models available through the Zed provider (#48614)
This PR updates the model selector to highlight the latest models that
are available through the Zed provider:

<img width="388" height="477" alt="Screenshot 2026-02-06 at 1 46 41 PM"
src="https://github.com/user-attachments/assets/70760399-ecf6-46e3-80a7-cb998216c192"
/>

Closes CLO-205.

Release Notes:

- Added a "Latest" indicator to highlight the latest models available
through the Zed provider.
2026-02-06 14:03:03 -05:00
Marshall Bowers
aa33a50ebe
language_models: Enable setting reasoning effort for OpenAI models through Zed provider (#48605)
This PR adds support for setting the reasoning effort for OpenAI models
through the Zed provider.

This is gated behind the `cloud-thinking-effort` feature flag.

Release Notes:

- N/A

Co-authored-by: Tom Houlé <tom@tomhoule.com>
2026-02-06 16:40:31 +00:00
Marshall Bowers
3d57951b41
feature_flags: Rename cloud-thinking-toggle feature flag (#48598)
This PR renames the `cloud-thinking-toggle` feature flag to
`cloud-thinking-effort`.

This feature flag has expanded slightly in scope, so we want the name to
be more representative of what it gates.

Release Notes:

- N/A

Co-authored-by: Tom Houlé <tom@tomhoule.com>
2026-02-06 16:11:32 +00:00
Marshall Bowers
9860106b8e
agent: Add support for setting thinking effort for Zed provider (#48545)
This PR adds the ability to set the thinking effort of a model.

Right now this only applies to Opus 4.6 through the Zed provider.

This is gated behind the `cloud-thinking-toggle` feature flag.

UI is still rough; needs a design pass:

<img width="639" height="163" alt="Screenshot 2026-02-05 at 7 45 54 PM"
src="https://github.com/user-attachments/assets/2b5a9ef8-74cd-498e-9c81-b92666572409"
/>

<img width="263" height="148" alt="Screenshot 2026-02-05 at 7 45 58 PM"
src="https://github.com/user-attachments/assets/40232cb0-1743-443b-b04c-5cd33065513d"
/>

Release Notes:

- N/A
2026-02-06 01:04:53 +00:00
Ben Kunkle
0d9bcf0ee5
Fix Codestral API key credentials URL mismatch (#48513)
Closes #46506

Release Notes:

- Fixed an issue where the codestral URL used for credentials would be
different than the one used for requests causing authentication errors
2026-02-05 17:34:34 -05:00
Marshall Bowers
a2ca07514c
language_model: Add supported_effort_levels method to LanguageModel (#48523)
This PR adds a new `supported_effort_levels` method to the
`LanguageModel` trait.

This can be used to retrieve the list of effort levels that the model
supports, which will eventually be used to drive the UI for selecting
the thinking effort.

Right now this list will only be populated for Cloud models.

Release Notes:

- N/A
2026-02-05 22:20:08 +00:00
Marshall Bowers
7dcff21dc9
anthropic: Update types for adaptive thinking (#48517)
This PR updates the Anthropic types with support for [adaptive
thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking).

We're not actually using adaptive thinking yet.

Release Notes:

- N/A
2026-02-05 19:55:42 +00:00
Kunall Banerjee
e5579cfc91
agent_settings: Fix Bedrock model catalog URL (#48382)
The previous URL pointed to the model access page which no longer exists
(not a 404, tho). The model catalog page is the current location for
selecting and requesting access to Bedrock models.

| Before | After |
|--------|--------|
| <img width="1732" height="1125" alt="Screenshot 2026-02-04 at 12 50
13"
src="https://github.com/user-attachments/assets/f513e7c9-aa70-439a-afd0-ef8177ada463"
/> | <img width="1732" height="1125" alt="Screenshot 2026-02-04 at 12 52
11"
src="https://github.com/user-attachments/assets/6609215e-1bbb-4ed1-b57d-422ed7893498"
/> |

Release Notes:

- Fixed Bedrock model catalog URL in Agent Panel settings
2026-02-05 07:20:16 -05:00
Marshall Bowers
a9fdd07e8d
cloud_api_types: Rework Plan type (#47784)
This PR reworks the `Plan` type, now that we don't need to be concerned
about the legacy plan versions.

We've also made the deserialization layer more robust, which should make
it easier to add new plan variants in the future without needing to go
through this same song and dance.

Release Notes:

- N/A
2026-01-27 12:15:05 -05:00
Marshall Bowers
4723dbe696
cloud_llm_client: Move Plan type into cloud_api_types (#47778)
This PR moves the `Plan` type out of `cloud_llm_client` and into
`cloud_api_types`.

Release Notes:

- N/A
2026-01-27 15:58:05 +00:00
Marshall Bowers
097cfae77e
Add helper method for checking if the LLM token needs to be refreshed (#47511)
This PR adds a new `needs_llm_token_refresh` helper method for checking
if the LLM token needs to be refreshed.

We were duplicating the check for the `x-zed-expired-token` header in a
number of spots, and it will be gaining an additional case soon.

Release Notes:

- N/A
2026-01-23 20:50:50 +00:00
Piotr Osiewicz
c9997592e4
build: Simplify build graph (#47253)
- **title_bar: Extract platform_title_bar from title_bar**
- **file_finder no longer depends on search and agent_servers no longer
depend on language_models**

Release Notes:

- N/A

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-01-23 18:29:20 +01:00
Richard Feldman
29cf14ed2f
Fix rate limiter holding permits during tool execution (#47494)
The rate limiter's semaphore guard was being held for the entire
duration of a turn, including during tool execution. This caused
deadlocks when subagents tried to acquire permits while parent requests
were waiting for them to complete.

## The Problem

In `run_turn_internal`, the stream (which contains the `RateLimitGuard`
holding the semaphore permit) was kept alive throughout the entire loop
iteration - including during **tool execution**:

1. Parent request acquires permit
2. Parent starts streaming, consumes response
3. Parent starts executing tools (subagents)
4. **Stream/guard still held** while tools execute
5. Subagents try to acquire permits → blocked because parent still holds
permit
6. Deadlock if all permits are held by parents waiting for subagent
children

## The Fix

Two changes were made:

1. **Drop the stream early**: Added an explicit `drop(events)` after the
stream is fully consumed but before tool execution begins. This releases
the rate limit permit so subagents can acquire it.

2. **Removed the `bypass_rate_limit` workaround**: Since the root cause
is now fixed, the bypass mechanism is no longer needed.

Note: no release notes because subagents are still feature-flagged, and
this rate limiting change isn't actually observable without them.

Release Notes:

- N/A
2026-01-23 12:15:55 -05:00