# assistant_tools: Fix code_action and rename schemas for Gemini \(\#28634\) · gitcafe/zed

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

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

Visibility: public

Requested revision: fddaa3165580eec8ddf02a3847c4fa0d020c05fd

Requested commit: fddaa3165580eec8ddf02a3847c4fa0d020c05fd

Commit: fddaa3165580eec8ddf02a3847c4fa0d020c05fd

Tree: 4f7836688efc12528f1859c870b4783daa2a27c4

Author: duvetfall

Committer: GitHub

## Message

```
assistant_tools: Fix code_action and rename schemas for Gemini (#28634)

Closes #28475

Updates `rename` and `code_action` `input_schema` methods to use
`json_schema_for<T>()` which transforms standard JSONSchema into the
subset required by Gemini.
Also makes `input_schema` implementations consistent.
Tested tools against Gemini 2.5 Pro Preview, Zed Claude 3.7 Sonnet
Thinking, o3-mini

Release Notes:

- Agent Beta: Fixed error 400 `INVALID_ARGUMENT` when using Gemini with
`code_actions` or `rename` tools enabled.
```

## Parents

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

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