Skip to content

Add xAI language model parameters#20

Merged
guillaumegay13 merged 5 commits into
mnfst:mainfrom
guillaumegay13:feat/xai-model-params
May 24, 2026
Merged

Add xAI language model parameters#20
guillaumegay13 merged 5 commits 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 Manifest can route to xAI:

  • grok-4.3
  • grok-4.20-0309-reasoning
  • grok-4.20-0309-non-reasoning
  • grok-4.20-multi-agent-0309 via /v1/responses
  • grok-build-0.1

Also adds the xai provider display label and includes the xAI structured-output format selector for Chat Completions (response_format.type) and Responses (text.format.type).

Sources

Official xAI docs used:

Media, voice, image input, streaming, tools, tool choice, and related tool orchestration controls are intentionally not modeled here because they are endpoint/request-shape capabilities rather than standalone MPS parameters. This PR keeps only scalar/enumerated parameters that map cleanly into the current schema.

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.
  • grok-4.20-multi-agent-0309 is Responses API-only. It now includes max_output_tokens, temperature, top_p, reasoning.effort, and text.format.type; Chat Completions-only paths such as max_completion_tokens and response_format.type are intentionally omitted.

Validation

  • npm run validate
  • npm test
  • npm run guard:params
  • npm run typecheck
  • npm run lint
  • npm run build
  • git diff --check

Live xAI smoke

Ran with the local xAI key from .env.keys 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-multi-agent-0309 on /v1/responses with max_output_tokens and reasoning.effort returned 200.
  • grok-4.20-multi-agent-0309 on /v1/responses with temperature and top_p returned 200.
  • grok-4.20-multi-agent-0309 on /v1/responses with text.format.type=json_object 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.
  • grok-4.20-multi-agent-0309 on /v1/responses with Chat Completions-style response_format returned 400 as expected; the API says to use text.format on Responses.

@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
@github-actions github-actions Bot added model Add a model that's missing site Website code or tooling labels May 24, 2026
@guillaumegay13 guillaumegay13 merged commit 17bdd4c into mnfst:main May 24, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model Add a model that's missing site Website code or tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant