Skip to content

[Bug]: xAI Grok 4.5 compatibility: HTTP 400 despite valid OpenAI-compatible API #383

Description

@lagan1

Affected Component

External Integrations (LLM/Search APIs)

Describe the bug

Hi,

I'm trying to use PentAGI with xAI Grok 4.5.

Configuration:

OPEN_AI_SERVER_URL=https://api.x.ai/v1

with a valid xAI API key.

I tried both:

OpenAI provider
Custom provider

Creating a flow always fails with:

failed to create flow worker:
failed to get flow provider:
failed to select primary docker image via llm call:
API returned unexpected status code: 400

Steps to Reproduce

  1. Configure an OpenAI-compatible provider with:
    OPEN_AI_SERVER_URL=https://api.x.ai/v1
    A valid xAI API key with access to grok-4.5.

  2. Select the configured provider.

  3. Create a new flow.

  4. Observe that flow creation fails with:

failed to create flow worker:
failed to get flow provider:
failed to select primary docker image via llm call:
API returned unexpected status code: 400

I got the same error when i created the custom provider too

System Configuration

PentAGI Version:
Latest (Docker image: vxcontrol/pentagi:latest)

Deployment Type:
Docker Compose

Environment:

  • Docker Version: 29.7.0
  • Docker Compose Version: v5.3.1
  • Host OS: Ubuntu 24.04 LTS
  • Available Resources:
    • RAM: 8 GB
    • CPU: 4
    • Disk Space: 93GB

Enabled Features:
Custom LLM Server

Active Integrations:

  • LLM Provider: OpenAI, Custom

Logs and Artifacts

I verified the following:

GET /v1/models works from inside the PentAGI container.
POST /v1/chat/completions with model: grok-4.5 works.
POST /v1/responses with model: grok-4.5 works.

Since the endpoint, authentication, and model all work, it looks like PentAGI may be sending one or more OpenAI-specific request parameters that xAI rejects

Screenshots or Recordings

No response

Verification

  • I have checked that this issue hasn't been already reported
  • I have provided all relevant configuration files (with sensitive data removed)
  • I have included relevant logs and error messages
  • I am running the latest version of PentAGI

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions