From 29cef2d858088d524abf510c030db139e3566204 Mon Sep 17 00:00:00 2001 From: Vishal Anton Date: Tue, 15 Sep 2026 23:07:04 +0530 Subject: [PATCH] docs: refresh model names and recommendations --- packages/docs/v4/basics/act.mdx | 6 +- packages/docs/v4/basics/extract.mdx | 6 +- packages/docs/v4/basics/observe.mdx | 6 +- packages/docs/v4/best-practices/caching.mdx | 10 +- .../v4/best-practices/cost-optimization.mdx | 18 ++-- .../docs/v4/best-practices/deployments.mdx | 6 +- packages/docs/v4/configuration/models.mdx | 102 +++++++++--------- packages/docs/v4/first-steps/ai-rules.mdx | 8 +- 8 files changed, 81 insertions(+), 81 deletions(-) diff --git a/packages/docs/v4/basics/act.mdx b/packages/docs/v4/basics/act.mdx index d5cc1cd515..b6d40ad0b8 100644 --- a/packages/docs/v4/basics/act.mdx +++ b/packages/docs/v4/basics/act.mdx @@ -287,7 +287,7 @@ You can pass additional options to configure the model, timeout, variables, targ // Custom model configuration await stagehand.act("choose 'Peach' from the favorite color dropdown", { model: { - modelName: "google/gemini-2.5-flash", + modelName: "google/gemini-3.8-flash", apiKey: process.env.GOOGLE_API_KEY, }, timeout: 10000, @@ -307,7 +307,7 @@ from stagehand import ModelConfig await stagehand.act( "choose 'Peach' from the favorite color dropdown", model=ModelConfig( - model_name="google/gemini-2.5-flash", + model_name="google/gemini-3.8-flash", api_key=os.environ["GOOGLE_API_KEY"], ), timeout=10000, @@ -322,7 +322,7 @@ await stagehand.act( // Custom model configuration modelAPIKey := os.Getenv("GOOGLE_API_KEY") model := stagehand.ModelConfig{ - ModelName: "google/gemini-2.5-flash", + ModelName: "google/gemini-3.8-flash", APIKey: &modelAPIKey, } timeout := 10000.0 diff --git a/packages/docs/v4/basics/extract.mdx b/packages/docs/v4/basics/extract.mdx index 0386d0d881..cdaa4b3acd 100644 --- a/packages/docs/v4/basics/extract.mdx +++ b/packages/docs/v4/basics/extract.mdx @@ -380,7 +380,7 @@ const result = await stagehand.extract( z.object({ name: z.string() }), { model: { - modelName: "anthropic/claude-sonnet-4-6", + modelName: "anthropic/claude-sonnet-5", apiKey: process.env.ANTHROPIC_API_KEY, }, timeout: 30000, @@ -402,7 +402,7 @@ result = await stagehand.extract( "extract the repository name", Repository, model=ModelConfig( - model_name="anthropic/claude-sonnet-4-6", + model_name="anthropic/claude-sonnet-5", api_key=os.environ["ANTHROPIC_API_KEY"], ), timeout=30000, @@ -416,7 +416,7 @@ result = await stagehand.extract( modelAPIKey := os.Getenv("ANTHROPIC_API_KEY") model := stagehand.ModelConfig{ - ModelName: "anthropic/claude-sonnet-4-6", + ModelName: "anthropic/claude-sonnet-5", APIKey: &modelAPIKey, } timeout := 30000.0 diff --git a/packages/docs/v4/basics/observe.mdx b/packages/docs/v4/basics/observe.mdx index 9fa820b12e..5e24606fcd 100644 --- a/packages/docs/v4/basics/observe.mdx +++ b/packages/docs/v4/basics/observe.mdx @@ -264,7 +264,7 @@ const page = await stagehand.browser.context.activePage(); // Custom model configuration const { data: actions } = await stagehand.observe("find navigation links", { model: { - modelName: "openai/gpt-5.4-mini", + modelName: "openai/gpt-5.6-luna", apiKey: process.env.OPENAI_API_KEY, }, timeout: 30000, @@ -285,7 +285,7 @@ page = await stagehand.browser.context.active_page() result = await stagehand.observe( "find navigation links", model=ModelConfig( - model_name="openai/gpt-5.4-mini", + model_name="openai/gpt-5.6-luna", api_key=os.environ["OPENAI_API_KEY"], ), timeout=30000, @@ -299,7 +299,7 @@ result = await stagehand.observe( // Custom model configuration modelAPIKey := os.Getenv("OPENAI_API_KEY") model := stagehand.ModelConfig{ - ModelName: "openai/gpt-5.4-mini", + ModelName: "openai/gpt-5.6-luna", APIKey: &modelAPIKey, } timeout := 30000.0 diff --git a/packages/docs/v4/best-practices/caching.mdx b/packages/docs/v4/best-practices/caching.mdx index dc6a985cfc..459e64bf6b 100644 --- a/packages/docs/v4/best-practices/caching.mdx +++ b/packages/docs/v4/best-practices/caching.mdx @@ -599,8 +599,8 @@ const browser = await browserbase.launch({ apiKey: process.env.BROWSERBASE_API_K const stagehand = await Stagehand.create({ browser, - model: { modelName: "openai/gpt-5" }, // Routed through Model Gateway - cache: true, // Served by Browserbase Cache + model: { modelName: "openai/gpt-5.6-sol" }, // Routed through Model Gateway + cache: true, // Served by Browserbase Cache }); ``` @@ -611,8 +611,8 @@ browser = await browserbase.launch(api_key=os.environ["BROWSERBASE_API_KEY"]) stagehand = await Stagehand.create( browser=browser, - model="openai/gpt-5", # Routed through Model Gateway - cache=True, # Served by Browserbase Cache + model="openai/gpt-5.6-sol", # Routed through Model Gateway + cache=True, # Served by Browserbase Cache ) ``` @@ -621,7 +621,7 @@ stagehand = await Stagehand.create( ```go apiKey := os.Getenv("BROWSERBASE_API_KEY") // Routed through Model Gateway: no model API key -model := stagehand.ModelConfig{ModelName: "openai/gpt-5"} +model := stagehand.ModelConfig{ModelName: "openai/gpt-5.6-sol"} cache := stagehand.CacheEnabled(true) // Served by Browserbase Cache browser, err := stagehand.LaunchBrowserbase(ctx, stagehand.BrowserbaseLaunchOptions{ diff --git a/packages/docs/v4/best-practices/cost-optimization.mdx b/packages/docs/v4/best-practices/cost-optimization.mdx index 7ded4c4530..66c37674ab 100644 --- a/packages/docs/v4/best-practices/cost-optimization.mdx +++ b/packages/docs/v4/best-practices/cost-optimization.mdx @@ -22,7 +22,7 @@ Reach for a stronger model only on the calls that need it, with a per-call model const stagehand = await Stagehand.create({ browser: await browserbase.launch({ apiKey: process.env.BROWSERBASE_API_KEY }), model: { - modelName: "google/gemini-2.5-flash", + modelName: "google/gemini-3.8-flash", }, }); @@ -31,7 +31,7 @@ const termsSchema = z.object({ summary: z.string() }); // One hard extraction gets the expensive model, everything else stays cheap await stagehand.extract("summarize the contract terms", termsSchema, { model: { - modelName: "anthropic/claude-sonnet-4-6", + modelName: "anthropic/claude-sonnet-5", apiKey: process.env.ANTHROPIC_API_KEY, }, }); @@ -48,7 +48,7 @@ browser = await browserbase.launch(api_key=os.environ["BROWSERBASE_API_KEY"]) stagehand = await Stagehand.create( browser=browser, - model="google/gemini-2.5-flash", + model="google/gemini-3.8-flash", model_api_key=os.environ["GOOGLE_GENERATIVE_AI_API_KEY"], ) @@ -60,7 +60,7 @@ await stagehand.extract( instruction="summarize the contract terms", schema=Terms, model=ModelConfig( - model_name="anthropic/claude-sonnet-4-6", + model_name="anthropic/claude-sonnet-5", api_key=os.environ["ANTHROPIC_API_KEY"], ), ) @@ -76,7 +76,7 @@ type terms struct { apiKey := os.Getenv("BROWSERBASE_API_KEY") googleKey := os.Getenv("GOOGLE_GENERATIVE_AI_API_KEY") cheapModel := stagehand.ModelConfig{ - ModelName: "google/gemini-2.5-flash", + ModelName: "google/gemini-3.8-flash", APIKey: &googleKey, } @@ -98,7 +98,7 @@ if err != nil { // One hard extraction gets the expensive model, everything else stays cheap anthropicKey := os.Getenv("ANTHROPIC_API_KEY") strongModel := stagehand.ModelConfig{ - ModelName: "anthropic/claude-sonnet-4-6", + ModelName: "anthropic/claude-sonnet-5", APIKey: &anthropicKey, } @@ -270,7 +270,7 @@ Automatically fall back to cheaper models for simple tasks. Escalate on `observe // See stagehand.dev/evals for performance comparisons async function smartAct(stagehand: Stagehand, prompt: string) { const models = [ - { modelName: "google/gemini-2.5-flash", apiKey: process.env.GOOGLE_GENERATIVE_AI_API_KEY }, + { modelName: "google/gemini-3.8-flash", apiKey: process.env.GOOGLE_GENERATIVE_AI_API_KEY }, { modelName: "openai/gpt-5.4", apiKey: process.env.OPENAI_API_KEY }, ] as const; @@ -299,7 +299,7 @@ async function smartAct(stagehand: Stagehand, prompt: string) { async def smart_act(stagehand: Stagehand, prompt: str): models = [ { - "model_name": "google/gemini-2.5-flash", + "model_name": "google/gemini-3.8-flash", "api_key": os.environ["GOOGLE_GENERATIVE_AI_API_KEY"], }, {"model_name": "openai/gpt-5.4", "api_key": os.environ["OPENAI_API_KEY"]}, @@ -334,7 +334,7 @@ func smartAct(ctx context.Context, client *stagehand.Stagehand, prompt string) ( models := []stagehand.ModelConfig{ stagehand.ModelConfig{ - ModelName: "google/gemini-2.5-flash", + ModelName: "google/gemini-3.8-flash", APIKey: &googleKey, }, stagehand.ModelConfig{ diff --git a/packages/docs/v4/best-practices/deployments.mdx b/packages/docs/v4/best-practices/deployments.mdx index 19b82ef8f9..af96581a7b 100644 --- a/packages/docs/v4/best-practices/deployments.mdx +++ b/packages/docs/v4/best-practices/deployments.mdx @@ -115,7 +115,7 @@ async function run(): Promise { const stagehand = await Stagehand.create({ browser, model: { - modelName: "google/gemini-2.5-flash", + modelName: "google/gemini-3.8-flash", }, logging: { level: "warn", format: "json" }, }); @@ -175,7 +175,7 @@ async def run() -> str: stagehand = await Stagehand.create( browser=browser, - model="google/gemini-2.5-flash", + model="google/gemini-3.8-flash", model_api_key=os.environ["GOOGLE_API_KEY"], logging=StagehandClientLoggingConfig(level="warn", format="json"), ) @@ -271,7 +271,7 @@ func run(ctx context.Context) (result string, err error) { blockAds := true model := stagehand.ModelConfig{ - ModelName: "google/gemini-2.5-flash", + ModelName: "google/gemini-3.8-flash", APIKey: &modelAPIKey, } diff --git a/packages/docs/v4/configuration/models.mdx b/packages/docs/v4/configuration/models.mdx index 4a6cb4bb82..6d875666c7 100644 --- a/packages/docs/v4/configuration/models.mdx +++ b/packages/docs/v4/configuration/models.mdx @@ -95,7 +95,7 @@ With Model Gateway, switching between providers is a config change: no new accou ```typescript const stagehand = await Stagehand.create({ browser: await browserbase.launch({ apiKey: process.env.BROWSERBASE_API_KEY }), - model: { modelName: "openai/gpt-5" }, + model: { modelName: "openai/gpt-5.6-sol" }, }); ``` @@ -106,7 +106,7 @@ browser = await browserbase.launch(api_key=os.environ["BROWSERBASE_API_KEY"]) stagehand = await Stagehand.create( browser=browser, - model="openai/gpt-5", + model="openai/gpt-5.6-sol", ) ``` @@ -115,7 +115,7 @@ stagehand = await Stagehand.create( ```go apiKey := os.Getenv("BROWSERBASE_API_KEY") // No model API key: requests route through Model Gateway -model := stagehand.ModelConfig{ModelName: "openai/gpt-5"} +model := stagehand.ModelConfig{ModelName: "openai/gpt-5.6-sol"} browser, err := stagehand.LaunchBrowserbase(ctx, stagehand.BrowserbaseLaunchOptions{ APIKey: apiKey, @@ -144,7 +144,7 @@ defer func() { err = errors.Join(err, client.Close(ctx)) }() ```typescript const stagehand = await Stagehand.create({ browser: await browserbase.launch({ apiKey: process.env.BROWSERBASE_API_KEY }), - model: { modelName: "anthropic/claude-sonnet-4-6" }, + model: { modelName: "anthropic/claude-sonnet-5" }, }); ``` @@ -155,7 +155,7 @@ browser = await browserbase.launch(api_key=os.environ["BROWSERBASE_API_KEY"]) stagehand = await Stagehand.create( browser=browser, - model="anthropic/claude-sonnet-4-6", + model="anthropic/claude-sonnet-5", ) ``` @@ -164,7 +164,7 @@ stagehand = await Stagehand.create( ```go apiKey := os.Getenv("BROWSERBASE_API_KEY") // No model API key: requests route through Model Gateway -model := stagehand.ModelConfig{ModelName: "anthropic/claude-sonnet-4-6"} +model := stagehand.ModelConfig{ModelName: "anthropic/claude-sonnet-5"} browser, err := stagehand.LaunchBrowserbase(ctx, stagehand.BrowserbaseLaunchOptions{ APIKey: apiKey, @@ -193,7 +193,7 @@ defer func() { err = errors.Join(err, client.Close(ctx)) }() ```typescript const stagehand = await Stagehand.create({ browser: await browserbase.launch({ apiKey: process.env.BROWSERBASE_API_KEY }), - model: { modelName: "google/gemini-3-flash-preview" }, + model: { modelName: "google/gemini-3.8-flash" }, }); ``` @@ -204,7 +204,7 @@ browser = await browserbase.launch(api_key=os.environ["BROWSERBASE_API_KEY"]) stagehand = await Stagehand.create( browser=browser, - model="google/gemini-3-flash-preview", + model="google/gemini-3.8-flash", ) ``` @@ -213,7 +213,7 @@ stagehand = await Stagehand.create( ```go apiKey := os.Getenv("BROWSERBASE_API_KEY") // No model API key: requests route through Model Gateway -model := stagehand.ModelConfig{ModelName: "google/gemini-3-flash-preview"} +model := stagehand.ModelConfig{ModelName: "google/gemini-3.8-flash"} browser, err := stagehand.LaunchBrowserbase(ctx, stagehand.BrowserbaseLaunchOptions{ APIKey: apiKey, @@ -249,9 +249,9 @@ defer func() { err = errors.Join(err, client.Close(ctx)) }() | Provider | Example Model | | ---------- | ------------------------------ | -| OpenAI | `openai/gpt-5` | -| Anthropic | `anthropic/claude-sonnet-4-6` | -| Google | `google/gemini-2.5-flash` | +| OpenAI | `openai/gpt-5.6-sol` | +| Anthropic | `anthropic/claude-sonnet-5` | +| Google | `google/gemini-3.8-flash` | Need a provider that isn't listed? [Reach out](https://www.browserbase.com/contact): Browserbase is happy to work with teams on additional model support. @@ -267,7 +267,7 @@ defer func() { err = errors.Join(err, client.Close(ctx)) }() Read your provider key from the environment and pass it on the model configuration. Stagehand does not read environment variables for you. -Get started with Google Gemini (recommended for speed and cost): +Get started with Google Gemini: @@ -277,7 +277,7 @@ import { browserbase, Stagehand } from "@browserbasehq/stagehand"; const stagehand = await Stagehand.create({ browser: await browserbase.launch({ apiKey: process.env.BROWSERBASE_API_KEY }), model: { - modelName: "google/gemini-2.5-flash", + modelName: "google/gemini-3.8-flash", }, }); ``` @@ -293,7 +293,7 @@ browser = await browserbase.launch(api_key=os.environ["BROWSERBASE_API_KEY"]) stagehand = await Stagehand.create( browser=browser, - model="google/gemini-2.5-flash", + model="google/gemini-3.8-flash", model_api_key=os.environ["GOOGLE_GENERATIVE_AI_API_KEY"], ) ``` @@ -304,7 +304,7 @@ stagehand = await Stagehand.create( apiKey := os.Getenv("BROWSERBASE_API_KEY") modelAPIKey := os.Getenv("GOOGLE_GENERATIVE_AI_API_KEY") model := stagehand.ModelConfig{ - ModelName: "google/gemini-2.5-flash", + ModelName: "google/gemini-3.8-flash", APIKey: &modelAPIKey, } @@ -349,7 +349,7 @@ import { browserbase, Stagehand } from "@browserbasehq/stagehand"; const stagehand = await Stagehand.create({ browser: await browserbase.launch({ apiKey: process.env.BROWSERBASE_API_KEY }), model: { - modelName: "google/gemini-2.5-flash", + modelName: "google/gemini-3.8-flash", }, }); ``` @@ -365,7 +365,7 @@ browser = await browserbase.launch(api_key=os.environ["BROWSERBASE_API_KEY"]) stagehand = await Stagehand.create( browser=browser, - model="google/gemini-2.5-flash", + model="google/gemini-3.8-flash", model_api_key=os.environ["GOOGLE_GENERATIVE_AI_API_KEY"], ) ``` @@ -376,7 +376,7 @@ stagehand = await Stagehand.create( apiKey := os.Getenv("BROWSERBASE_API_KEY") modelAPIKey := os.Getenv("GOOGLE_GENERATIVE_AI_API_KEY") model := stagehand.ModelConfig{ - ModelName: "google/gemini-2.5-flash", + ModelName: "google/gemini-3.8-flash", APIKey: &modelAPIKey, } @@ -399,7 +399,7 @@ defer func() { err = errors.Join(err, client.Close(ctx)) }() -Commonly used: `google/gemini-3.1-pro-preview`, `google/gemini-3-flash-preview`, `google/gemini-3.5-flash`, `google/gemini-2.5-flash`, `google/gemini-flash-latest`. +Commonly used: `google/gemini-3.8-flash`, `google/gemini-3.7-flash`, `google/gemini-3.6-flash`, `google/gemini-3.5-flash`, `google/gemini-3.1-pro-preview`. [View all supported Google models →](https://ai.google.dev/gemini-api/docs/models) @@ -414,7 +414,7 @@ import { browserbase, Stagehand } from "@browserbasehq/stagehand"; const stagehand = await Stagehand.create({ browser: await browserbase.launch({ apiKey: process.env.BROWSERBASE_API_KEY }), model: { - modelName: "anthropic/claude-haiku-4-5", + modelName: "anthropic/claude-sonnet-5", }, }); ``` @@ -430,7 +430,7 @@ browser = await browserbase.launch(api_key=os.environ["BROWSERBASE_API_KEY"]) stagehand = await Stagehand.create( browser=browser, - model="anthropic/claude-haiku-4-5", + model="anthropic/claude-sonnet-5", model_api_key=os.environ["ANTHROPIC_API_KEY"], ) ``` @@ -441,7 +441,7 @@ stagehand = await Stagehand.create( apiKey := os.Getenv("BROWSERBASE_API_KEY") modelAPIKey := os.Getenv("ANTHROPIC_API_KEY") model := stagehand.ModelConfig{ - ModelName: "anthropic/claude-haiku-4-5", + ModelName: "anthropic/claude-sonnet-5", APIKey: &modelAPIKey, } @@ -464,7 +464,7 @@ defer func() { err = errors.Join(err, client.Close(ctx)) }() -Commonly used: `anthropic/claude-sonnet-5`, `anthropic/claude-fable-5`, `anthropic/claude-opus-4-8`, `anthropic/claude-sonnet-4-6`, `anthropic/claude-haiku-4-5`. +Commonly used: `anthropic/claude-fable-5-1`, `anthropic/claude-opus-5`, `anthropic/claude-sonnet-5`, `anthropic/claude-haiku-4-5`, `anthropic/claude-sonnet-4-6`. [View all supported Anthropic models →](https://docs.anthropic.com/en/docs/models-overview) @@ -479,7 +479,7 @@ import { browserbase, Stagehand } from "@browserbasehq/stagehand"; const stagehand = await Stagehand.create({ browser: await browserbase.launch({ apiKey: process.env.BROWSERBASE_API_KEY }), model: { - modelName: "openai/gpt-5", + modelName: "openai/gpt-5.6-sol", }, }); ``` @@ -495,7 +495,7 @@ browser = await browserbase.launch(api_key=os.environ["BROWSERBASE_API_KEY"]) stagehand = await Stagehand.create( browser=browser, - model="openai/gpt-5", + model="openai/gpt-5.6-sol", model_api_key=os.environ["OPENAI_API_KEY"], ) ``` @@ -506,7 +506,7 @@ stagehand = await Stagehand.create( apiKey := os.Getenv("BROWSERBASE_API_KEY") modelAPIKey := os.Getenv("OPENAI_API_KEY") model := stagehand.ModelConfig{ - ModelName: "openai/gpt-5", + ModelName: "openai/gpt-5.6-sol", APIKey: &modelAPIKey, } @@ -529,7 +529,7 @@ defer func() { err = errors.Join(err, client.Close(ctx)) }() -Commonly used: `openai/gpt-5.6`, `openai/gpt-5.5`, `openai/gpt-5.4`, `openai/gpt-5.4-mini`, `openai/gpt-5.4-nano`, `openai/o4-mini`. +Commonly used: `openai/gpt-6-astra`, `openai/gpt-5.6-sol`, `openai/gpt-5.6-terra`, `openai/gpt-5.6-luna`, `openai/gpt-5.5`, `openai/gpt-5.4`. OpenAI models are called through the Responses API. @@ -1025,7 +1025,7 @@ async function generateWithOpenAI(params: LLMGenerateParams) { } const response = await openai.responses.create({ - model: "gpt-5.4-mini", + model: "gpt-5.6-sol", instructions: params.systemPrompt, input: params.messages.map((message) => ({ role: message.role, @@ -1084,7 +1084,7 @@ def message_content(message): async def generate_with_openai(params): response_format = params.response_format response = await openai.responses.create( - model="gpt-5.4-mini", + model="gpt-5.6-sol", instructions=params.system_prompt, input=[ {"role": message.role.value, "content": message_content(message)} @@ -1122,7 +1122,7 @@ func generateWithOpenAI( } text, err := callOpenAI(ctx, callOpenAIInput{ - Model: "gpt-5.4-mini", + Model: "gpt-5.6-luna", Instructions: request.SystemPrompt, Messages: request.Messages, Temperature: request.Temperature, @@ -1353,21 +1353,21 @@ The result is validated against the response format Stagehand asked for. If you ## Choose a model -Different models excel at different tasks. Consider speed, accuracy, and cost for your use case. +Different models excel at different tasks. The picks below follow [Browserbase Benchmark v2](https://www.stagehand.dev/evals). - - Find detailed model comparisons and recommendations on the Stagehand model evaluation page. + + Live accuracy, cost, and speed comparisons across models and harnesses. **Quick recommendations** -| Use Case | Recommended Model | Why | -| ------------------------- | ------------------------------------ | ------------------------------ | -| **Production** | `google/gemini-2.5-flash` | Fast, accurate, cost-effective | -| **Intelligence** | `google/gemini-3.1-pro-preview` | Best accuracy on hard tasks | -| **Speed** | `google/gemini-2.5-flash` | Fastest response times | -| **Cost** | `google/gemini-2.5-flash` | Best value per token | -| **Local/offline** | Bring your own LLM callback | No API costs, full control | +| Use Case | Recommended Model | Why | +| ----------------- | --------------------------- | ------------------------------------ | +| **Production** | `openai/gpt-5.6-sol` | Strong accuracy without a high bill | +| **Intelligence** | `openai/gpt-6-astra` | Best accuracy on hard tasks | +| **Speed** | `openai/gpt-5.6-luna` | Fastest response times | +| **Cost** | `openai/gpt-5.6-luna` | Lowest cost per task | +| **Local/offline** | Bring your own LLM callback | No API costs, full control | --- @@ -1386,7 +1386,7 @@ const PricingSchema = z.object({ summary: z.string() }); const stagehand = await Stagehand.create({ browser: await browserbase.launch({ apiKey: process.env.BROWSERBASE_API_KEY }), model: { - modelName: "google/gemini-2.5-flash", + modelName: "google/gemini-3.8-flash", }, }); @@ -1396,7 +1396,7 @@ await stagehand.act("click the login button"); // Uses a stronger model for one hard extraction const { data } = await stagehand.extract("summarize the pricing table", PricingSchema, { model: { - modelName: "anthropic/claude-sonnet-4-6", + modelName: "anthropic/claude-sonnet-5", apiKey: process.env.ANTHROPIC_API_KEY, }, }); @@ -1420,7 +1420,7 @@ browser = await browserbase.launch(api_key=os.environ["BROWSERBASE_API_KEY"]) stagehand = await Stagehand.create( browser=browser, - model="google/gemini-2.5-flash", + model="google/gemini-3.8-flash", model_api_key=os.environ["GOOGLE_GENERATIVE_AI_API_KEY"], ) @@ -1432,7 +1432,7 @@ data = (await stagehand.extract( "summarize the pricing table", Pricing, model=ModelConfig( - model_name="anthropic/claude-sonnet-4-6", + model_name="anthropic/claude-sonnet-5", api_key=os.environ["ANTHROPIC_API_KEY"], ), )).data @@ -1451,7 +1451,7 @@ type pricing struct { apiKey := os.Getenv("BROWSERBASE_API_KEY") googleKey := os.Getenv("GOOGLE_GENERATIVE_AI_API_KEY") instanceModel := stagehand.ModelConfig{ - ModelName: "google/gemini-2.5-flash", + ModelName: "google/gemini-3.8-flash", APIKey: &googleKey, } @@ -1478,7 +1478,7 @@ if _, err := client.Act(ctx, stagehand.ActInstruction("click the login button"), // Uses a stronger model for one hard extraction anthropicKey := os.Getenv("ANTHROPIC_API_KEY") strongModel := stagehand.ModelConfig{ - ModelName: "anthropic/claude-sonnet-4-6", + ModelName: "anthropic/claude-sonnet-5", APIKey: &anthropicKey, } @@ -1515,7 +1515,7 @@ Some enterprise gateways require extra headers on every model request. Attach th const stagehand = await Stagehand.create({ browser: await browserbase.launch({ apiKey: process.env.BROWSERBASE_API_KEY }), model: { - modelName: "openai/gpt-5", + modelName: "openai/gpt-5.6-sol", headers: { "x-tenant-id": "acme" }, }, }); @@ -1532,7 +1532,7 @@ browser = await browserbase.launch(api_key=os.environ["BROWSERBASE_API_KEY"]) stagehand = await Stagehand.create( browser=browser, - model="openai/gpt-5", + model="openai/gpt-5.6-sol", model_api_key=os.environ["OPENAI_API_KEY"], model_headers={"x-tenant-id": "acme"}, ) @@ -1544,7 +1544,7 @@ stagehand = await Stagehand.create( apiKey := os.Getenv("BROWSERBASE_API_KEY") modelAPIKey := os.Getenv("OPENAI_API_KEY") model := stagehand.ModelConfig{ - ModelName: "openai/gpt-5", + ModelName: "openai/gpt-5.6-sol", APIKey: &modelAPIKey, Headers: stagehand.ModelConfigHeaders{"x-tenant-id": "acme"}, } @@ -1755,7 +1755,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`. The prefix is required; bare model names are rejected +- 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` - 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 diff --git a/packages/docs/v4/first-steps/ai-rules.mdx b/packages/docs/v4/first-steps/ai-rules.mdx index c250819318..01ccd67e9e 100644 --- a/packages/docs/v4/first-steps/ai-rules.mdx +++ b/packages/docs/v4/first-steps/ai-rules.mdx @@ -113,7 +113,7 @@ const browser = await localBrowser.launch({ headless: true }); const stagehand = await Stagehand.create({ browser, model: { - modelName: "openai/gpt-5.4-mini", + modelName: "openai/gpt-5.6-luna", apiKey: process.env.OPENAI_API_KEY, }, logging: { level: "info", format: "pretty" }, @@ -135,7 +135,7 @@ const browser = await browserbase.launch({ }); const stagehand = await Stagehand.create({ browser, - model: { modelName: "openai/gpt-5.4-mini", apiKey: process.env.OPENAI_API_KEY }, + model: { modelName: "openai/gpt-5.6-luna", apiKey: process.env.OPENAI_API_KEY }, }); ``` @@ -417,7 +417,7 @@ from stagehand import Stagehand, browserbase, local_browser browser = await local_browser.launch(headless=True) stagehand = await Stagehand.create( browser=browser, - model="openai/gpt-5.4-mini", + model="openai/gpt-5.6-luna", model_api_key=os.environ["OPENAI_API_KEY"], logging={"level": "info", "format": "pretty"}, ) @@ -722,7 +722,7 @@ Every method takes a `context.Context` as its first argument and returns an `err ```go apiKey := os.Getenv("OPENAI_API_KEY") model := stagehand.ModelConfig{ - ModelName: "openai/gpt-5.4-mini", + ModelName: "openai/gpt-5.6-sol", APIKey: &apiKey, }