# agent: Improve Gemini support in the edit_file tool \(\#31116\) · gitcafe/zed

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

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

Visibility: public

Requested revision: ab017129d8646b09c29f1fa9ef3d07b318f68005

Requested commit: ab017129d8646b09c29f1fa9ef3d07b318f68005

Commit: ab017129d8646b09c29f1fa9ef3d07b318f68005

Tree: b2ee34878fe3648bad97407915e9d5b89969c1bf

Author: Oleksiy Syvokon

Committer: GitHub

## Message

```
agent: Improve Gemini support in the edit_file tool (#31116)

This change improves `eval_extract_handle_command_output` results for
all models:

Model                       | Pass rate before | Pass rate after
----------------------------|------------------|----------------
claude-3.7-sonnet           |  0.96            | 0.98
gemini-2.5-pro              |  0.35            | 0.86
gpt-4.1                     |  0.81            | 1.00

Part of this improvement comes from more robust evaluation, which now
accepts multiple possible outcomes. Another part is from the prompt
adaptation: addressing common Gemini failure modes, adding a few-shot
example, and, in the final commit, auto-rewriting instructions for
clarity and conciseness.

This change still needs validation from larger end-to-end evals.


Release Notes:

- N/A
```

## Parents

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

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