Skip to main content

Overview

Here’s how to configure the models.

Migration from Langchain

with import { ChatOpenAI } from "browsernode"; or import { ChatOpenAI } from "browsernode/llm"; etc. The methods should be compatible(ish). We also made and example here to help you stay with Langchain in case your workflow requires it.

Model Recommendations

We recommend using GPT-4.1 for the best performance (best accuracy ~$0.01 per step). The best price to performance can be achieved using gemini-2.5-flash (currently also the most popular model, costs ~$0.001 per step).

Supported Models

Our library natively supports the following models:
  • OpenAI
  • Anthropic
  • Azure OpenAI
  • Gemini
We also support all other models that can be called via OpenAI compatible API (deepseek, novita, x, qwen). Please open a PR if you want to add a model. We have natively switched to structured output when possible,

OpenAI

OpenAI’s GPT-4.1 models are recommended for best performance.
Required environment variables:
.env

Anthropic

And add the variable:
.env

Azure OpenAI

Required environment variables:
.env

Gemini

[!IMPORTANT] GEMINI_API_KEY was the old environment var name, it should be called GOOGLE_API_KEY as of 2025-05.
Required environment variables:
.env