# x_ai: Add support for tools and images with custom models \(\#38792\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 92a09ecf2557e276858986e92ee0a21a7ee39d45

Requested commit: 92a09ecf2557e276858986e92ee0a21a7ee39d45

Commit: 92a09ecf2557e276858986e92ee0a21a7ee39d45

Tree: 956fb2347359d6494bac9e54fc73fb285752c315

Author: Jowell Young

Committer: GitHub

## Message

````
x_ai: Add support for tools and images with custom models (#38792)

After the change, we can add "supports_images", "supports_tools" and
"parallel_tool_calls" properties to set up new models. Our
`settings.json` will be as follows:
```json
  "language_models": {
     "x_ai": {
       "api_url": "https://api.x.ai/v1",
       "available_models": [
         {
           "name": "grok-4-fast-reasoning",
           "display_name": "Grok 4 Fast Reasoning",
           "max_tokens": 2000000,
           "max_output_tokens": 64000,
           "supports_tools": true,
           "parallel_tool_calls": true,
         },
         {
           "name": "grok-4-fast-non-reasoning",
           "display_name": "Grok 4 Fast Non-Reasoning",
           "max_tokens": 2000000,
           "max_output_tokens": 64000,
           "supports_images": true,
         }
       ]
     }
   }

```

Closes https://github.com/zed-industries/zed/issues/38752

Release Notes:

- xAI: Added support for for configuring tool and image support for
custom model configurations
````

## Parents

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

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