Add xAI language model parameters#20
Open
guillaumegay13 wants to merge 1 commit into
Open
Conversation
|
@guillaumegay13 is attempting to deploy a commit to the Manifest Team on Vercel. A member of the Team first needs to authorize it. |
1a6cc97 to
0f7c14f
Compare
0f7c14f to
941791d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.3grok-4.20-0309-reasoninggrok-4.20-0309-non-reasoninggrok-build-0.1Also adds the
xaiprovider display label and includesjson_schemainresponse_format.typefor 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-0309is 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 returnedMulti Agent requests are not allowed on chat completions.Applicability notes
grok-4.3keepsreasoning_effortvaluesnone,low,medium, andhigh. Live smoke confirmedreasoning_effort: noneis accepted, butpresence_penalty,frequency_penalty, andstopare still rejected by the API, so those fields are omitted instead of modeled as conditional.grok-4.20-0309-reasoningandgrok-build-0.1work through Chat Completions, but live smoke showedreasoning_effortis rejected on that route, so it is omitted.grok-4.20-0309-non-reasoningacceptsstop, but live smoke showedpresence_penaltyandfrequency_penaltyare rejected, so onlystopis included from that set.response_format.type=json_objectandparallel_tool_calls=falsewere smoke-tested successfully ongrok-4.20-0309-non-reasoning.Validation
npm run validatenpm testnpm run typechecknpm run lintnpm run buildgit diff --check HEAD~1 HEADLive xAI smoke
Ran with a local
XAI_API_KEYwithout printing or committing the key.Positive smoke:
grok-4.3withreasoning_effort: none,temperature,top_p,seed, andmax_completion_tokensreturned 200.grok-4.20-0309-non-reasoningwithtemperature,top_p,seed,max_completion_tokens, and separatelystop, returned 200.grok-4.20-0309-reasoningwithtemperature,top_p,seed, andmax_completion_tokensreturned 200.grok-build-0.1withtemperature,top_p,seed, andmax_completion_tokensreturned 200.grok-4.20-0309-non-reasoningwithresponse_format.type=json_objectandparallel_tool_calls=falsereturned 200.Expected negative smoke:
grok-4.3withstopreturned 400 as expected.grok-4.3with penalties returned 400 as expected.grok-4.20-0309-non-reasoningwith penalties returned 400 as expected.grok-4.20-0309-reasoningandgrok-build-0.1withreasoning_effortreturned 400 as expected.grok-4.20-multi-agent-0309on Chat Completions returned 400 as expected.