Add xAI language model provider (#33593)

Closes #30010

Release Notes:

- Add support for xAI language model provider
This commit is contained in:
Umesh Yadav 2025-07-16 01:05:50 +05:30 committed by GitHub
parent af0031ae8b
commit ec52e9281a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 840 additions and 28 deletions

View file

@ -376,7 +376,7 @@ impl LanguageModel for OpenRouterLanguageModel {
fn tool_input_format(&self) -> LanguageModelToolSchemaFormat {
let model_id = self.model.id().trim().to_lowercase();
if model_id.contains("gemini") {
if model_id.contains("gemini") || model_id.contains("grok-4") {
LanguageModelToolSchemaFormat::JsonSchemaSubset
} else {
LanguageModelToolSchemaFormat::JsonSchema