Skip to content

feat: add direct xAI Grok support (stack 4/4) - #3068

Draft
antonvishal wants to merge 45 commits into
browserbase:mainfrom
antonvishal:model-allowlist
Draft

antonvishal wants to merge 45 commits into
browserbase:mainfrom
antonvishal:model-allowlist

Conversation

@antonvishal

@antonvishal antonvishal commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Why

Stack 4/4. Add direct xAI Grok inference after provider-only validation and its documentation land.

Merge order: #2921, #2941, #3098, #3068. Fork PRs target upstream main; merge in this order. Each branch contains its predecessor. Depends on #3098. This is the final layer of the original draft.

What

Add xai/ model names and the AI SDK xAI Responses provider for direct and agent inference. Require a provider API key because Model Gateway does not support xAI. Reject unsupported stop sequences. Docs and unit tests use xai/grok-4.7. Eval pricing and eval harness IDs are unchanged.

Focused diff: antonvishal/stagehand@vishal/model-provider-docs...model-allowlist

How

53 xAI-related extension tests, 228 Python SDK tests, and Go SDK tests passed.

Reviewer: verify xAI provider construction, tool and JSON-schema request serialization, unchanged upstream errors, and keyless/stop-sequence rejection. Tests intercept requests; they do not run paid live xAI inference. ModelProvider gains xai, so exhaustive consumers may need changes.

@changeset-bot

changeset-bot Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1c1740a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 25 packages
Name Type
@browserbasehq/stagehand-protocol Major
@browserbasehq/stagehand-extension Patch
@browserbasehq/stagehand-python Minor
@browserbasehq/stagehand-go Minor
@browserbasehq/stagehand Minor
browse Patch
@browserbasehq/stagehand-examples Patch
@browserbasehq/stagehand-integrations-claude-cua-sdk Patch
@browserbasehq/stagehand-integrations Patch
@browserbasehq/eve Patch
@browserbasehq/stagehand-integrations-gemini-cua-sdk Patch
@browserbasehq/stagehand-integrations-example-pi-facade Patch
@browserbasehq/stagehand-integrations-claude-agent-sdk Patch
@browserbasehq/stagehand-integrations-example-claude-code-facade Patch
@browserbasehq/stagehand-integrations-codex-sdk Patch
@browserbasehq/stagehand-integrations-example-codex-facade Patch
@browserbasehq/stagehand-integrations-cursor-sdk Patch
@browserbasehq/stagehand-integrations-example-cursor-facade Patch
@browserbasehq/stagehand-integrations-deepagents-sdk Patch
@browserbasehq/stagehand-integrations-eve-sdk Patch
@browserbasehq/stagehand-integrations-fx-sdk Patch
@browserbasehq/stagehand-integrations-mastra-sdk Patch
@browserbasehq/stagehand-integrations-example-mastra-facade Patch
@browserbasehq/stagehand-integrations-pi-sdk Patch
@browserbasehq/stagehand-integrations-example-vercel-ai-facade Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

This PR is from an external contributor and must be approved by a stagehand team member with write access before CI can run.
Approving the latest commit mirrors it into an internal PR owned by the approver.
If new commits are pushed later, the internal PR stays open but is marked stale until someone approves the latest external commit and refreshes it.

@github-actions github-actions Bot added external-contributor Tracks PRs mirrored from external contributor forks. external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. labels Sep 28, 2026
@socket-security

socket-security Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​ai-sdk/​xai@​5.0.11711008798100
Updatednpm/​@​ai-sdk/​google@​4.0.8 ⏵ 4.0.8472 +110088 +198100
Updatednpm/​@​ai-sdk/​openai@​4.0.8 ⏵ 4.0.7973 +810094 +798100
Updatednpm/​@​ai-sdk/​anthropic@​4.0.8 ⏵ 4.0.6793 +1910088 +198100
Updatednpm/​ai@​7.0.77 ⏵ 7.0.1209910010099100

View full report

@antonvishal antonvishal changed the title Draft: simplify model support feat: add direct xAI Grok support (stack 4/4) Oct 3, 2026
Use current OpenAI, Anthropic, and Google catalog IDs in SDK examples,
generated schema samples, eval defaults, and harness pricing. GPT-6
models default to hybrid agent mode. CUA defaults stay on the existing
computer-use IDs.
Point v4 examples and the models page at current OpenAI, Anthropic, and Google IDs, and rank recommendations from Browserbase Benchmark v2.
# Conflicts:
#	packages/docs/v4/configuration/models.mdx
Point xAI docs, tests, and eval pricing at the current Grok 4.7 API ID.
Keep oxfmt happy after the current provider ID strings.
Leave eval harness IDs unchanged. Use gpt-6-luna for former mini defaults, keep Sol for larger OpenAI fixtures.
Keep Sol for default examples, Astra and Fable as the largest models, and leave eval harness IDs alone.
Keep the eval pricing table unchanged while docs and unit tests use grok-4.7.
Update only Sol and Luna IDs in the recommendations table.
Use opus-5-5 for accuracy, gpt-6-sol for speed, and keep Sol/Luna for production and cost.
# Conflicts:
#	pnpm-lock.yaml
#	pnpm-workspace.yaml
…ion-protocol-sdks

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	pnpm-lock.yaml
#	pnpm-workspace.yaml
…er-docs

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	pnpm-lock.yaml
#	pnpm-workspace.yaml
…sdks' into vishal/model-provider-docs

# Conflicts:
#	pnpm-lock.yaml
Drop unused Groq/Cerebras catalog pins that leaked in from an independent main merge.
# Conflicts:
#	packages/sdk-go/internal/extensionassets/stagehand-extension.zip
# Conflicts:
#	packages/sdk-go/internal/extensionassets/stagehand-extension.zip
# Conflicts:
#	packages/sdk-go/internal/extensionassets/stagehand-extension.zip

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. external-contributor Tracks PRs mirrored from external contributor forks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant