Files
zed/crates/language_models
Tom HouléandNeel 3bde1e2e27 language_models: Apply JSON schema subset transform to xAI (#51835)
The conversations on Grok 4 were failing right away on the first message
in a conversation when using Zed provided model directly, but not the
xAI API directly.

The reason we were seeing this is that when sending the JSON schemas for
built-in tools to the cloud API, we didn't use the transform we use for
xAI in a BYOK context. The xAI API doesn't support the full JSON schema
spec, and specifically for the spawn_agent tool, we were generating a
`oneOf` type for a field. Applying that transformation in the cloud case
too fixes the issue.

Release Notes:

- Fixed broken (failing on first message) xAI models over the Zed
provider on profiles using the spawn_agent tool, including the default
Ask and Write profiles.

Co-authored-by: Neel <neel@zed.dev>
2026-03-18 15:23:47 +01:00
..