weaver logoWeaver

xAI Grok

Configuration options for xAI Grok models in Weaver

xAI Grok Provider Options

Weaver supports provider-specific configuration options for xAI Grok models. These can be set in the Provider Options (JSON) field in the chat configuration settings.

Available Provider Options

Reasoning Effort

Control reasoning depth for Grok reasoning models.

{
  "reasoningEffort": "high"
}

Possible values:

  • "low" – Minimal reasoning (faster)
  • "high" – Extensive reasoning (slower but more thorough)

Query live data from sources including web, news, X posts, and RSS feeds to provide real-time information in responses. This is different than Weaver's built in web search tool and you SHOULD NOT enable both at the same time.

Note: To enable inline citations, please use the following system prompt:

**Inline Citation Format:**
 * Format citations exactly as: `{@cite:URL;;PageTitle}`.

   * **URL**: Direct source link.
   * **PageTitle**: Plain text title (no markdown/HTML) and remove any `|`.
   * URL and PageTitle separated by `;;`.
 * Group multiple sources clearly using `::` separator:

   * **Example single source:**
     `Toronto had record snowfall today. {@cite:https://example.com/;;Weather Update}`
   * **Example multi-source:**
     `LA had a parade today. {@cite:https://ex1.com/;;Parade News::https://ex2.com/;;Local Events}`
 * Avoid repeating citations for the same source; consolidate citations at the end of relevant sections.

Use the searchParameters provider option to enable live search

{
  "searchParameters": {
    "mode": "auto", // required
    // everything else is optional
    "returnCitations": true,
    "maxSearchResults": 20,
    "fromDate": "2024-01-01",
    "toDate": "2024-12-31",
    "sources": [
      {
        "type": "web",
        "country": "US",
        "excludedWebsites": ["example.com"],
        "allowedWebsites": ["trusted-site.com"],
        "safeSearch": true
      },
      {
        "type": "x",
        "xHandles": ["username1", "username2"]
      },
      {
        "type": "news",
        "country": "GB",
        "excludedWebsites": ["tabloid.com"],
        "safeSearch": true
      },
      {
        "type": "rss",
        "links": ["https://example.com/feed.xml"]
      }
    ]
  }
}

Search Parameters

mode (required):

  • "off" – Disables search and uses the model without accessing additional information
  • "auto" – Live search is available to the model, but the model automatically decides whether to perform live search
  • "on" – Enables live search

returnCitations (optional, default: true):

  • true – Returns data source citations in the response
  • false – Does not return citations

maxSearchResults (optional, default: 20):

  • Maximum number of data sources to consider in the query
  • Integer value

fromDate and toDate (optional):

  • Restrict the date range of search data
  • Format: ISO8601 ("YYYY-MM-DD")
  • Can be used independently

Data Sources

sources (optional, defaults to ["web", "x"]):

Web Search ("type": "web")

Search websites across the internet.

Parameters:

  • "country" – ISO alpha-2 country code (e.g., "US", "GB", "CH")
  • "excludedWebsites" – Array of up to 5 websites to exclude (cannot use with allowedWebsites)
  • "allowedWebsites" – Array of up to 5 websites to search only (cannot use with excludedWebsites)
  • "safeSearch" – Boolean, default true
X Posts ("type": "x")

Search X (formerly Twitter) posts.

Parameters:

  • "xHandles" – Array of X usernames to search posts from
News ("type": "news")

Search news sources.

Parameters:

  • "country" – ISO alpha-2 country code
  • "excludedWebsites" – Array of up to 5 news websites to exclude
  • "safeSearch" – Boolean, default true
RSS Feeds ("type": "rss")

Retrieve data from RSS feeds.

Parameters:

  • "links" – Array containing one RSS feed URL

User Identifier

Provide a unique identifier for the end user.

{
  "user": "user_12345"
}

Format: String identifier that helps xAI monitor usage and detect potential abuse

The user identifier is used for:

  • Usage tracking
  • Abuse detection
  • Rate limiting
  • Debugging assistance

This parameter is optional but recommended, especially for applications with multiple users.

Model Compatibility

Check the xAI documentation for the most up-to-date compatibility information. AI SDK

On this page