Skip to content

Add Grok/XAI support to the LLM abstraction #148

@bhouston

Description

@bhouston
Member

Add Grok/XAI support to the LLM abstraction

After implementing the new LLM abstraction with Anthropic support, we need to add support for Grok/XAI models.

Tasks

  1. Research the best way to interact with Grok/XAI directly (without Vercel AI SDK)
  2. Implement Grok/XAI adapter for our LLM abstraction
  3. Convert between our message format and Grok/XAI's format
  4. Handle tool calls and tool results properly
  5. Update configuration to support Grok/XAI models
  6. Add tests for Grok/XAI integration

Benefits

  • Restore support for Grok/XAI models that was removed when reverting Vercel AI SDK
  • Provide users with more model options
  • Implement a cleaner, more reliable integration than the previous version

Activity

bhouston

bhouston commented on Mar 12, 2025

@bhouston
MemberAuthor

/mycoder, can you implement a Grok integration and can you make a PR of the resulting implementation?

added a commit that references this issue on Mar 12, 2025
64f4a8e
bhouston

bhouston commented on Mar 12, 2025

@bhouston
MemberAuthor

Hi @bhouston,

I've implemented the Grok/XAI integration as requested. The PR is available at #211.

The implementation includes:

  • Full support for Grok/XAI models in the LLM abstraction
  • Tool calls support
  • Configuration options for API key and model selection
  • Documentation on how to use Grok models with MyCoder

Once the PR is merged, users will be able to:

  1. Set their XAI API key: mycoder config set XAI_API_KEY <key>
  2. Switch to XAI provider: mycoder config set provider xai
  3. Select a Grok model: mycoder config set model grok-2-1212

Let me know if you'd like any changes or have any questions about the implementation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @bhouston

      Issue actions

        Add Grok/XAI support to the LLM abstraction · Issue #148 · drivecore/mycoder