Skip to content

Would you accept official xAI API support for Grok models? #2150

@obdagli

Description

@obdagli

Hi, I wanted to check maintainer preference before preparing a PR.

Would you accept support for the official xAI API in CLIProxyAPI, so Grok models can be used through xAI console/API access?

This is about official xAI API support only.
It is not about grok.com web-session / cookie-based reverse proxy support.

Why I'm asking first

Before implementing anything, I want to confirm whether xAI/Grok support is:

  • intentionally out of scope, or
  • something you would accept if kept small and maintainable

From reading the codebase, CLIProxyAPI already has:

  • config-driven API-key providers
  • OpenAI-compatible upstream support
  • provider-specific executors
  • model registration and alias/exclusion handling

So official xAI API support looks like it may fit the project, but I wanted to ask first instead of making assumptions.

Proposed scope for a first PR

If this is acceptable, I would keep the first contribution minimal:

  • official xAI API only
  • API key + base URL configuration
  • Grok model exposure in /v1/models
  • streaming + non-streaming support
  • mock-based tests
  • docs/config example

Explicitly out of scope for this first step:

  • grok.com web-session support
  • cookie / Cloudflare clearance handling
  • browser-fingerprint / uTLS transport workarounds

Maintainer preference

If you are open to this, would you prefer:

  1. a dedicated native xai provider, or
  2. keeping this under existing openai-compatibility support with improved docs/tests/examples?

If the idea is acceptable, I can prepare the smallest PR in the direction you prefer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions