Commit graph

163 commits

Author SHA1 Message Date
Oleksiy Syvokon
376d410b83
ep: Add multi-region format (#51185)
This format generates fewer token while maintaining the quality:

```
Model                     Generated tokens ↓    DeltaChrF ↑
0306-seed-multi-regions   46,239                80.62
0304-seed-no-edits        110,871               80.61
0303-seed                 271,457               79.62
```

In addition to the student format, this change adds a new teacher
prompt. It seems to be worse than the original, but I haven't optimized
it at all. Keeping it for now as a base for potential improvements.


Release Notes:

- N/A
2026-03-10 13:43:27 +02:00
Ben Kunkle
147577496d
ep: Include diagnostics in ZetaPromptInput (#51141)
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 *or* Added/Fixed/Improved ...
2026-03-09 20:24:41 -04:00
Max Brunsfeld
2bd5c21855
zeta: Allow the server to select the editable and context ranges more flexibly (#50975)
Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-03-09 19:58:31 -04:00
Oleksiy Syvokon
b54716dac1
ep: Skip context retrieval when already performed (#51100)
Previously we didn't distinguish between an empty `.related_files[]` and
a case where context collection hadn't run yet. As a result, context
retrieval was always attempted for examples with empty `related_files`.

Release Notes:

- N/A
2026-03-09 14:42:15 +00:00
Oleksiy Syvokon
af2b35a83d
ep: Make repair parser more robust (#51044)
Release Notes:

- N/A
2026-03-08 09:27:10 +00:00
Ben Kunkle
5b2d39e3ae
ep: Add captured example fetching (#50960)
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 *or* Added/Fixed/Improved ...
2026-03-06 15:09:36 -05:00
Oleksiy Syvokon
4b3660bc33
ep: Unify code in parse_output and zeta_prompt (#50958)
This also fixed `ep parse-output` for newer formats

Release Notes:

- N/A
2026-03-06 22:07:54 +02:00
Neel
dc0e41f834
Refresh LLM API token on organization change (#50931)
Emit client-side organization changed events through
`RefreshLlmTokenListener` so it produces the same `RefreshLlmTokenEvent`
used for server-pushed `UserUpdated` messages.

This keeps token refresh fan-out in one place.

Closes CLO-383.

Release Notes:

- N/A

---------

Co-authored-by: Tom Houlé <tom@tomhoule.com>
2026-03-06 19:15:21 +00:00
Max Brunsfeld
61d969665b
zeta: Add variable edit format (#50850)
Release Notes:

- N/A

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-03-05 16:23:36 -08:00
Ben Kunkle
da9d5481e5
zeta2: Don't remove redundant excerpts on the client (#50886)
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 *or* Added/Fixed/Improved ...
2026-03-05 19:04:49 -05:00
Oleksiy Syvokon
2991b0593c
ep: Make --repetitions work with Anthropic and OpenAI batches (#50789)
Release Notes:

- N/A
2026-03-05 07:16:09 +00:00
Max Brunsfeld
67c2c34b94
Include repo_url in edit prediction requests when data collection is enabled (#50745)
Release Notes:

- N/A
2026-03-04 13:14:44 -08:00
Oleksiy Syvokon
0394341c81
ep: Collapse whitespace in deltaChrF (#50716)
Release Notes:

- N/A
2026-03-04 16:28:48 +00:00
Oleksiy Syvokon
9b8ad01769
ep: Option to configure custom Baseten environment (#50706)
Release Notes:

- N/A
2026-03-04 14:56:56 +00:00
Ben Kunkle
dc7cbd3326
zeta2: Hashlines prompt format (#50623)
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 *or* Added/Fixed/Improved ...
2026-03-03 16:11:32 -05:00
Oleksiy Syvokon
09e178d1e1
ep: Predict by querying Baseten directly (#50626)
This can be used like `ep predict --provider
baseten:V0131GitMergeMarkersPrefix`. Since it doesn't require
load_project, it can be used with captured requests.


Release Notes:

- N/A
2026-03-03 21:09:26 +02:00
Oleksiy Syvokon
528bf7c251
ep: Fix fetching rated-after (#50617)
Release Notes:

- N/A
2026-03-03 17:27:52 +00:00
Max Brunsfeld
880b2e512b
Remove Zeta1 logic, allow choosing zeta2 experiment (#50560)
Release Notes:

- N/A
2026-03-02 22:24:55 -08:00
Ben Kunkle
7eb7458c62
ep_cli: Clean up snowflake fetching (#50450)
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 *or* Added/Fixed/Improved ...
2026-03-01 21:17:49 -05:00
Ben Kunkle
ceb9d83dd7
ep: Add settled data fetching from snowflake (#50326)
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 *or* Added/Fixed/Improved ...
2026-03-01 11:20:32 -05:00
Max Brunsfeld
d4e89f9587
Add edit prediction evals that test related excerpt usage (#50256)
I've also fixed a race condition with the programmatic context retrieval
in the CLI, which was causing no excerpts to be fetched for the Rust
examples.

Release Notes:

- N/A
2026-02-26 15:36:29 -08: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
Max Brunsfeld
3da9adc4e7
Edit prediction: add some typescript evals, fix a teacher model failure mode (#50141)
In some evals, the teacher produced hallucinations, seemingly due to
context rot. This makes the zeta prompt crate's budgeted rendering
usable by the teacher, so that it can truncate the list of excerpts.

I've also cleaned up the implementation of zeta_prompt's
`format_related_files_within_budget`, and changed the behavior so that
it filters the the excerpts by priority but renders the files in their
original order.

Release Notes:

- N/A
2026-02-25 15:47:08 -08:00
Oleksiy Syvokon
c9aea6f294
ep: Stratify by cursor_path by default (#50111)
Also, `ep split train=100` now means 100 lines, not 100 groups (repos or
cursor_paths).


Release Notes:

- N/A
2026-02-25 18:15:05 +00:00
Max Brunsfeld
096610efdb
Fix incorrect cursor excerpt handling in EP CLI format-prompt (#49947)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-02-24 05:13:33 +00:00
Max Brunsfeld
5ef898d61e
Fix handling of excerpt regions in EP CLI (#49936)
Previously, we were not computing excerpt regions correctly for EP
examples captured from prod. This PR fixes that, and also simplifies the
data flow in the EP CLI. Examples either come from a concise spec (like
the markdown evals), or are collected from prod. Either way, we compute
from them a `ZetaPromptInput`, and the downstream steps like
prompt-formatting and scoring are derived from that.

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-02-23 17:08:09 -08:00
Max Brunsfeld
97a8fe7828
zeta: Consolidate logic for picking region sizes, use larger editable region (#49921)
This will not affect how Zeta 2 behaves in production until we update
Cloud to pull in the changes to the `zeta_prompt` crate. But from some
early testing, it seems to improve behavior, not worsen it, even though
the editable region size differs from the currently-deployed model's
training data.

Release Notes:

- N/A

---------

Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-02-23 12:52:33 -08:00
Oleksiy Syvokon
450c66ce6e
ep: Add a parameter to sample at most N near-duplicates (#49870)
Duplicates are defined as cursor positions that have an approximate
Jaccard similarity greater than 0.5 (over token 5-grams).

From the resulting clusters of near-duplicates, we select up to N
examples that are maximally different from each other.


Release Notes:

- N/A
2026-02-23 10:56:57 +00:00
Oleksiy Syvokon
67d9e7d011
ep: Fix teacher parser and other fixes (#49863)
Release Notes:

- N/A
2026-02-23 07:18:04 +00:00
Ben Kunkle
8f5ae2d236
ep_cli: Only compute reversals on last user edit (#49747)
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 *or* Added/Fixed/Improved ...
2026-02-20 16:25:40 -05:00
Ben Kunkle
d05ea29095
ep_cli: Delete sync-deployments command (#49728)
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 *or* Added/Fixed/Improved ...
2026-02-20 16:14:04 +00:00
Ben Kunkle
d896bf7c9d
ep_cli: Don't filter rated predictions by Zed version (#49609)
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 *or* Added/Fixed/Improved ...
2026-02-19 22:23:24 -05:00
Max Brunsfeld
62af5b8105
Allow using Zeta through an arbitrary OpenAI-compatible self-hosted API (#49554)
Release Notes:

- Added the ability to use a self-hosted OpenAI-compatible server for
edit predictions.

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-02-19 20:18:36 +00:00
Piotr Osiewicz
bc31ad4a8c
gpui: Extract gpui_platform out of gpui (#49277)
#2874 on steroids

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

---------

Co-authored-by: Eric Holk <eric@zed.dev>
2026-02-19 18:57:49 +01:00
Oleksiy Syvokon
3a1c3757dc
ep: Fix pull examples query (#49610)
Release Notes:

- N/A
2026-02-19 15:09:03 +00:00
Oleksiy Syvokon
3129d7e6b5
ep: Parse "user accepted prediction" markers in evals (#49598)
Also:
- Add two evals
- Remove duplicated Example 6 from the teacher prompt 

Release Notes:

- N/A
2026-02-19 13:01:07 +00:00
Ben Kunkle
84de30d8a3
ep_cli: Filter fetched examples by can_collect_data (#49506)
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 *or* Added/Fixed/Improved ...
2026-02-18 12:27:04 -05:00
Oleksiy Syvokon
d4af86001c
ep: Update teacher prompt (#49489)
* More conservative predictions for prose
* Explain "user accepted prediction" in the teacher prompt
* Sonnet 4.6 support
* Don't strip comments in teacher prompt's edit history

Release Notes:

- N/A
2026-02-18 15:26:47 +00:00
Oleksiy Syvokon
5305c22223
ep: Encode cursor position in the predicted patch (#49450)
Release Notes:

- N/A
2026-02-18 09:55:26 +00:00
Max Brunsfeld
9743fe7dfd
Put back logic for passing data collection choice to cloud (#49426)
Release Notes:

- N/A
2026-02-17 17:43:40 -08:00
Max Brunsfeld
717ea9e998
Filter collection of snowflake requests to those with latest schemas (#49424)
This allows us to just pull requests that have the latest EP request
schema with the `predicted` boolean on events in the edit history.

Release Notes:

- N/A
2026-02-17 16:37:28 -08:00
Max Brunsfeld
e6352278ce
Remove project cache in edit prediction CLI (#49409)
The cache isn't needed, now that we have a better way of reducing
resource consumption (disabling worktree scanning), and it adds race
conditions.

Release Notes:

- N/A
2026-02-17 14:20:46 -08:00
Oleksiy Syvokon
97a21c13b9
ep: Fix Unicode chars boundary (#49351)
Release Notes:

- N/A
2026-02-17 11:39:51 +00:00
Oleksiy Syvokon
c70f300c13
ep: Make extract_last_codeblock more robust (#49347)
Release Notes:

- N/A
2026-02-17 12:48:36 +02:00
Oleksiy Syvokon
96035d137a
ep: Repair predictions with too many edits (#49342)
Also fixes batches upload

Release Notes:

- N/A
2026-02-17 12:48:23 +02:00
Oleksiy Syvokon
891f432f66
ep: Rework ep repair to use original teacher prompt (#49335)
It now creates multi-turn conversation, where first two messages are the
original teacher prompt and output.

This way, we'll have changes in teacher prompt automatically applied to
repair without having to explicitly sync them.


Release Notes:

- N/A
2026-02-17 08:41:15 +00:00
Oleksiy Syvokon
4344681188
ep: Rely on editable_region tags when parsing teacher output (#49334)
Release Notes:

- N/A
2026-02-17 08:37:05 +00:00
Oleksiy Syvokon
ae293de057
ep: Add metrics for inserted/deleted tokens (#49330)
Other changes:
- Changed tokenization to more code-aware tokenization from split-commit
- Fixed word-diff implementation which was inefficient and sometimes
incorrect

Release Notes:

- N/A
2026-02-17 09:40:10 +02:00
Max Brunsfeld
806e944e25
Fix EP CLI issues found when generating new teacher predictions (#49327)
Release Notes:

- N/A
2026-02-17 09:33:34 +02:00
Max Brunsfeld
6cbeb84880
Tune edit prediction teacher to leave fewer blank spots in predictions (#49315)
Release Notes:

- N/A
2026-02-16 16:38:43 -08:00