Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
57bfdee
refactor: remove Groq and Cerebras support from SDK
antonvishal Sep 11, 2026
f7f17f1
Merge branch 'main' into remove-groq-cerebras
antonvishal Sep 24, 2026
f77ef2f
Merge remote-tracking branch 'upstream/main' into remove-groq-cerebras
antonvishal Sep 28, 2026
d992948
Merge branch 'browserbase:main' into remove-groq-cerebras
antonvishal Sep 28, 2026
bd0b91e
Merge remote-tracking branch 'upstream/main' into vishal/resolve-pr-2921
antonvishal Oct 1, 2026
d46c915
Merge remote-tracking branch 'upstream/main' into vishal/resolve-oct0…
antonvishal Oct 2, 2026
78bd6e2
feat: validate providers without model allowlists
antonvishal Oct 3, 2026
e06a3ff
Merge branch 'vishal/remove-groq-cerebras' into vishal/provider-only-…
antonvishal Oct 3, 2026
d33c03a
fix: preserve unrelated contributor credit
antonvishal Oct 3, 2026
b0ab6d1
chore: refresh example and eval model IDs
antonvishal Oct 3, 2026
3046e4d
style: format model ID table wrapping
antonvishal Oct 3, 2026
47c020b
fix: restore evals and map mini examples to Luna
antonvishal Oct 3, 2026
f827284
Merge remote-tracking branch 'upstream/main' into newer-models-extens…
antonvishal Oct 4, 2026
5a03c58
Merge remote-tracking branch 'upstream/main' into vishal/oct04-2921
antonvishal Oct 4, 2026
c84335e
Merge remote-tracking branch 'origin/remove-groq-cerebras' into newer…
antonvishal Oct 4, 2026
5bbf093
Merge remote-tracking branch 'upstream/main' into vishal/conflicts-2921
antonvishal Oct 6, 2026
9fddbf3
Merge branch 'vishal/conflicts-2921' into vishal/conflicts-2941
antonvishal Oct 6, 2026
5e34c34
Merge remote-tracking branch 'upstream/main' into vishal/resolve-2941…
antonvishal Oct 6, 2026
e2007c0
Merge upstream main into provider validation stack
antonvishal Oct 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/open-model-ids.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@browserbasehq/stagehand-protocol": minor
"@browserbasehq/stagehand-extension": patch
"@browserbasehq/stagehand-python": minor
"@browserbasehq/stagehand-go": minor
"@browserbasehq/stagehand": minor
---

Accept any nonempty model ID under the OpenAI, Anthropic, and Google provider prefixes without a Stagehand release. Unknown model IDs now fail on the provider request instead of during configuration validation. Public model ID types widen from literal unions to strings. Examples and generated schema samples use current provider IDs such as `openai/gpt-6-luna`, `anthropic/claude-sonnet-5-5`, and `google/gemini-3.8-flash`.
9 changes: 9 additions & 0 deletions .changeset/remove-groq-cerebras.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@browserbasehq/stagehand-protocol": major
"@browserbasehq/stagehand-extension": patch
"@browserbasehq/stagehand-python": patch
"@browserbasehq/stagehand-go": patch
"@browserbasehq/stagehand": patch
---

Remove native Groq and Cerebras provider support.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ import { z } from "zod/v4";
const browser = await localBrowser.launch({ userDataDir: "./browser-data" });
const stagehand = await Stagehand.create({
browser,
model: { modelName: "openai/gpt-5.4-mini", apiKey: process.env.OPENAI_API_KEY },
model: { modelName: "openai/gpt-6-luna", apiKey: process.env.OPENAI_API_KEY },
});

const [page] = await browser.context.pages();
Expand Down Expand Up @@ -115,7 +115,7 @@ async def main() -> None:
try:
stagehand = await Stagehand.create(
browser=browser,
model="openai/gpt-5.4-mini",
model="openai/gpt-6-luna",
model_api_key=os.environ["OPENAI_API_KEY"],
)
try:
Expand Down Expand Up @@ -195,7 +195,7 @@ func run(ctx context.Context) (err error) {
client, err := stagehand.Create(ctx, stagehand.CreateOptions{
Browser: browser,
Model: &stagehand.ModelConfig{
ModelName: "openai/gpt-5.4-mini",
ModelName: "openai/gpt-6-luna",
APIKey: &modelAPIKey,
},
})
Expand Down
5 changes: 1 addition & 4 deletions packages/docs/v2/configuration/models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Set up your API keys before configuring Stagehand:
OPENAI_API_KEY=your_openai_key_here
ANTHROPIC_API_KEY=your_anthropic_key_here
GOOGLE_API_KEY=your_google_key_here
GROQ_API_KEY=your_groq_key_here
```
</CodeGroup>

Expand All @@ -54,10 +53,8 @@ Stagehand supports major LLM providers with structured output capabilities:
### Additional Providers

<Expandable title="More Providers">
- **Groq** - `llama-3.3-70b-versatile` (Good for speed critical applications)
- **xAI** - `grok-beta` (Good for complex reasoning)
- **Azure** - Enterprise OpenAI deployment
- **Cerebras** - High-speed inference
- **TogetherAI** - Open-source models
- **Mistral** - `mixtral-8x7b-32768` (European option)
- **DeepSeek** - Cost-effective alternative
Expand Down Expand Up @@ -302,4 +299,4 @@ For each provider, use their latest models that meet these requirements. Some ex
<Card title="Cache Results" href="/v2/best-practices/caching" icon="database">
Store successful patterns using our Caching Guide
</Card>
</CardGroup>
</CardGroup>
53 changes: 0 additions & 53 deletions packages/docs/v3/configuration/models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -340,24 +340,6 @@ For Microsoft Entra ID authentication, pass the bearer token explicitly in `auth
[View all supported Azure models →](https://ai.azure.com/catalog)
</Tab>

<Tab title="Cerebras">
<CodeGroup>
```typescript TypeScript
import { Stagehand } from "@browserbasehq/stagehand";

const stagehand = new Stagehand({
env: "BROWSERBASE",
model: "cerebras/llama-4-scout"
// API key auto-loads from CEREBRAS_API_KEY - set in your .env
});

await stagehand.init();
```

</CodeGroup>
[View all supported Cerebras models →](https://inference-docs.cerebras.ai/models/overview)
</Tab>

<Tab title="DeepSeek">

<CodeGroup>
Expand All @@ -377,26 +359,6 @@ await stagehand.init();
[View all supported DeepSeek models →](https://api-docs.deepseek.com/quick_start/pricing)
</Tab>

<Tab title="Groq">


<CodeGroup>
```typescript TypeScript
import { Stagehand } from "@browserbasehq/stagehand";

const stagehand = new Stagehand({
env: "BROWSERBASE",
model: "groq/llama-3.1-8b-instant"
// API key auto-loads from GROQ_API_KEY - set in your .env
});

await stagehand.init();
```

</CodeGroup>
[View all supported Groq models →](https://console.groq.com/docs/models)
</Tab>

<Tab title="Mistral">

<CodeGroup>
Expand Down Expand Up @@ -1003,19 +965,6 @@ The following models work without the `provider/` prefix in the model parameter
- `gpt-4o-2024-08-06`
- `o1-preview`

</Accordion>
<Accordion title="Cerebras">

- `cerebras-llama-3.3-70b`
- `cerebras-llama-3.1-8b`

</Accordion>
<Accordion title="Groq">

- `groq-llama-3.3-70b-versatile`
- `groq-llama-3.3-70b-specdec`
- `moonshotai/kimi-k2-instruct`

</Accordion>
</AccordionGroup>

Expand All @@ -1042,9 +991,7 @@ The following models work without the `provider/` prefix in the model parameter
| Anthropic | `ANTHROPIC_API_KEY` |
| OpenAI | `OPENAI_API_KEY` |
| Azure | `AZURE_API_KEY` |
| Cerebras | `CEREBRAS_API_KEY` |
| DeepSeek | `DEEPSEEK_API_KEY` |
| Groq | `GROQ_API_KEY` |
| Mistral | `MISTRAL_API_KEY` |
| Ollama | None (local) |
| Perplexity | `PERPLEXITY_API_KEY` |
Expand Down
134 changes: 1 addition & 133 deletions packages/docs/v4/configuration/models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -538,136 +538,6 @@ OpenAI models are called through the Responses API.
[View all supported OpenAI models →](https://platform.openai.com/docs/models)
</Tab>

<Tab title="Groq">

<Tabs>
<Tab title="TypeScript">
```typescript
import { browserbase, Stagehand } from "@browserbasehq/stagehand";

const stagehand = await Stagehand.create({
browser: await browserbase.launch({ apiKey: process.env.BROWSERBASE_API_KEY }),
model: {
modelName: "groq/llama-3.3-70b-versatile",
},
});
```
</Tab>

<Tab title="Python">
```python
import os

from stagehand import Stagehand, browserbase

browser = await browserbase.launch(api_key=os.environ["BROWSERBASE_API_KEY"])

stagehand = await Stagehand.create(
browser=browser,
model="groq/llama-3.3-70b-versatile",
model_api_key=os.environ["GROQ_API_KEY"],
)
```
</Tab>

<Tab title="Go">
```go
apiKey := os.Getenv("BROWSERBASE_API_KEY")
modelAPIKey := os.Getenv("GROQ_API_KEY")
model := stagehand.ModelConfig{
ModelName: "groq/llama-3.3-70b-versatile",
APIKey: &modelAPIKey,
}

browser, err := stagehand.LaunchBrowserbase(ctx, stagehand.BrowserbaseLaunchOptions{
APIKey: apiKey,
})
if err != nil {
return err
}

client, err := stagehand.Create(ctx, stagehand.CreateOptions{
Browser: browser,
Model: &model,
})
if err != nil {
return err
}
defer func() { err = errors.Join(err, client.Close(ctx)) }()
```
</Tab>
</Tabs>

Commonly used: `groq/llama-3.3-70b-versatile`, `groq/openai/gpt-oss-120b`, `groq/moonshotai/kimi-k2-instruct-0905`, `groq/qwen/qwen3-32b`.

[View all supported Groq models →](https://console.groq.com/docs/models)
</Tab>

<Tab title="Cerebras">

<Tabs>
<Tab title="TypeScript">
```typescript
import { browserbase, Stagehand } from "@browserbasehq/stagehand";

const stagehand = await Stagehand.create({
browser: await browserbase.launch({ apiKey: process.env.BROWSERBASE_API_KEY }),
model: {
modelName: "cerebras/gpt-oss-120b",
},
});
```
</Tab>

<Tab title="Python">
```python
import os

from stagehand import Stagehand, browserbase

browser = await browserbase.launch(api_key=os.environ["BROWSERBASE_API_KEY"])

stagehand = await Stagehand.create(
browser=browser,
model="cerebras/gpt-oss-120b",
model_api_key=os.environ["CEREBRAS_API_KEY"],
)
```
</Tab>

<Tab title="Go">
```go
apiKey := os.Getenv("BROWSERBASE_API_KEY")
modelAPIKey := os.Getenv("CEREBRAS_API_KEY")
model := stagehand.ModelConfig{
ModelName: "cerebras/gpt-oss-120b",
APIKey: &modelAPIKey,
}

browser, err := stagehand.LaunchBrowserbase(ctx, stagehand.BrowserbaseLaunchOptions{
APIKey: apiKey,
})
if err != nil {
return err
}

client, err := stagehand.Create(ctx, stagehand.CreateOptions{
Browser: browser,
Model: &model,
})
if err != nil {
return err
}
defer func() { err = errors.Join(err, client.Close(ctx)) }()
```
</Tab>
</Tabs>

Commonly used: `cerebras/gpt-oss-120b`, `cerebras/qwen-3-235b-a22b-instruct-2507`, `cerebras/zai-glm-4.7`, `cerebras/llama3.1-8b`.

[View all supported Cerebras models →](https://inference-docs.cerebras.ai/models/overview)
</Tab>

</Tabs>

---
Expand Down Expand Up @@ -1744,8 +1614,6 @@ You pinned a `model` but gave it no `apiKey`, and the browser is not a Browserba
| Google | `GOOGLE_GENERATIVE_AI_API_KEY` or `GEMINI_API_KEY` |
| Anthropic | `ANTHROPIC_API_KEY` |
| OpenAI | `OPENAI_API_KEY` |
| Groq | `GROQ_API_KEY` |
| Cerebras | `CEREBRAS_API_KEY` |
| Bring your own LLM | None; your callback owns its credentials |

</Accordion>
Expand All @@ -1756,7 +1624,7 @@ You pinned a `model` but gave it no `apiKey`, and the browser is not a Browserba
**Solutions:**

- Use the `provider/model` format: `openai/gpt-5.6-sol`. The prefix is required; bare model names are rejected
- Use one of the five supported providers: `openai`, `anthropic`, `google`, `groq`, `cerebras`
- Use one of the three supported providers: `openai`, `anthropic`, `google`
- Check the model ID against the lists on this page. Stagehand validates the whole name, so a typo fails at `Stagehand.create()` rather than on the first inference
- Upgrade the SDK if the model shipped after your installed version
- For a provider outside that list, use the [bring-your-own-LLM callback](#custom-models)
Expand Down
2 changes: 0 additions & 2 deletions packages/evals/initStagehand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ const PROVIDER_API_KEY_ENV: Record<string, string[]> = {
openai: ["OPENAI_API_KEY"],
anthropic: ["ANTHROPIC_API_KEY"],
google: ["GOOGLE_GENERATIVE_AI_API_KEY", "GEMINI_API_KEY"],
groq: ["GROQ_API_KEY"],
cerebras: ["CEREBRAS_API_KEY"],
};

type StagehandLogEvent = Parameters<NonNullable<StagehandClientLoggingConfig["onLog"]>>[0];
Expand Down
10 changes: 0 additions & 10 deletions packages/evals/taskConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,6 @@ const ALL_EVAL_MODELS = [
// TOGETHER - DEEPSEEK
"deepseek-ai/DeepSeek-V3",
"Qwen/Qwen2.5-7B-Instruct-Turbo",
// GROQ
"groq/meta-llama/llama-4-scout-17b-16e-instruct",
"groq/llama-3.3-70b-versatile",
"groq/llama3-70b-8192",
"groq/qwen-qwq-32b",
"groq/qwen-2.5-32b",
"groq/deepseek-r1-distill-qwen-32b",
"groq/deepseek-r1-distill-llama-70b",
// CEREBRAS
"cerebras/llama3.3-70b",
];

// ---------------------------------------------------------------------------
Expand Down
16 changes: 8 additions & 8 deletions packages/examples/showcase/_harness/pricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ export type ModelPrice = {
// USD per million tokens. Snapshotted into every results.json so published
// costs stay tied to the prices in effect when the run happened.
export const PRICES: Record<string, ModelPrice> = {
"anthropic/claude-sonnet-5": {
"anthropic/claude-sonnet-5-5": {
inputPerMTok: 2,
cachedInputPerMTok: 0.2,
cacheWritePerMTok: 2.5,
outputPerMTok: 10,
source: "https://platform.claude.com/docs/en/about-claude/pricing",
checkedOn: "2026-09-25",
},
"openai/gpt-5.4-mini": {
inputPerMTok: 0.75,
cachedInputPerMTok: 0.075,
cacheWritePerMTok: 0.75,
outputPerMTok: 4.5,
source: "https://openrouter.ai/openai/gpt-5.4-mini",
checkedOn: "2026-09-25",
"openai/gpt-6-luna": {
inputPerMTok: 0.1,
cachedInputPerMTok: 0.01,
cacheWritePerMTok: 0.1,
outputPerMTok: 0.5,
source: "https://developers.openai.com/api/docs/models/gpt-6-luna",
checkedOn: "2026-10-03",
},
};

Expand Down
6 changes: 3 additions & 3 deletions packages/examples/showcase/_harness/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export function sessionSettings(task: { proxies?: boolean }) {
}

// Both sides always run the same model. Override with SHOWCASE_MODEL.
export const MODEL = (process.env.SHOWCASE_MODEL ?? "anthropic/claude-sonnet-5") as
| "anthropic/claude-sonnet-5"
| "openai/gpt-5.4-mini";
export const MODEL = (process.env.SHOWCASE_MODEL ?? "anthropic/claude-sonnet-5-5") as
| "anthropic/claude-sonnet-5-5"
| "openai/gpt-6-luna";

export const PROVIDER = MODEL.split("/")[0] as "anthropic" | "openai";
export const MODEL_ID = MODEL.slice(PROVIDER.length + 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const browser = await browserbase.launch({ apiKey: BROWSERBASE_API_KEY });
const stagehand = await Stagehand.create({
browser,
model: {
modelName: "anthropic/claude-sonnet-5",
modelName: "anthropic/claude-sonnet-5-5",
apiKey: ANTHROPIC_API_KEY,
// Stagehand calls the model from inside the browser extension.
headers: { "anthropic-dangerous-direct-browser-access": "true" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const browser = await browserbase.launch({ apiKey: BROWSERBASE_API_KEY, proxies:
const stagehand = await Stagehand.create({
browser,
model: {
modelName: "anthropic/claude-sonnet-5",
modelName: "anthropic/claude-sonnet-5-5",
apiKey: ANTHROPIC_API_KEY,
// Stagehand calls the model from inside the browser extension.
headers: { "anthropic-dangerous-direct-browser-access": "true" },
Expand Down
Loading
Loading