Skip to content

language_models: Apply JSON schema subset transform to xAI#51835

Merged
tomhoule merged 1 commit intomainfrom
tomhoule-qzvsuykxosvn
Mar 18, 2026
Merged

language_models: Apply JSON schema subset transform to xAI#51835
tomhoule merged 1 commit intomainfrom
tomhoule-qzvsuykxosvn

Conversation

@tomhoule
Copy link
Copy Markdown
Contributor

@tomhoule tomhoule commented Mar 18, 2026

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.

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.

Co-authored-by: Neel <neel@zed.dev>
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 18, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Mar 18, 2026
@NeelChotai NeelChotai changed the title language_models: apply JSON schema subset transform to xAI language_models: Apply JSON schema subset transform to xAI Mar 18, 2026
@tomhoule tomhoule marked this pull request as ready for review March 18, 2026 14:04
@tomhoule tomhoule merged commit f6fd673 into main Mar 18, 2026
44 checks passed
@tomhoule tomhoule deleted the tomhoule-qzvsuykxosvn branch March 18, 2026 14:23
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 18, 2026
…tries#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>
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 20, 2026
…tries#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>
toshmukhamedov pushed a commit to toshmukhamedov/zed that referenced this pull request Mar 20, 2026
…tries#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>
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 23, 2026
…tries#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants