Add xAI to supported language model providers (#37206)

Joseph T. Lyons created

After setting a `grok` model via the agent panel, the settings complains
that it doesn't recognize the language model provider:

<img width="1005" height="188" alt="SCR-20250829-tqqd"
src="https://github.com/user-attachments/assets/a25fc7e0-60f0-44fd-96d2-b1cb316d06b6"
/>

Also, sorted the list, in the follow-up commit.

Release Notes:

- N/A

Change summary

crates/agent_settings/src/agent_settings.rs | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

Detailed changes

crates/agent_settings/src/agent_settings.rs 🔗

@@ -352,18 +352,19 @@ impl JsonSchema for LanguageModelProviderSetting {
     fn json_schema(_: &mut schemars::SchemaGenerator) -> schemars::Schema {
         json_schema!({
             "enum": [
-                "anthropic",
                 "amazon-bedrock",
+                "anthropic",
+                "copilot_chat",
+                "deepseek",
                 "google",
                 "lmstudio",
+                "mistral",
                 "ollama",
                 "openai",
-                "zed.dev",
-                "copilot_chat",
-                "deepseek",
                 "openrouter",
-                "mistral",
-                "vercel"
+                "vercel",
+                "x_ai",
+                "zed.dev"
             ]
         })
     }