7687e1f
settings: Await config worktree before opening settings.json (#47199)
Click to expand commit body
Closes #47007
Release Notes:
- Fixed await config worktree before opening settings.json
ensures that the worktree creation is awaited before attempting to open
the settings file.
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Xiaobo Liu
created
49dee40
agent: Skip empty assistant messages for Mistral provider (#47579)
Click to expand commit body
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
Ian Chamberlain
created
c981245
ep: Don't run predictions for excerpts with special tokens (#49040)
Click to expand commit body
Release Notes:
- N/A
Oleksiy Syvokon
created
13a9386
language_models: Add image support for Bedrock (#47673)
Click to expand commit body
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
gitarth
created
c131713
Fix Conda activation error appearing during task execution (#48736)
Click to expand commit body
Closes #48732
- [X] Tests or screenshots needed?
- [X] Code Reviewed
- [X] Manual QA
The fix enables interactive mode during task execution, resolving the
Conda activation error. However, enabling this mode adds some overhead.
In my environment, the task startup time increased by approximately 1
seconds due to the loading of ~/.zshrc.
[录屏 2026-02-08
23-49-53.webm](https://github.com/user-attachments/assets/4064e366-b0d2-4a8c-9599-c4108e76af9f)
Release Notes:
- Fixed conda activation error appears during task execution.
feeiyu
created
a6653f0
language: Respect combined injection sub-ranges for language queries (#48522)
Click to expand commit body
Follow-up to https://github.com/zed-industries/zed/pull/41111.
PR #41111 introduced combined injection handling, but cursor language
queries still relied on layer range selection alone. For combined
injections this can surface a language from the outer combined layer
even when the cursor is outside that language's actual included
sub-range. So, we just need to add sub-range filtering based on
anchor-aware boundary checks in the same way we did in the previous PR.
That means: apply it in `Buffer::language_at`,
`Buffer::languages_at`, and `BufferSnapshot::language_scope_at`. All
places that rely on the described behavior.
I also added some additional test cases for the `HTML+ERB` lang to
verify language resolution for HTML and Ruby positions.
Thank you!
Closes https://github.com/zed-industries/zed/issues/48358
Release Notes:
- Respect combined injection sub-ranges for language queries
Vitaly Slobodin
created
0c29a09
editor: Fix soft wrap premature wrapping with certain fonts (#45206)
Click to expand commit body
Closes #45107
Release Notes:
- Fixed soft wrap prematurely wrapping with certain fonts
---------
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Mayank Verma
and
Lukas Wirth
created
856ba20
markdown_preview: Add Mermaid Diagram Support (#49064)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/10696
Adds support for rendering Mermaid diagrams in the markdown preview
using
[mermaid-rs-renderer](https://github.com/1jehuang/mermaid-rs-renderer)
(with [a
patch](https://github.com/1jehuang/mermaid-rs-renderer/pull/35)).
- Renders mermaid diagrams on background task
- Shows the previously cached image while re-computing
- Supports a scale parameter i.e. default 100
- Falls back to raw mermaid source code when render fails
<img width="1512" height="897" alt="image"
src="https://github.com/user-attachments/assets/9157625d-bb62-402f-8a8b-517f28d43f95"
/>
Release Notes:
- Added mermaid diagram rendering support to the markdown preview panel.
---------
Co-authored-by: oscarvarto <contact@oscarvarto.mx>
Co-authored-by: oscarvarto <oscarvarto@users.noreply.github.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Smit Barmase
,
oscarvarto
,
oscarvarto
, and
Piotr Osiewicz
created
Release Notes:
- N/A
---------
Co-authored-by: Lena <241371603+zelenenka@users.noreply.github.com>
Mikayla Maki
and
Lena
created
e4ea8ae
docs: Add note about escaping `$` in snippets (#48710)
Click to expand commit body
In writing PHP snippets, I ran into this issue and only discovered this
has to be done through reviewing examples of other PHP snippets.
I think it would be useful to include some mention of this behavior in
the documentation - although I'm not great at writing docs and not sure
if this is the best place or way to write this out.
Open to any feedback on this or perfectly okay if maintainers find this
unnecessary.
Release Notes:
- N/A
---------
Co-authored-by: Kunall Banerjee <hey@kimchiii.space>
CJ Pokowitz
and
Kunall Banerjee
created
9081af8
Tweak stalebot (words, number of days) (#48603)
Click to expand commit body
While the 60 days of inactivity works for a lot of the issues, with
other (more stubborn and popular) bugs it's too noisy to nag people
every eight weeks.
Also changing days-before-close after seeing a few cases of people
getting back to us after more than two weeks since the bot's question.
Release Notes:
- N/A
Lena
created
af8ea0d
gpui: Remove blade, reimplement linux renderer with wgpu (#46758)
Click to expand commit body
The blade graphics library is a mess and causes several issues for both
Zed users as well as other 3rd party apps using GPUI. This PR removes
blade and implements the linux platform using `wgpu` which is the
de-facto standard in the rust UI and graphics ecosystem. This will not
just fix [issues that Zed users have
today](https://github.com/YaLTeR/niri/issues/2335), but also profit from
wgpu improvements in the futures, from other projects contributing (such
as the bevy game engine, Iced, or pretty much every other relevant
project).
This will close several related issues on the zed repo as well. See
https://github.com/zed-industries/zed/issues?q=frozen%20nvidia%20linux
(probably not all of them, have only tested the freeze on nvidia and
Smithay-based wayland compositors).
Some related issues:
https://github.com/zed-industries/zed/issues/44814
https://github.com/zed-industries/zed/issues/40481
https://github.com/YaLTeR/niri/issues/2335
https://github.com/zortax/zlaunch/issues/15
Would appreciate feedback if this is something the zed maintainers would
be interested in.
Release Notes:
- N/A
---------
Co-authored-by: John Tur <john-tur@outlook.com>
Leonard Seibold
and
John Tur
created
8249ef5
repl: Initial stdin support for kernels (#48851)
Click to expand commit body
Support stdin from Jupyter kernels AKA `input()` and `getpass()` in
IPython.
<img width="460" height="380" alt="image"
src="https://github.com/user-attachments/assets/3b26457f-d651-4514-94b4-8cbb6ff52003"
/>
<img width="391" height="243" alt="image"
src="https://github.com/user-attachments/assets/255bd388-5622-4521-ab93-f9ef7fe861aa"
/>
Closes #22746
Release Notes:
- Added STDIN support (`input` / `raw_input`) to REPL
Kyle Kelley
created
0b8424a
Remove deprecated GPT-4o, GPT-4.1, GPT-4.1-mini, and o4-mini (#49082)
Click to expand commit body
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
Richard Feldman
created
20ed142
Revert "Default agent panel to left dock when multi-workspace is enabled" (#49080)
Click to expand commit body
Reverts zed-industries/zed#49034
This proved to be a bit disruptive, we should re-land once we have more
of the pieces together.
Release Notes:
- N/A
Mikayla Maki
created
69a2ea3
Fix document highlight data issues (#49079)
Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/48780
Fixes incorrect multi byte characters treatment in the symbol range when
highlighting:
<img width="1728" height="507" alt="image"
src="https://github.com/user-attachments/assets/c6639220-f08a-4ea8-bf99-926566e356ae"
/>
Fixes multiple language servers' duplicate data display:
<img width="1726" height="925" alt="image"
src="https://github.com/user-attachments/assets/ca98ee29-732e-4c8e-adf4-21a9523a5a9c"
/>
Release Notes:
- N/A
Kirill Bulatov
created
4fefc6f
Fix discard not reloading buffer from disk (#48936)
Click to expand commit body
Closes #48308.
Before:

After:

Release Notes:
- Fixed file changes not being discarded when closing a tab with "Don't
Save" or "Discard all".
Tom Planche
created
1a49170
devcontainer: Fix OpenDevContainer action panic due to double workspace entity lease (#49058)
Click to expand commit body
Closes #49055
**Heads up**: This might be a naïve solution. I ran into the issue after
merging latest main into
https://github.com/zed-industries/zed/pull/48896, and confirming that it
was unrelated to that PR and incoming from upstream.
Agent one-shot the fix, it works and tests pass. But I'm still wrapping
my head around the changes that led to the bug. I figured the breakage
is bad enough (I couldn't open devcontainers at all) to submit a
possibly naïve fix.
## Fix
Hoists the `find_devcontainer_configs` call out of `new_dev_container`
and into the call site, where we already have a direct `&mut Workspace`
reference that doesn't go through the entity map. The computed configs
are passed into `new_dev_container` as an argument.
## What was happening
After #48800 ("Re-add MultiWorkspace"), `with_active_or_new_workspace`
nests a `Workspace` entity lease inside a `MultiWorkspace` entity lease.
The `OpenDevContainer` handler was also changed from async to sync in
the same PR, so `RemoteServerProjects::new_dev_container` now runs while
`Workspace` is leased. Inside `new_dev_container`, a
`WeakEntity<Workspace>::read_with` call tries to read `Workspace`
through the entity map, finds it already leased, and panics.
Release Notes:
- Fixed a panic when opening the dev container modal via the
`OpenDevContainer` action.
Oliver Azevedo Barnes
created
aa4e1b4
Separate accepted edit predictions in edit history (#49056)
Click to expand commit body
Release Notes:
- N/A
---------
Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Oleksiy Syvokon
,
Ben Kunkle
, and
Max Brunsfeld
created
This PR uses the already-existing `ListSubHeader` component for the
section subheader as opposed to a custom label.
<img width="350" height="942" alt="Screenshot 2026-02-12 at 8 30@2x"
src="https://github.com/user-attachments/assets/a86ce59d-9d3b-4b10-87c8-69da1469743d"
/>
- [x] Code Reviewed
- [x] Manual QA
Release Notes:
- N/A
Danilo Leal
created
cabf404
git_graph: Open graph from Git Panel and Commit Historic view from Git Graph rows (#48842)
Click to expand commit body
Release Notes:
- N/A (still featured flag)
Operations as follows:
1. Click to select
2. Double-click to open diff
Operation demo:
https://github.com/user-attachments/assets/15e583c1-37ea-4166-972d-d2247b9c5fff
---------
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Anthony Eid <anthony@zed.dev>
Xiaobo Liu
and
Anthony Eid
created
d453d95
Suppress agent popup notification when status is already visible (#49044)
Click to expand commit body
If you have Zed open and the sidebar open, don't show a notification
when a thread finishes.
Closes AI-18
(No release notes because multi-agent is still feature-flagged.)
Release Notes:
- N/A
Richard Feldman
created
f39e3fb
Fix agent panel closing unexpectedly when zoomed (#49037)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/33430
Two changes:
1. Fix `observe_global_in` to not permanently remove observers when the
window is transiently unavailable (e.g. temporarily taken during a
nested update). Previously this returned false and silently removed the
observer from the subscriber set. Now it checks whether the entity is
actually dropped before removing — if the entity is alive but the window
is just unavailable, it keeps the observer alive.
2. Extend `dock_to_preserve` in `handle_pane_focused` to also preserve
docks whose active panel has focus, not just docks whose panel's inner
pane matches the focused pane. Panels like `AgentPanel` don't implement
`pane()` (only panels like `TerminalPanel` that contain panes do), so
the existing preservation logic never identified the agent panel's dock
as needing protection. This meant that when the agent panel was zoomed
and a center pane received focus (e.g. during macOS window activation
events), `dismiss_zoomed_items_to_reveal` would close the dock, making
the panel disappear unexpectedly.
Closes AI-16
Release Notes:
- Fixed agent panel unexpectedly closing when zoomed and the window
regains focus.
Richard Feldman
created
9446eef
Preserve panel zoom state across workspace switches (#49069)
Click to expand commit body
When the agent panel (or any dock panel) is open and
fullscreened/zoomed, switching to a different workspace in the sidebar
and then switching back caused the panel to close. It should remain both
open and zoomed.
The root cause was in `MultiWorkspace::focus_active_workspace()` — it
always focused the center pane of the active workspace. This triggered
`dismiss_zoomed_items_to_reveal(None)`, which closed any zoomed dock
panel (the same behavior as when a user intentionally clicks away from a
zoomed panel).
The fix checks if any dock has a zoomed panel before deciding what to
focus. If a zoomed panel exists, it focuses that panel instead of the
center pane, preventing the dismiss logic from firing.
Closes AI-22
Release Notes:
- Fixed panels losing their fullscreen state when switching between
workspaces.
Richard Feldman
created
65027dd
Handle newlines better in parse_edits (#48960)
Click to expand commit body
Release Notes:
- Fix a potential crash around multibyte characters in edit predictions
---------
Co-authored-by: Ben Kunkle <ben@zed.dev>
Eric Holk
and
Ben Kunkle
created
44015e0
Fix semantic highlights not cleared when disabled in settings (#49066)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/49060
Release Notes:
- Fixed semantic highlights not cleared when disabled in settings
Kirill Bulatov
created
009cc7e
Remove Agents Panel and utility panes (#49038)
Click to expand commit body
Remove the `AgentsPanel` (from the `agent_ui_v2` crate) and the utility
pane infrastructure from the codebase.
The Agents Panel was a separate panel gated behind the `agent-v2`
feature flag that was redundant with the existing Agent Panel. Utility
panes were a layout concept (secondary panes next to the editor,
separate from dock panels) whose only consumer was `AgentThreadPane` in
the Agents Panel.
### Changes
- Deleted the entire `agent_ui_v2` crate (`agents_panel.rs`,
`agent_thread_pane.rs`)
- Deleted `workspace/src/utility_pane.rs`
- Removed `UtilityPane`, `UtilityPaneHandle`, `UtilityPanePosition`,
`MinimizePane`, `ClosePane` from `workspace/src/dock.rs`
- Removed all utility pane fields, methods, and render blocks from
`workspace.rs`
- Removed all aside toggle code from `pane.rs` and `pane_group.rs`
- Removed `agents_panel_dock` setting from agent settings and
`default.json`
- Removed all `agent_ui_v2` references from `main.rs`, `zed.rs`, and
Cargo.toml files
- Cleaned up test code in `tool_permissions.rs` and `agent_ui.rs`
Closes AI-17
(No release notes because this was all feature-flagged.)
Release Notes:
- N/A
Richard Feldman
created
889d0db
Add prompts and scripts for automatic crash repro and fix (#49063)
Click to expand commit body
These prompts can be used to automatically diagnose and fix crashes
report in Sentry.
Usage:
1. Find a crash in Sentry. It will have an ID like ZED-123
2. In an agent, do a prompt like `Follow the instructions in
@investigate.md to investigate ZED-123`
3. Once the agent finds a repro, fix it in a new thread by saying
`Follow the instructions in @fix.md`
Release Notes:
- N/A
---------
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
This PR adds basic support for keyboard navigation for the git graph
panel.
**Back and forward**:
https://github.com/user-attachments/assets/5015b0d9-bf83-4944-8c9b-1c5b9badfdb4
**Scrolling**:
https://github.com/user-attachments/assets/451badb5-59df-48a2-aa73-be5188d28dae
- [x] Tests or screenshots needed?
- [x] Code Reviewed
- [x] Manual QA
- Do we need to add keybinds for it, or is falling back to the default
keybindings enough?
**TODO**:
- [x] Add auto scroll when you select the last visible item
Release Notes:
- N/A (no release notes since its behind a feature flag)
Ben Kunkle
,
Zed Zippy
,
Max
, and
Max Brunsfeld
created
bd72484
Potentially fix hang when opening LSP menu (#49046)
Click to expand commit body
It is maybe possible that, if a process's parent dies, the PID can be
reused by a different process. This could cause an infinite loop in
`is_descendant_of`. To fix this, break out of the loop when a cycle is
detected.
- [ ] Tests or screenshots needed?
- [X] Code Reviewed
- [X] Manual QA
Release Notes:
- N/A
---------
Co-authored-by: Eric Holk <eric@zed.dev>
John Tur
and
Eric Holk
created
2eb015d
Allow changing the context window size for Ollama (#44506)
Click to expand commit body
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>
Santiago Bernhardt
and
Conrad Irwin
created
9c102a5
languages: Add runnable support for bash (#48807)
71de6ed
Fix VSCode tasks.json parsing for tasks without explicit labels (#47754)
Click to expand commit body
Implements automatic label generation for VSCode tasks that don't have
explicit 'label' fields, matching VSCode's behavior.
Changes:
- Made label field optional in VsCodeTaskDefinition deserialization
- Implemented custom deserializer to auto-generate labels:
- npm tasks: 'npm: {script}' (e.g., 'npm: start')
- shell tasks: first word of command (e.g., 'echo')
- gulp tasks: 'gulp: {task}' (e.g., 'gulp: build')
- fallback: 'Untitled Task'
- Added test data file with tasks without labels
- Added test cases
Closes #47749
Release Notes:
- Fixed: VSCode tasks.json files with tasks missing explicit `label`
fields now parse correctly. Labels are auto-generated matching VSCode's
behavior (e.g., "npm: start").
Daniel Strobusch
created
b229520
Increase SQLite busy_timeout from 1ms to 500ms (#49039)
Click to expand commit body
When two Zed instances share the same data directory (e.g. a release
build and a dev build running simultaneously), SQLite operations can
fail with "database is locked" (error code 5), surfacing as a "Failed to
Launch" error in the agent panel.
The root cause is `PRAGMA busy_timeout=1` in `crates/db/src/db.rs`,
which gives SQLite only 1ms to wait for a write lock before giving up.
With WAL mode, the actual lock hold times are microseconds — the problem
isn't long-held locks, it's that we give up before even trying to wait.
During startup, both instances hit the DB heavily for workspace
restoration, so even tiny overlaps fail.
This changes `busy_timeout` from 1ms to 500ms, giving SQLite more room
to retry without (hopefully) any perceptible delay to the user.
Closes AI-20
Release Notes:
- N/A
Richard Feldman
created
99db990
agent_ui: Fix thread title being overridden even when manually edited (#49028)
Click to expand commit body
This PR actually fixes two issues:
- the thread title being overridden even after it's been manually
edited; as you go and come back from the thread history view, the edited
title would get swapped for the auto-summarized one
- the parent thread title sometimes displaying the title of a subagent
thread; this would also override the manual edit
- - -
- [x] Tests
- [x] Code Reviewed
- [x] Manual QA
Release Notes:
- Agent: Fixed thread titles being overridden even when manually edited.
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Danilo Leal
and
Bennet Bo Fenner
created
85736ec
Install sccache *after* we rm-rf target... (#49035)
deb52aa
Default agent panel to left dock when multi-workspace is enabled (#49034)
Click to expand commit body
When users have the `multi-workspace` feature flag enabled (agent-v2),
the default dock position for the agent panel is changed from right to
left.
This adds a `update_default_settings` method to `SettingsStore` that
allows mutating defaults in place, then observes the
`AgentV2FeatureFlag` to update the agent dock default accordingly.
Because this modifies the defaults layer, user-configured dock positions
still take precedence.
Closes AI-15
(No release notes because multi-agent is feature-flagged.)
Release Notes:
- N/A
## Fix incorrect context size limits for GitHub Copilot Chat models
Fixes #44909
### Problem
The agent panel was displaying incorrect token limits for GitHub Copilot
models. Users reported that:
- The agent panel always showed a **128K token limit** for all GitHub
Copilot models, regardless of their actual context window size
- Claude models (e.g., Claude 3.7 Sonnet, Claude Opus 4.5) were showing
~90K instead of their actual 200K context window
- GPT-4o was showing 110K instead of its actual 128K context window
- Users could continue using models beyond the displayed limit, which
worked but was confusing
### Root Cause
The `max_token_count()` method in `copilot_chat.rs` was returning
`max_prompt_tokens` instead of `max_context_window_tokens`:
```rust
// Before (incorrect)
pub fn max_token_count(&self) -> u64 {
self.capabilities.limits.max_prompt_tokens
}
```
GitHub's API returns three different token-related fields:
- `max_context_window_tokens`: The **full context window size** (e.g.,
200K for Claude 3.7)
- `max_prompt_tokens`: GitHub's limit for prompt input (e.g., 90K for
Claude 3.7)
- `max_output_tokens`: Maximum output tokens (e.g., 16K)
The `max_token_count()` method in the `LanguageModel` trait is expected
to return the **full context window size** — this is consistent with all
other providers (Anthropic returns 200K for Claude, OpenAI returns 128K
for GPT-4o, etc.).
### Solution
<img width="583" height="132" alt="Screenshot 2026-01-25 at 1 07 53 AM"
src="https://github.com/user-attachments/assets/847e2fdb-635d-44bc-a630-2d4867ba8c32"
/>
Changed `max_token_count()` to return `max_context_window_tokens`:
```rust
// After (correct)
pub fn max_token_count(&self) -> u64 {
self.capabilities.limits.max_context_window_tokens as u64
}
```
### Impact
| Model | Before | After |
|-------|--------|-------|
| Claude 3.7 Sonnet | 90,000 | **200,000** |
| Claude Opus 4.5 | 90,000 | **200,000** |
| GPT-4o | 110,000 | **128,000** |
### Testing
Added a new test
`test_max_token_count_returns_context_window_not_prompt_tokens` that:
1. Deserializes model JSON with distinct `max_context_window_tokens` and
`max_prompt_tokens` values
2. Verifies Claude 3.7 Sonnet returns 200,000 (context window), not
90,000 (prompt tokens)
3. Verifies GPT-4o returns 128,000 (context window), not 110,000 (prompt
tokens)
All existing tests continue to pass:
```
running 4 tests
test tests::test_unknown_vendor_resilience ... ok
test tests::test_max_token_count_returns_context_window_not_prompt_tokens ... ok
test tests::test_resilient_model_schema_deserialize ... ok
test result: ok. 4 passed; 0 failed
```
Release Notes:
- copilot: Fixed incorrect context window size displayed for GitHub
Copilot Chat models in the agent panel.
Anil Pai
created
c1907c9
json_schema_store: Include available LSP adapters in settings schema (#46766)
Click to expand commit body
Closes #46556
## Summary
- Fix "Property `ty` is not allowed" warning in `settings.json` for LSP
adapters registered via `register_available_lsp_adapter()`
- Add `available_lsp_adapter_names()` method to include these adapters
in schema generation
- Support `initialization_options` schema lookup for available adapters
## Problem
LSP adapters registered via `register_available_lsp_adapter()` were not
included in the settings JSON schema. This caused validation warnings
like:
Property ty is not allowed
Even though `ty` is a built-in Python language server that works
correctly.
**Affected adapters:**
- `ty`, `py`, `python-lsp-server`
- `eslint`, `vtsls`, `typescript-language-server`
- `tailwindcss-language-server`, `tailwindcss-intellisense-css`
## Solution
Schema generation now queries both:
1. `all_lsp_adapters()` - adapters bound to specific languages
2. `available_lsp_adapter_names()` - adapters enabled via settings (new)
Related: #43104, #45928
Release Notes:
- Fixed an issue where not all LSP adapters would be suggested for
completion, or recognized as valid in `settings.json`
---------
Co-authored-by: Ben Kunkle <ben@zed.dev>
Bae Seokjae
and
Ben Kunkle
created
839dac1
agent_ui: Add some UI tweaks to the subagents thread (#49030)
Click to expand commit body
Just some relatively small UI adjustments, like adding the forward arrow
to make it clearer there's a hierarchy between the parent thread and the
subagent thread, and a check icon to comunicate the subagent thread is
done.
<img width="500" height="612" alt="Screenshot 2026-02-12 at 11 47@2x"
src="https://github.com/user-attachments/assets/d49319b5-9c19-435a-b5c7-424060fa0629"
/>
- [x] Code Reviewed
- [x] Manual QA
Release Notes:
- N/A
Danilo Leal
created
1ea2f2f
agent: Sanitize MCP server IDs in tool name disambiguation (#45789)
Click to expand commit body
Release Notes:
- Fixed an issue where a request could fail if an MCP server with names
containing whitespace was used
## Summary
When multiple MCP servers expose tools with the same name, Zed
disambiguates them by prefixing the tool name with the server ID from
settings.json. If the server ID contains spaces or special characters
(e.g., `"Azure DevOps"`), the resulting tool name like `Azure
DevOps_echo` violates Anthropic's API pattern `^[a-zA-Z0-9_-]{1,128}$`,
causing API errors:
> "Received an error from the Anthropic API: tools.0.custom.name: String
should match pattern '^[a-zA-Z0-9_-]{1,128}$'"
## Solution
Convert server IDs to snake_case (using the `heck` crate already
available in the workspace) before using them as prefixes during tool
name disambiguation.
| Server ID in settings.json | Disambiguated Tool Name |
|---------------------------|------------------------|
| `"Azure DevOps"` | `azure_dev_ops_echo` |
| `"My MCP Server"` | `my_mcp_server_echo` |
## Test plan
- [x] Added test case for server name with spaces ("Azure DevOps") in
`test_mcp_tool_truncation`
- [x] Verified existing tests pass
- [x] Manually tested with two MCP servers having overlapping tool names
After (left), Before (right):
<img width="2880" height="1800" alt="Screenshot_20251228_163249"
src="https://github.com/user-attachments/assets/09c4e8f0-e282-4620-9db3-3e2c7d428d15"
/>
🤖 Generated with (some) help from [Claude
Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Jonathan Camp
,
Claude Opus 4.5
, and
Bennet Bo Fenner
created
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>
Shardul Vaidya
,
Ona
, and
Bennet Bo Fenner
created
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
Daniel Strobusch
created
8742889
Add user picked model to be used as a default for open router provider when generating comments and thread summary (#47475)
Click to expand commit body
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
zapp88
created
dc56998
agent_ui: Fix MCP tool results not displaying after app restart (#47654)
Click to expand commit body
Closes #47404
Release Notes:
- Fixed MCP tool results not displaying after restarting Zed
Oliver Azevedo Barnes
created
521ffc3
agent: Check is_error flag in MCP tool responses (#47095)
Click to expand commit body
Previously, when an MCP server returned a tool response with
`is_error: true`, the error content was incorrectly treated as
a successful result. This could mislead the LLM into thinking
the tool call succeeded when it actually failed.
Now we check the `is_error` flag and propagate the error message
properly, allowing the agent to handle failures appropriately.
Release Notes:
- N/A
---------
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Xiaobo Liu
and
Ben Brandt
created
b02ad38
docs: Add link back to Ruby LSP config documentation (#48613)
Click to expand commit body
Small thing here, but there's no actual link back to the ruby-lsp docs,
like there is for other languages or ruby LSPs (like solargraph). This
should help users find the correct docs for configuring.
Release Notes:
- N/A
Edward Loveall
created
e792648
settings: Add ability to select audio input/output devices for collab (#49015)
Click to expand commit body
This PR adds ability to select and test audio input/output devices for
use in collaboration setting (which is what the team at Zed relies
heavily on). Currently, we only ever used whatever the system default is
and it worked well until it didn't - for some reason, when I am on my
Linux laptop, I am unable to force Zed to use my external mic +
headphones via external USB audio interface. With this PR, now I can
list all available devices and select the one I want.
There are still a couple of caveats that we should be aware of:
* I've decided to list *all* available devices meaning on Linux it is
quite possible that you may discover that what your desktop environment
is reporting to you is a significantly shorter list than what your sound
framework/hw is actually exposing. I think this makes sense given my
inexperience with audio drivers/devices and frameworks on various OSes
so that we get full control over what is available with the goal of
being able to come up with some filtering heuristic as we go along.
* We currently populate the list of available audio devices only once at
startup meaning if you unplug your device while you have Zed running
this will not register until you restart Zed which is a PITA. However,
in order to keep the changes manageable I thought it would be best to do
minimal work in this regard now, and iterate on this some more in the
near future. After all, we don't really monitor device changes on any
platform except macOS anyhow, so it might be the case that when I get
round to implementing this I will have the opportunity to tackle both at
the same time.
* In order to get a valid list of all audio devices using `cpal` crate
(which is the building block of `rodio`), I had to bump `cpal` to 0.17,
and pin `rodio` to a more recent commit sha as a result, so if you see
any regressions, lemme know and/or feel free to revert this PR.
* Finally, I've done my best to integrate this with the settings UI, but
I am sure more could be done in terms of styling, etc.
Some screenshots:
<img width="1152" height="949" alt="Screenshot From 2026-02-12 11-40-04"
src="https://github.com/user-attachments/assets/e147c153-1902-49d6-bf68-3ac317a6a7b0"
/>
<img width="1152" height="949" alt="Screenshot From 2026-02-12 11-40-16"
src="https://github.com/user-attachments/assets/b4e9a2f8-b38e-4de0-b910-067cc432b5bc"
/>
Release Notes:
- Added ability to select audio input/output devices as part of
Collaboration page in Settings. Added ability to test selected devices
with a simple playback loop routing input directly into output for
easier debugging of your audio devices.
---------
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>