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, } diff --git a/packages/extension/tests/ai-sdk-client.test.ts b/packages/extension/tests/ai-sdk-client.test.ts index b5590d80a4..7443edba65 100644 --- a/packages/extension/tests/ai-sdk-client.test.ts +++ b/packages/extension/tests/ai-sdk-client.test.ts @@ -19,20 +19,20 @@ describe("AI SDK language models", () => { it.each([ { name: "OpenAI", - modelName: "openai/gpt-5.4-mini" as const, - modelId: "gpt-5.4-mini", + modelName: "openai/gpt-5.6-luna" as const, + modelId: "gpt-5.6-luna", provider: "openai.responses", }, { name: "Anthropic", - modelName: "anthropic/claude-sonnet-4-6" as const, - modelId: "claude-sonnet-4-6", + modelName: "anthropic/claude-sonnet-5" as const, + modelId: "claude-sonnet-5", provider: "anthropic.messages", }, { name: "Google", - modelName: "google/gemini-3-flash-preview" as const, - modelId: "gemini-3-flash-preview", + modelName: "google/gemini-3.8-flash" as const, + modelId: "gemini-3.8-flash", provider: "google.generative-ai", }, { diff --git a/packages/extension/tests/gateway-client.test.ts b/packages/extension/tests/gateway-client.test.ts index 76aa1d1288..fca39e0fe5 100644 --- a/packages/extension/tests/gateway-client.test.ts +++ b/packages/extension/tests/gateway-client.test.ts @@ -25,7 +25,7 @@ afterEach(() => { }); const initParams = { - model: { modelName: "openai/gpt-5" }, + model: { modelName: "openai/gpt-5.6-luna" }, apiKey: "bb-api-key", browser: { sessionId: "session-123", region: "eu-central-1" }, } as StagehandInitParams; @@ -61,7 +61,7 @@ describe("buildGatewayContext", () => { describe("createGatewayLanguageModel", () => { it("creates a Responses API model against the gateway endpoint with the full model slug", () => { const model = createGatewayLanguageModel( - { modelName: "openai/gpt-5" }, + { modelName: "openai/gpt-5.6-luna" }, { apiUrl: "https://api.stagehand.browserbase.com/v1", apiKey: "bb-api-key", @@ -71,7 +71,7 @@ describe("createGatewayLanguageModel", () => { expect(model).toMatchObject({ provider: "openai.responses", - modelId: "openai/gpt-5", + modelId: "openai/gpt-5.6-luna", }); }); @@ -115,7 +115,7 @@ describe("llmService.generate gateway routing", () => { usage: { inputTokens: 1, outputTokens: 1, totalTokens: 2 }, } as never); - await llmService.generate({ modelName: "openai/gpt-5" }, input, vi.fn(), { + await llmService.generate({ modelName: "openai/gpt-5.6-sol" }, input, vi.fn(), { apiUrl: "https://api.stagehand.browserbase.com/v1", apiKey: "bb-api-key", sessionId: "session-123", @@ -125,7 +125,7 @@ describe("llmService.generate gateway routing", () => { expect.objectContaining({ model: expect.objectContaining({ provider: "openai.responses", - modelId: "openai/gpt-5", + modelId: "openai/gpt-5.6-sol", }), }), ); @@ -157,7 +157,7 @@ describe("llmService.generate gateway routing", () => { it("rejects key-less model configurations when no gateway context is available", async () => { await expect( - llmService.generate({ modelName: "openai/gpt-5" }, input, vi.fn()), + llmService.generate({ modelName: "openai/gpt-5.6-sol" }, input, vi.fn()), ).rejects.toThrow(/requires a provider API key or a Browserbase session/); expect(generateText).not.toHaveBeenCalled(); }); @@ -172,7 +172,7 @@ describe("llmService.generate gateway routing", () => { it("rejects stop sequences instead of silently ignoring them", async () => { await expect( llmService.generate( - { modelName: "openai/gpt-5" }, + { modelName: "openai/gpt-5.6-sol" }, { ...input, stopSequences: ["STOP"] }, vi.fn(), { diff --git a/packages/extension/tests/gateway-e2e.test.ts b/packages/extension/tests/gateway-e2e.test.ts index 057e857bae..49ac9f40ad 100644 --- a/packages/extension/tests/gateway-e2e.test.ts +++ b/packages/extension/tests/gateway-e2e.test.ts @@ -28,7 +28,7 @@ const completion = (content: string) => ({ id: "resp_e2e", object: "response", created_at: 1700000000, - model: "openai/gpt-5", + model: "openai/gpt-5.6-luna", status: "completed", output: [ { @@ -97,7 +97,7 @@ describe("gateway inference end to end", () => { it("sends an OpenAI-format request to the gateway endpoint and maps the response back", async () => { const result = await llmService.generate( { - modelName: "openai/gpt-5", + modelName: "openai/gpt-5.6-luna", headers: { "x-custom-header": "custom-value", "x-bb-api-key": "must-not-override-auth", @@ -118,7 +118,7 @@ describe("gateway inference end to end", () => { expect(request.headers["x-bb-api-key"]).toBe("bb-api-key"); expect(request.headers["x-bb-session-id"]).toBe("session-123"); expect(request.headers["x-custom-header"]).toBe("custom-value"); - expect(request.body.model).toBe("openai/gpt-5"); + expect(request.body.model).toBe("openai/gpt-5.6-luna"); expect(request.body.input).toEqual([ { role: "system", content: "Answer concisely." }, { @@ -140,7 +140,7 @@ describe("gateway inference end to end", () => { respondWith = () => completion(JSON.stringify({ greeting: "hi" })); const result = await llmService.generate( - { modelName: "openai/gpt-5" }, + { modelName: "openai/gpt-5.6-luna" }, { messages: [{ role: "user", content: { type: "text", text: "Greet me" } }], responseFormat: { @@ -170,7 +170,7 @@ describe("gateway inference end to end", () => { it("forwards tools and tool choice in Responses format", async () => { await llmService.generate( - { modelName: "openai/gpt-5" }, + { modelName: "openai/gpt-5.6-luna" }, { messages: [{ role: "user", content: { type: "text", text: "Check the weather" } }], tools: [ diff --git a/packages/extension/tests/runtime-state.test.ts b/packages/extension/tests/runtime-state.test.ts index 72bd2d8ee8..0addb4feaf 100644 --- a/packages/extension/tests/runtime-state.test.ts +++ b/packages/extension/tests/runtime-state.test.ts @@ -105,7 +105,7 @@ describe("Stagehand runtime state", () => { }); await runtime.initialize({ ...runtimeIdentity, - model: { modelName: "openai/gpt-5" }, + model: { modelName: "openai/gpt-5.6-luna" }, telemetry: { traces: { endpoint: "https://collector.example.com/v1/traces", @@ -119,7 +119,7 @@ describe("Stagehand runtime state", () => { status: "initialized", initParams: { ...runtimeIdentity, - model: { modelName: "openai/gpt-5" }, + model: { modelName: "openai/gpt-5.6-luna" }, telemetry: { traces: { endpoint: "https://collector.example.com/v1/traces", @@ -143,7 +143,7 @@ describe("Stagehand runtime state", () => { }); await runtime.initialize({ ...runtimeIdentity, - model: { modelName: "openai/gpt-5" }, + model: { modelName: "openai/gpt-5.6-luna" }, telemetry: { traces: { endpoint: "https://collector.example.com/v1/traces", headers: {} }, }, @@ -168,7 +168,7 @@ describe("Stagehand runtime state", () => { status: "initialized", initParams: { ...runtimeIdentity, - model: { modelName: "openai/gpt-5" }, + model: { modelName: "openai/gpt-5.6-luna" }, telemetry: { traces: { endpoint: "https://collector.example.com/v1/traces", headers: {} }, }, @@ -321,7 +321,7 @@ describe("Stagehand runtime state", () => { }); await runtime.initialize({ ...runtimeIdentity, - model: { modelName: "openai/gpt-5", apiKey: "secret" }, + model: { modelName: "openai/gpt-5.6-luna", apiKey: "secret" }, telemetry: { traces: { endpoint: "https://collector.example.com/v1/traces", headers: {} }, }, diff --git a/packages/integrations/core/src/facade/config.ts b/packages/integrations/core/src/facade/config.ts index 14c5ab9a57..d8ad6e885b 100644 --- a/packages/integrations/core/src/facade/config.ts +++ b/packages/integrations/core/src/facade/config.ts @@ -45,7 +45,7 @@ export function stagehandFacadeConfigFromEnv( const inferredGoogleKey = providerApiKey("google", env); const modelName = - explicitModelName ?? (inferredGoogleKey ? "google/gemini-3.6-flash" : undefined); + explicitModelName ?? (inferredGoogleKey ? "google/gemini-3.8-flash" : undefined); const modelProvider = modelName ? providerName(modelName) : undefined; const modelApiKey = explicitModelApiKey ?? providerApiKey(modelProvider, env); const parsed = StagehandClientCreateConfigSchema.safeParse({ diff --git a/packages/integrations/eve/README.md b/packages/integrations/eve/README.md index 50a35634e8..f5e82360f8 100644 --- a/packages/integrations/eve/README.md +++ b/packages/integrations/eve/README.md @@ -23,7 +23,7 @@ Configure the environment as needed: | `STAGEHAND_EVE_SESSION_FILE` | Optional path used to persist the Browserbase session ID; defaults to a file in the system temporary directory. | | `EVE_STAGEHAND_MODEL` | Eve agent model; defaults to `gpt-5.6-luna`. | | `OPENAI_API_KEY` | OpenAI credential used by the Eve agent model and inferred for an OpenAI Stagehand model. | -| `GOOGLE_GENERATIVE_AI_API_KEY` / `GEMINI_API_KEY` / `GOOGLE_API_KEY` | Google credential inferred by Stagehand. If one is set without explicit Stagehand model configuration, the model defaults to `google/gemini-3.6-flash`. | +| `GOOGLE_GENERATIVE_AI_API_KEY` / `GEMINI_API_KEY` / `GOOGLE_API_KEY` | Google credential inferred by Stagehand. If one is set without explicit Stagehand model configuration, the model defaults to `google/gemini-3.8-flash`. | ## Run diff --git a/packages/protocol/schemas.ts b/packages/protocol/schemas.ts index 87e0be02af..4a0d0e18db 100644 --- a/packages/protocol/schemas.ts +++ b/packages/protocol/schemas.ts @@ -3,9 +3,8 @@ import { StagehandProtocolVersionSchema } from "./protocol-version.ts"; export { STAGEHAND_PROTOCOL_VERSION } from "./protocol-version.ts"; -// Seeded from the explicit model IDs in Vercel AI SDK's provider packages. -// Stagehand owns these allowlists: changes are reviewed and maintained here -// rather than inherited automatically from the SDK. +// Language models that are still reachable on the provider APIs (OpenAI, Anthropic, Gemini). +// Stagehand owns these allowlists. export const OpenAIModelIdSchema = z .enum([ "gpt-4.1", @@ -15,21 +14,10 @@ export const OpenAIModelIdSchema = z "gpt-4.1-nano", "gpt-4.1-nano-2025-04-14", "gpt-4o", - "gpt-4o-2024-05-13", "gpt-4o-2024-08-06", "gpt-4o-2024-11-20", - "gpt-4o-audio-preview", - "gpt-4o-audio-preview-2024-12-17", - "gpt-4o-search-preview", - "gpt-4o-search-preview-2025-03-11", - "gpt-4o-mini-search-preview", - "gpt-4o-mini-search-preview-2025-03-11", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", - "gpt-3.5-turbo-0125", - "gpt-3.5-turbo", - "gpt-3.5-turbo-1106", - "gpt-5-chat-latest", "o1", "o1-2024-12-17", "o3", @@ -40,7 +28,6 @@ export const OpenAIModelIdSchema = z "o4-mini-2025-04-16", "gpt-5", "gpt-5-2025-08-07", - "gpt-5-codex", "gpt-5-mini", "gpt-5-mini-2025-08-07", "gpt-5-nano", @@ -48,15 +35,8 @@ export const OpenAIModelIdSchema = z "gpt-5-pro", "gpt-5-pro-2025-10-06", "gpt-5.1", - "gpt-5.1-chat-latest", - "gpt-5.1-codex-mini", - "gpt-5.1-codex", - "gpt-5.1-codex-max", "gpt-5.2", - "gpt-5.2-chat-latest", "gpt-5.2-pro", - "gpt-5.2-codex", - "gpt-5.3-chat-latest", "gpt-5.3-codex", "gpt-5.4", "gpt-5.4-2026-03-05", @@ -68,78 +48,56 @@ export const OpenAIModelIdSchema = z "gpt-5.4-pro-2026-03-05", "gpt-5.5", "gpt-5.5-2026-04-23", + "gpt-5.5-pro", "gpt-5.6", "gpt-5.6-luna", "gpt-5.6-sol", "gpt-5.6-terra", + "gpt-6-astra", ]) .meta({ id: "OpenAIModelId" }); export const AnthropicModelIdSchema = z .enum([ - "claude-3-haiku-20240307", - "claude-haiku-4-5-20251001", "claude-haiku-4-5", - "claude-opus-4-0", - "claude-opus-4-20250514", - "claude-opus-4-1-20250805", - "claude-opus-4-1", - "claude-opus-4-5", - "claude-opus-4-5-20251101", - "claude-sonnet-4-0", - "claude-sonnet-4-20250514", - "claude-sonnet-4-5-20250929", + "claude-haiku-4-5-20251001", "claude-sonnet-4-5", + "claude-sonnet-4-5-20250929", "claude-sonnet-4-6", + "claude-sonnet-5", + "claude-opus-4-5", + "claude-opus-4-5-20251101", "claude-opus-4-6", "claude-opus-4-7", "claude-opus-4-8", + "claude-opus-5", "claude-fable-5", - "claude-sonnet-5", + "claude-fable-5-1", ]) .meta({ id: "AnthropicModelId" }); export const GoogleModelIdSchema = z .enum([ - "gemini-2.0-flash", - "gemini-2.0-flash-001", - "gemini-2.0-flash-lite", - "gemini-2.0-flash-lite-001", "gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-image", "gemini-2.5-flash-lite", - "gemini-2.5-flash-preview-tts", - "gemini-2.5-pro-preview-tts", - "gemini-2.5-flash-native-audio-latest", - "gemini-2.5-flash-native-audio-preview-09-2025", - "gemini-2.5-flash-native-audio-preview-12-2025", "gemini-2.5-computer-use-preview-10-2025", - "gemini-3-pro-preview", - "gemini-3-pro-image-preview", "gemini-3-flash-preview", + "gemini-3-pro-image", "gemini-3.1-pro-preview", - "gemini-3.1-pro-preview-customtools", - "gemini-3.1-flash-image-preview", - "gemini-3.1-flash-lite-preview", - "gemini-3.1-flash-tts-preview", + "gemini-3.1-flash-image", + "gemini-3.1-flash-lite", + "gemini-3.1-flash-lite-image", "gemini-3.5-flash", + "gemini-3.5-flash-lite", "gemini-3.6-flash", + "gemini-3.7-flash", + "gemini-3.8-flash", + "gemini-omni-1.1-flash", "gemini-pro-latest", "gemini-flash-latest", "gemini-flash-lite-latest", - "deep-research-pro-preview-12-2025", - "deep-research-max-preview-04-2026", - "deep-research-preview-04-2026", - "nano-banana-pro-preview", - "aqa", - "gemini-robotics-er-1.5-preview", - "gemma-3-1b-it", - "gemma-3-4b-it", - "gemma-3n-e4b-it", - "gemma-3n-e2b-it", - "gemma-3-12b-it", - "gemma-3-27b-it", ]) .meta({ id: "GoogleModelId" }); diff --git a/packages/protocol/stagehand.v4.json b/packages/protocol/stagehand.v4.json index c91ab6cc08..257eb1e932 100644 --- a/packages/protocol/stagehand.v4.json +++ b/packages/protocol/stagehand.v4.json @@ -1268,15 +1268,15 @@ }, "OpenAIModelName": { "type": "string", - "pattern": "^openai\\/(gpt-4\\.1|gpt-4\\.1-2025-04-14|gpt-4\\.1-mini|gpt-4\\.1-mini-2025-04-14|gpt-4\\.1-nano|gpt-4\\.1-nano-2025-04-14|gpt-4o|gpt-4o-2024-05-13|gpt-4o-2024-08-06|gpt-4o-2024-11-20|gpt-4o-audio-preview|gpt-4o-audio-preview-2024-12-17|gpt-4o-search-preview|gpt-4o-search-preview-2025-03-11|gpt-4o-mini-search-preview|gpt-4o-mini-search-preview-2025-03-11|gpt-4o-mini|gpt-4o-mini-2024-07-18|gpt-3\\.5-turbo-0125|gpt-3\\.5-turbo|gpt-3\\.5-turbo-1106|gpt-5-chat-latest|o1|o1-2024-12-17|o3|o3-2025-04-16|o3-mini|o3-mini-2025-01-31|o4-mini|o4-mini-2025-04-16|gpt-5|gpt-5-2025-08-07|gpt-5-codex|gpt-5-mini|gpt-5-mini-2025-08-07|gpt-5-nano|gpt-5-nano-2025-08-07|gpt-5-pro|gpt-5-pro-2025-10-06|gpt-5\\.1|gpt-5\\.1-chat-latest|gpt-5\\.1-codex-mini|gpt-5\\.1-codex|gpt-5\\.1-codex-max|gpt-5\\.2|gpt-5\\.2-chat-latest|gpt-5\\.2-pro|gpt-5\\.2-codex|gpt-5\\.3-chat-latest|gpt-5\\.3-codex|gpt-5\\.4|gpt-5\\.4-2026-03-05|gpt-5\\.4-mini|gpt-5\\.4-mini-2026-03-17|gpt-5\\.4-nano|gpt-5\\.4-nano-2026-03-17|gpt-5\\.4-pro|gpt-5\\.4-pro-2026-03-05|gpt-5\\.5|gpt-5\\.5-2026-04-23|gpt-5\\.6|gpt-5\\.6-luna|gpt-5\\.6-sol|gpt-5\\.6-terra)$" + "pattern": "^openai\\/(gpt-4\\.1|gpt-4\\.1-2025-04-14|gpt-4\\.1-mini|gpt-4\\.1-mini-2025-04-14|gpt-4\\.1-nano|gpt-4\\.1-nano-2025-04-14|gpt-4o|gpt-4o-2024-08-06|gpt-4o-2024-11-20|gpt-4o-mini|gpt-4o-mini-2024-07-18|o1|o1-2024-12-17|o3|o3-2025-04-16|o3-mini|o3-mini-2025-01-31|o4-mini|o4-mini-2025-04-16|gpt-5|gpt-5-2025-08-07|gpt-5-mini|gpt-5-mini-2025-08-07|gpt-5-nano|gpt-5-nano-2025-08-07|gpt-5-pro|gpt-5-pro-2025-10-06|gpt-5\\.1|gpt-5\\.2|gpt-5\\.2-pro|gpt-5\\.3-codex|gpt-5\\.4|gpt-5\\.4-2026-03-05|gpt-5\\.4-mini|gpt-5\\.4-mini-2026-03-17|gpt-5\\.4-nano|gpt-5\\.4-nano-2026-03-17|gpt-5\\.4-pro|gpt-5\\.4-pro-2026-03-05|gpt-5\\.5|gpt-5\\.5-2026-04-23|gpt-5\\.5-pro|gpt-5\\.6|gpt-5\\.6-luna|gpt-5\\.6-sol|gpt-5\\.6-terra|gpt-6-astra)$" }, "AnthropicModelName": { "type": "string", - "pattern": "^anthropic\\/(claude-3-haiku-20240307|claude-haiku-4-5-20251001|claude-haiku-4-5|claude-opus-4-0|claude-opus-4-20250514|claude-opus-4-1-20250805|claude-opus-4-1|claude-opus-4-5|claude-opus-4-5-20251101|claude-sonnet-4-0|claude-sonnet-4-20250514|claude-sonnet-4-5-20250929|claude-sonnet-4-5|claude-sonnet-4-6|claude-opus-4-6|claude-opus-4-7|claude-opus-4-8|claude-fable-5|claude-sonnet-5)$" + "pattern": "^anthropic\\/(claude-haiku-4-5|claude-haiku-4-5-20251001|claude-sonnet-4-5|claude-sonnet-4-5-20250929|claude-sonnet-4-6|claude-sonnet-5|claude-opus-4-5|claude-opus-4-5-20251101|claude-opus-4-6|claude-opus-4-7|claude-opus-4-8|claude-opus-5|claude-fable-5|claude-fable-5-1)$" }, "GoogleModelName": { "type": "string", - "pattern": "^google\\/(gemini-2\\.0-flash|gemini-2\\.0-flash-001|gemini-2\\.0-flash-lite|gemini-2\\.0-flash-lite-001|gemini-2\\.5-pro|gemini-2\\.5-flash|gemini-2\\.5-flash-image|gemini-2\\.5-flash-lite|gemini-2\\.5-flash-preview-tts|gemini-2\\.5-pro-preview-tts|gemini-2\\.5-flash-native-audio-latest|gemini-2\\.5-flash-native-audio-preview-09-2025|gemini-2\\.5-flash-native-audio-preview-12-2025|gemini-2\\.5-computer-use-preview-10-2025|gemini-3-pro-preview|gemini-3-pro-image-preview|gemini-3-flash-preview|gemini-3\\.1-pro-preview|gemini-3\\.1-pro-preview-customtools|gemini-3\\.1-flash-image-preview|gemini-3\\.1-flash-lite-preview|gemini-3\\.1-flash-tts-preview|gemini-3\\.5-flash|gemini-3\\.6-flash|gemini-pro-latest|gemini-flash-latest|gemini-flash-lite-latest|deep-research-pro-preview-12-2025|deep-research-max-preview-04-2026|deep-research-preview-04-2026|nano-banana-pro-preview|aqa|gemini-robotics-er-1\\.5-preview|gemma-3-1b-it|gemma-3-4b-it|gemma-3n-e4b-it|gemma-3n-e2b-it|gemma-3-12b-it|gemma-3-27b-it)$" + "pattern": "^google\\/(gemini-2\\.5-pro|gemini-2\\.5-flash|gemini-2\\.5-flash-image|gemini-2\\.5-flash-lite|gemini-2\\.5-computer-use-preview-10-2025|gemini-3-flash-preview|gemini-3-pro-image|gemini-3\\.1-pro-preview|gemini-3\\.1-flash-image|gemini-3\\.1-flash-lite|gemini-3\\.1-flash-lite-image|gemini-3\\.5-flash|gemini-3\\.5-flash-lite|gemini-3\\.6-flash|gemini-3\\.7-flash|gemini-3\\.8-flash|gemini-omni-1\\.1-flash|gemini-pro-latest|gemini-flash-latest|gemini-flash-lite-latest)$" }, "GroqModelName": { "type": "string", diff --git a/packages/protocol/tests/protocol/object-model-protocol.test.ts b/packages/protocol/tests/protocol/object-model-protocol.test.ts index d2c708ffa5..cff8e0e281 100644 --- a/packages/protocol/tests/protocol/object-model-protocol.test.ts +++ b/packages/protocol/tests/protocol/object-model-protocol.test.ts @@ -54,7 +54,7 @@ describe("Stagehand object-model protocol", () => { sessionId: "session_123", region: "eu-central-1", }, - model: { modelName: "openai/gpt-5-mini" }, + model: { modelName: "openai/gpt-5.6-luna" }, }); expect(params).toStrictEqual({ @@ -66,7 +66,7 @@ describe("Stagehand object-model protocol", () => { sessionId: "session_123", region: "eu-central-1", }, - model: { modelName: "openai/gpt-5-mini" }, + model: { modelName: "openai/gpt-5.6-luna" }, telemetry: { traces: { endpoint: "https://example.com/v1/traces", diff --git a/packages/protocol/tests/protocol/wire-casing.test.ts b/packages/protocol/tests/protocol/wire-casing.test.ts index 0efedefd0c..0171304d20 100644 --- a/packages/protocol/tests/protocol/wire-casing.test.ts +++ b/packages/protocol/tests/protocol/wire-casing.test.ts @@ -436,7 +436,7 @@ describe("JSON-RPC wire casing", () => { region: "eu-central-1" as const, }, model: { - modelName: "openai/gpt-5-mini", + modelName: "openai/gpt-5.6-luna", headers: { doNotRenameMe: "value" }, }, telemetry: { @@ -457,7 +457,7 @@ describe("JSON-RPC wire casing", () => { region: "eu-central-1", }, model: { - model_name: "openai/gpt-5-mini", + model_name: "openai/gpt-5.6-luna", headers: { doNotRenameMe: "value" }, }, telemetry: { diff --git a/packages/sdk-go/internal/extensionassets/stagehand-extension.zip b/packages/sdk-go/internal/extensionassets/stagehand-extension.zip index 3833853d84..d5474c341f 100644 Binary files a/packages/sdk-go/internal/extensionassets/stagehand-extension.zip and b/packages/sdk-go/internal/extensionassets/stagehand-extension.zip differ diff --git a/packages/sdk-go/models_test.go b/packages/sdk-go/models_test.go index 33c945ace0..8b90881cb2 100644 --- a/packages/sdk-go/models_test.go +++ b/packages/sdk-go/models_test.go @@ -173,10 +173,10 @@ func TestObjectUnionsRoundTrip(t *testing.T) { }, { name: "model", - value: ModelConfig{ModelName: ModelName("openai/gpt-5.6")}, + value: ModelConfig{ModelName: ModelName("openai/gpt-5.6-sol")}, new: func() any { return new(ModelConfig) }, check: func(t *testing.T, value any) { - if value.(*ModelConfig).ModelName != ModelName("openai/gpt-5.6") { + if value.(*ModelConfig).ModelName != ModelName("openai/gpt-5.6-sol") { t.Fatal("decoded the wrong model configuration") } }, diff --git a/packages/sdk-python/src/stagehand/_generated/models.py b/packages/sdk-python/src/stagehand/_generated/models.py index f9ecf9cda2..5998ee346b 100644 --- a/packages/sdk-python/src/stagehand/_generated/models.py +++ b/packages/sdk-python/src/stagehand/_generated/models.py @@ -148,7 +148,7 @@ class AnthropicModelName(RootModel[StrictStr]): root: Annotated[ StrictStr, Field( - pattern="^anthropic\\/(claude-3-haiku-20240307|claude-haiku-4-5-20251001|claude-haiku-4-5|claude-opus-4-0|claude-opus-4-20250514|claude-opus-4-1-20250805|claude-opus-4-1|claude-opus-4-5|claude-opus-4-5-20251101|claude-sonnet-4-0|claude-sonnet-4-20250514|claude-sonnet-4-5-20250929|claude-sonnet-4-5|claude-sonnet-4-6|claude-opus-4-6|claude-opus-4-7|claude-opus-4-8|claude-fable-5|claude-sonnet-5)$" + pattern="^anthropic\\/(claude-haiku-4-5|claude-haiku-4-5-20251001|claude-sonnet-4-5|claude-sonnet-4-5-20250929|claude-sonnet-4-6|claude-sonnet-5|claude-opus-4-5|claude-opus-4-5-20251101|claude-opus-4-6|claude-opus-4-7|claude-opus-4-8|claude-opus-5|claude-fable-5|claude-fable-5-1)$" ), ] @@ -712,7 +712,7 @@ class GoogleModelName(RootModel[StrictStr]): root: Annotated[ StrictStr, Field( - pattern="^google\\/(gemini-2\\.0-flash|gemini-2\\.0-flash-001|gemini-2\\.0-flash-lite|gemini-2\\.0-flash-lite-001|gemini-2\\.5-pro|gemini-2\\.5-flash|gemini-2\\.5-flash-image|gemini-2\\.5-flash-lite|gemini-2\\.5-flash-preview-tts|gemini-2\\.5-pro-preview-tts|gemini-2\\.5-flash-native-audio-latest|gemini-2\\.5-flash-native-audio-preview-09-2025|gemini-2\\.5-flash-native-audio-preview-12-2025|gemini-2\\.5-computer-use-preview-10-2025|gemini-3-pro-preview|gemini-3-pro-image-preview|gemini-3-flash-preview|gemini-3\\.1-pro-preview|gemini-3\\.1-pro-preview-customtools|gemini-3\\.1-flash-image-preview|gemini-3\\.1-flash-lite-preview|gemini-3\\.1-flash-tts-preview|gemini-3\\.5-flash|gemini-3\\.6-flash|gemini-pro-latest|gemini-flash-latest|gemini-flash-lite-latest|deep-research-pro-preview-12-2025|deep-research-max-preview-04-2026|deep-research-preview-04-2026|nano-banana-pro-preview|aqa|gemini-robotics-er-1\\.5-preview|gemma-3-1b-it|gemma-3-4b-it|gemma-3n-e4b-it|gemma-3n-e2b-it|gemma-3-12b-it|gemma-3-27b-it)$" + pattern="^google\\/(gemini-2\\.5-pro|gemini-2\\.5-flash|gemini-2\\.5-flash-image|gemini-2\\.5-flash-lite|gemini-2\\.5-computer-use-preview-10-2025|gemini-3-flash-preview|gemini-3-pro-image|gemini-3\\.1-pro-preview|gemini-3\\.1-flash-image|gemini-3\\.1-flash-lite|gemini-3\\.1-flash-lite-image|gemini-3\\.5-flash|gemini-3\\.5-flash-lite|gemini-3\\.6-flash|gemini-3\\.7-flash|gemini-3\\.8-flash|gemini-omni-1\\.1-flash|gemini-pro-latest|gemini-flash-latest|gemini-flash-lite-latest)$" ), ] @@ -1433,7 +1433,7 @@ class OpenAIModelName(RootModel[StrictStr]): root: Annotated[ StrictStr, Field( - pattern="^openai\\/(gpt-4\\.1|gpt-4\\.1-2025-04-14|gpt-4\\.1-mini|gpt-4\\.1-mini-2025-04-14|gpt-4\\.1-nano|gpt-4\\.1-nano-2025-04-14|gpt-4o|gpt-4o-2024-05-13|gpt-4o-2024-08-06|gpt-4o-2024-11-20|gpt-4o-audio-preview|gpt-4o-audio-preview-2024-12-17|gpt-4o-search-preview|gpt-4o-search-preview-2025-03-11|gpt-4o-mini-search-preview|gpt-4o-mini-search-preview-2025-03-11|gpt-4o-mini|gpt-4o-mini-2024-07-18|gpt-3\\.5-turbo-0125|gpt-3\\.5-turbo|gpt-3\\.5-turbo-1106|gpt-5-chat-latest|o1|o1-2024-12-17|o3|o3-2025-04-16|o3-mini|o3-mini-2025-01-31|o4-mini|o4-mini-2025-04-16|gpt-5|gpt-5-2025-08-07|gpt-5-codex|gpt-5-mini|gpt-5-mini-2025-08-07|gpt-5-nano|gpt-5-nano-2025-08-07|gpt-5-pro|gpt-5-pro-2025-10-06|gpt-5\\.1|gpt-5\\.1-chat-latest|gpt-5\\.1-codex-mini|gpt-5\\.1-codex|gpt-5\\.1-codex-max|gpt-5\\.2|gpt-5\\.2-chat-latest|gpt-5\\.2-pro|gpt-5\\.2-codex|gpt-5\\.3-chat-latest|gpt-5\\.3-codex|gpt-5\\.4|gpt-5\\.4-2026-03-05|gpt-5\\.4-mini|gpt-5\\.4-mini-2026-03-17|gpt-5\\.4-nano|gpt-5\\.4-nano-2026-03-17|gpt-5\\.4-pro|gpt-5\\.4-pro-2026-03-05|gpt-5\\.5|gpt-5\\.5-2026-04-23|gpt-5\\.6|gpt-5\\.6-luna|gpt-5\\.6-sol|gpt-5\\.6-terra)$" + pattern="^openai\\/(gpt-4\\.1|gpt-4\\.1-2025-04-14|gpt-4\\.1-mini|gpt-4\\.1-mini-2025-04-14|gpt-4\\.1-nano|gpt-4\\.1-nano-2025-04-14|gpt-4o|gpt-4o-2024-08-06|gpt-4o-2024-11-20|gpt-4o-mini|gpt-4o-mini-2024-07-18|o1|o1-2024-12-17|o3|o3-2025-04-16|o3-mini|o3-mini-2025-01-31|o4-mini|o4-mini-2025-04-16|gpt-5|gpt-5-2025-08-07|gpt-5-mini|gpt-5-mini-2025-08-07|gpt-5-nano|gpt-5-nano-2025-08-07|gpt-5-pro|gpt-5-pro-2025-10-06|gpt-5\\.1|gpt-5\\.2|gpt-5\\.2-pro|gpt-5\\.3-codex|gpt-5\\.4|gpt-5\\.4-2026-03-05|gpt-5\\.4-mini|gpt-5\\.4-mini-2026-03-17|gpt-5\\.4-nano|gpt-5\\.4-nano-2026-03-17|gpt-5\\.4-pro|gpt-5\\.4-pro-2026-03-05|gpt-5\\.5|gpt-5\\.5-2026-04-23|gpt-5\\.5-pro|gpt-5\\.6|gpt-5\\.6-luna|gpt-5\\.6-sol|gpt-5\\.6-terra|gpt-6-astra)$" ), ] diff --git a/packages/sdk-python/tests/test_stagehand.py b/packages/sdk-python/tests/test_stagehand.py index fed1c0e519..12969a55c4 100644 --- a/packages/sdk-python/tests/test_stagehand.py +++ b/packages/sdk-python/tests/test_stagehand.py @@ -890,7 +890,7 @@ async def test_stagehand_routes_metrics_and_ai_methods( browser, _ = _browser_handle() stagehand = await Stagehand.create(browser=browser) page = Page(cast(RPCClient, recording), PageRef(page_id="explicit-page")) - model: ModelConfig = {"model_name": "openai/gpt-4.1-mini"} + model: ModelConfig = {"model_name": "openai/gpt-5.6-luna"} act_locator = page.locator("main").nth(2) act_ignored_locator = page.locator(".promo") locator = page.locator("main").nth(1) diff --git a/packages/sdk-ts/tests/packageContract.test.ts b/packages/sdk-ts/tests/packageContract.test.ts index 58f5e1228c..3e5d1fcbb4 100644 --- a/packages/sdk-ts/tests/packageContract.test.ts +++ b/packages/sdk-ts/tests/packageContract.test.ts @@ -124,7 +124,7 @@ describe("published TypeScript SDK", () => { const loadState: LoadState = "domcontentloaded"; const mouseButton: MouseButton = "left"; - const modelName: ModelName = "openai/gpt-5"; + const modelName: ModelName = "openai/gpt-5.6-luna"; const model: ModelConfig = { modelName }; const caching: Caching = { threshold: 2 }; const variables: Variables = {