# agent: Check built-in tools schema compatibility in tests \(\#28691\) · gitcafe/zed

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

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

Visibility: public

Requested revision: a0511941958aa9f0ad4d688bd0a69ca8c2926bfc

Requested commit: a0511941958aa9f0ad4d688bd0a69ca8c2926bfc

Commit: a0511941958aa9f0ad4d688bd0a69ca8c2926bfc

Tree: 73ab0f13870e1aad587716acbb589fb47ee4b37d

Author: Bennet Bo Fenner

Committer: GitHub

## Message

````
agent: Check built-in tools schema compatibility in tests (#28691)

This ensures that we respect the `LanguageModelToolSchemaFormat` value
when we call `tool.input_schema`. This prevents us from breaking Gemini
compatibility when adding/changing built-in tools. See #28634.

The test suite will now fail with an error message like this, when
providing an incompatible input_schema:

```
thread 'tests::test_tool_schema_compatibility' panicked at crates/assistant_tools/src/assistant_tools.rs:108:17:
Tool schema for `code_actions` is not compatible with `language_model::LanguageModelToolSchemaFormat::JsonSchemaSubset` (Gemini Models).
Are you using `schema::json_schema_for<T>(format)` to generate the schema?
```


Release Notes:

- N/A
````

## Parents

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

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