diff --git a/.changeset/floppy-shoes-hide.md b/.changeset/floppy-shoes-hide.md
deleted file mode 100644
index bc919d9ee..000000000
--- a/.changeset/floppy-shoes-hide.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-"@browserbasehq/stagehand": major
----
-
-welcome to stagehand v3!
-
-please see the full migration guide at https://docs.stagehand.dev
diff --git a/.changeset/pink-snakes-sneeze.md b/.changeset/pink-snakes-sneeze.md
deleted file mode 100644
index 4cadf6444..000000000
--- a/.changeset/pink-snakes-sneeze.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@browserbasehq/stagehand": patch
----
-
-Replace operator handler with base of new agent
diff --git a/.changeset/pretty-jokes-own.md b/.changeset/pretty-jokes-own.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/.changeset/social-moles-wish.md b/.changeset/social-moles-wish.md
deleted file mode 100644
index 017cc4bf5..000000000
--- a/.changeset/social-moles-wish.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@browserbasehq/stagehand": patch
----
-
-remove need for duplicate project id if already passed to Stagehand
diff --git a/.changeset/spicy-snails-flash.md b/.changeset/spicy-snails-flash.md
deleted file mode 100644
index 9a33947b7..000000000
--- a/.changeset/spicy-snails-flash.md
+++ /dev/null
@@ -1,6 +0,0 @@
----
-"@browserbasehq/stagehand-evals": patch
-"@browserbasehq/orca": patch
----
-
-update ci for v3
diff --git a/.changeset/tired-cats-repeat.md b/.changeset/tired-cats-repeat.md
deleted file mode 100644
index 60a5c5031..000000000
--- a/.changeset/tired-cats-repeat.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@browserbasehq/stagehand": patch
----
-
-replace operator agent with scaffold for new stagehand agent
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bc9fc61cf..196d71f03 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,27 @@
# @browserbasehq/stagehand
+## 3.0.0
+
+### Major Changes
+
+- Removes internal Playwright dependency
+- A generous 20-40% speed increase across `act`, `extract`, & `observe` calls
+- Compatibility with Playwright, Puppeteer, and Patchright
+- Automatic action caching (agent, stagehand.act). Go from CUA → deterministic scripts w/o inference
+- A suite of non AI primitives:
+ - `page`
+ - `locator` (built in closed mode shadow root traversal, with xpaths & css selectors)
+ - `frameLocator`
+ - `deepLocator` (crosses iframes & shadow roots)
+- bun compatibility
+- Simplified extract schemas
+- CSS selector support (id-based support coming soon)
+- Targeted extract and observe across iframes & shadow roots
+- More intuitive type names (observeResult is now action, act accepts an instruction string instead of an action string, solidified ModelConfiguration)
+
+Check the [migration guide](https://docs.stagehand.dev/v3/migrations/v2) for more information
+
+
## 2.5.0
### Minor Changes
diff --git a/README.md b/README.md
index 33b06c551..da7e90f5c 100644
--- a/README.md
+++ b/README.md
@@ -49,71 +49,58 @@ If you're looking for the Python implementation, you can find it
+## What is Stagehand?
+
+Stagehand is a browser automation framework used to control web browsers with natural language and code. By combining the power of AI with the precision of code, Stagehand makes web automation flexible, maintainable, and actually reliable.
+
## Why Stagehand?
-Most existing browser automation tools either require you to write low-level code in a framework like Selenium, Playwright, or Puppeteer, or use high-level agents that can be unpredictable in production. By letting developers choose what to write in code vs. natural language, Stagehand is the natural choice for browser automations in production.
+Most existing browser automation tools either require you to write low-level code in a framework like Selenium, Playwright, or Puppeteer, or use high-level agents that can be unpredictable in production. By letting developers choose what to write in code vs. natural language (and bridging the gap between the two) Stagehand is the natural choice for browser automations in production.
+
+1. **Choose when to write code vs. natural language**: use AI when you want to navigate unfamiliar pages, and use code when you know exactly what you want to do.
-1. **Choose when to write code vs. natural language**: use AI when you want to navigate unfamiliar pages, and use code ([Playwright](https://playwright.dev/)) when you know exactly what you want to do.
+2. **Go from AI-driven to repeatable workflows**: Stagehand lets you preview AI actions before running them, and also helps you easily cache repeatable actions to save time and tokens.
+
+3. **Write once, run forever**: Stagehand's auto-caching combined with self-healing remembers previous actions, runs without LLM inference, and knows when to involve AI whenever the website changes and your automation breaks.
+
+## Getting Started
-2. **Preview and cache actions**: Stagehand lets you preview AI actions before running them, and also helps you easily cache repeatable actions to save time and tokens.
+Start with Stagehand with one line of code, or check out our [Quickstart Guide](https://docs.stagehand.dev/v3/first-steps/quickstart) for more information:
-3. **Computer use models with one line of code**: Stagehand lets you integrate SOTA computer use models from OpenAI and Anthropic into the browser with one line of code.
+```bash
+npx create-browser-app
+```
## Example
Here's how to build a sample browser automation with Stagehand:
-
-
-
-
-
-
```typescript
-// Use Playwright functions on the page object
-const page = stagehand.page;
+// Stagehand's CDP engine provides an optimized, low level interface to the browser built for automation
+const page = stagehand.context.pages()[0];
await page.goto("https://github.com/browserbase");
// Use act() to execute individual actions
-await page.act("click on the stagehand repo");
+await stagehand.act("click on the stagehand repo");
-// Use Computer Use agents for larger actions
-const agent = stagehand.agent({
- provider: "openai",
- model: "computer-use-preview",
-});
+// Use agent() for multi-step tasks
+const agent = stagehand.agent();
await agent.execute("Get to the latest PR");
-// Use extract() to read data from the page
-const { author, title } = await page.extract({
- instruction: "extract the author and title of the PR",
- schema: z.object({
+// Use extract() to get structured data from the page
+const { author, title } = await stagehand.extract(
+ "extract the author and title of the PR",
+ z.object({
author: z.string().describe("The username of the PR author"),
title: z.string().describe("The title of the PR"),
}),
-});
+);
```
## Documentation
Visit [docs.stagehand.dev](https://docs.stagehand.dev) to view the full documentation.
-## Getting Started
-
-Start with Stagehand with one line of code, or check out our [Quickstart Guide](https://docs.stagehand.dev/get_started/quickstart) for more information:
-
-```bash
-npx create-browser-app
-```
-
-
### Build and Run from Source
@@ -121,11 +108,8 @@ npx create-browser-app
git clone https://github.com/browserbase/stagehand.git
cd stagehand
pnpm install
-pnpm playwright install
pnpm run build
pnpm run example # run the blank script at ./examples/example.ts
-pnpm run example 2048 # run the 2048 example at ./examples/2048.ts
-pnpm run evals -man # see evaluation suite options
```
Stagehand is best when you have an API key for an LLM provider and Browserbase credentials. To add these to your project, run:
@@ -140,21 +124,20 @@ nano .env # Edit the .env file to add API keys
> [!NOTE]
> We highly value contributions to Stagehand! For questions or support, please join our [Slack community](https://join.slack.com/t/stagehand-dev/shared_invite/zt-38khc8iv5-T2acb50_0OILUaX7lxeBOg).
-At a high level, we're focused on improving reliability, speed, and cost in that order of priority. If you're interested in contributing, we strongly recommend reaching out to [Miguel Gonzalez](https://x.com/miguel_gonzf) or [Paul Klein](https://x.com/pk_iv) in our [Slack community](https://join.slack.com/t/stagehand-dev/shared_invite/zt-38khc8iv5-T2acb50_0OILUaX7lxeBOg) before starting to ensure that your contribution aligns with our goals.
+At a high level, we're focused on improving reliability, extensibility, speed, and cost in that order of priority. If you're interested in contributing, **bug fixes and small improvements are the best way to get started**. For more involved features, we strongly recommend reaching out to [Miguel Gonzalez](https://x.com/miguel_gonzf) or [Paul Klein](https://x.com/pk_iv) in our [Slack community](https://join.slack.com/t/stagehand-dev/shared_invite/zt-38khc8iv5-T2acb50_0OILUaX7lxeBOg) before starting to ensure that your contribution aligns with our goals.
-For more information, please see our [Contributing Guide](https://docs.stagehand.dev/examples/contributing).
+
## Acknowledgements
-This project heavily relies on [Playwright](https://playwright.dev/) as a resilient backbone to automate the web. It also would not be possible without the awesome techniques and discoveries made by [tarsier](https://github.com/reworkd/tarsier), [gemini-zod](https://github.com/jbeoris/gemini-zod), and [fuji-web](https://github.com/normal-computing/fuji-web).
-
We'd like to thank the following people for their major contributions to Stagehand:
- [Paul Klein](https://github.com/pkiv)
-- [Anirudh Kamath](https://github.com/kamath)
- [Sean McGuire](https://github.com/seanmcguire12)
- [Miguel Gonzalez](https://github.com/miguelg719)
- [Sameel Arif](https://github.com/sameelarif)
+- [Thomas Katwan](https://github.com/tkattkat)
- [Filip Michalsky](https://github.com/filip-michalsky)
+- [Anirudh Kamath](https://github.com/kamath)
- [Jeremy Press](https://x.com/jeremypress)
- [Navid Pour](https://github.com/navidpour)
diff --git a/package.json b/package.json
index ebe2776bc..52ad35591 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,7 @@
"evals": "pnpm --filter @browserbasehq/stagehand-evals run evals",
"docs": "turbo run docs",
"dev": "turbo run dev",
- "example": "pnpm --filter @browserbasehq/orca run example --",
+ "example": "pnpm --filter @browserbasehq/stagehand run example --",
"cache:clear": "turbo run build --force",
"prepare": "turbo run build",
"release": "turbo run build && changeset publish",
diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md
new file mode 100644
index 000000000..33e9d5e23
--- /dev/null
+++ b/packages/core/CHANGELOG.md
@@ -0,0 +1,17 @@
+# @browserbasehq/stagehand
+
+## 3.0.1
+
+### Patch Changes
+
+- [#1207](https://github.com/browserbase/stagehand/pull/1207) [`55da8c6`](https://github.com/browserbase/stagehand/commit/55da8c6e9575cbad3246c55b17650cf6b293ddbe) Thanks [@miguelg719](https://github.com/miguelg719)! - Fix broken links to quickstart docs
+
+- [#1200](https://github.com/browserbase/stagehand/pull/1200) [`0a5ee63`](https://github.com/browserbase/stagehand/commit/0a5ee638bde051d109eb2266e665934a12f3dc31) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - log info when scope narrowing selector fails
+
+- [#1205](https://github.com/browserbase/stagehand/pull/1205) [`ee76881`](https://github.com/browserbase/stagehand/commit/ee7688156cb67a9f0f90dfe0dbab77423693a332) Thanks [@miguelg719](https://github.com/miguelg719)! - Update README.md, add Changelog for v3
+
+- [#1209](https://github.com/browserbase/stagehand/pull/1209) [`9e95add`](https://github.com/browserbase/stagehand/commit/9e95add37eb30db4f85e73df7760c7e63fb4131e) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - fix circular import in exported aisdk example client
+
+- [#1211](https://github.com/browserbase/stagehand/pull/1211) [`98e212b`](https://github.com/browserbase/stagehand/commit/98e212b27887241879608c6c1b6c2524477a40d7) Thanks [@miguelg719](https://github.com/miguelg719)! - Add an example for passing custom tools to agent
+
+- [#1206](https://github.com/browserbase/stagehand/pull/1206) [`d5ecbfc`](https://github.com/browserbase/stagehand/commit/d5ecbfc8e419a59b91c2115fd7f984378381d3d0) Thanks [@miguelg719](https://github.com/miguelg719)! - Export example AISdkClient properly from the stagehand package
diff --git a/packages/core/README.md b/packages/core/README.md
new file mode 100644
index 000000000..46b8cadc9
--- /dev/null
+++ b/packages/core/README.md
@@ -0,0 +1,148 @@
+
+
+ The AI Browser Automation Framework
+ Read the Docs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+If you're looking for the Python implementation, you can find it
+ here
+
+
+
+
+## What is Stagehand?
+
+Stagehand is a browser automation framework used to control web browsers with natural language and code. By combining the power of AI with the precision of code, Stagehand makes web automation flexible, maintainable, and actually reliable.
+
+## Why Stagehand?
+
+Most existing browser automation tools either require you to write low-level code in a framework like Selenium, Playwright, or Puppeteer, or use high-level agents that can be unpredictable in production. By letting developers choose what to write in code vs. natural language (and bridging the gap between the two) Stagehand is the natural choice for browser automations in production.
+
+1. **Choose when to write code vs. natural language**: use AI when you want to navigate unfamiliar pages, and use code when you know exactly what you want to do.
+
+2. **Go from AI-driven to repeatable workflows**: Stagehand lets you preview AI actions before running them, and also helps you easily cache repeatable actions to save time and tokens.
+
+3. **Write once, run forever**: Stagehand's auto-caching combined with self-healing remembers previous actions, runs without LLM inference, and knows when to involve AI whenever the website changes and your automation breaks.
+
+## Getting Started
+
+Start with Stagehand with one line of code, or check out our [Quickstart Guide](https://docs.stagehand.dev/v3/first-steps/quickstart) for more information:
+
+```bash
+npx create-browser-app
+```
+
+## Example
+
+Here's how to build a sample browser automation with Stagehand:
+
+```typescript
+// Stagehand's CDP engine provides an optimized, low level interface to the browser built for automation
+const page = stagehand.context.pages()[0];
+await page.goto("https://github.com/browserbase");
+
+// Use act() to execute individual actions
+await stagehand.act("click on the stagehand repo");
+
+// Use agent() for multi-step tasks
+const agent = stagehand.agent();
+await agent.execute("Get to the latest PR");
+
+// Use extract() to get structured data from the page
+const { author, title } = await stagehand.extract(
+ "extract the author and title of the PR",
+ z.object({
+ author: z.string().describe("The username of the PR author"),
+ title: z.string().describe("The title of the PR"),
+ }),
+);
+```
+
+## Documentation
+
+Visit [docs.stagehand.dev](https://docs.stagehand.dev) to view the full documentation.
+
+### Build and Run from Source
+
+```bash
+git clone https://github.com/browserbase/stagehand.git
+cd stagehand
+pnpm install
+pnpm run build
+pnpm run example # run the blank script at ./examples/example.ts
+```
+
+Stagehand is best when you have an API key for an LLM provider and Browserbase credentials. To add these to your project, run:
+
+```bash
+cp .env.example .env
+nano .env # Edit the .env file to add API keys
+```
+
+## Contributing
+
+> [!NOTE]
+> We highly value contributions to Stagehand! For questions or support, please join our [Slack community](https://join.slack.com/t/stagehand-dev/shared_invite/zt-38khc8iv5-T2acb50_0OILUaX7lxeBOg).
+
+At a high level, we're focused on improving reliability, extensibility, speed, and cost in that order of priority. If you're interested in contributing, **bug fixes and small improvements are the best way to get started**. For more involved features, we strongly recommend reaching out to [Miguel Gonzalez](https://x.com/miguel_gonzf) or [Paul Klein](https://x.com/pk_iv) in our [Slack community](https://join.slack.com/t/stagehand-dev/shared_invite/zt-38khc8iv5-T2acb50_0OILUaX7lxeBOg) before starting to ensure that your contribution aligns with our goals.
+
+
+
+## Acknowledgements
+
+We'd like to thank the following people for their major contributions to Stagehand:
+
+- [Paul Klein](https://github.com/pkiv)
+- [Sean McGuire](https://github.com/seanmcguire12)
+- [Miguel Gonzalez](https://github.com/miguelg719)
+- [Sameel Arif](https://github.com/sameelarif)
+- [Thomas Katwan](https://github.com/tkattkat)
+- [Filip Michalsky](https://github.com/filip-michalsky)
+- [Anirudh Kamath](https://github.com/kamath)
+- [Jeremy Press](https://x.com/jeremypress)
+- [Navid Pour](https://github.com/navidpour)
+
+## License
+
+Licensed under the MIT License.
+
+Copyright 2025 Browserbase, Inc.
diff --git a/packages/core/examples/2048.ts b/packages/core/examples/2048.ts
index c97e96a87..5cb76b3d9 100644
--- a/packages/core/examples/2048.ts
+++ b/packages/core/examples/2048.ts
@@ -1,5 +1,5 @@
import { Stagehand } from "../lib/v3";
-import { z } from "zod/v3";
+import { z } from "zod";
async function example() {
console.log("🎮 Starting 2048 bot...");
diff --git a/packages/core/examples/agent-custom-tools.ts b/packages/core/examples/agent-custom-tools.ts
new file mode 100644
index 000000000..ad5d63dc9
--- /dev/null
+++ b/packages/core/examples/agent-custom-tools.ts
@@ -0,0 +1,107 @@
+/**
+ * This example shows how to pass custom tools to stagehand agent (both CUA and non-CUA)
+ */
+import { z } from "zod";
+import { tool } from "ai";
+import { Stagehand } from "../lib/v3";
+import chalk from "chalk";
+
+// Mock weather API, replace with your own API/tool logic
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
+const fetchWeatherAPI = async (location: string) => {
+ return {
+ temp: 70,
+ conditions: "sunny",
+ };
+};
+
+// Define the tool in an AI SDK format
+const getWeather = tool({
+ description: "Get the current weather in a location",
+ inputSchema: z.object({
+ location: z.string().describe("The location to get weather for"),
+ }),
+ execute: async ({ location }) => {
+ // Your custom logic here
+ const weather = await fetchWeatherAPI(location);
+ return {
+ location,
+ temperature: weather.temp,
+ conditions: weather.conditions,
+ };
+ },
+});
+
+async function main() {
+ console.log(
+ `\n${chalk.bold("Stagehand 🤘 Computer Use Agent (CUA) Demo")}\n`,
+ );
+
+ // Initialize Stagehand
+ const stagehand = new Stagehand({
+ env: "LOCAL",
+ verbose: 2,
+ experimental: true, // You must enable experimental mode to use custom tools / MCP integrations
+ model: "anthropic/claude-sonnet-4-5",
+ });
+ await stagehand.init();
+
+ try {
+ const page = stagehand.context.pages()[0];
+
+ // Create a computer use agent
+ const agent = stagehand.agent({
+ cua: true,
+ model: {
+ modelName: "anthropic/claude-sonnet-4-5-20250929",
+ apiKey: process.env.ANTHROPIC_API_KEY,
+ },
+ systemPrompt: `You are a helpful assistant that can use a web browser.
+ You are currently on the following page: ${page.url()}.
+ Do not ask follow up questions, the user will trust your judgement. Today's date is ${new Date().toLocaleDateString()}.`,
+ tools: {
+ getWeather, // Pass the tools to the agent
+ },
+ });
+
+ // const agent = stagehand.agent({
+ // systemPrompt: `You are a helpful assistant that can use a web browser.
+ // You are currently on the following page: ${page.url()}.
+ // Do not ask follow up questions, the user will trust your judgement. Today's date is ${new Date().toLocaleDateString()}.`,
+ // // Pass the tools to the agent
+ // tools: {
+ // getWeather: getWeather,
+ // },
+ // });
+
+ // Navigate to the Browserbase careers page
+ await page.goto("https://www.google.com");
+
+ // Define the instruction for the CUA
+ const instruction = "What's the weather in San Francisco?";
+ console.log(`Instruction: ${chalk.white(instruction)}`);
+
+ // Execute the instruction
+ const result = await agent.execute({
+ instruction,
+ maxSteps: 20,
+ });
+
+ console.log(`${chalk.green("✓")} Execution complete`);
+ console.log(`${chalk.yellow("⤷")} Result:`);
+ console.log(chalk.white(JSON.stringify(result, null, 2)));
+ } catch (error) {
+ console.log(`${chalk.red("✗")} Error: ${error}`);
+ if (error instanceof Error && error.stack) {
+ console.log(chalk.dim(error.stack.split("\n").slice(1).join("\n")));
+ }
+ } finally {
+ // Close the browser
+ await stagehand.close();
+ }
+}
+
+main().catch((error) => {
+ console.log(`${chalk.red("✗")} Unhandled error in main function`);
+ console.log(chalk.red(error));
+});
diff --git a/packages/core/examples/custom_client_aisdk.ts b/packages/core/examples/custom_client_aisdk.ts
index 18cb76a46..7d7708574 100644
--- a/packages/core/examples/custom_client_aisdk.ts
+++ b/packages/core/examples/custom_client_aisdk.ts
@@ -7,7 +7,7 @@
*/
import { Stagehand } from "../lib/v3";
import { AISdkClient } from "./external_clients/aisdk";
-import { z } from "zod/v3";
+import { z } from "zod";
import { openai } from "@ai-sdk/openai";
async function example() {
diff --git a/packages/core/examples/custom_client_langchain.ts b/packages/core/examples/custom_client_langchain.ts
index f15d0beb2..3f1f1c62f 100644
--- a/packages/core/examples/custom_client_langchain.ts
+++ b/packages/core/examples/custom_client_langchain.ts
@@ -3,15 +3,17 @@
*
* You will need to reference the Langchain Client in /external_clients/langchain.ts
*/
-import { z } from "zod/v3";
+import { z } from "zod";
import { Stagehand } from "../lib/v3";
import { LangchainClient } from "./external_clients/langchain";
import { ChatOpenAI } from "@langchain/openai";
async function example() {
+ // @ts-expect-error Type instantiation is excessively deep and possibly infinite
const stagehand = new Stagehand({
env: "BROWSERBASE",
verbose: 1,
+ // @ts-expect-error Type instantiation is excessively deep and possibly infinite
llmClient: new LangchainClient(
new ChatOpenAI({
model: "gpt-4o",
diff --git a/packages/core/examples/custom_client_openai.ts b/packages/core/examples/custom_client_openai.ts
index 499d7db67..e92c4c4ba 100644
--- a/packages/core/examples/custom_client_openai.ts
+++ b/packages/core/examples/custom_client_openai.ts
@@ -6,7 +6,7 @@
* You will need to reference the Custom OpenAI Client in /external_clients/customOpenAI.ts
*/
import { Stagehand } from "../lib/v3";
-import { z } from "zod/v3";
+import { z } from "zod";
import { CustomOpenAIClient } from "./external_clients/customOpenAI";
import OpenAI from "openai";
diff --git a/packages/core/examples/external_clients/aisdk.ts b/packages/core/examples/external_clients/aisdk.ts
index 67657a16e..97c7bf5c0 100644
--- a/packages/core/examples/external_clients/aisdk.ts
+++ b/packages/core/examples/external_clients/aisdk.ts
@@ -13,8 +13,8 @@ import type { LanguageModelV2 } from "@ai-sdk/provider";
import {
CreateChatCompletionOptions,
LLMClient,
- AvailableModel,
-} from "../../lib/v3";
+} from "../../lib/v3/llm/LLMClient";
+import { AvailableModel } from "../../lib/v3/types/public";
import { ChatCompletion } from "openai/resources";
export class AISdkClient extends LLMClient {
diff --git a/packages/core/examples/external_clients/customOpenAI.ts b/packages/core/examples/external_clients/customOpenAI.ts
index d43f37cc4..40510ecca 100644
--- a/packages/core/examples/external_clients/customOpenAI.ts
+++ b/packages/core/examples/external_clients/customOpenAI.ts
@@ -22,7 +22,7 @@ import type {
ChatCompletionSystemMessageParam,
ChatCompletionUserMessageParam,
} from "openai/resources/chat/completions";
-import { z } from "zod/v3";
+import { z } from "zod";
import { CreateChatCompletionResponseError } from "../../lib/v3";
function validateZodSchema(schema: z.ZodTypeAny, data: unknown) {
diff --git a/packages/core/examples/external_clients/langchain.ts b/packages/core/examples/external_clients/langchain.ts
index 8bb6b9566..7950fd9af 100644
--- a/packages/core/examples/external_clients/langchain.ts
+++ b/packages/core/examples/external_clients/langchain.ts
@@ -4,7 +4,7 @@ import {
LLMClient,
AvailableModel,
} from "../../lib/v3";
-import { zodToJsonSchema } from "zod-to-json-schema";
+import { z } from "zod";
import {
AIMessage,
BaseMessageLike,
@@ -60,9 +60,8 @@ export class LangchainClient extends LLMClient {
);
if (options.response_model) {
- const responseSchema = zodToJsonSchema(options.response_model.schema, {
- $refStrategy: "none",
- });
+ //ref string no longer needed, this is now default behavior
+ const responseSchema = z.toJSONSchema(options.response_model.schema);
const structuredModel = this.model.withStructuredOutput(responseSchema);
const response = await structuredModel.invoke(formattedMessages);
diff --git a/packages/core/examples/parameterizeApiKey.ts b/packages/core/examples/parameterizeApiKey.ts
index afdeedec3..5da677321 100644
--- a/packages/core/examples/parameterizeApiKey.ts
+++ b/packages/core/examples/parameterizeApiKey.ts
@@ -1,5 +1,5 @@
import { Stagehand } from "../lib/v3";
-import { z } from "zod/v3";
+import { z } from "zod";
/**
* This example shows how to parameterize the API key for the LLM provider.
diff --git a/packages/core/examples/v3/patchright.ts b/packages/core/examples/v3/patchright.ts
index 1b901b2bd..023cc726c 100644
--- a/packages/core/examples/v3/patchright.ts
+++ b/packages/core/examples/v3/patchright.ts
@@ -1,6 +1,6 @@
import { Stagehand } from "../../lib/v3";
import { chromium } from "patchright-core";
-import { z } from "zod/v3";
+import { z } from "zod";
async function example(stagehand: Stagehand) {
const browser = await chromium.connectOverCDP({
diff --git a/packages/core/examples/v3/playwright.ts b/packages/core/examples/v3/playwright.ts
index ea3ab5af7..dce44dc99 100644
--- a/packages/core/examples/v3/playwright.ts
+++ b/packages/core/examples/v3/playwright.ts
@@ -1,6 +1,6 @@
import { Stagehand } from "../../lib/v3";
import { chromium } from "playwright-core";
-import { z } from "zod/v3";
+import { z } from "zod";
async function example(stagehand: Stagehand) {
const browser = await chromium.connectOverCDP({
diff --git a/packages/core/examples/v3/targetedExtract.ts b/packages/core/examples/v3/targetedExtract.ts
index cf6b6a4f8..9e903ca35 100644
--- a/packages/core/examples/v3/targetedExtract.ts
+++ b/packages/core/examples/v3/targetedExtract.ts
@@ -1,5 +1,5 @@
import { Stagehand } from "../../lib/v3";
-import { z } from "zod/v3";
+import { z } from "zod";
async function example(stagehand: Stagehand) {
const page = stagehand.context.pages()[0];
@@ -32,4 +32,4 @@ async function example(stagehand: Stagehand) {
});
await stagehand.init();
await example(stagehand);
-})();
+})();
\ No newline at end of file
diff --git a/packages/core/examples/v3_example.ts b/packages/core/examples/v3_example.ts
index 9304e1b5a..a30f30e9d 100644
--- a/packages/core/examples/v3_example.ts
+++ b/packages/core/examples/v3_example.ts
@@ -1,5 +1,5 @@
import { V3 } from "../lib/v3";
-import { z } from "zod/v3";
+import { z } from "zod";
async function example(v3: V3) {
const page = v3.context.pages()[0];
diff --git a/packages/core/lib/inference.ts b/packages/core/lib/inference.ts
index 86163d8a1..538b2f19a 100644
--- a/packages/core/lib/inference.ts
+++ b/packages/core/lib/inference.ts
@@ -1,4 +1,4 @@
-import { z } from "zod/v3";
+import { z } from "zod";
import { LogLine } from "./v3/types/public/logs";
import { ChatMessage, LLMClient } from "./v3/llm/LLMClient";
import {
@@ -12,20 +12,8 @@ import {
} from "./prompt";
import { appendSummary, writeTimestampedTxtFile } from "./inferenceLogUtils";
-/** Simple usage shape if your LLM returns usage tokens. */
-interface LLMUsage {
- prompt_tokens: number;
- completion_tokens: number;
- total_tokens: number;
-}
-
-/**
- * For calls that use a schema: the LLMClient may return { data: T; usage?: LLMUsage }
- */
-export interface LLMParsedResponse {
- data: T;
- usage?: LLMUsage;
-}
+// Re-export for backward compatibility
+export type { LLMParsedResponse } from "./v3/llm/LLMClient";
export async function extract({
instruction,
@@ -101,8 +89,7 @@ export async function extract({
});
const extractEndTime = Date.now();
- const { data: extractedData, usage: extractUsage } =
- extractionResponse as LLMParsedResponse;
+ const { data: extractedData, usage: extractUsage } = extractionResponse;
let extractResponseFile = "";
if (logInferenceToFile) {
@@ -171,7 +158,7 @@ export async function extract({
progress: metadataResponseProgress,
},
usage: metadataResponseUsage,
- } = metadataResponse as LLMParsedResponse;
+ } = metadataResponse;
let metadataResponseFile = "";
if (logInferenceToFile) {
@@ -308,8 +295,7 @@ export async function observe({
const end = Date.now();
const usageTimeMs = end - start;
- const { data: observeData, usage: observeUsage } =
- rawResponse as LLMParsedResponse;
+ const { data: observeData, usage: observeUsage } = rawResponse;
const promptTokens = observeUsage?.prompt_tokens ?? 0;
const completionTokens = observeUsage?.completion_tokens ?? 0;
@@ -436,8 +422,7 @@ export async function act({
const end = Date.now();
const usageTimeMs = end - start;
- const { data: actData, usage: actUsage } =
- rawResponse as LLMParsedResponse;
+ const { data: actData, usage: actUsage } = rawResponse;
const promptTokens = actUsage?.prompt_tokens ?? 0;
const completionTokens = actUsage?.completion_tokens ?? 0;
diff --git a/packages/core/lib/utils.ts b/packages/core/lib/utils.ts
index 476d99bf3..b37776016 100644
--- a/packages/core/lib/utils.ts
+++ b/packages/core/lib/utils.ts
@@ -1,12 +1,37 @@
import { ZodSchemaValidationError } from "./v3/types/public/sdkErrors";
import { Schema, Type } from "@google/genai";
-import { ZodFirstPartyTypeKind as Kind, z, ZodTypeAny } from "zod/v3";
+import { z, ZodTypeAny } from "zod";
import { LogLine } from "./v3/types/public/logs";
import { ModelProvider } from "./v3/types/public/model";
import { ZodPathSegments } from "./v3/types/private/internal";
+/**
+ * Zod 4 Internal Types
+ *
+ * We import these from zod/v4/core to access the internal structure of Zod schemas.
+ * Note: zod/v4/core uses `$ZodType` while the main zod module uses `z.ZodTypeAny`.
+ * These are functionally identical at runtime but TypeScript sees them as incompatible types.
+ * Therefore, when extracting properties from these internals (e.g., `def.element`, `def.innerType`),
+ * we must cast them to `z.ZodTypeAny` to work with the public Zod API.
+ */
+import type {
+ $ZodArrayInternals,
+ $ZodObjectInternals,
+ $ZodStringInternals,
+ $ZodUnionInternals,
+ $ZodIntersectionInternals,
+ $ZodOptionalInternals,
+ $ZodNullableInternals,
+ $ZodPipeInternals,
+ $ZodEnumInternals,
+ $ZodLiteralInternals,
+} from "zod/v4/core";
+
const ID_PATTERN = /^\d+-\d+$/;
+// Helper type for accessing Zod 4 internals
+type ZodWithInternals = z.ZodTypeAny & { _zod: T };
+
export function validateZodSchema(schema: z.ZodTypeAny, data: unknown) {
const result = schema.safeParse(data);
@@ -48,31 +73,30 @@ function decorateGeminiSchema(
export function toGeminiSchema(zodSchema: z.ZodTypeAny): Schema {
const zodType = getZodType(zodSchema);
-
switch (zodType) {
- case "ZodArray": {
+ case "array": {
+ const arraySchema = zodSchema as ZodWithInternals<$ZodArrayInternals>;
+ const element = arraySchema._zod.def.element as z.ZodTypeAny;
return decorateGeminiSchema(
{
type: Type.ARRAY,
- items: toGeminiSchema(
- (zodSchema as z.ZodArray).element,
- ),
+ items: toGeminiSchema(element ?? z.any()),
},
zodSchema,
);
}
- case "ZodObject": {
+ case "object": {
const properties: Record = {};
const required: string[] = [];
- Object.entries((zodSchema as z.ZodObject).shape).forEach(
- ([key, value]: [string, z.ZodTypeAny]) => {
- properties[key] = toGeminiSchema(value);
- if (getZodType(value) !== "ZodOptional") {
- required.push(key);
- }
- },
- );
+ const objectSchema = zodSchema as ZodWithInternals<$ZodObjectInternals>;
+ const shape = objectSchema._zod.def.shape;
+ Object.entries(shape).forEach(([key, value]: [string, z.ZodTypeAny]) => {
+ properties[key] = toGeminiSchema(value);
+ if (getZodType(value) !== "optional") {
+ required.push(key);
+ }
+ });
return decorateGeminiSchema(
{
@@ -83,39 +107,47 @@ export function toGeminiSchema(zodSchema: z.ZodTypeAny): Schema {
zodSchema,
);
}
- case "ZodString":
+ case "string":
+ case "url":
return decorateGeminiSchema(
{
type: Type.STRING,
},
zodSchema,
);
- case "ZodNumber":
+ case "number":
return decorateGeminiSchema(
{
type: Type.NUMBER,
},
zodSchema,
);
- case "ZodBoolean":
+ case "boolean":
return decorateGeminiSchema(
{
type: Type.BOOLEAN,
},
zodSchema,
);
- case "ZodEnum":
+ case "enum": {
+ const enumSchema = zodSchema as ZodWithInternals<$ZodEnumInternals>;
+ const values = Object.values(enumSchema._zod.def.entries);
return decorateGeminiSchema(
{
type: Type.STRING,
- enum: zodSchema._def.values,
+ enum: values as string[],
},
zodSchema,
);
- case "ZodDefault":
- case "ZodNullable":
- case "ZodOptional": {
- const innerSchema = toGeminiSchema(zodSchema._def.innerType);
+ }
+ case "default":
+ case "nullable":
+ case "optional": {
+ const wrapperSchema = zodSchema as ZodWithInternals<
+ $ZodOptionalInternals | $ZodNullableInternals
+ >;
+ const innerType = wrapperSchema._zod.def.innerType as z.ZodTypeAny;
+ const innerSchema = toGeminiSchema(innerType);
return decorateGeminiSchema(
{
...innerSchema,
@@ -124,14 +156,23 @@ export function toGeminiSchema(zodSchema: z.ZodTypeAny): Schema {
zodSchema,
);
}
- case "ZodLiteral":
+ case "literal": {
+ const literalSchema = zodSchema as ZodWithInternals<$ZodLiteralInternals>;
+ const values = literalSchema._zod.def.values;
return decorateGeminiSchema(
{
type: Type.STRING,
- enum: [zodSchema._def.value],
+ enum: values as string[],
},
zodSchema,
);
+ }
+ case "pipe": {
+ const pipeSchema = zodSchema as ZodWithInternals<$ZodPipeInternals>;
+ const inSchema = pipeSchema._zod.def.in as z.ZodTypeAny;
+ return toGeminiSchema(inSchema);
+ }
+ // Standalone transforms and any unknown types fall through to default
default:
return decorateGeminiSchema(
{
@@ -145,7 +186,18 @@ export function toGeminiSchema(zodSchema: z.ZodTypeAny): Schema {
// Helper function to check the type of Zod schema
export function getZodType(schema: z.ZodTypeAny): string {
- return schema._def.typeName;
+ // In Zod 4, the type is accessed via _zod.def.type
+ const schemaWithDef = schema as unknown as {
+ _zod?: { def?: { type?: string } };
+ };
+
+ if (schemaWithDef._zod?.def?.type) {
+ return schemaWithDef._zod.def.type;
+ }
+
+ throw new Error(
+ `Unable to determine Zod schema type. Schema: ${JSON.stringify(schema)}`,
+ );
}
/**
@@ -165,22 +217,35 @@ export function transformSchema(
schema: z.ZodTypeAny,
currentPath: Array,
): [z.ZodTypeAny, ZodPathSegments[]] {
- // 1) If it's a string with .url(), convert to z.number()
- if (isKind(schema, Kind.ZodString)) {
+ // 1) If it's a URL type (z.url() in Zod 4), convert to ID string pattern
+ if (isKind(schema, "url")) {
+ const transformed = makeIdStringSchema(schema as z.ZodString);
+ return [transformed, [{ segments: [] }]];
+ }
+
+ // 2) If it's a string with .url() check, convert to ID string pattern
+ if (isKind(schema, "string")) {
+ const stringSchema = schema as ZodWithInternals<
+ $ZodStringInternals
+ >;
+ const checks = stringSchema._zod.def.checks;
+ const format = stringSchema._zod.bag?.format;
const hasUrlCheck =
- schema._def.checks?.some(
- (check: { kind: string }) => check.kind === "url",
- ) ?? false;
+ (checks?.some((check) => check._zod?.def?.check === "url") ?? false) ||
+ format === "url";
if (hasUrlCheck) {
return [makeIdStringSchema(schema as z.ZodString), [{ segments: [] }]];
}
return [schema, []];
}
- // 2) If it's an object, transform each field
- if (isKind(schema, Kind.ZodObject)) {
- // The shape is a raw object containing fields keyed by string (no symbols):
- const shape = schema._def.shape() as Record;
+ // 3) If it's an object, transform each field
+ if (isKind(schema, "object")) {
+ const objectSchema = schema as ZodWithInternals<$ZodObjectInternals>;
+ const shape = objectSchema._zod.def.shape as Record;
+ if (!shape) {
+ return [schema, []];
+ }
const newShape: Record = {};
const urlPaths: ZodPathSegments[] = [];
let changed = false;
@@ -207,14 +272,19 @@ export function transformSchema(
}
if (changed) {
- return [z.object(newShape), urlPaths];
+ const newSchema = z.object(newShape);
+ return [newSchema, urlPaths];
}
return [schema, urlPaths];
}
- // 3) If it's an array, transform its item type
- if (isKind(schema, Kind.ZodArray)) {
- const itemType = schema._def.type as z.ZodTypeAny;
+ // 4) If it's an array, transform its item type
+ if (isKind(schema, "array")) {
+ const arraySchema = schema as ZodWithInternals<$ZodArrayInternals>;
+ const itemType = arraySchema._zod.def.element as z.ZodTypeAny;
+ if (!itemType) {
+ return [schema, []];
+ }
const [transformedItem, childPaths] = transformSchema(itemType, [
...currentPath,
"*",
@@ -225,15 +295,19 @@ export function transformSchema(
}));
if (changed) {
- return [z.array(transformedItem), arrayPaths];
+ const newSchema = z.array(transformedItem);
+ return [newSchema, arrayPaths];
}
return [schema, arrayPaths];
}
- // 4) If it's a union, transform each option
- if (isKind(schema, Kind.ZodUnion)) {
- // Cast the union’s options to an array of ZodTypeAny
- const unionOptions = schema._def.options as z.ZodTypeAny[];
+ // 5) If it's a union, transform each option
+ if (isKind(schema, "union")) {
+ const unionSchema = schema as ZodWithInternals<$ZodUnionInternals>;
+ const unionOptions = unionSchema._zod.def.options;
+ if (!unionOptions || unionOptions.length === 0) {
+ return [schema, []];
+ }
const newOptions: z.ZodTypeAny[] = [];
let changed = false;
let allPaths: ZodPathSegments[] = [];
@@ -260,10 +334,15 @@ export function transformSchema(
return [schema, allPaths];
}
- // 5) If it's an intersection, transform left and right
- if (isKind(schema, Kind.ZodIntersection)) {
- const leftType = schema._def.left as z.ZodTypeAny;
- const rightType = schema._def.right as z.ZodTypeAny;
+ // 6) If it's an intersection, transform left and right
+ if (isKind(schema, "intersection")) {
+ const intersectionSchema =
+ schema as ZodWithInternals<$ZodIntersectionInternals>;
+ const leftType = intersectionSchema._zod.def.left as z.ZodTypeAny;
+ const rightType = intersectionSchema._zod.def.right as z.ZodTypeAny;
+ if (!leftType || !rightType) {
+ return [schema, []];
+ }
const [left, leftPaths] = transformSchema(leftType, [
...currentPath,
@@ -281,9 +360,13 @@ export function transformSchema(
return [schema, allPaths];
}
- // 6) If it's optional, transform inner
- if (isKind(schema, Kind.ZodOptional)) {
- const innerType = schema._def.innerType as z.ZodTypeAny;
+ // 7) If it's optional, transform inner
+ if (isKind(schema, "optional")) {
+ const optionalSchema = schema as ZodWithInternals<$ZodOptionalInternals>;
+ const innerType = optionalSchema._zod.def.innerType as z.ZodTypeAny;
+ if (!innerType) {
+ return [schema, []];
+ }
const [inner, innerPaths] = transformSchema(innerType, currentPath);
if (inner !== innerType) {
return [z.optional(inner), innerPaths];
@@ -291,9 +374,13 @@ export function transformSchema(
return [schema, innerPaths];
}
- // 7) If it's nullable, transform inner
- if (isKind(schema, Kind.ZodNullable)) {
- const innerType = schema._def.innerType as z.ZodTypeAny;
+ // 8) If it's nullable, transform inner
+ if (isKind(schema, "nullable")) {
+ const nullableSchema = schema as ZodWithInternals<$ZodNullableInternals>;
+ const innerType = nullableSchema._zod.def.innerType as z.ZodTypeAny;
+ if (!innerType) {
+ return [schema, []];
+ }
const [inner, innerPaths] = transformSchema(innerType, currentPath);
if (inner !== innerType) {
return [z.nullable(inner), innerPaths];
@@ -301,17 +388,28 @@ export function transformSchema(
return [schema, innerPaths];
}
- // 8) If it's an effect, transform base schema
- if (isKind(schema, Kind.ZodEffects)) {
- const baseSchema = schema._def.schema as z.ZodTypeAny;
- const [newBaseSchema, basePaths] = transformSchema(baseSchema, currentPath);
- if (newBaseSchema !== baseSchema) {
- return [z.effect(newBaseSchema, schema._def.effect), basePaths];
+ // 9) If it's a pipe (which is what .transform() creates in Zod 4)
+ if (isKind(schema, "pipe")) {
+ const pipeSchema = schema as ZodWithInternals<$ZodPipeInternals>;
+ const inSchema = pipeSchema._zod.def.in as z.ZodTypeAny;
+ const outSchema = pipeSchema._zod.def.out as z.ZodTypeAny;
+ if (!inSchema || !outSchema) {
+ return [schema, []];
}
- return [schema, basePaths];
- }
- // 9) If none of the above, return as-is
+ const [newIn, inPaths] = transformSchema(inSchema, currentPath);
+ const [newOut, outPaths] = transformSchema(outSchema, currentPath);
+ const allPaths = [...inPaths, ...outPaths];
+
+ const changed = newIn !== inSchema || newOut !== outSchema;
+ if (changed) {
+ // Reconstruct the pipe with transformed schemas
+ // In Zod 4, we use z.pipe() to create pipes
+ const result = z.pipe(newIn as never, newOut as never) as z.ZodTypeAny;
+ return [result, allPaths];
+ }
+ return [schema, allPaths];
+ }
return [schema, []];
}
@@ -368,17 +466,18 @@ export function injectUrls(
}
}
-function isKind(s: z.ZodTypeAny, kind: Kind): boolean {
- return (s as z.ZodTypeAny)._def.typeName === kind;
+// Helper to check if a schema is of a specific type
+function isKind(s: z.ZodTypeAny, kind: string): boolean {
+ try {
+ return getZodType(s) === kind;
+ } catch {
+ return false;
+ }
}
function makeIdStringSchema(orig: z.ZodString): z.ZodString {
const userDesc =
- // Zod ≥3.23 exposes .description directly; fall back to _def for older minor versions
- (orig as unknown as { description?: string }).description ??
- (orig as unknown as { _def?: { description?: string } })._def
- ?.description ??
- "";
+ (orig as unknown as { description?: string }).description ?? "";
const base =
"This field must be the element-ID in the form 'frameId-backendId' " +
diff --git a/packages/core/lib/v3/agent/AnthropicCUAClient.ts b/packages/core/lib/v3/agent/AnthropicCUAClient.ts
index d30905e03..76d0caaf9 100644
--- a/packages/core/lib/v3/agent/AnthropicCUAClient.ts
+++ b/packages/core/lib/v3/agent/AnthropicCUAClient.ts
@@ -13,8 +13,7 @@ import { LogLine } from "../types/public/logs";
import { AgentScreenshotProviderError } from "../types/public/sdkErrors";
import Anthropic from "@anthropic-ai/sdk";
import { ToolSet } from "ai";
-import { zodToJsonSchema } from "zod-to-json-schema";
-import { z } from "zod/v3";
+import { z } from "zod";
import { AgentClient } from "./AgentClient";
import { mapKeyToPlaywright } from "./utils/cuaKeyMapping";
import { compressConversationImages } from "./utils/imageCompression";
@@ -444,7 +443,7 @@ export class AnthropicCUAClient extends AgentClient {
if (this.tools && Object.keys(this.tools).length > 0) {
const customTools = Object.entries(this.tools).map(([name, tool]) => {
// Convert Zod schema to proper JSON schema format for Anthropic
- const jsonSchema = zodToJsonSchema(tool.inputSchema as z.ZodType) as {
+ const jsonSchema = z.toJSONSchema(tool.inputSchema as z.ZodType) as {
properties?: Record;
required?: string[];
};
diff --git a/packages/core/lib/v3/agent/tools/v3-act.ts b/packages/core/lib/v3/agent/tools/v3-act.ts
index ab66d279a..d05f84239 100644
--- a/packages/core/lib/v3/agent/tools/v3-act.ts
+++ b/packages/core/lib/v3/agent/tools/v3-act.ts
@@ -1,5 +1,5 @@
import { tool } from "ai";
-import { z } from "zod/v3";
+import { z } from "zod";
import type { V3 } from "../../v3";
import type { Action } from "../../types/public/methods";
diff --git a/packages/core/lib/v3/agent/tools/v3-ariaTree.ts b/packages/core/lib/v3/agent/tools/v3-ariaTree.ts
index 252a23eda..82c883ae8 100644
--- a/packages/core/lib/v3/agent/tools/v3-ariaTree.ts
+++ b/packages/core/lib/v3/agent/tools/v3-ariaTree.ts
@@ -1,5 +1,5 @@
import { tool } from "ai";
-import { z } from "zod/v3";
+import { z } from "zod";
import type { V3 } from "../../v3";
export const createAriaTreeTool = (v3: V3) =>
diff --git a/packages/core/lib/v3/agent/tools/v3-close.ts b/packages/core/lib/v3/agent/tools/v3-close.ts
index 4f492787c..258d92724 100644
--- a/packages/core/lib/v3/agent/tools/v3-close.ts
+++ b/packages/core/lib/v3/agent/tools/v3-close.ts
@@ -1,5 +1,5 @@
import { tool } from "ai";
-import { z } from "zod/v3";
+import { z } from "zod";
export const createCloseTool = () =>
tool({
diff --git a/packages/core/lib/v3/agent/tools/v3-extract.ts b/packages/core/lib/v3/agent/tools/v3-extract.ts
index 3106a0989..c2d38830c 100644
--- a/packages/core/lib/v3/agent/tools/v3-extract.ts
+++ b/packages/core/lib/v3/agent/tools/v3-extract.ts
@@ -1,5 +1,5 @@
import { tool } from "ai";
-import { z } from "zod/v3";
+import { z } from "zod";
import type { V3 } from "../../v3";
import type { LogLine } from "../../types/public/logs";
diff --git a/packages/core/lib/v3/agent/tools/v3-fillform.ts b/packages/core/lib/v3/agent/tools/v3-fillform.ts
index 8059f40fe..5be1e13be 100644
--- a/packages/core/lib/v3/agent/tools/v3-fillform.ts
+++ b/packages/core/lib/v3/agent/tools/v3-fillform.ts
@@ -1,5 +1,5 @@
import { tool } from "ai";
-import { z } from "zod/v3";
+import { z } from "zod";
import type { V3 } from "../../v3";
import type { Action } from "../../types/public/methods";
diff --git a/packages/core/lib/v3/agent/tools/v3-goto.ts b/packages/core/lib/v3/agent/tools/v3-goto.ts
index 45dcf49b5..3093977e1 100644
--- a/packages/core/lib/v3/agent/tools/v3-goto.ts
+++ b/packages/core/lib/v3/agent/tools/v3-goto.ts
@@ -1,5 +1,5 @@
import { tool } from "ai";
-import { z } from "zod/v3";
+import { z } from "zod";
import type { V3 } from "../../v3";
export const createGotoTool = (v3: V3) =>
diff --git a/packages/core/lib/v3/agent/tools/v3-navback.ts b/packages/core/lib/v3/agent/tools/v3-navback.ts
index 3b9e3b105..2d9abba45 100644
--- a/packages/core/lib/v3/agent/tools/v3-navback.ts
+++ b/packages/core/lib/v3/agent/tools/v3-navback.ts
@@ -1,5 +1,5 @@
import { tool } from "ai";
-import { z } from "zod/v3";
+import { z } from "zod";
import type { V3 } from "../../v3";
export const createNavBackTool = (v3: V3) =>
diff --git a/packages/core/lib/v3/agent/tools/v3-screenshot.ts b/packages/core/lib/v3/agent/tools/v3-screenshot.ts
index 3ebcca546..1ef81cf90 100644
--- a/packages/core/lib/v3/agent/tools/v3-screenshot.ts
+++ b/packages/core/lib/v3/agent/tools/v3-screenshot.ts
@@ -1,5 +1,5 @@
import { tool } from "ai";
-import { z } from "zod/v3";
+import { z } from "zod";
import type { V3 } from "../../v3";
export const createScreenshotTool = (v3: V3) =>
diff --git a/packages/core/lib/v3/agent/tools/v3-scroll.ts b/packages/core/lib/v3/agent/tools/v3-scroll.ts
index 311a4ed75..65229b495 100644
--- a/packages/core/lib/v3/agent/tools/v3-scroll.ts
+++ b/packages/core/lib/v3/agent/tools/v3-scroll.ts
@@ -1,5 +1,5 @@
import { tool } from "ai";
-import { z } from "zod/v3";
+import { z } from "zod";
import type { V3 } from "../../v3";
export const createScrollTool = (v3: V3) =>
diff --git a/packages/core/lib/v3/agent/tools/v3-wait.ts b/packages/core/lib/v3/agent/tools/v3-wait.ts
index 2d6de2f63..567ad8ead 100644
--- a/packages/core/lib/v3/agent/tools/v3-wait.ts
+++ b/packages/core/lib/v3/agent/tools/v3-wait.ts
@@ -1,5 +1,5 @@
import { tool } from "ai";
-import { z } from "zod/v3";
+import { z } from "zod";
import type { V3 } from "../../v3";
export const createWaitTool = (v3: V3) =>
diff --git a/packages/core/lib/v3/agent/utils/googleCustomToolHandler.ts b/packages/core/lib/v3/agent/utils/googleCustomToolHandler.ts
index 3343c775b..9cf709e55 100644
--- a/packages/core/lib/v3/agent/utils/googleCustomToolHandler.ts
+++ b/packages/core/lib/v3/agent/utils/googleCustomToolHandler.ts
@@ -1,8 +1,7 @@
import { Part, FunctionCall, FunctionDeclaration, Type } from "@google/genai";
import { ToolSet } from "ai";
import { LogLine } from "../../types/public/logs";
-import { zodToJsonSchema } from "zod-to-json-schema";
-import { z } from "zod/v3";
+import { z } from "zod";
/**
* Result of executing a custom tool for Google CUA
@@ -122,7 +121,7 @@ function convertToolToFunctionDeclaration(
): FunctionDeclaration | null {
try {
// Convert Zod schema to JSON schema
- const jsonSchema = zodToJsonSchema(tool.inputSchema as z.ZodType) as {
+ const jsonSchema = z.toJSONSchema(tool.inputSchema as z.ZodType) as {
properties?: Record;
required?: string[];
type?: string;
diff --git a/packages/core/lib/v3/api.ts b/packages/core/lib/v3/api.ts
index c38629e91..fca9ab21b 100644
--- a/packages/core/lib/v3/api.ts
+++ b/packages/core/lib/v3/api.ts
@@ -1,6 +1,5 @@
import makeFetchCookie from "fetch-cookie";
-import zodToJsonSchema from "zod-to-json-schema";
-import z from "zod/v3";
+import { z } from "zod";
import { Action } from "./types/public";
import { STAGEHAND_VERSION } from "../version";
import {
@@ -132,13 +131,13 @@ export class StagehandAPIClient {
});
}
- async extract({
+ async extract({
instruction,
schema: zodSchema,
options,
frameId,
}: APIExtractParameters): Promise> {
- const jsonSchema = zodSchema ? zodToJsonSchema(zodSchema) : undefined;
+ const jsonSchema = zodSchema ? z.toJSONSchema(zodSchema) : undefined;
const args: Record = {
schema: jsonSchema,
diff --git a/packages/core/lib/v3/handlers/extractHandler.ts b/packages/core/lib/v3/handlers/extractHandler.ts
index c686470a2..1794d08c3 100644
--- a/packages/core/lib/v3/handlers/extractHandler.ts
+++ b/packages/core/lib/v3/handlers/extractHandler.ts
@@ -4,7 +4,7 @@ import { injectUrls, transformSchema } from "../../utils";
import { v3Logger } from "../logger";
import { V3FunctionName } from "../types/public/methods";
import { captureHybridSnapshot } from "../understudy/a11y/snapshot";
-import { z, ZodTypeAny } from "zod/v3";
+import { z, ZodTypeAny } from "zod";
import { LLMClient } from "../llm/LLMClient";
import { ExtractHandlerParams } from "../types/private/handlers";
import { EncodedId, ZodPathSegments } from "../types/private/internal";
@@ -39,7 +39,7 @@ interface ExtractionResponseBase {
inference_time_ms: number;
}
-type ExtractionResponse = ExtractionResponseBase &
+type ExtractionResponse = ExtractionResponseBase &
z.infer;
export class ExtractHandler {
diff --git a/packages/core/lib/v3/llm/AnthropicClient.ts b/packages/core/lib/v3/llm/AnthropicClient.ts
index 2a06e8219..ce8a6326e 100644
--- a/packages/core/lib/v3/llm/AnthropicClient.ts
+++ b/packages/core/lib/v3/llm/AnthropicClient.ts
@@ -5,7 +5,7 @@ import {
TextBlockParam,
Tool,
} from "@anthropic-ai/sdk/resources";
-import { zodToJsonSchema } from "zod-to-json-schema";
+import { z } from "zod";
import { LogLine } from "../types/public/logs";
import {
AnthropicJsonSchemaObject,
@@ -145,7 +145,7 @@ export class AnthropicClient extends LLMClient {
let toolDefinition: Tool | undefined;
if (options.response_model) {
- const jsonSchema = zodToJsonSchema(options.response_model.schema);
+ const jsonSchema = z.toJSONSchema(options.response_model.schema);
const { properties: schemaProperties, required: schemaRequired } =
extractSchemaProperties(jsonSchema);
diff --git a/packages/core/lib/v3/llm/CerebrasClient.ts b/packages/core/lib/v3/llm/CerebrasClient.ts
index cfbc56051..ad4d6e6c3 100644
--- a/packages/core/lib/v3/llm/CerebrasClient.ts
+++ b/packages/core/lib/v3/llm/CerebrasClient.ts
@@ -1,6 +1,6 @@
import OpenAI from "openai";
import type { ClientOptions } from "openai";
-import { zodToJsonSchema } from "zod-to-json-schema";
+import { z } from "zod";
import { LogLine } from "../types/public/logs";
import { AvailableModel } from "../types/public/model";
import {
@@ -100,7 +100,7 @@ export class CerebrasClient extends LLMClient {
// Add response model as a tool if provided
if (options.response_model) {
- const jsonSchema = zodToJsonSchema(options.response_model.schema) as {
+ const jsonSchema = z.toJSONSchema(options.response_model.schema) as {
properties?: Record;
required?: string[];
};
diff --git a/packages/core/lib/v3/llm/GroqClient.ts b/packages/core/lib/v3/llm/GroqClient.ts
index af967295e..229e22652 100644
--- a/packages/core/lib/v3/llm/GroqClient.ts
+++ b/packages/core/lib/v3/llm/GroqClient.ts
@@ -1,6 +1,6 @@
import type { ClientOptions } from "openai";
import OpenAI from "openai";
-import { zodToJsonSchema } from "zod-to-json-schema";
+import { z } from "zod";
import { LogLine } from "../types/public/logs";
import { AvailableModel } from "../types/public/model";
import {
@@ -100,7 +100,7 @@ export class GroqClient extends LLMClient {
// Add response model as a tool if provided
if (options.response_model) {
- const jsonSchema = zodToJsonSchema(options.response_model.schema) as {
+ const jsonSchema = z.toJSONSchema(options.response_model.schema) as {
properties?: Record;
required?: string[];
};
diff --git a/packages/core/lib/v3/llm/LLMClient.ts b/packages/core/lib/v3/llm/LLMClient.ts
index a2a317c43..a6b03c5f8 100644
--- a/packages/core/lib/v3/llm/LLMClient.ts
+++ b/packages/core/lib/v3/llm/LLMClient.ts
@@ -11,7 +11,7 @@ import {
streamText,
} from "ai";
import type { LanguageModelV2 } from "@ai-sdk/provider";
-import { ZodType } from "zod/v3";
+import { ZodType } from "zod";
import { LogLine } from "../types/public/logs";
import { AvailableModel, ClientOptions } from "../types/public/model";
@@ -97,6 +97,15 @@ export interface CreateChatCompletionOptions {
retries?: number;
}
+export interface LLMParsedResponse {
+ data: T;
+ usage?: {
+ prompt_tokens: number;
+ completion_tokens: number;
+ total_tokens: number;
+ };
+}
+
export abstract class LLMClient {
public type: "openai" | "anthropic" | "cerebras" | "groq" | (string & {});
public modelName: AvailableModel | (string & {});
@@ -109,11 +118,17 @@ export abstract class LLMClient {
this.userProvidedInstructions = userProvidedInstructions;
}
- abstract createChatCompletion<
- T = LLMResponse & {
- usage?: LLMResponse["usage"];
+ // Overload 1: When response_model is provided, returns LLMParsedResponse
+ abstract createChatCompletion(
+ options: CreateChatCompletionOptions & {
+ options: { response_model: { name: string; schema: ZodType } };
},
- >(options: CreateChatCompletionOptions): Promise;
+ ): Promise>;
+
+ // Overload 2: When response_model is not provided, returns T (defaults to LLMResponse)
+ abstract createChatCompletion(
+ options: CreateChatCompletionOptions,
+ ): Promise;
public generateObject = generateObject;
public generateText = generateText;
diff --git a/packages/core/lib/v3/llm/OpenAIClient.ts b/packages/core/lib/v3/llm/OpenAIClient.ts
index ba1d052cb..cf68c9eb9 100644
--- a/packages/core/lib/v3/llm/OpenAIClient.ts
+++ b/packages/core/lib/v3/llm/OpenAIClient.ts
@@ -9,10 +9,10 @@ import {
ChatCompletionSystemMessageParam,
ChatCompletionUserMessageParam,
} from "openai/resources/chat";
-import zodToJsonSchema from "zod-to-json-schema";
import { LogLine } from "../types/public/logs";
import { AvailableModel } from "../types/public/model";
import { validateZodSchema } from "../../utils";
+import { z } from "zod";
import {
ChatCompletionOptions,
ChatMessage,
@@ -158,7 +158,7 @@ export class OpenAIClient extends LLMClient {
if (this.modelName.startsWith("o1") || this.modelName.startsWith("o3")) {
try {
const parsedSchema = JSON.stringify(
- zodToJsonSchema(options.response_model.schema),
+ z.toJSONSchema(options.response_model.schema),
);
options.messages.push({
role: "user",
diff --git a/packages/core/lib/v3/tests/timeouts.spec.ts b/packages/core/lib/v3/tests/timeouts.spec.ts
index 605904e96..623b11ea2 100644
--- a/packages/core/lib/v3/tests/timeouts.spec.ts
+++ b/packages/core/lib/v3/tests/timeouts.spec.ts
@@ -1,7 +1,7 @@
import { test, expect } from "@playwright/test";
import { V3 } from "../v3";
import { v3DynamicTestConfig } from "./v3.dynamic.config";
-import { z } from "zod/v3";
+import { z } from "zod";
test.describe("V3 hard timeouts", () => {
let v3: V3;
diff --git a/packages/core/lib/v3/tests/v3.dynamic.config.ts b/packages/core/lib/v3/tests/v3.dynamic.config.ts
index 63f267c4b..d3a94b463 100644
--- a/packages/core/lib/v3/tests/v3.dynamic.config.ts
+++ b/packages/core/lib/v3/tests/v3.dynamic.config.ts
@@ -27,6 +27,7 @@ export const v3DynamicTestConfig: V3Options =
env: "BROWSERBASE",
apiKey: process.env.BROWSERBASE_API_KEY!,
projectId: process.env.BROWSERBASE_PROJECT_ID!,
+ disableAPI: true,
}
: {
...baseConfig,
diff --git a/packages/core/lib/v3/types/private/api.ts b/packages/core/lib/v3/types/private/api.ts
index 643ef3fcb..204c9f0f2 100644
--- a/packages/core/lib/v3/types/private/api.ts
+++ b/packages/core/lib/v3/types/private/api.ts
@@ -1,5 +1,5 @@
import Browserbase from "@browserbasehq/sdk";
-import { ZodTypeAny } from "zod/v3";
+import { ZodTypeAny } from "zod";
import {
Action,
ActOptions,
diff --git a/packages/core/lib/v3/types/private/handlers.ts b/packages/core/lib/v3/types/private/handlers.ts
index 72cba746c..33f88a9e4 100644
--- a/packages/core/lib/v3/types/private/handlers.ts
+++ b/packages/core/lib/v3/types/private/handlers.ts
@@ -1,4 +1,4 @@
-import { ZodTypeAny } from "zod/v3";
+import { ZodTypeAny } from "zod";
import { Page } from "../../understudy/page";
import { ModelConfiguration } from "../public/model";
diff --git a/packages/core/lib/v3/types/public/index.ts b/packages/core/lib/v3/types/public/index.ts
index b777969b3..26df3638a 100644
--- a/packages/core/lib/v3/types/public/index.ts
+++ b/packages/core/lib/v3/types/public/index.ts
@@ -7,3 +7,6 @@ export * from "./model";
export * from "./options";
export * from "./page";
export * from "./sdkErrors";
+// Exporting the example AISdkClient for backwards compatibility
+// Note added for revisiting this scaffold for an improved version based on llm/aisdk.ts
+export { AISdkClient } from "../../../../examples/external_clients/aisdk";
diff --git a/packages/core/lib/v3/types/public/methods.ts b/packages/core/lib/v3/types/public/methods.ts
index e91c578fd..a7dad9865 100644
--- a/packages/core/lib/v3/types/public/methods.ts
+++ b/packages/core/lib/v3/types/public/methods.ts
@@ -1,7 +1,7 @@
import { Page as PatchrightPage } from "patchright-core";
import { Page as PlaywrightPage } from "playwright-core";
import { Page as PuppeteerPage } from "puppeteer-core";
-import { z } from "zod/v3";
+import { z } from "zod";
import { Page } from "../../understudy/page";
import { ModelConfiguration } from "../public/model";
@@ -19,7 +19,7 @@ export interface ActResult {
actions: Action[];
}
-export type ExtractResult = z.infer;
+export type ExtractResult = z.infer;
export interface Action {
selector: string;
diff --git a/packages/core/lib/v3/types/public/sdkErrors.ts b/packages/core/lib/v3/types/public/sdkErrors.ts
index a5a3ac127..f67c2f110 100644
--- a/packages/core/lib/v3/types/public/sdkErrors.ts
+++ b/packages/core/lib/v3/types/public/sdkErrors.ts
@@ -1,4 +1,4 @@
-import { ZodError } from "zod/v3";
+import { ZodError } from "zod";
// Avoid .js extension so tsup/esbuild resolves TS source
import { STAGEHAND_VERSION } from "../../../version";
diff --git a/packages/core/lib/v3/understudy/a11y/snapshot.ts b/packages/core/lib/v3/understudy/a11y/snapshot.ts
index eb6013e29..ef9d734bd 100644
--- a/packages/core/lib/v3/understudy/a11y/snapshot.ts
+++ b/packages/core/lib/v3/understudy/a11y/snapshot.ts
@@ -3,6 +3,7 @@ import type { Protocol } from "devtools-protocol";
import type { CDPSessionLike } from "../cdp";
import { Page } from "../page";
import { executionContexts } from "../executionContextRegistry";
+import { v3Logger } from "../../logger";
/**
* a11y/snapshot
@@ -542,6 +543,19 @@ export async function captureHybridSnapshot(
// the full-tree and trimming after.
const requestedFocus = options?.focusSelector?.trim();
if (requestedFocus) {
+ const logScopeFallback = () => {
+ v3Logger({
+ message: `Unable to narrow scope with selector. Falling back to using full DOM`,
+ level: 1,
+ auxiliary: {
+ arguments: {
+ value: `selector: ${options?.focusSelector?.trim()}`,
+ type: "string",
+ },
+ },
+ });
+ };
+
try {
let targetFrameId: string;
let tailSelector: string | undefined;
@@ -586,7 +600,7 @@ export async function captureHybridSnapshot(
/*attemptOwnerLookup=*/ sameSessionAsParent,
);
- const { outline, urlMap } = await a11yForFrame(
+ const { outline, urlMap, scopeApplied } = await a11yForFrame(
owningSess,
targetFrameId,
{
@@ -613,7 +627,7 @@ export async function captureHybridSnapshot(
const combinedUrlMap: Record = { ...urlMap };
- return {
+ const snapshot: HybridSnapshot = {
combinedTree: outline,
combinedXpathMap,
combinedUrlMap,
@@ -626,7 +640,14 @@ export async function captureHybridSnapshot(
},
],
};
+
+ if (scopeApplied) {
+ return snapshot;
+ }
+
+ logScopeFallback();
} catch {
+ logScopeFallback();
// If traversal fails for any reason, fall back to full snapshot below.
}
}
@@ -1274,6 +1295,7 @@ async function a11yForFrame(
): Promise<{
outline: string;
urlMap: Record;
+ scopeApplied: boolean;
}> {
await session.send("Accessibility.enable").catch(() => {});
// Runtime/DOM often already enabled; enable defensively for XPath resolution.
@@ -1311,6 +1333,8 @@ async function a11yForFrame(
urlMap[enc] = url;
}
// If focusSelector provided, filter the AX nodes to the subtree rooted at that selector
+ let scopeApplied = false;
+
const nodesForOutline = await (async () => {
const sel = opts.focusSelector?.trim();
if (!sel) return nodes;
@@ -1328,6 +1352,7 @@ async function a11yForFrame(
if (typeof be !== "number") return nodes;
const target = nodes.find((n) => n.backendDOMNodeId === be);
if (!target) return nodes;
+ scopeApplied = true;
const keep = new Set([target.nodeId]);
const queue: Protocol.Accessibility.AXNode[] = [target];
while (queue.length) {
@@ -1353,7 +1378,7 @@ async function a11yForFrame(
const { tree } = await buildHierarchicalTree(decorated, opts);
const simplified = tree.map((n) => formatTreeLine(n)).join("\n");
- return { outline: simplified.trimEnd(), urlMap };
+ return { outline: simplified.trimEnd(), urlMap, scopeApplied };
}
/** Resolve an XPath to a Runtime remoteObjectId in the given CDP session. */
diff --git a/packages/core/lib/v3/v3.ts b/packages/core/lib/v3/v3.ts
index 72f4932d6..c24f9577f 100644
--- a/packages/core/lib/v3/v3.ts
+++ b/packages/core/lib/v3/v3.ts
@@ -3,8 +3,8 @@ import fs from "fs";
import os from "os";
import path from "path";
import process from "process";
-import type { ZodTypeAny } from "zod/v3";
-import { z } from "zod/v3";
+import type { ZodTypeAny } from "zod";
+import { z } from "zod";
import { loadApiKeyFromEnv } from "../utils";
import { StagehandLogger, LoggerOptions } from "../logger";
import { ActCache } from "./cache/ActCache";
@@ -1363,25 +1363,34 @@ export class V3 {
} {
this.logger({
category: "agent",
- message: "Creating v3 agent instance with options:",
+ message: `Creating v3 agent instance with options: ${JSON.stringify(options)}`,
level: 1,
auxiliary: {
cua: { value: options?.cua ? "true" : "false", type: "boolean" },
- model:
- typeof options?.model === "string"
+ model: options?.model
+ ? typeof options?.model === "string"
? { value: options.model, type: "string" }
- : { value: options.model.modelName, type: "string" },
+ : { value: options.model.modelName, type: "string" }
+ : { value: this.llmClient.modelName, type: "string" },
systemPrompt: { value: options?.systemPrompt ?? "", type: "string" },
tools: { value: JSON.stringify(options?.tools ?? {}), type: "object" },
- integrations: {
- value: JSON.stringify(options?.integrations ?? []),
- type: "object",
- },
+ ...(options?.integrations && {
+ integrations: {
+ value: JSON.stringify(options.integrations),
+ type: "object",
+ },
+ }),
},
});
// If CUA is enabled, use the computer-use agent path
if (options?.cua) {
+ if ((options?.integrations || options?.tools) && !this.experimental) {
+ throw new Error(
+ "MCP integrations and custom tools are experimental. Enable experimental: true in V3 options.",
+ );
+ }
+
const modelToUse = options?.model || {
modelName: this.modelName,
...this.modelClientOptions,
@@ -1499,9 +1508,9 @@ export class V3 {
return {
execute: async (instructionOrOptions: string | AgentExecuteOptions) =>
withInstanceLogContext(this.instanceId, async () => {
- if (options?.integrations && !this.experimental) {
+ if ((options?.integrations || options?.tools) && !this.experimental) {
throw new Error(
- "MCP integrations are experimental. Enable experimental: true in V3 options.",
+ "MCP integrations and custom tools are experimental. Enable experimental: true in V3 options.",
);
}
diff --git a/packages/core/lib/v3Evaluator.ts b/packages/core/lib/v3Evaluator.ts
index 149e09347..c20728ed2 100644
--- a/packages/core/lib/v3Evaluator.ts
+++ b/packages/core/lib/v3Evaluator.ts
@@ -5,7 +5,7 @@
*/
import dotenv from "dotenv";
-import { z } from "zod/v3";
+import { z } from "zod";
import type { AvailableModel, ClientOptions } from "./v3/types/public/model";
import type {
EvaluateOptions,
diff --git a/packages/core/package.json b/packages/core/package.json
index a5d05020d..9212ac0c8 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,6 +1,6 @@
{
"name": "@browserbasehq/stagehand",
- "version": "2.5.2",
+ "version": "3.0.1",
"description": "An AI web browsing framework focused on simplicity and extensibility.",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -38,8 +38,7 @@
"license": "MIT",
"peerDependencies": {
"deepmerge": "^4.3.1",
- "dotenv": "^16.4.5",
- "zod": "3.25.67"
+ "dotenv": "^16.4.5"
},
"dependencies": {
"@ai-sdk/provider": "^2.0.0",
@@ -56,7 +55,7 @@
"pino-pretty": "^13.0.0",
"playwright": "^1.52.0",
"ws": "^8.18.0",
- "zod-to-json-schema": "^3.23.5"
+ "zod": "^4.1.8"
},
"optionalDependencies": {
"@ai-sdk/anthropic": "^2.0.34",
diff --git a/packages/docs/v2/basics/agent.mdx b/packages/docs/v2/basics/agent.mdx
index cb4cc9966..4383fb6f5 100644
--- a/packages/docs/v2/basics/agent.mdx
+++ b/packages/docs/v2/basics/agent.mdx
@@ -46,14 +46,13 @@ await agent.execute("apply for a job at Browserbase")
```
```python Python
-agent = stagehand.agent({
- "provider": "anthropic",
- "model": "claude-sonnet-4-20250514",
- "instructions": "You are a helpful assistant that can use a web browser.",
- "options": {
- "apiKey": os.getenv("ANTHROPIC_API_KEY"),
+agent = stagehand.agent(
+ model="claude-sonnet-4-20250514",
+ instructions="You are a helpful assistant that can use a web browser.",
+ options={
+ "api_key": os.getenv("ANTHROPIC_API_KEY"),
},
-})
+)
await agent.execute("apply for a job at Browserbase")
```
diff --git a/packages/docs/v2/best-practices/contributing.mdx b/packages/docs/v2/best-practices/contributing.mdx
index d7594b864..53e4c7406 100644
--- a/packages/docs/v2/best-practices/contributing.mdx
+++ b/packages/docs/v2/best-practices/contributing.mdx
@@ -44,8 +44,8 @@ Get listed as [one of our beloved contributors](https://github.com/browserbase/s

2. **Provide a reproducible test plan.** Include an eval (preferred) or example. We can’t merge your PR if we can’t run anything that specifically highlights your contribution.
- 1. Write a script in [`evals/tasks`](https://github.com/browserbase/stagehand/tree/main/evals/tasks) as `someTask.ts`
- 2. Add your script to [`evals.config.json`](https://github.com/browserbase/stagehand/blob/main/evals/evals.config.json) with default category `combination` (*or act/extract/observe if you’re* *only* *testing* *act/extract/observe*).
+ 1. Write a script in [`evals/tasks`](https://github.com/browserbase/stagehand/tree/v2/evals/tasks) as `someTask.ts`
+ 2. Add your script to [`evals.config.json`](https://github.com/browserbase/stagehand/blob/v2/evals/evals.config.json) with default category `combination` (*or act/extract/observe if you’re* *only* *testing* *act/extract/observe*).
3. **Add a changeset.** Run `npx changeset` in TS or `uvx changeset` in Python to add a changeset that will directly reflect in the `CHANGELOG` in the upcoming release.
1. `patch` - no net new functionality to an end-user
2. `minor` - some net new functionality to an end-user (new function parameter, new exposed type, etc.)
diff --git a/packages/docs/v2/configuration/evals.mdx b/packages/docs/v2/configuration/evals.mdx
index 90de751bf..71199218d 100644
--- a/packages/docs/v2/configuration/evals.mdx
+++ b/packages/docs/v2/configuration/evals.mdx
@@ -132,7 +132,7 @@ evals run b:osworld -f source=Mind2Web
#### Configuration Files
-You can view the specific evals in [`evals/tasks`](https://github.com/browserbase/stagehand/tree/main/evals/tasks). Each eval is grouped into eval categories based on [`evals/evals.config.json`](https://github.com/browserbase/stagehand/blob/main/evals/evals.config.json).
+You can view the specific evals in [`evals/tasks`](https://github.com/browserbase/stagehand/tree/v2/evals/tasks). Each eval is grouped into eval categories based on [`evals/evals.config.json`](https://github.com/browserbase/stagehand/blob/main/evals/evals.config.json).
#### Viewing eval results
@@ -148,7 +148,7 @@ You can use the Braintrust UI to filter by model/eval and aggregate results acro
To run deterministic evals, you can run `npm run e2e` from within the Stagehand repo. This will test the functionality of Playwright within Stagehand to make sure it's working as expected.
-These tests are in [`evals/deterministic`](https://github.com/browserbase/stagehand/tree/main/evals/deterministic) and test on both Browserbase browsers and local headless Chromium browsers.
+These tests are in [`evals/deterministic`](https://github.com/browserbase/stagehand/tree/v2/evals/deterministic) and test on both Browserbase browsers and local headless Chromium browsers.
## Creating Custom Evaluations
diff --git a/packages/docs/v2/configuration/models.mdx b/packages/docs/v2/configuration/models.mdx
index 5b79d6dba..b2874c336 100644
--- a/packages/docs/v2/configuration/models.mdx
+++ b/packages/docs/v2/configuration/models.mdx
@@ -168,7 +168,7 @@ Vercel AI SDK supports providers for OpenAI, Anthropic, and Google, along with s
To get started, you'll need to install the `ai` package and the provider you want to use. For example, to use Amazon Bedrock, you'll need to install the `@ai-sdk/amazon-bedrock` package.
-You'll also need to use the [Vercel AI SDK external client](https://github.com/browserbase/stagehand/blob/main/examples/external_clients/aisdk.ts) as a template to create a client for your model.
+You'll also need to use the [Vercel AI SDK external client](https://github.com/browserbase/stagehand/blob/v2/examples/external_clients/aisdk.ts) as a template to create a client for your model.
diff --git a/packages/docs/v2/first-steps/introduction.mdx b/packages/docs/v2/first-steps/introduction.mdx
index 8dff9f348..cbbf90c34 100644
--- a/packages/docs/v2/first-steps/introduction.mdx
+++ b/packages/docs/v2/first-steps/introduction.mdx
@@ -124,7 +124,7 @@ Stagehand is designed for developers building production browser automations and
See real-world automation examples
diff --git a/packages/docs/v2/references/agent.mdx b/packages/docs/v2/references/agent.mdx
index 823470106..c5e8a4782 100644
--- a/packages/docs/v2/references/agent.mdx
+++ b/packages/docs/v2/references/agent.mdx
@@ -44,11 +44,11 @@ interface AgentInstance {
```python
# Create agent instance
-agent = stagehand.agent({
- "model": str,
- "instructions": str = None,
- "options": Dict[str, Any] = None
-})
+agent = stagehand.agent(
+ model: str,
+ instructions: str = None,
+ options: Dict[str, Any] = None
+)
```
diff --git a/packages/docs/v2/references/stagehand.mdx b/packages/docs/v2/references/stagehand.mdx
index 6240dab59..0516b99e1 100644
--- a/packages/docs/v2/references/stagehand.mdx
+++ b/packages/docs/v2/references/stagehand.mdx
@@ -128,7 +128,7 @@ await stagehand.init()
Configuration options for launching a local browser. Only used when `env` is `LOCAL`.
- See the [full interface definition](https://github.com/browserbase/stagehand/blob/main/types/stagehand.ts#L174) for all available options.
+ See the [full interface definition](https://github.com/browserbase/stagehand/blob/v2/types/stagehand.ts#L174) for all available options.
#### LLM Configuration
diff --git a/packages/docs/v3/basics/agent.mdx b/packages/docs/v3/basics/agent.mdx
index 211e7139e..3cd687f7e 100644
--- a/packages/docs/v3/basics/agent.mdx
+++ b/packages/docs/v3/basics/agent.mdx
@@ -142,6 +142,139 @@ When you use `agent()`, Stagehand will return a `Promise` with the
}
```
+## Custom Tools
+
+Agents can be enhanced with custom tools for more granular control and better performance. Unlike MCP integrations, custom tools are defined inline and execute directly within your application.
+
+Custom tools provide a cleaner, more performant alternative to MCP integrations when you need specific functionality.
+
+### Defining Custom Tools
+
+Use the `tool` helper from the [Vercel AI SDK](https://ai-sdk.dev/docs/ai-sdk-core/tools-and-tool-calling) to define custom tools:
+
+
+```typescript Basic Tool
+import { tool } from "ai";
+import { z } from "zod/v3";
+
+const agent = stagehand.agent({
+ model: "openai/gpt-5",
+ tools: {
+ getWeather: tool({
+ description: 'Get the current weather in a location',
+ inputSchema: z.object({
+ location: z.string().describe('The location to get weather for'),
+ }),
+ execute: async ({ location }) => {
+ // Your custom logic here
+ const weather = await fetchWeatherAPI(location);
+ return {
+ location,
+ temperature: weather.temp,
+ conditions: weather.conditions,
+ };
+ },
+ }),
+ },
+ systemPrompt: 'You are a helpful assistant with access to weather data.',
+});
+
+await agent.execute("What's the weather in San Francisco and should I bring an umbrella?");
+```
+
+```typescript Multiple Tools
+import { tool } from "ai";
+import { z } from "zod/v3";
+
+const agent = stagehand.agent({
+ cua: true,
+ model: "anthropic/claude-sonnet-4-20250514",
+ tools: {
+ searchDatabase: tool({
+ description: 'Search for records in the database',
+ inputSchema: z.object({
+ query: z.string().describe('The search query'),
+ limit: z.number().optional().describe('Max results to return'),
+ }),
+ execute: async ({ query, limit = 10 }) => {
+ const results = await db.search(query, limit);
+ return { results };
+ },
+ }),
+
+ calculatePrice: tool({
+ description: 'Calculate the total price with tax',
+ inputSchema: z.object({
+ amount: z.number().describe('The base amount'),
+ taxRate: z.number().describe('Tax rate as decimal (e.g., 0.08 for 8%)'),
+ }),
+ execute: async ({ amount, taxRate }) => {
+ const total = amount * (1 + taxRate);
+ return { total: total.toFixed(2) };
+ },
+ }),
+ },
+});
+
+await agent.execute("Find products under $50 and calculate the total with 8% tax");
+```
+
+```typescript Tool with API Integration
+import { tool } from "ai";
+import { z } from "zod/v3";
+
+const agent = stagehand.agent({
+ model: "google/gemini-2.0-flash",
+ tools: {
+ sendEmail: tool({
+ description: 'Send an email via SendGrid',
+ inputSchema: z.object({
+ to: z.string().email().describe('Recipient email address'),
+ subject: z.string().describe('Email subject'),
+ body: z.string().describe('Email body content'),
+ }),
+ execute: async ({ to, subject, body }) => {
+ const response = await fetch('https://api.sendgrid.com/v3/mail/send', {
+ method: 'POST',
+ headers: {
+ 'Authorization': `Bearer ${process.env.SENDGRID_API_KEY}`,
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({
+ personalizations: [{ to: [{ email: to }] }],
+ from: { email: 'noreply@example.com' },
+ subject,
+ content: [{ type: 'text/plain', value: body }],
+ }),
+ });
+
+ return {
+ sent: response.ok,
+ messageId: response.headers.get('X-Message-Id'),
+ };
+ },
+ }),
+ },
+});
+
+await agent.execute("Fill out the contact form and send me a confirmation email at user@example.com");
+```
+
+
+### Custom Tools vs MCP Integrations
+
+| Custom Tools | MCP Integrations |
+|----------------------------------------|-----------------------------------------|
+| Defined inline with your code | Connect to external services |
+| Direct function execution | Standard protocol |
+| Better performance & optimized context | Reusable across applications |
+| Type-safe with TypeScript | Access to pre-built integrations |
+| Granular control | Network-based communication |
+
+
+Use custom tools when you need specific functionality within your application. Use MCP integrations when connecting to external services or when you need standardized cross-application tools.
+
+
## MCP Integrations
Agents can be enhanced with external tools and services through MCP (Model Context Protocol) integrations. This allows your agent to access external APIs and data sources beyond just browser interactions.
@@ -188,12 +321,12 @@ await agent.execute("Search for restaurants and save the first result to the dat
MCP integrations enable agents to be more powerful by combining browser automation with external APIs, databases, and services. The agent can intelligently decide when to use browser actions versus external tools.
+## Agent Execution Configuration
+
-Stagehand uses a 1288x711 viewport by default (the optimal size for Computer Use Agents). Other viewport sizes may reduce performance. If you need to modify the viewport, you can edit in the [Browser Configuration](/v3/configuration/browser).
+Stagehand uses a 1288x711 viewport by default. Other viewport sizes may reduce performance. If you need to modify the viewport, you can edit in the [Browser Configuration](/v3/configuration/browser).
-## Agent Execution Configuration
-
Control the maximum number of steps the agent can take to complete the task using the `maxSteps` parameter.
diff --git a/packages/docs/v3/basics/evals.mdx b/packages/docs/v3/basics/evals.mdx
index 97cb62f2f..d16298d06 100644
--- a/packages/docs/v3/basics/evals.mdx
+++ b/packages/docs/v3/basics/evals.mdx
@@ -127,7 +127,7 @@ evals run b:osworld -f source=Mind2Web
#### Configuration Files
-You can view the specific evals in [`evals/tasks`](https://github.com/browserbase/stagehand/tree/main/evals/tasks). Each eval is grouped into eval categories based on [`evals/evals.config.json`](https://github.com/browserbase/stagehand/blob/main/evals/evals.config.json).
+You can view the specific evals in [`evals/tasks`](https://github.com/browserbase/stagehand/tree/main/packages/evals/tasks). Each eval is grouped into eval categories based on [`evals/evals.config.json`](https://github.com/browserbase/stagehand/blob/main/evals/evals.config.json).
#### Viewing eval results
diff --git a/packages/docs/v3/first-steps/installation.mdx b/packages/docs/v3/first-steps/installation.mdx
index 88ebd0515..be0448904 100644
--- a/packages/docs/v3/first-steps/installation.mdx
+++ b/packages/docs/v3/first-steps/installation.mdx
@@ -69,12 +69,12 @@ async function main() {
await page.goto("https://example.com");
// Act on the page
- await stagehand.act("Click the sign in button");
+ await stagehand.act("Click the learn more button");
// Extract structured data
- const title = await stagehand.extract("extract the page title", z.string());
+ const description = await stagehand.extract("extract the description", z.string());
- console.log(title);
+ console.log(description);
await stagehand.close();
}
diff --git a/packages/docs/v3/first-steps/introduction.mdx b/packages/docs/v3/first-steps/introduction.mdx
index 305fd1c13..d25bfd984 100644
--- a/packages/docs/v3/first-steps/introduction.mdx
+++ b/packages/docs/v3/first-steps/introduction.mdx
@@ -99,7 +99,7 @@ Stagehand is designed for developers building production browser automations and
See real-world automation examples
diff --git a/packages/evals/CHANGELOG.md b/packages/evals/CHANGELOG.md
index 6e6fc429a..debd77ebd 100644
--- a/packages/evals/CHANGELOG.md
+++ b/packages/evals/CHANGELOG.md
@@ -1,5 +1,12 @@
# @browserbasehq/stagehand-evals
+## 1.1.1
+
+### Patch Changes
+
+- Updated dependencies [[`55da8c6`](https://github.com/browserbase/stagehand/commit/55da8c6e9575cbad3246c55b17650cf6b293ddbe), [`0a5ee63`](https://github.com/browserbase/stagehand/commit/0a5ee638bde051d109eb2266e665934a12f3dc31), [`ee76881`](https://github.com/browserbase/stagehand/commit/ee7688156cb67a9f0f90dfe0dbab77423693a332), [`9e95add`](https://github.com/browserbase/stagehand/commit/9e95add37eb30db4f85e73df7760c7e63fb4131e), [`98e212b`](https://github.com/browserbase/stagehand/commit/98e212b27887241879608c6c1b6c2524477a40d7), [`d5ecbfc`](https://github.com/browserbase/stagehand/commit/d5ecbfc8e419a59b91c2115fd7f984378381d3d0)]:
+ - @browserbasehq/stagehand@3.0.1
+
## 1.0.9
### Patch Changes
diff --git a/packages/evals/index.eval.ts b/packages/evals/index.eval.ts
index d8edf3471..709fd2274 100644
--- a/packages/evals/index.eval.ts
+++ b/packages/evals/index.eval.ts
@@ -32,9 +32,9 @@ import {
AgentProvider,
loadApiKeyFromEnv,
LogLine,
-} from "@browserbasehq/orca";
+} from "@browserbasehq/stagehand";
import { AISdkClientWrapped } from "./lib/AISdkClientWrapped";
-import { getAISDKLanguageModel } from "@browserbasehq/orca/lib/v3/llm/LLMProvider";
+import { getAISDKLanguageModel } from "@browserbasehq/stagehand/lib/v3/llm/LLMProvider";
import { env } from "./env";
import dotenv from "dotenv";
import { initV3 } from "./initV3";
diff --git a/packages/evals/initV3.ts b/packages/evals/initV3.ts
index fe0af9eef..d601105be 100644
--- a/packages/evals/initV3.ts
+++ b/packages/evals/initV3.ts
@@ -14,12 +14,12 @@ import type {
ModelConfiguration,
V3Options,
AgentModelConfig,
-} from "@browserbasehq/orca";
+} from "@browserbasehq/stagehand";
import {
loadApiKeyFromEnv,
modelToAgentProviderMap,
V3,
-} from "@browserbasehq/orca";
+} from "@browserbasehq/stagehand";
import dotenv from "dotenv";
import { env } from "./env";
import { EvalLogger } from "./logger";
diff --git a/packages/evals/lib/AISdkClientWrapped.ts b/packages/evals/lib/AISdkClientWrapped.ts
index 2b7614881..7ed6d74c1 100644
--- a/packages/evals/lib/AISdkClientWrapped.ts
+++ b/packages/evals/lib/AISdkClientWrapped.ts
@@ -13,12 +13,12 @@ import * as ai from "ai";
import { wrapAISDK } from "braintrust";
import type { LanguageModelV2 } from "@ai-sdk/provider";
import { ChatCompletion } from "openai/resources";
-import { LogLine } from "@browserbasehq/orca/lib/v3/types/public/logs";
-import { AvailableModel } from "@browserbasehq/orca/lib/v3/types/public/model";
+import { LogLine } from "@browserbasehq/stagehand/lib/v3/types/public/logs";
+import { AvailableModel } from "@browserbasehq/stagehand/lib/v3/types/public/model";
import {
CreateChatCompletionOptions,
LLMClient,
-} from "@browserbasehq/orca/lib/v3/llm/LLMClient";
+} from "@browserbasehq/stagehand/lib/v3/llm/LLMClient";
// Wrap AI SDK functions with Braintrust for tracing
const { generateObject, generateText } = wrapAISDK(ai);
diff --git a/packages/evals/llm_clients/hn_aisdk.ts b/packages/evals/llm_clients/hn_aisdk.ts
index 822ba5b79..f69211e85 100644
--- a/packages/evals/llm_clients/hn_aisdk.ts
+++ b/packages/evals/llm_clients/hn_aisdk.ts
@@ -1,6 +1,6 @@
// import { Stagehand } from "@browserbasehq/stagehand";
// import { EvalFunction } from "@/types/evals";
-// import { z } from "zod/v3";
+// import { z } from "zod";
//
// export const hn_aisdk: EvalFunction = async ({
// debugUrl,
diff --git a/packages/evals/llm_clients/hn_customOpenAI.ts b/packages/evals/llm_clients/hn_customOpenAI.ts
index a6007dcdb..8dd35f31b 100644
--- a/packages/evals/llm_clients/hn_customOpenAI.ts
+++ b/packages/evals/llm_clients/hn_customOpenAI.ts
@@ -1,5 +1,5 @@
// import { EvalFunction } from "@/types/evals";
-// import { z } from "zod/v3";
+// import { z } from "zod";
// import { CustomOpenAIClient } from "@/examples/external_clients/customOpenAI";
// import OpenAI from "openai";
// import { Stagehand } from "@browserbasehq/stagehand";
diff --git a/packages/evals/llm_clients/hn_langchain.ts b/packages/evals/llm_clients/hn_langchain.ts
index 012d9198f..a86fecb87 100644
--- a/packages/evals/llm_clients/hn_langchain.ts
+++ b/packages/evals/llm_clients/hn_langchain.ts
@@ -1,5 +1,5 @@
// import { EvalFunction } from "@/types/evals";
-// import { z } from "zod/v3";
+// import { z } from "zod";
// import { LangchainClient } from "@/examples/external_clients/langchain";
// import { ChatOpenAI } from "@langchain/openai";
// import { Stagehand } from "@browserbasehq/stagehand";
diff --git a/packages/evals/logger.ts b/packages/evals/logger.ts
index 1cdb42a65..c90bbc2f9 100644
--- a/packages/evals/logger.ts
+++ b/packages/evals/logger.ts
@@ -12,8 +12,8 @@
*/
import { logLineToString } from "./utils";
import { LogLineEval } from "./types/evals";
-import { LogLine } from "@browserbasehq/orca";
-import type { V3 } from "@browserbasehq/orca";
+import { LogLine } from "@browserbasehq/stagehand";
+import type { V3 } from "@browserbasehq/stagehand";
/**
* parseLogLine:
diff --git a/packages/evals/package.json b/packages/evals/package.json
index e38d7738a..dd665e845 100644
--- a/packages/evals/package.json
+++ b/packages/evals/package.json
@@ -1,6 +1,6 @@
{
"name": "@browserbasehq/stagehand-evals",
- "version": "1.1.0",
+ "version": "1.1.1",
"private": true,
"description": "Evaluation suite for Stagehand",
"main": "./",
@@ -13,12 +13,12 @@
"format": "prettier --write ."
},
"dependencies": {
- "@browserbasehq/orca": "workspace:*",
+ "@browserbasehq/stagehand": "workspace:*",
"ai": "^5.0.0",
"@ai-sdk/provider": "^2.0.0",
"openai": "^4.87.1",
"dotenv": "16.4.5",
- "zod": "3.25.67"
+ "zod": "^4.1.8"
},
"devDependencies": {
"tsx": "^4.10.5"
diff --git a/packages/evals/suites/gaia.ts b/packages/evals/suites/gaia.ts
index 96ed43adb..1643e7ce3 100644
--- a/packages/evals/suites/gaia.ts
+++ b/packages/evals/suites/gaia.ts
@@ -1,6 +1,6 @@
import path from "path";
import type { Testcase, EvalInput } from "../types/evals";
-import type { AvailableModel } from "@browserbasehq/orca";
+import type { AvailableModel } from "@browserbasehq/stagehand";
import { tasksConfig } from "../taskConfig";
import { readJsonlFile, parseJsonlRows, applySampling } from "../utils";
diff --git a/packages/evals/suites/onlineMind2Web.ts b/packages/evals/suites/onlineMind2Web.ts
index 3e1a469cc..baa922d0c 100644
--- a/packages/evals/suites/onlineMind2Web.ts
+++ b/packages/evals/suites/onlineMind2Web.ts
@@ -1,6 +1,6 @@
import path from "path";
import type { Testcase, EvalInput } from "../types/evals";
-import type { AvailableModel } from "@browserbasehq/orca";
+import type { AvailableModel } from "@browserbasehq/stagehand";
import { tasksConfig } from "../taskConfig";
import { readJsonlFile, parseJsonlRows, applySampling } from "../utils";
diff --git a/packages/evals/suites/webvoyager.ts b/packages/evals/suites/webvoyager.ts
index a35a84535..16f59db2e 100644
--- a/packages/evals/suites/webvoyager.ts
+++ b/packages/evals/suites/webvoyager.ts
@@ -1,6 +1,6 @@
import path from "path";
import type { Testcase, EvalInput } from "../types/evals";
-import type { AvailableModel } from "@browserbasehq/orca";
+import type { AvailableModel } from "@browserbasehq/stagehand";
import { tasksConfig } from "../taskConfig";
import { readJsonlFile, parseJsonlRows, applySampling } from "../utils";
diff --git a/packages/evals/taskConfig.ts b/packages/evals/taskConfig.ts
index fc27e156a..2f7566909 100644
--- a/packages/evals/taskConfig.ts
+++ b/packages/evals/taskConfig.ts
@@ -12,7 +12,7 @@
import fs from "fs";
import path from "path";
-import { AvailableModel } from "@browserbasehq/orca";
+import { AvailableModel } from "@browserbasehq/stagehand";
import { filterByEvalName } from "./args";
const ALL_EVAL_MODELS = [
diff --git a/packages/evals/tasks/agent/all_recipes.ts b/packages/evals/tasks/agent/all_recipes.ts
index 3c2750537..15915222c 100644
--- a/packages/evals/tasks/agent/all_recipes.ts
+++ b/packages/evals/tasks/agent/all_recipes.ts
@@ -1,4 +1,4 @@
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
import { EvalFunction } from "../../types/evals";
export const all_recipes: EvalFunction = async ({
diff --git a/packages/evals/tasks/agent/apple_trade_in.ts b/packages/evals/tasks/agent/apple_trade_in.ts
index 6496ef586..359dcd008 100644
--- a/packages/evals/tasks/agent/apple_trade_in.ts
+++ b/packages/evals/tasks/agent/apple_trade_in.ts
@@ -1,6 +1,6 @@
//this eval is expected to fail due to issues scrolling within the trade in dialog
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const apple_trade_in: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/apple_tv.ts b/packages/evals/tasks/agent/apple_tv.ts
index b553c9167..bd3ced1e9 100644
--- a/packages/evals/tasks/agent/apple_tv.ts
+++ b/packages/evals/tasks/agent/apple_tv.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const apple_tv: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/arxiv_gpt_report.ts b/packages/evals/tasks/agent/arxiv_gpt_report.ts
index e6ede2661..e3a540a16 100644
--- a/packages/evals/tasks/agent/arxiv_gpt_report.ts
+++ b/packages/evals/tasks/agent/arxiv_gpt_report.ts
@@ -1,6 +1,6 @@
//agent often fails on this one,
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const arxiv_gpt_report: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/gaia.ts b/packages/evals/tasks/agent/gaia.ts
index 1f0231351..00f8dec0a 100644
--- a/packages/evals/tasks/agent/gaia.ts
+++ b/packages/evals/tasks/agent/gaia.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
/**
* Data-driven GAIA agent eval
diff --git a/packages/evals/tasks/agent/github.ts b/packages/evals/tasks/agent/github.ts
index cfa399491..7214199db 100644
--- a/packages/evals/tasks/agent/github.ts
+++ b/packages/evals/tasks/agent/github.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const github: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/github_react_version.ts b/packages/evals/tasks/agent/github_react_version.ts
index 65a23904d..ddf732723 100644
--- a/packages/evals/tasks/agent/github_react_version.ts
+++ b/packages/evals/tasks/agent/github_react_version.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const github_react_version: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/google_flights.ts b/packages/evals/tasks/agent/google_flights.ts
index 472145557..360b3cc03 100644
--- a/packages/evals/tasks/agent/google_flights.ts
+++ b/packages/evals/tasks/agent/google_flights.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const google_flights: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/google_maps.ts b/packages/evals/tasks/agent/google_maps.ts
index 4d5cb0318..d32f859db 100644
--- a/packages/evals/tasks/agent/google_maps.ts
+++ b/packages/evals/tasks/agent/google_maps.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const google_maps: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/google_maps_2.ts b/packages/evals/tasks/agent/google_maps_2.ts
index 16315b2da..bf0d386b9 100644
--- a/packages/evals/tasks/agent/google_maps_2.ts
+++ b/packages/evals/tasks/agent/google_maps_2.ts
@@ -1,7 +1,7 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
-import type { AvailableModel } from "@browserbasehq/orca";
-import { z } from "zod/v3";
+import { V3Evaluator } from "@browserbasehq/stagehand";
+import type { AvailableModel } from "@browserbasehq/stagehand";
+import { z } from "zod";
export const google_maps_2: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/google_maps_3.ts b/packages/evals/tasks/agent/google_maps_3.ts
index fec07691f..4073f4aff 100644
--- a/packages/evals/tasks/agent/google_maps_3.ts
+++ b/packages/evals/tasks/agent/google_maps_3.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const google_maps_3: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/google_shopping.ts b/packages/evals/tasks/agent/google_shopping.ts
index e433a6321..3225d69ba 100644
--- a/packages/evals/tasks/agent/google_shopping.ts
+++ b/packages/evals/tasks/agent/google_shopping.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const google_shopping: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/hotel_booking.ts b/packages/evals/tasks/agent/hotel_booking.ts
index b713dc30a..73630f207 100644
--- a/packages/evals/tasks/agent/hotel_booking.ts
+++ b/packages/evals/tasks/agent/hotel_booking.ts
@@ -1,6 +1,6 @@
//this eval is expected to fail.
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const hotel_booking: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/hugging_face.ts b/packages/evals/tasks/agent/hugging_face.ts
index 0530c91b7..e70259de8 100644
--- a/packages/evals/tasks/agent/hugging_face.ts
+++ b/packages/evals/tasks/agent/hugging_face.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const hugging_face: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/iframe_form.ts b/packages/evals/tasks/agent/iframe_form.ts
index 02fc5f5e8..b2ee62a20 100644
--- a/packages/evals/tasks/agent/iframe_form.ts
+++ b/packages/evals/tasks/agent/iframe_form.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const iframe_form: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/iframe_form_multiple.ts b/packages/evals/tasks/agent/iframe_form_multiple.ts
index 608d5c2ac..466f5b4d7 100644
--- a/packages/evals/tasks/agent/iframe_form_multiple.ts
+++ b/packages/evals/tasks/agent/iframe_form_multiple.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const iframe_form_multiple: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/kayak.ts b/packages/evals/tasks/agent/kayak.ts
index 096f92052..829f4f5b8 100644
--- a/packages/evals/tasks/agent/kayak.ts
+++ b/packages/evals/tasks/agent/kayak.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const kayak: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/kith.ts b/packages/evals/tasks/agent/kith.ts
index 8b94bfd2b..1b35d084f 100644
--- a/packages/evals/tasks/agent/kith.ts
+++ b/packages/evals/tasks/agent/kith.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const kith: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/nba_trades.ts b/packages/evals/tasks/agent/nba_trades.ts
index e92936b65..0b4d92e13 100644
--- a/packages/evals/tasks/agent/nba_trades.ts
+++ b/packages/evals/tasks/agent/nba_trades.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const nba_trades: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/onlineMind2Web.ts b/packages/evals/tasks/agent/onlineMind2Web.ts
index a11a0f226..654d6f8a8 100644
--- a/packages/evals/tasks/agent/onlineMind2Web.ts
+++ b/packages/evals/tasks/agent/onlineMind2Web.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
import { ScreenshotCollector } from "../../utils/ScreenshotCollector";
import dotenv from "dotenv";
import fs from "fs";
diff --git a/packages/evals/tasks/agent/sf_library_card.ts b/packages/evals/tasks/agent/sf_library_card.ts
index 17de35929..acbf42a15 100644
--- a/packages/evals/tasks/agent/sf_library_card.ts
+++ b/packages/evals/tasks/agent/sf_library_card.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const sf_library_card: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/sf_library_card_multiple.ts b/packages/evals/tasks/agent/sf_library_card_multiple.ts
index c7e57a62b..68399c76d 100644
--- a/packages/evals/tasks/agent/sf_library_card_multiple.ts
+++ b/packages/evals/tasks/agent/sf_library_card_multiple.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const sf_library_card_multiple: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/ubereats.ts b/packages/evals/tasks/agent/ubereats.ts
index 702f6f93f..6a5df531a 100644
--- a/packages/evals/tasks/agent/ubereats.ts
+++ b/packages/evals/tasks/agent/ubereats.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
export const ubereats: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/agent/webvoyager.ts b/packages/evals/tasks/agent/webvoyager.ts
index d027210a8..e3cd89bcd 100644
--- a/packages/evals/tasks/agent/webvoyager.ts
+++ b/packages/evals/tasks/agent/webvoyager.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../../types/evals";
-import { V3Evaluator } from "@browserbasehq/orca";
+import { V3Evaluator } from "@browserbasehq/stagehand";
import { ScreenshotCollector } from "../../utils/ScreenshotCollector";
export const webvoyager: EvalFunction = async ({
diff --git a/packages/evals/tasks/allrecipes.ts b/packages/evals/tasks/allrecipes.ts
index c5c46fcef..c6d85f8ec 100644
--- a/packages/evals/tasks/allrecipes.ts
+++ b/packages/evals/tasks/allrecipes.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const allrecipes: EvalFunction = async ({
logger,
diff --git a/packages/evals/tasks/arxiv.ts b/packages/evals/tasks/arxiv.ts
index ea58937fa..932cad5d1 100644
--- a/packages/evals/tasks/arxiv.ts
+++ b/packages/evals/tasks/arxiv.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const arxiv: EvalFunction = async ({
logger,
diff --git a/packages/evals/tasks/combination_sauce.ts b/packages/evals/tasks/combination_sauce.ts
index e5fd71234..54110dd01 100644
--- a/packages/evals/tasks/combination_sauce.ts
+++ b/packages/evals/tasks/combination_sauce.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const combination_sauce: EvalFunction = async ({
logger,
diff --git a/packages/evals/tasks/costar.ts b/packages/evals/tasks/costar.ts
index e62518b48..98364fc32 100644
--- a/packages/evals/tasks/costar.ts
+++ b/packages/evals/tasks/costar.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const costar: EvalFunction = async ({
logger,
diff --git a/packages/evals/tasks/extract_aigrant_companies.ts b/packages/evals/tasks/extract_aigrant_companies.ts
index 8f75173c5..bbc09bb3a 100644
--- a/packages/evals/tasks/extract_aigrant_companies.ts
+++ b/packages/evals/tasks/extract_aigrant_companies.ts
@@ -1,4 +1,4 @@
-import { z } from "zod/v3";
+import { z } from "zod";
import { EvalFunction } from "../types/evals";
export const extract_aigrant_companies: EvalFunction = async ({
diff --git a/packages/evals/tasks/extract_aigrant_targeted.ts b/packages/evals/tasks/extract_aigrant_targeted.ts
index 7cfe4d27d..677da27cf 100644
--- a/packages/evals/tasks/extract_aigrant_targeted.ts
+++ b/packages/evals/tasks/extract_aigrant_targeted.ts
@@ -1,4 +1,4 @@
-import { z } from "zod/v3";
+import { z } from "zod";
import { EvalFunction } from "../types/evals";
export const extract_aigrant_targeted: EvalFunction = async ({
diff --git a/packages/evals/tasks/extract_aigrant_targeted_2.ts b/packages/evals/tasks/extract_aigrant_targeted_2.ts
index c793040d0..6a9b76e7a 100644
--- a/packages/evals/tasks/extract_aigrant_targeted_2.ts
+++ b/packages/evals/tasks/extract_aigrant_targeted_2.ts
@@ -1,4 +1,4 @@
-import { z } from "zod/v3";
+import { z } from "zod";
import { EvalFunction } from "../types/evals";
export const extract_aigrant_targeted_2: EvalFunction = async ({
diff --git a/packages/evals/tasks/extract_apartments.ts b/packages/evals/tasks/extract_apartments.ts
index 6634f291f..75fe13b07 100644
--- a/packages/evals/tasks/extract_apartments.ts
+++ b/packages/evals/tasks/extract_apartments.ts
@@ -1,4 +1,4 @@
-import { z } from "zod/v3";
+import { z } from "zod";
import { EvalFunction } from "../types/evals";
export const extract_apartments: EvalFunction = async ({
diff --git a/packages/evals/tasks/extract_area_codes.ts b/packages/evals/tasks/extract_area_codes.ts
index 8759d5800..719170e41 100644
--- a/packages/evals/tasks/extract_area_codes.ts
+++ b/packages/evals/tasks/extract_area_codes.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const extract_area_codes: EvalFunction = async ({
logger,
diff --git a/packages/evals/tasks/extract_baptist_health.ts b/packages/evals/tasks/extract_baptist_health.ts
index f619f4ae3..c586ebbbb 100644
--- a/packages/evals/tasks/extract_baptist_health.ts
+++ b/packages/evals/tasks/extract_baptist_health.ts
@@ -1,6 +1,6 @@
import { EvalFunction } from "../types/evals";
import { compareStrings } from "../utils";
-import { z } from "zod/v3";
+import { z } from "zod";
export const extract_baptist_health: EvalFunction = async ({
logger,
diff --git a/packages/evals/tasks/extract_capacitor_info.ts b/packages/evals/tasks/extract_capacitor_info.ts
index 6328c990f..5b9e8aa1c 100644
--- a/packages/evals/tasks/extract_capacitor_info.ts
+++ b/packages/evals/tasks/extract_capacitor_info.ts
@@ -1,6 +1,6 @@
import { EvalFunction } from "../types/evals";
import { normalizeString } from "../utils";
-import { z } from "zod/v3";
+import { z } from "zod";
export const extract_capacitor_info: EvalFunction = async ({
logger,
diff --git a/packages/evals/tasks/extract_collaborators.ts b/packages/evals/tasks/extract_collaborators.ts
index 5b5e571a7..944679636 100644
--- a/packages/evals/tasks/extract_collaborators.ts
+++ b/packages/evals/tasks/extract_collaborators.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const extract_collaborators: EvalFunction = async ({
logger,
diff --git a/packages/evals/tasks/extract_csa.ts b/packages/evals/tasks/extract_csa.ts
index aa986f1a7..9ab07e855 100644
--- a/packages/evals/tasks/extract_csa.ts
+++ b/packages/evals/tasks/extract_csa.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const extract_csa: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/extract_geniusee.ts b/packages/evals/tasks/extract_geniusee.ts
index da6f51f8e..2561b1897 100644
--- a/packages/evals/tasks/extract_geniusee.ts
+++ b/packages/evals/tasks/extract_geniusee.ts
@@ -1,4 +1,4 @@
-import { z } from "zod/v3";
+import { z } from "zod";
import { EvalFunction } from "../types/evals";
export const extract_geniusee: EvalFunction = async ({
diff --git a/packages/evals/tasks/extract_geniusee_2.ts b/packages/evals/tasks/extract_geniusee_2.ts
index 90d0d6281..52fff6660 100644
--- a/packages/evals/tasks/extract_geniusee_2.ts
+++ b/packages/evals/tasks/extract_geniusee_2.ts
@@ -1,4 +1,4 @@
-import { z } from "zod/v3";
+import { z } from "zod";
import { EvalFunction } from "../types/evals";
export const extract_geniusee_2: EvalFunction = async ({
diff --git a/packages/evals/tasks/extract_github_commits.ts b/packages/evals/tasks/extract_github_commits.ts
index 6635ef92e..fcf35aa92 100644
--- a/packages/evals/tasks/extract_github_commits.ts
+++ b/packages/evals/tasks/extract_github_commits.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const extract_github_commits: EvalFunction = async ({
logger,
diff --git a/packages/evals/tasks/extract_github_stars.ts b/packages/evals/tasks/extract_github_stars.ts
index 1725465b4..d0651a186 100644
--- a/packages/evals/tasks/extract_github_stars.ts
+++ b/packages/evals/tasks/extract_github_stars.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const extract_github_stars: EvalFunction = async ({
logger,
diff --git a/packages/evals/tasks/extract_hamilton_weather.ts b/packages/evals/tasks/extract_hamilton_weather.ts
index 9519676c5..a1501e4a9 100644
--- a/packages/evals/tasks/extract_hamilton_weather.ts
+++ b/packages/evals/tasks/extract_hamilton_weather.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
import { compareStrings } from "../utils";
export const extract_hamilton_weather: EvalFunction = async ({
diff --git a/packages/evals/tasks/extract_jfk_links.ts b/packages/evals/tasks/extract_jfk_links.ts
index d4c285c07..049ff5ca6 100644
--- a/packages/evals/tasks/extract_jfk_links.ts
+++ b/packages/evals/tasks/extract_jfk_links.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const extract_jfk_links: EvalFunction = async ({
logger,
diff --git a/packages/evals/tasks/extract_jstor_news.ts b/packages/evals/tasks/extract_jstor_news.ts
index 7dbe40d15..5d5a449eb 100644
--- a/packages/evals/tasks/extract_jstor_news.ts
+++ b/packages/evals/tasks/extract_jstor_news.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const extract_jstor_news: EvalFunction = async ({
logger,
diff --git a/packages/evals/tasks/extract_memorial_healthcare.ts b/packages/evals/tasks/extract_memorial_healthcare.ts
index d7fcbe062..37015d2d4 100644
--- a/packages/evals/tasks/extract_memorial_healthcare.ts
+++ b/packages/evals/tasks/extract_memorial_healthcare.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
import { compareStrings } from "../utils";
export const extract_memorial_healthcare: EvalFunction = async ({
diff --git a/packages/evals/tasks/extract_nhl_stats.ts b/packages/evals/tasks/extract_nhl_stats.ts
index 00301f718..8701fd405 100644
--- a/packages/evals/tasks/extract_nhl_stats.ts
+++ b/packages/evals/tasks/extract_nhl_stats.ts
@@ -1,6 +1,6 @@
import { EvalFunction } from "../types/evals";
import { normalizeString } from "../utils";
-import { z } from "zod/v3";
+import { z } from "zod";
export const extract_nhl_stats: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/extract_partners.ts b/packages/evals/tasks/extract_partners.ts
index 328413597..1c1e7a18f 100644
--- a/packages/evals/tasks/extract_partners.ts
+++ b/packages/evals/tasks/extract_partners.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const extract_partners: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/extract_press_releases.ts b/packages/evals/tasks/extract_press_releases.ts
index 52b75c52e..3b86a745a 100644
--- a/packages/evals/tasks/extract_press_releases.ts
+++ b/packages/evals/tasks/extract_press_releases.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
import { compareStrings } from "../utils";
export const extract_press_releases: EvalFunction = async ({
diff --git a/packages/evals/tasks/extract_professional_info.ts b/packages/evals/tasks/extract_professional_info.ts
index 941cd1695..3c77caada 100644
--- a/packages/evals/tasks/extract_professional_info.ts
+++ b/packages/evals/tasks/extract_professional_info.ts
@@ -1,6 +1,6 @@
import { EvalFunction } from "../types/evals";
import { normalizeString } from "../utils";
-import { z } from "zod/v3";
+import { z } from "zod";
export const extract_professional_info: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/extract_public_notices.ts b/packages/evals/tasks/extract_public_notices.ts
index 85db71626..72d612874 100644
--- a/packages/evals/tasks/extract_public_notices.ts
+++ b/packages/evals/tasks/extract_public_notices.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
import { compareStrings } from "../utils";
export const extract_public_notices: EvalFunction = async ({
diff --git a/packages/evals/tasks/extract_recipe.ts b/packages/evals/tasks/extract_recipe.ts
index 9ba0f34b1..b50e55b70 100644
--- a/packages/evals/tasks/extract_recipe.ts
+++ b/packages/evals/tasks/extract_recipe.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const extract_recipe: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/extract_regulations_table.ts b/packages/evals/tasks/extract_regulations_table.ts
index 1ca130f20..2c645f97f 100644
--- a/packages/evals/tasks/extract_regulations_table.ts
+++ b/packages/evals/tasks/extract_regulations_table.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const extract_regulations_table: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/extract_resistor_info.ts b/packages/evals/tasks/extract_resistor_info.ts
index 7e214e868..ff6d05e7f 100644
--- a/packages/evals/tasks/extract_resistor_info.ts
+++ b/packages/evals/tasks/extract_resistor_info.ts
@@ -1,6 +1,6 @@
import { EvalFunction } from "../types/evals";
import { normalizeString } from "../utils";
-import { z } from "zod/v3";
+import { z } from "zod";
export const extract_resistor_info: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/extract_rockauto.ts b/packages/evals/tasks/extract_rockauto.ts
index eada3e9ed..9bcd361df 100644
--- a/packages/evals/tasks/extract_rockauto.ts
+++ b/packages/evals/tasks/extract_rockauto.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const extract_rockauto: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/extract_single_link.ts b/packages/evals/tasks/extract_single_link.ts
index b4ca2c0d1..eee2584b0 100644
--- a/packages/evals/tasks/extract_single_link.ts
+++ b/packages/evals/tasks/extract_single_link.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const extract_single_link: EvalFunction = async ({
logger,
diff --git a/packages/evals/tasks/extract_snowshoeing_destinations.ts b/packages/evals/tasks/extract_snowshoeing_destinations.ts
index 02dd18012..067f0ad9f 100644
--- a/packages/evals/tasks/extract_snowshoeing_destinations.ts
+++ b/packages/evals/tasks/extract_snowshoeing_destinations.ts
@@ -1,4 +1,4 @@
-import { z } from "zod/v3";
+import { z } from "zod";
import { EvalFunction } from "../types/evals";
export const extract_snowshoeing_destinations: EvalFunction = async ({
diff --git a/packages/evals/tasks/extract_staff_members.ts b/packages/evals/tasks/extract_staff_members.ts
index 82f82b5d4..a67958d7a 100644
--- a/packages/evals/tasks/extract_staff_members.ts
+++ b/packages/evals/tasks/extract_staff_members.ts
@@ -1,4 +1,4 @@
-import { z } from "zod/v3";
+import { z } from "zod";
import { EvalFunction } from "../types/evals";
export const extract_staff_members: EvalFunction = async ({
diff --git a/packages/evals/tasks/extract_zillow.ts b/packages/evals/tasks/extract_zillow.ts
index d6f75ca9a..76fd567ac 100644
--- a/packages/evals/tasks/extract_zillow.ts
+++ b/packages/evals/tasks/extract_zillow.ts
@@ -1,4 +1,4 @@
-import { z } from "zod/v3";
+import { z } from "zod";
import { EvalFunction } from "../types/evals";
export const extract_zillow: EvalFunction = async ({
diff --git a/packages/evals/tasks/google_flights.ts b/packages/evals/tasks/google_flights.ts
index 94fe4ef18..50cce7f68 100644
--- a/packages/evals/tasks/google_flights.ts
+++ b/packages/evals/tasks/google_flights.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { Action } from "@browserbasehq/orca";
+import { Action } from "@browserbasehq/stagehand";
/**
* This eval attempts to click on an element that should not pass the playwright actionability check
diff --git a/packages/evals/tasks/homedepot.ts b/packages/evals/tasks/homedepot.ts
index 884a94025..aa904f6b8 100644
--- a/packages/evals/tasks/homedepot.ts
+++ b/packages/evals/tasks/homedepot.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const homedepot: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/iframe_hn.ts b/packages/evals/tasks/iframe_hn.ts
index 69a50b57b..5984f1fb4 100644
--- a/packages/evals/tasks/iframe_hn.ts
+++ b/packages/evals/tasks/iframe_hn.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const iframe_hn: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/imdb_movie_details.ts b/packages/evals/tasks/imdb_movie_details.ts
index 28a9f5dbe..400fa72d3 100644
--- a/packages/evals/tasks/imdb_movie_details.ts
+++ b/packages/evals/tasks/imdb_movie_details.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const imdb_movie_details: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/no_js_click.ts b/packages/evals/tasks/no_js_click.ts
index 20a5617a1..633ee59d2 100644
--- a/packages/evals/tasks/no_js_click.ts
+++ b/packages/evals/tasks/no_js_click.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { Action } from "@browserbasehq/orca";
+import { Action } from "@browserbasehq/stagehand";
export const no_js_click: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/observe_iframes2.ts b/packages/evals/tasks/observe_iframes2.ts
index 8d5eb319e..3ae424b83 100644
--- a/packages/evals/tasks/observe_iframes2.ts
+++ b/packages/evals/tasks/observe_iframes2.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { Action } from "@browserbasehq/orca";
+import { Action } from "@browserbasehq/stagehand";
export const observe_iframes2: EvalFunction = async ({
logger,
diff --git a/packages/evals/tasks/peeler_complex.ts b/packages/evals/tasks/peeler_complex.ts
index 3cadd106d..ea442415c 100644
--- a/packages/evals/tasks/peeler_complex.ts
+++ b/packages/evals/tasks/peeler_complex.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const peeler_complex: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/sciquest.ts b/packages/evals/tasks/sciquest.ts
index 0d8f50e29..7aa13be92 100644
--- a/packages/evals/tasks/sciquest.ts
+++ b/packages/evals/tasks/sciquest.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const sciquest: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/ted_talk.ts b/packages/evals/tasks/ted_talk.ts
index 0fe243bf1..057c63836 100644
--- a/packages/evals/tasks/ted_talk.ts
+++ b/packages/evals/tasks/ted_talk.ts
@@ -1,6 +1,6 @@
import { EvalFunction } from "../types/evals";
import { normalizeString } from "../utils";
-import { z } from "zod/v3";
+import { z } from "zod";
export const ted_talk: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/tasks/wichita.ts b/packages/evals/tasks/wichita.ts
index a729652ac..0ecf69fdc 100644
--- a/packages/evals/tasks/wichita.ts
+++ b/packages/evals/tasks/wichita.ts
@@ -1,5 +1,5 @@
import { EvalFunction } from "../types/evals";
-import { z } from "zod/v3";
+import { z } from "zod";
export const wichita: EvalFunction = async ({
debugUrl,
diff --git a/packages/evals/types/evals.ts b/packages/evals/types/evals.ts
index c3f9ce9c7..4ccbe1637 100644
--- a/packages/evals/types/evals.ts
+++ b/packages/evals/types/evals.ts
@@ -1,9 +1,9 @@
-import { z } from "zod/v3";
-import type { AvailableModel } from "@browserbasehq/orca";
-import type { LogLine } from "@browserbasehq/orca";
-import type { AgentInstance } from "@browserbasehq/orca";
+import { z } from "zod";
+import type { AvailableModel } from "@browserbasehq/stagehand";
+import type { LogLine } from "@browserbasehq/stagehand";
+import type { AgentInstance } from "@browserbasehq/stagehand";
import type { EvalCase } from "braintrust";
-import type { V3 } from "@browserbasehq/orca";
+import type { V3 } from "@browserbasehq/stagehand";
import { EvalLogger } from "../logger";
export type StagehandInitResult = {
diff --git a/packages/evals/utils.ts b/packages/evals/utils.ts
index 9c61eb8b8..9c49a47f5 100644
--- a/packages/evals/utils.ts
+++ b/packages/evals/utils.ts
@@ -8,7 +8,7 @@
* and eval name or category.
*/
import fs from "fs";
-import { LogLine } from "@browserbasehq/orca";
+import { LogLine } from "@browserbasehq/stagehand";
import stringComparison from "string-comparison";
const { jaroWinkler } = stringComparison;
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 0538ccf63..b7b378336 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -19,16 +19,16 @@ importers:
version: 9.25.1
'@langchain/community':
specifier: ^1.0.0
- version: 1.0.0(@browserbasehq/sdk@2.5.0)(@browserbasehq/stagehand@1.14.0(@playwright/test@1.54.2)(deepmerge@4.3.1)(dotenv@16.5.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))(zod@3.25.67))(@ibm-cloud/watsonx-ai@1.7.0)(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(@opentelemetry/api@1.9.0)(cheerio@1.0.0)(google-auth-library@9.15.1)(ibm-cloud-sdk-core@5.4.3)(ignore@5.3.2)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))(playwright@1.54.2)(puppeteer@22.15.0(typescript@5.8.3))(ws@8.18.3)
+ version: 1.0.0(@browserbasehq/sdk@2.5.0)(@browserbasehq/stagehand@3.0.1(@opentelemetry/api@1.9.0)(deepmerge@4.3.1)(dotenv@16.5.0)(zod@3.25.67))(@ibm-cloud/watsonx-ai@1.7.0)(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(@opentelemetry/api@1.9.0)(cheerio@1.0.0)(google-auth-library@9.15.1)(ibm-cloud-sdk-core@5.4.3)(ignore@5.3.2)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))(playwright@1.54.2)(puppeteer@22.15.0(typescript@5.8.3))(ws@8.18.3)
'@langchain/core':
specifier: ^0.3.40
- version: 0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
+ version: 0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
'@langchain/langgraph':
specifier: ^1.0.1
- version: 1.0.1(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zod-to-json-schema@3.24.5(zod@3.25.67))(zod@3.25.67)
+ version: 1.0.1(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zod-to-json-schema@3.24.5(zod@3.25.67))(zod@3.25.67)
'@langchain/openai':
specifier: ^0.4.4
- version: 0.4.9(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(ws@8.18.3)
+ version: 0.4.9(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(ws@8.18.3)
'@playwright/test':
specifier: ^1.42.1
version: 1.54.2
@@ -67,7 +67,7 @@ importers:
version: 1.2.0
chromium-bidi:
specifier: ^0.10.0
- version: 0.10.2(devtools-protocol@0.0.1312386)
+ version: 0.10.2(devtools-protocol@0.0.1464554)
esbuild:
specifier: ^0.21.4
version: 0.21.5
@@ -130,13 +130,13 @@ importers:
version: 1.24.0(@modelcontextprotocol/sdk@1.17.2)
'@langchain/openai':
specifier: ^0.4.4
- version: 0.4.9(@langchain/core@0.3.50(openai@4.96.2(ws@8.18.3)(zod@3.25.67)))(ws@8.18.3)
+ version: 0.4.9(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@4.96.2(ws@8.18.3)(zod@4.1.12)))(ws@8.18.3)
'@modelcontextprotocol/sdk':
specifier: ^1.17.2
version: 1.17.2
ai:
specifier: ^5.0.0
- version: 5.0.76(zod@3.25.67)
+ version: 5.0.76(zod@4.1.12)
deepmerge:
specifier: ^4.3.1
version: 4.3.1
@@ -151,7 +151,7 @@ importers:
version: 3.1.0
openai:
specifier: ^4.87.1
- version: 4.96.2(ws@8.18.3)(zod@3.25.67)
+ version: 4.96.2(ws@8.18.3)(zod@4.1.12)
pino:
specifier: ^9.6.0
version: 9.6.0
@@ -165,54 +165,51 @@ importers:
specifier: ^8.18.0
version: 8.18.3
zod:
- specifier: 3.25.67
- version: 3.25.67
- zod-to-json-schema:
- specifier: ^3.23.5
- version: 3.24.5(zod@3.25.67)
+ specifier: ^4.1.8
+ version: 4.1.12
optionalDependencies:
'@ai-sdk/anthropic':
specifier: ^2.0.34
- version: 2.0.34(zod@3.25.67)
+ version: 2.0.34(zod@4.1.12)
'@ai-sdk/azure':
specifier: ^2.0.54
- version: 2.0.54(zod@3.25.67)
+ version: 2.0.54(zod@4.1.12)
'@ai-sdk/cerebras':
specifier: ^1.0.25
- version: 1.0.25(zod@3.25.67)
+ version: 1.0.25(zod@4.1.12)
'@ai-sdk/deepseek':
specifier: ^1.0.23
- version: 1.0.23(zod@3.25.67)
+ version: 1.0.23(zod@4.1.12)
'@ai-sdk/google':
specifier: ^2.0.23
- version: 2.0.23(zod@3.25.67)
+ version: 2.0.23(zod@4.1.12)
'@ai-sdk/groq':
specifier: ^2.0.24
- version: 2.0.24(zod@3.25.67)
+ version: 2.0.24(zod@4.1.12)
'@ai-sdk/mistral':
specifier: ^2.0.19
- version: 2.0.19(zod@3.25.67)
+ version: 2.0.19(zod@4.1.12)
'@ai-sdk/openai':
specifier: ^2.0.53
- version: 2.0.53(zod@3.25.67)
+ version: 2.0.53(zod@4.1.12)
'@ai-sdk/perplexity':
specifier: ^2.0.13
- version: 2.0.13(zod@3.25.67)
+ version: 2.0.13(zod@4.1.12)
'@ai-sdk/togetherai':
specifier: ^1.0.23
- version: 1.0.23(zod@3.25.67)
+ version: 1.0.23(zod@4.1.12)
'@ai-sdk/xai':
specifier: ^2.0.26
- version: 2.0.26(zod@3.25.67)
+ version: 2.0.26(zod@4.1.12)
'@langchain/core':
specifier: ^0.3.40
- version: 0.3.50(openai@4.96.2(ws@8.18.3)(zod@3.25.67))
+ version: 0.3.50(@opentelemetry/api@1.9.0)(openai@4.96.2(ws@8.18.3)(zod@4.1.12))
chrome-launcher:
specifier: ^1.2.0
version: 1.2.0
ollama-ai-provider-v2:
specifier: ^1.5.0
- version: 1.5.0(zod@3.25.67)
+ version: 1.5.0(zod@4.1.12)
patchright-core:
specifier: ^1.55.2
version: 1.55.2
@@ -259,21 +256,21 @@ importers:
'@ai-sdk/provider':
specifier: ^2.0.0
version: 2.0.0
- '@browserbasehq/orca':
+ '@browserbasehq/stagehand':
specifier: workspace:*
version: link:../core
ai:
specifier: ^5.0.0
- version: 5.0.76(zod@3.25.67)
+ version: 5.0.76(zod@4.1.12)
dotenv:
specifier: 16.4.5
version: 16.4.5
openai:
specifier: ^4.87.1
- version: 4.96.2(ws@8.18.3)(zod@3.25.67)
+ version: 4.96.2(ws@8.18.3)(zod@4.1.12)
zod:
- specifier: 3.25.67
- version: 3.25.67
+ specifier: ^4.1.8
+ version: 4.1.12
devDependencies:
tsx:
specifier: ^4.10.5
@@ -381,9 +378,6 @@ packages:
resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==}
engines: {node: '>=10'}
- '@anthropic-ai/sdk@0.27.3':
- resolution: {integrity: sha512-IjLt0gd3L4jlOfilxVXTifn42FnVffMgDC04RJK1KDZpmkBWLv0XC92MVVmkxrFZNS/7l3xWgP/I3nqtX1sQHw==}
-
'@anthropic-ai/sdk@0.39.0':
resolution: {integrity: sha512-eMyDIPRZbt1CCLErRCi3exlAvNkBtRe+kW5vvJyef93PmNr/clstYgHhtvmkxN82nlKgzyGPCyGxrm0JQ1ZIdg==}
@@ -422,14 +416,12 @@ packages:
'@browserbasehq/sdk@2.5.0':
resolution: {integrity: sha512-bcnbYZvm5Ht1nrHUfWDK4crspiTy1ESJYMApsMiOTUnlKOan0ocRD6m7hZH34iSC2c2XWsoryR80cwsYgCBWzQ==}
- '@browserbasehq/stagehand@1.14.0':
- resolution: {integrity: sha512-Hi/EzgMFWz+FKyepxHTrqfTPjpsuBS4zRy3e9sbMpBgLPv+9c0R+YZEvS7Bw4mTS66QtvvURRT6zgDGFotthVQ==}
+ '@browserbasehq/stagehand@3.0.1':
+ resolution: {integrity: sha512-GfI6qWAGBj3obGvIgi8wbE1e65y29hB7u9FUmlQIz2wUX/izFFchlq+PszafPr9d2q4ZzbqzqNoc9WSjhxT65w==}
peerDependencies:
- '@playwright/test': ^1.42.1
deepmerge: ^4.3.1
dotenv: ^16.4.5
- openai: ^4.62.1
- zod: ^3.23.8
+ zod: 3.25.67
'@cfworker/json-schema@4.1.1':
resolution: {integrity: sha512-gAmrUZSGtKc3AiBL71iNWxDsyUC5uMaKKGdvzYsBoTW/xi42JQHl7eKV2OYzCUqvc+D2RCcf7EXY2iCyFIk6og==}
@@ -4081,14 +4073,6 @@ packages:
resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==}
engines: {node: '>=0.10.0'}
- langsmith@0.3.23:
- resolution: {integrity: sha512-6gfotO1YS3vqznSJutdFmJXL2Vxy27/RV2JA7YTsfWoJtxlmBR/1QE7kMIyEvuoEE5KGFHyZMuAh/fVeiRffLA==}
- peerDependencies:
- openai: '*'
- peerDependenciesMeta:
- openai:
- optional: true
-
langsmith@0.3.75:
resolution: {integrity: sha512-4cl/KOxq99/c0MtlzXd6rpmOvMUuRHrJTRFzEwz/G+zDygeFm6bbKaa5XRu/VDZs1FsFGKL2WJYNbjFfL2Cg3Q==}
peerDependencies:
@@ -6109,6 +6093,9 @@ packages:
zod@3.25.76:
resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==}
+ zod@4.1.12:
+ resolution: {integrity: sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==}
+
zwitch@2.0.4:
resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}
@@ -6121,6 +6108,13 @@ snapshots:
zod: 3.25.67
optional: true
+ '@ai-sdk/anthropic@2.0.34(zod@4.1.12)':
+ dependencies:
+ '@ai-sdk/provider': 2.0.0
+ '@ai-sdk/provider-utils': 3.0.12(zod@4.1.12)
+ zod: 4.1.12
+ optional: true
+
'@ai-sdk/azure@2.0.54(zod@3.25.67)':
dependencies:
'@ai-sdk/openai': 2.0.53(zod@3.25.67)
@@ -6129,6 +6123,14 @@ snapshots:
zod: 3.25.67
optional: true
+ '@ai-sdk/azure@2.0.54(zod@4.1.12)':
+ dependencies:
+ '@ai-sdk/openai': 2.0.53(zod@4.1.12)
+ '@ai-sdk/provider': 2.0.0
+ '@ai-sdk/provider-utils': 3.0.12(zod@4.1.12)
+ zod: 4.1.12
+ optional: true
+
'@ai-sdk/cerebras@1.0.25(zod@3.25.67)':
dependencies:
'@ai-sdk/openai-compatible': 1.0.22(zod@3.25.67)
@@ -6137,6 +6139,14 @@ snapshots:
zod: 3.25.67
optional: true
+ '@ai-sdk/cerebras@1.0.25(zod@4.1.12)':
+ dependencies:
+ '@ai-sdk/openai-compatible': 1.0.22(zod@4.1.12)
+ '@ai-sdk/provider': 2.0.0
+ '@ai-sdk/provider-utils': 3.0.12(zod@4.1.12)
+ zod: 4.1.12
+ optional: true
+
'@ai-sdk/deepseek@1.0.23(zod@3.25.67)':
dependencies:
'@ai-sdk/openai-compatible': 1.0.22(zod@3.25.67)
@@ -6145,6 +6155,14 @@ snapshots:
zod: 3.25.67
optional: true
+ '@ai-sdk/deepseek@1.0.23(zod@4.1.12)':
+ dependencies:
+ '@ai-sdk/openai-compatible': 1.0.22(zod@4.1.12)
+ '@ai-sdk/provider': 2.0.0
+ '@ai-sdk/provider-utils': 3.0.12(zod@4.1.12)
+ zod: 4.1.12
+ optional: true
+
'@ai-sdk/gateway@2.0.0(zod@3.25.67)':
dependencies:
'@ai-sdk/provider': 2.0.0
@@ -6152,6 +6170,13 @@ snapshots:
'@vercel/oidc': 3.0.3
zod: 3.25.67
+ '@ai-sdk/gateway@2.0.0(zod@4.1.12)':
+ dependencies:
+ '@ai-sdk/provider': 2.0.0
+ '@ai-sdk/provider-utils': 3.0.12(zod@4.1.12)
+ '@vercel/oidc': 3.0.3
+ zod: 4.1.12
+
'@ai-sdk/google@2.0.23(zod@3.25.67)':
dependencies:
'@ai-sdk/provider': 2.0.0
@@ -6159,6 +6184,13 @@ snapshots:
zod: 3.25.67
optional: true
+ '@ai-sdk/google@2.0.23(zod@4.1.12)':
+ dependencies:
+ '@ai-sdk/provider': 2.0.0
+ '@ai-sdk/provider-utils': 3.0.12(zod@4.1.12)
+ zod: 4.1.12
+ optional: true
+
'@ai-sdk/groq@2.0.24(zod@3.25.67)':
dependencies:
'@ai-sdk/provider': 2.0.0
@@ -6166,6 +6198,13 @@ snapshots:
zod: 3.25.67
optional: true
+ '@ai-sdk/groq@2.0.24(zod@4.1.12)':
+ dependencies:
+ '@ai-sdk/provider': 2.0.0
+ '@ai-sdk/provider-utils': 3.0.12(zod@4.1.12)
+ zod: 4.1.12
+ optional: true
+
'@ai-sdk/mistral@2.0.19(zod@3.25.67)':
dependencies:
'@ai-sdk/provider': 2.0.0
@@ -6173,6 +6212,13 @@ snapshots:
zod: 3.25.67
optional: true
+ '@ai-sdk/mistral@2.0.19(zod@4.1.12)':
+ dependencies:
+ '@ai-sdk/provider': 2.0.0
+ '@ai-sdk/provider-utils': 3.0.12(zod@4.1.12)
+ zod: 4.1.12
+ optional: true
+
'@ai-sdk/openai-compatible@1.0.22(zod@3.25.67)':
dependencies:
'@ai-sdk/provider': 2.0.0
@@ -6180,6 +6226,13 @@ snapshots:
zod: 3.25.67
optional: true
+ '@ai-sdk/openai-compatible@1.0.22(zod@4.1.12)':
+ dependencies:
+ '@ai-sdk/provider': 2.0.0
+ '@ai-sdk/provider-utils': 3.0.12(zod@4.1.12)
+ zod: 4.1.12
+ optional: true
+
'@ai-sdk/openai@2.0.53(zod@3.25.67)':
dependencies:
'@ai-sdk/provider': 2.0.0
@@ -6187,6 +6240,13 @@ snapshots:
zod: 3.25.67
optional: true
+ '@ai-sdk/openai@2.0.53(zod@4.1.12)':
+ dependencies:
+ '@ai-sdk/provider': 2.0.0
+ '@ai-sdk/provider-utils': 3.0.12(zod@4.1.12)
+ zod: 4.1.12
+ optional: true
+
'@ai-sdk/perplexity@2.0.13(zod@3.25.67)':
dependencies:
'@ai-sdk/provider': 2.0.0
@@ -6194,6 +6254,13 @@ snapshots:
zod: 3.25.67
optional: true
+ '@ai-sdk/perplexity@2.0.13(zod@4.1.12)':
+ dependencies:
+ '@ai-sdk/provider': 2.0.0
+ '@ai-sdk/provider-utils': 3.0.12(zod@4.1.12)
+ zod: 4.1.12
+ optional: true
+
'@ai-sdk/provider-utils@3.0.12(zod@3.25.67)':
dependencies:
'@ai-sdk/provider': 2.0.0
@@ -6201,6 +6268,13 @@ snapshots:
eventsource-parser: 3.0.6
zod: 3.25.67
+ '@ai-sdk/provider-utils@3.0.12(zod@4.1.12)':
+ dependencies:
+ '@ai-sdk/provider': 2.0.0
+ '@standard-schema/spec': 1.0.0
+ eventsource-parser: 3.0.6
+ zod: 4.1.12
+
'@ai-sdk/provider@1.1.3':
dependencies:
json-schema: 0.4.0
@@ -6217,6 +6291,14 @@ snapshots:
zod: 3.25.67
optional: true
+ '@ai-sdk/togetherai@1.0.23(zod@4.1.12)':
+ dependencies:
+ '@ai-sdk/openai-compatible': 1.0.22(zod@4.1.12)
+ '@ai-sdk/provider': 2.0.0
+ '@ai-sdk/provider-utils': 3.0.12(zod@4.1.12)
+ zod: 4.1.12
+ optional: true
+
'@ai-sdk/xai@2.0.26(zod@3.25.67)':
dependencies:
'@ai-sdk/openai-compatible': 1.0.22(zod@3.25.67)
@@ -6225,6 +6307,14 @@ snapshots:
zod: 3.25.67
optional: true
+ '@ai-sdk/xai@2.0.26(zod@4.1.12)':
+ dependencies:
+ '@ai-sdk/openai-compatible': 1.0.22(zod@4.1.12)
+ '@ai-sdk/provider': 2.0.0
+ '@ai-sdk/provider-utils': 3.0.12(zod@4.1.12)
+ zod: 4.1.12
+ optional: true
+
'@alcalzone/ansi-tokenize@0.1.3':
dependencies:
ansi-styles: 6.2.1
@@ -6232,18 +6322,6 @@ snapshots:
'@alloc/quick-lru@5.2.0': {}
- '@anthropic-ai/sdk@0.27.3':
- dependencies:
- '@types/node': 18.19.87
- '@types/node-fetch': 2.6.12
- abort-controller: 3.0.0
- agentkeepalive: 4.6.0
- form-data-encoder: 1.7.2
- formdata-node: 4.4.1
- node-fetch: 2.7.0
- transitivePeerDependencies:
- - encoding
-
'@anthropic-ai/sdk@0.39.0':
dependencies:
'@types/node': 18.19.87
@@ -6262,10 +6340,10 @@ snapshots:
'@ark/util@0.46.0': {}
- '@asteasolutions/zod-to-openapi@6.4.0(zod@3.25.67)':
+ '@asteasolutions/zod-to-openapi@6.4.0(zod@3.25.76)':
dependencies:
openapi3-ts: 4.4.0
- zod: 3.25.67
+ zod: 3.25.76
'@asyncapi/parser@3.4.0':
dependencies:
@@ -6307,9 +6385,9 @@ snapshots:
'@braintrust/core@0.0.34':
dependencies:
- '@asteasolutions/zod-to-openapi': 6.4.0(zod@3.25.67)
+ '@asteasolutions/zod-to-openapi': 6.4.0(zod@3.25.76)
uuid: 9.0.1
- zod: 3.25.67
+ zod: 3.25.76
'@browserbasehq/sdk@2.5.0':
dependencies:
@@ -6323,20 +6401,52 @@ snapshots:
transitivePeerDependencies:
- encoding
- '@browserbasehq/stagehand@1.14.0(@playwright/test@1.54.2)(deepmerge@4.3.1)(dotenv@16.5.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))(zod@3.25.67)':
+ '@browserbasehq/stagehand@3.0.1(@opentelemetry/api@1.9.0)(deepmerge@4.3.1)(dotenv@16.5.0)(zod@3.25.67)':
dependencies:
- '@anthropic-ai/sdk': 0.27.3
+ '@ai-sdk/provider': 2.0.0
+ '@anthropic-ai/sdk': 0.39.0
'@browserbasehq/sdk': 2.5.0
- '@playwright/test': 1.54.2
+ '@google/genai': 1.24.0(@modelcontextprotocol/sdk@1.17.2)
+ '@langchain/openai': 0.4.9(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(ws@8.18.3)
+ '@modelcontextprotocol/sdk': 1.17.2
+ ai: 5.0.76(zod@3.25.67)
deepmerge: 4.3.1
+ devtools-protocol: 0.0.1464554
dotenv: 16.5.0
- openai: 6.7.0(ws@8.18.3)(zod@3.25.67)
+ fetch-cookie: 3.1.0
+ openai: 4.96.2(ws@8.18.3)(zod@3.25.67)
+ pino: 9.6.0
+ pino-pretty: 13.0.0
+ playwright: 1.54.2
ws: 8.18.3
zod: 3.25.67
zod-to-json-schema: 3.24.5(zod@3.25.67)
+ optionalDependencies:
+ '@ai-sdk/anthropic': 2.0.34(zod@3.25.67)
+ '@ai-sdk/azure': 2.0.54(zod@3.25.67)
+ '@ai-sdk/cerebras': 1.0.25(zod@3.25.67)
+ '@ai-sdk/deepseek': 1.0.23(zod@3.25.67)
+ '@ai-sdk/google': 2.0.23(zod@3.25.67)
+ '@ai-sdk/groq': 2.0.24(zod@3.25.67)
+ '@ai-sdk/mistral': 2.0.19(zod@3.25.67)
+ '@ai-sdk/openai': 2.0.53(zod@3.25.67)
+ '@ai-sdk/perplexity': 2.0.13(zod@3.25.67)
+ '@ai-sdk/togetherai': 1.0.23(zod@3.25.67)
+ '@ai-sdk/xai': 2.0.26(zod@3.25.67)
+ '@langchain/core': 0.3.50(@opentelemetry/api@1.9.0)(openai@4.96.2(ws@8.18.3)(zod@3.25.67))
+ chrome-launcher: 1.2.0
+ ollama-ai-provider-v2: 1.5.0(zod@3.25.67)
+ patchright-core: 1.55.2
+ playwright-core: 1.54.2
+ puppeteer-core: 22.15.0
transitivePeerDependencies:
+ - '@opentelemetry/api'
+ - '@opentelemetry/exporter-trace-otlp-proto'
+ - '@opentelemetry/sdk-trace-base'
+ - bare-buffer
- bufferutil
- encoding
+ - supports-color
- utf-8-validate
'@cfworker/json-schema@4.1.1': {}
@@ -7040,11 +7150,11 @@ snapshots:
'@kwsites/promise-deferred@1.1.1': {}
- '@langchain/classic@1.0.0(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(@opentelemetry/api@1.9.0)(cheerio@1.0.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))(ws@8.18.3)':
+ '@langchain/classic@1.0.0(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(@opentelemetry/api@1.9.0)(cheerio@1.0.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))(ws@8.18.3)':
dependencies:
- '@langchain/core': 0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
- '@langchain/openai': 1.0.0-alpha.3(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(ws@8.18.3)
- '@langchain/textsplitters': 1.0.0(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))
+ '@langchain/core': 0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
+ '@langchain/openai': 1.0.0-alpha.3(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(ws@8.18.3)
+ '@langchain/textsplitters': 1.0.0(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))
handlebars: 4.7.8
js-yaml: 4.1.0
jsonpointer: 5.0.1
@@ -7063,13 +7173,13 @@ snapshots:
- openai
- ws
- '@langchain/community@1.0.0(@browserbasehq/sdk@2.5.0)(@browserbasehq/stagehand@1.14.0(@playwright/test@1.54.2)(deepmerge@4.3.1)(dotenv@16.5.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))(zod@3.25.67))(@ibm-cloud/watsonx-ai@1.7.0)(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(@opentelemetry/api@1.9.0)(cheerio@1.0.0)(google-auth-library@9.15.1)(ibm-cloud-sdk-core@5.4.3)(ignore@5.3.2)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))(playwright@1.54.2)(puppeteer@22.15.0(typescript@5.8.3))(ws@8.18.3)':
+ '@langchain/community@1.0.0(@browserbasehq/sdk@2.5.0)(@browserbasehq/stagehand@3.0.1(@opentelemetry/api@1.9.0)(deepmerge@4.3.1)(dotenv@16.5.0)(zod@3.25.67))(@ibm-cloud/watsonx-ai@1.7.0)(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(@opentelemetry/api@1.9.0)(cheerio@1.0.0)(google-auth-library@9.15.1)(ibm-cloud-sdk-core@5.4.3)(ignore@5.3.2)(jsonwebtoken@9.0.2)(lodash@4.17.21)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))(playwright@1.54.2)(puppeteer@22.15.0(typescript@5.8.3))(ws@8.18.3)':
dependencies:
- '@browserbasehq/stagehand': 1.14.0(@playwright/test@1.54.2)(deepmerge@4.3.1)(dotenv@16.5.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))(zod@3.25.67)
+ '@browserbasehq/stagehand': 3.0.1(@opentelemetry/api@1.9.0)(deepmerge@4.3.1)(dotenv@16.5.0)(zod@3.25.67)
'@ibm-cloud/watsonx-ai': 1.7.0
- '@langchain/classic': 1.0.0(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(@opentelemetry/api@1.9.0)(cheerio@1.0.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))(ws@8.18.3)
- '@langchain/core': 0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
- '@langchain/openai': 1.0.0(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(ws@8.18.3)
+ '@langchain/classic': 1.0.0(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(@opentelemetry/api@1.9.0)(cheerio@1.0.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))(ws@8.18.3)
+ '@langchain/core': 0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
+ '@langchain/openai': 1.0.0(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(ws@8.18.3)
binary-extensions: 2.3.0
expr-eval: 2.0.2
flat: 5.0.2
@@ -7094,60 +7204,87 @@ snapshots:
- '@opentelemetry/sdk-trace-base'
- peggy
- '@langchain/core@0.3.50(openai@4.96.2(ws@8.18.3)(zod@3.25.67))':
+ '@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@4.96.2(ws@8.18.3)(zod@3.25.67))':
dependencies:
'@cfworker/json-schema': 4.1.1
ansi-styles: 5.2.0
camelcase: 6.3.0
decamelize: 1.2.0
js-tiktoken: 1.0.20
- langsmith: 0.3.23(openai@4.96.2(ws@8.18.3)(zod@3.25.67))
+ langsmith: 0.3.75(@opentelemetry/api@1.9.0)(openai@4.96.2(ws@8.18.3)(zod@3.25.67))
mustache: 4.2.0
p-queue: 6.6.2
p-retry: 4.6.2
uuid: 10.0.0
- zod: 3.25.67
- zod-to-json-schema: 3.24.5(zod@3.25.67)
+ zod: 3.25.76
+ zod-to-json-schema: 3.24.5(zod@3.25.76)
transitivePeerDependencies:
+ - '@opentelemetry/api'
+ - '@opentelemetry/exporter-trace-otlp-proto'
+ - '@opentelemetry/sdk-trace-base'
- openai
+ optional: true
- '@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67))':
+ '@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@4.96.2(ws@8.18.3)(zod@4.1.12))':
dependencies:
'@cfworker/json-schema': 4.1.1
ansi-styles: 5.2.0
camelcase: 6.3.0
decamelize: 1.2.0
js-tiktoken: 1.0.20
- langsmith: 0.3.23(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
+ langsmith: 0.3.75(@opentelemetry/api@1.9.0)(openai@4.96.2(ws@8.18.3)(zod@4.1.12))
mustache: 4.2.0
p-queue: 6.6.2
p-retry: 4.6.2
uuid: 10.0.0
- zod: 3.25.67
- zod-to-json-schema: 3.24.5(zod@3.25.67)
+ zod: 3.25.76
+ zod-to-json-schema: 3.24.5(zod@3.25.76)
transitivePeerDependencies:
+ - '@opentelemetry/api'
+ - '@opentelemetry/exporter-trace-otlp-proto'
+ - '@opentelemetry/sdk-trace-base'
- openai
- '@langchain/langgraph-checkpoint@1.0.0(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))':
+ '@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))':
dependencies:
- '@langchain/core': 0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
+ '@cfworker/json-schema': 4.1.1
+ ansi-styles: 5.2.0
+ camelcase: 6.3.0
+ decamelize: 1.2.0
+ js-tiktoken: 1.0.20
+ langsmith: 0.3.75(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
+ mustache: 4.2.0
+ p-queue: 6.6.2
+ p-retry: 4.6.2
uuid: 10.0.0
+ zod: 3.25.76
+ zod-to-json-schema: 3.24.5(zod@3.25.76)
+ transitivePeerDependencies:
+ - '@opentelemetry/api'
+ - '@opentelemetry/exporter-trace-otlp-proto'
+ - '@opentelemetry/sdk-trace-base'
+ - openai
- '@langchain/langgraph-sdk@1.0.0(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
+ '@langchain/langgraph-checkpoint@1.0.0(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))':
+ dependencies:
+ '@langchain/core': 0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
+ uuid: 10.0.0
+
+ '@langchain/langgraph-sdk@1.0.0(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
dependencies:
p-queue: 6.6.2
p-retry: 4.6.2
uuid: 9.0.1
optionalDependencies:
- '@langchain/core': 0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
+ '@langchain/core': 0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
- '@langchain/langgraph@1.0.1(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zod-to-json-schema@3.24.5(zod@3.25.67))(zod@3.25.67)':
+ '@langchain/langgraph@1.0.1(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zod-to-json-schema@3.24.5(zod@3.25.67))(zod@3.25.67)':
dependencies:
- '@langchain/core': 0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
- '@langchain/langgraph-checkpoint': 1.0.0(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))
- '@langchain/langgraph-sdk': 1.0.0(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ '@langchain/core': 0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
+ '@langchain/langgraph-checkpoint': 1.0.0(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))
+ '@langchain/langgraph-sdk': 1.0.0(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
uuid: 10.0.0
zod: 3.25.67
optionalDependencies:
@@ -7156,9 +7293,9 @@ snapshots:
- react
- react-dom
- '@langchain/openai@0.4.9(@langchain/core@0.3.50(openai@4.96.2(ws@8.18.3)(zod@3.25.67)))(ws@8.18.3)':
+ '@langchain/openai@0.4.9(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@4.96.2(ws@8.18.3)(zod@4.1.12)))(ws@8.18.3)':
dependencies:
- '@langchain/core': 0.3.50(openai@4.96.2(ws@8.18.3)(zod@3.25.67))
+ '@langchain/core': 0.3.50(@opentelemetry/api@1.9.0)(openai@4.96.2(ws@8.18.3)(zod@4.1.12))
js-tiktoken: 1.0.20
openai: 4.96.2(ws@8.18.3)(zod@3.25.67)
zod: 3.25.67
@@ -7167,9 +7304,9 @@ snapshots:
- encoding
- ws
- '@langchain/openai@0.4.9(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(ws@8.18.3)':
+ '@langchain/openai@0.4.9(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(ws@8.18.3)':
dependencies:
- '@langchain/core': 0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
+ '@langchain/core': 0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
js-tiktoken: 1.0.20
openai: 4.96.2(ws@8.18.3)(zod@3.25.67)
zod: 3.25.67
@@ -7178,27 +7315,27 @@ snapshots:
- encoding
- ws
- '@langchain/openai@1.0.0(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(ws@8.18.3)':
+ '@langchain/openai@1.0.0(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(ws@8.18.3)':
dependencies:
- '@langchain/core': 0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
+ '@langchain/core': 0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
js-tiktoken: 1.0.20
openai: 6.7.0(ws@8.18.3)(zod@3.25.76)
zod: 3.25.76
transitivePeerDependencies:
- ws
- '@langchain/openai@1.0.0-alpha.3(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(ws@8.18.3)':
+ '@langchain/openai@1.0.0-alpha.3(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))(ws@8.18.3)':
dependencies:
- '@langchain/core': 0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
+ '@langchain/core': 0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
js-tiktoken: 1.0.20
openai: 6.7.0(ws@8.18.3)(zod@3.25.76)
zod: 3.25.76
transitivePeerDependencies:
- ws
- '@langchain/textsplitters@1.0.0(@langchain/core@0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))':
+ '@langchain/textsplitters@1.0.0(@langchain/core@0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)))':
dependencies:
- '@langchain/core': 0.3.50(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
+ '@langchain/core': 0.3.50(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67))
js-tiktoken: 1.0.20
'@leichtgewicht/ip-codec@2.0.5': {}
@@ -7478,7 +7615,7 @@ snapshots:
unified: 11.0.5
unist-util-visit: 5.0.0
yargs: 17.7.2
- zod: 3.25.67
+ zod: 3.25.76
transitivePeerDependencies:
- '@types/react'
- bare-buffer
@@ -7499,8 +7636,8 @@ snapshots:
lcm: 0.0.3
lodash: 4.17.21
openapi-types: 12.1.3
- zod: 3.25.67
- zod-to-json-schema: 3.24.5(zod@3.25.67)
+ zod: 3.25.76
+ zod-to-json-schema: 3.24.5(zod@3.25.76)
transitivePeerDependencies:
- debug
@@ -7516,8 +7653,8 @@ snapshots:
express-rate-limit: 7.5.1(express@5.1.0)
pkce-challenge: 5.0.0
raw-body: 3.0.0
- zod: 3.25.67
- zod-to-json-schema: 3.24.5(zod@3.25.67)
+ zod: 3.25.76
+ zod-to-json-schema: 3.24.5(zod@3.25.76)
transitivePeerDependencies:
- supports-color
@@ -8090,6 +8227,14 @@ snapshots:
'@opentelemetry/api': 1.9.0
zod: 3.25.67
+ ai@5.0.76(zod@4.1.12):
+ dependencies:
+ '@ai-sdk/gateway': 2.0.0(zod@4.1.12)
+ '@ai-sdk/provider': 2.0.0
+ '@ai-sdk/provider-utils': 3.0.12(zod@4.1.12)
+ '@opentelemetry/api': 1.9.0
+ zod: 4.1.12
+
ajv-draft-04@1.0.0(ajv@8.17.1):
optionalDependencies:
ajv: 8.17.1
@@ -8499,9 +8644,9 @@ snapshots:
transitivePeerDependencies:
- supports-color
- chromium-bidi@0.10.2(devtools-protocol@0.0.1312386):
+ chromium-bidi@0.10.2(devtools-protocol@0.0.1464554):
dependencies:
- devtools-protocol: 0.0.1312386
+ devtools-protocol: 0.0.1464554
mitt: 3.0.1
zod: 3.23.8
@@ -10317,29 +10462,32 @@ snapshots:
kind-of@6.0.3: {}
- langsmith@0.3.23(openai@4.96.2(ws@8.18.3)(zod@3.25.67)):
+ langsmith@0.3.75(@opentelemetry/api@1.9.0)(openai@4.96.2(ws@8.18.3)(zod@3.25.67)):
dependencies:
'@types/uuid': 10.0.0
chalk: 4.1.2
console-table-printer: 2.12.1
p-queue: 6.6.2
p-retry: 4.6.2
- semver: 7.7.1
+ semver: 7.7.2
uuid: 10.0.0
optionalDependencies:
+ '@opentelemetry/api': 1.9.0
openai: 4.96.2(ws@8.18.3)(zod@3.25.67)
+ optional: true
- langsmith@0.3.23(openai@6.7.0(ws@8.18.3)(zod@3.25.67)):
+ langsmith@0.3.75(@opentelemetry/api@1.9.0)(openai@4.96.2(ws@8.18.3)(zod@4.1.12)):
dependencies:
'@types/uuid': 10.0.0
chalk: 4.1.2
console-table-printer: 2.12.1
p-queue: 6.6.2
p-retry: 4.6.2
- semver: 7.7.1
+ semver: 7.7.2
uuid: 10.0.0
optionalDependencies:
- openai: 6.7.0(ws@8.18.3)(zod@3.25.67)
+ '@opentelemetry/api': 1.9.0
+ openai: 4.96.2(ws@8.18.3)(zod@4.1.12)
langsmith@0.3.75(@opentelemetry/api@1.9.0)(openai@6.7.0(ws@8.18.3)(zod@3.25.67)):
dependencies:
@@ -10353,7 +10501,6 @@ snapshots:
optionalDependencies:
'@opentelemetry/api': 1.9.0
openai: 6.7.0(ws@8.18.3)(zod@3.25.67)
- optional: true
lcm@0.0.3:
dependencies:
@@ -11142,6 +11289,13 @@ snapshots:
zod: 3.25.67
optional: true
+ ollama-ai-provider-v2@1.5.0(zod@4.1.12):
+ dependencies:
+ '@ai-sdk/provider': 2.0.0
+ '@ai-sdk/provider-utils': 3.0.12(zod@4.1.12)
+ zod: 4.1.12
+ optional: true
+
on-exit-leak-free@2.1.2: {}
on-finished@2.4.1:
@@ -11199,6 +11353,21 @@ snapshots:
transitivePeerDependencies:
- encoding
+ openai@4.96.2(ws@8.18.3)(zod@4.1.12):
+ dependencies:
+ '@types/node': 18.19.87
+ '@types/node-fetch': 2.6.12
+ abort-controller: 3.0.0
+ agentkeepalive: 4.6.0
+ form-data-encoder: 1.7.2
+ formdata-node: 4.4.1
+ node-fetch: 2.7.0
+ optionalDependencies:
+ ws: 8.18.3
+ zod: 4.1.12
+ transitivePeerDependencies:
+ - encoding
+
openai@6.7.0(ws@8.18.3)(zod@3.25.67):
optionalDependencies:
ws: 8.18.3
@@ -12940,10 +13109,16 @@ snapshots:
dependencies:
zod: 3.25.67
+ zod-to-json-schema@3.24.5(zod@3.25.76):
+ dependencies:
+ zod: 3.25.76
+
zod@3.23.8: {}
zod@3.25.67: {}
zod@3.25.76: {}
+ zod@4.1.12: {}
+
zwitch@2.0.4: {}