Add xAI language model parameters#20
Merged
Merged
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 Manifest can route to xAI:
grok-4.3grok-4.20-0309-reasoninggrok-4.20-0309-non-reasoninggrok-4.20-multi-agent-0309via/v1/responsesgrok-build-0.1Also adds the
xaiprovider 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.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.grok-4.20-multi-agent-0309is Responses API-only. It now includesmax_output_tokens,temperature,top_p,reasoning.effort, andtext.format.type; Chat Completions-only paths such asmax_completion_tokensandresponse_format.typeare intentionally omitted.Validation
npm run validatenpm testnpm run guard:paramsnpm run typechecknpm run lintnpm run buildgit diff --checkLive xAI smoke
Ran with the local
xAIkey from.env.keyswithout 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-multi-agent-0309on/v1/responseswithmax_output_tokensandreasoning.effortreturned 200.grok-4.20-multi-agent-0309on/v1/responseswithtemperatureandtop_preturned 200.grok-4.20-multi-agent-0309on/v1/responseswithtext.format.type=json_objectreturned 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.grok-4.20-multi-agent-0309on/v1/responseswith Chat Completions-styleresponse_formatreturned 400 as expected; the API says to usetext.formaton Responses.