Skip to content

Add xAI Grok model support - #586

Merged
rsproule merged 10 commits into
Merit-Systems:masterfrom
dhvll:grok-ai
Oct 27, 2025
Merged

Add xAI Grok model support#586
rsproule merged 10 commits into
Merit-Systems:masterfrom
dhvll:grok-ai

Conversation

@dhvll

@dhvll dhvll commented Oct 20, 2025

Copy link
Copy Markdown
Contributor
  • Added Groq provider with 13 models and accurate pricing
  • Added xAI Grok provider with 7 models and accurate pricing
  • Implemented X Search tool call support via web_search_preview
  • Added TypeScript and Next.js SDK support for both providers

/claim #585

@vercel

vercel Bot commented Oct 20, 2025

Copy link
Copy Markdown
Contributor

@dhvll is attempting to deploy a commit to the Merit Systems Team on Vercel.

A member of the Team first needs to authorize it.

@rsproule rsproule left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing:

  • provider smoke test for xai

Comment on lines +34 to +48
const tools = (reqBody as any)?.tools as unknown[] | undefined;
if (Array.isArray(tools)) {
const wantsWebSearch = tools.some(tool => {
const t = tool as any;
return (
t?.type === 'web_search_preview' || t?.name === 'web_search_preview'
);
});
if (wantsWebSearch) {
(reqBody as any).search = true;
}
}
} catch (e) {
// best-effort; fall through
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unclear to me what is going on here? whats the idea?

Comment thread packages/sdk/ts/src/providers/xai.ts Outdated
Comment thread packages/sdk/ts/src/supported-models/tools/xai.ts Outdated
Comment thread packages/sdk/ts/src/providers/index.ts Outdated
Comment thread packages/sdk/ts/src/providers/xai.ts Outdated
@dhvll
dhvll requested a review from rsproule October 22, 2025 13:19
@fmhall

fmhall commented Oct 22, 2025

Copy link
Copy Markdown
Member

Related to #586

@dhvll

dhvll commented Oct 27, 2025

Copy link
Copy Markdown
Contributor Author

@rsproule can you review and tell me which changes needs to be done?

@rsproule

Copy link
Copy Markdown
Contributor

Cool just tested. LGTM. good work!

@rsproule
rsproule merged commit e7bb7c6 into Merit-Systems:master Oct 27, 2025
2 of 17 checks passed
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.

3 participants