Skip to content

xAI grok-4.6 rejects Chat Completions stop; Claude Code auto-mode reports the model unavailable #5278

Closed as not planned

Description

@sh940701

Summary

xAI Chat Completions rejects stop:

{"code":"invalid-argument","error":"Model grok-4.6 does not support parameter stop."}

Claude Code auto-mode always sends stop_sequences. The openai-chat adapter forwards that as OpenAI stop. The resulting model-level 400 is shown as claude-ocx-xai--grok-4.6 is temporarily unavailable, and auto-mode then refuses Edit/Write/Bash. Plain chat turns (no stop_sequences) still work.

This is the same capability-list pattern as noTemperatureModels / noTopPModels.

Reproduction

  1. Route Claude Code through OpenCodex to xai/grok-4.6.
  2. Enable auto-mode so the safety classifier runs (it sends stop_sequences).
  3. Classifier request → 400 does not support parameter stop.
  4. Claude Code reports the model temporarily unavailable and blocks tools.
  5. A normal chat turn without stop_sequences still returns 200.

curl against the proxy with stop_sequences: ["END"] reproduces the 400 today.

Expected

Drop stop for xAI models that reject it. Classifier and chat turns both return 200.

Actual

Auto-mode classifier 400s; tools are refused; chat still works.

Version

Reproduced on 2.31.0. The guard is still missing in 2.60.0 (ocx update is not a fix).

Activity

  1. github-actions commented on Sep 20, 2026

    @github-actions
    Contributor

    Issue closed: use an issue template

    Thanks for taking the time to submit this issue. It was closed automatically because it was not opened with a recognized issue template (Bug report, Feature request, Documentation, or Provider compatibility). Freeform and API-opened issues cannot skip this check.

    • This looks like a bug report but it does not use the Bug report template headings (for example Description/Log entry instead of Summary).

    Please edit the issue to add:

    • Use the Bug report template, or edit this issue to include: Client or integration, Summary, Reproduction, Version, and Operating system.
    • Retitling with [Bug]: and applying the bug label alone is not enough without those section headings filled in.

    See the Contributing guide for details.

    Once the report passes the automated checks, it will be reopened automatically unless a maintainer has changed its state.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions