Class XaiLlmClient

All Implemented Interfaces:
LlmClient

public class XaiLlmClient extends OpenAiLlmClient
Runtime client for xAI Grok. OpenAI-chat-compatible, so it inherits request building and response parsing from OpenAiLlmClient; only the provider and default base URL (https://api.x.ai) differ.
  • Constructor Details

    • XaiLlmClient

      public XaiLlmClient()
  • Method Details

    • provider

      public Provider provider()
      Description copied from interface: LlmClient
      The provider this client handles — the registry key.
      Specified by:
      provider in interface LlmClient
      Overrides:
      provider in class OpenAiLlmClient
    • defaultBaseUrl

      protected String defaultBaseUrl()
      Description copied from class: OpenAiLlmClient
      The default base URL used when the backend does not supply one. OpenAI-compatible subclasses (Mistral, xAI, DeepSeek, Groq, OpenRouter) override this to point at their own host while inheriting the identical request/response wire format.
      Overrides:
      defaultBaseUrl in class OpenAiLlmClient