Skip to content

Add xAI language model parameters#20

Open
guillaumegay13 wants to merge 1 commit into
mnfst:mainfrom
guillaumegay13:feat/xai-model-params
Open

Add xAI language model parameters#20
guillaumegay13 wants to merge 1 commit into
mnfst:mainfrom
guillaumegay13:feat/xai-model-params

Conversation

@guillaumegay13
Copy link
Copy Markdown
Collaborator

@guillaumegay13 guillaumegay13 commented May 22, 2026

Summary

Adds xAI API-key parameter coverage for the current xAI language models that are compatible with the OpenAI-style Chat Completions route Manifest sends to xAI:

  • grok-4.3
  • grok-4.20-0309-reasoning
  • grok-4.20-0309-non-reasoning
  • grok-build-0.1

Also adds the xai provider display label and includes json_schema in response_format.type for xAI structured outputs.

Sources

Official xAI docs used:

Media and voice models are intentionally not included here because MPS currently describes configurable model request parameters for language/chat routes, not image/video/voice endpoint capabilities.

grok-4.20-multi-agent-0309 is also intentionally not included in this Chat Completions-focused PR: the official multi-agent docs say it uses the Responses API and that Chat Completions is not supported, and live smoke returned Multi Agent requests are not allowed on chat completions.

Applicability notes

  • grok-4.3 keeps reasoning_effort values none, low, medium, and high. Live smoke confirmed reasoning_effort: none is accepted, but presence_penalty, frequency_penalty, and stop are still rejected by the API, so those fields are omitted instead of modeled as conditional.
  • grok-4.20-0309-reasoning and grok-build-0.1 work through Chat Completions, but live smoke showed reasoning_effort is rejected on that route, so it is omitted.
  • grok-4.20-0309-non-reasoning accepts stop, but live smoke showed presence_penalty and frequency_penalty are rejected, so only stop is included from that set.
  • response_format.type=json_object and parallel_tool_calls=false were smoke-tested successfully on grok-4.20-0309-non-reasoning.

Validation

  • npm run validate
  • npm test
  • npm run typecheck
  • npm run lint
  • npm run build
  • git diff --check HEAD~1 HEAD

Live xAI smoke

Ran with a local XAI_API_KEY without printing or committing the key.

Positive smoke:

  • grok-4.3 with reasoning_effort: none, temperature, top_p, seed, and max_completion_tokens returned 200.
  • grok-4.20-0309-non-reasoning with temperature, top_p, seed, max_completion_tokens, and separately stop, returned 200.
  • grok-4.20-0309-reasoning with temperature, top_p, seed, and max_completion_tokens returned 200.
  • grok-build-0.1 with temperature, top_p, seed, and max_completion_tokens returned 200.
  • grok-4.20-0309-non-reasoning with response_format.type=json_object and parallel_tool_calls=false returned 200.

Expected negative smoke:

  • grok-4.3 with stop returned 400 as expected.
  • grok-4.3 with penalties returned 400 as expected.
  • grok-4.20-0309-non-reasoning with penalties returned 400 as expected.
  • grok-4.20-0309-reasoning and grok-build-0.1 with reasoning_effort returned 400 as expected.
  • grok-4.20-multi-agent-0309 on Chat Completions returned 400 as expected.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

@guillaumegay13 is attempting to deploy a commit to the Manifest Team on Vercel.

A member of the Team first needs to authorize it.

@guillaumegay13 guillaumegay13 force-pushed the feat/xai-model-params branch from 1a6cc97 to 0f7c14f Compare May 22, 2026 14:35
@guillaumegay13 guillaumegay13 marked this pull request as ready for review May 22, 2026 14:41
@guillaumegay13 guillaumegay13 force-pushed the feat/xai-model-params branch from 0f7c14f to 941791d Compare May 22, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant