What model does ChatOpenAI use by default?
By Nabil A. Updated December 4, 2026
On this page
What model does ChatOpenAI use by default?
It uses gpt-3.5-turbo. That's the field default in the newest releases of both LangChain packages today, and nothing in your environment changes it. OpenAI's deprecations page lists gpt-3.5-turbo with a shutdown date of October 23, 2026 and names gpt-5.6-terra as the replacement.
Here's the check, so you can run it against whatever version you have installed. No API key needed: the Python script reads the class's field defaults, and the JavaScript one creates the object without calling OpenAI.
$ cat defaults.py
from langchain_openai import ChatOpenAI, OpenAI
from llama_index.llms.openai import OpenAI as LlamaOpenAI
print(ChatOpenAI.model_fields["model_name"].default)
print(OpenAI.model_fields["model_name"].default)
print(LlamaOpenAI.model_fields["model"].default)
$ python defaults.py
gpt-3.5-turbo
gpt-3.5-turbo-instruct
gpt-3.5-turbo$ cat defaults.mjs
import { ChatOpenAI } from "@langchain/openai";
console.log(new ChatOpenAI().model);
$ node defaults.mjs
gpt-3.5-turboThe second Python line is LangChain's older completions class, OpenAI, which defaults to gpt-3.5-turbo-instruct. OpenAI shut that one down on September 28, 2026. The third is LlamaIndex's OpenAI class from llama-index-llms-openai 0.9.1, which also defaults to gpt-3.5-turbo.
What do other AI wrappers send by default?
Most of the popular wrappers ship a default, and several of those defaults are already past their shutdown date. A few make the model required, which is the safer design. I installed the newest release of each one today and read the default from the class itself.
| Class (package version) | Default model | Status on December 4, 2026 |
|---|---|---|
| ChatOpenAI (langchain-openai 1.8.7, Python) | gpt-3.5-turbo | Shut down October 23, 2026 (OpenAI) |
| ChatOpenAI (@langchain/openai 1.8.6, JavaScript) | gpt-3.5-turbo | Shut down October 23, 2026 |
| OpenAI, completions (langchain-openai 1.8.7) | gpt-3.5-turbo-instruct | Shut down September 28, 2026 |
| OpenAI (llama-index-llms-openai 0.9.1) | gpt-3.5-turbo | Shut down October 23, 2026 |
| DallEAPIWrapper (@langchain/openai 1.8.6) | dall-e-3 | Shut down May 12, 2026 |
| VertexAI (langchain-google-vertexai 3.3.0) | gemini-2.5-flash | Retirement date October 20, 2026 on Vertex AI, replacement gemini-3.8-flash or gemini-3.5-flash-lite |
| ChatAnthropic (@langchain/anthropic 1.6.7, JavaScript) | claude-sonnet-4-6 | Active, not retired sooner than February 17, 2027 (Claude model deprecations) |
| Agent (openai-agents 0.26.2 and @openai/agents 0.23.1) | gpt-5.6-luna | The Agents SDK's current default; set OPENAI_DEFAULT_MODEL to change it |
| ChatAnthropic (langchain-anthropic 1.9.0, Python) | None: model is required | Nothing to go stale |
| ChatVertexAI (langchain-google-vertexai 3.3.0) | None: model is required | Nothing to go stale |
Two things stand out. The same package can be safe in one language and not the other: ChatAnthropic requires a model in Python but defaults to claude-sonnet-4-6 in JavaScript. And a default that's fine today, like that one, will still be the default the day it retires unless the maintainers ship a new release and you install it.
This isn't a handful of packages. On November 21, 2026 Since.dev read the code of the 185 most downloaded PyPI packages and the 200 most downloaded npm packages built on an AI model SDK. By its count, 28% of PyPI downloads and 8% of npm downloads of those packages got a version that sends a retired or retiring model by default.
Can I set ChatOpenAI's default model with an environment variable?
No. Neither langchain-openai nor @langchain/openai reads any environment variable for the model. I searched both packages' installed code for OPENAI_DEFAULT_MODEL and OPENAI_MODEL and found nothing. Some AI answers say otherwise, because OPENAI_DEFAULT_MODEL is real, but it belongs to OpenAI's Agents SDK.
$ OPENAI_DEFAULT_MODEL=gpt-5.6-terra node defaults.mjs
gpt-3.5-turboThe Agents SDK does honor it. Its models page says an agent with no model uses gpt-5.6-luna, and that the variable changes the default for every agent that doesn't set one:
$ cat agent.py
from agents.models import get_default_model
print(get_default_model())
$ python agent.py
gpt-5.6-luna
$ OPENAI_DEFAULT_MODEL=gpt-5.6-terra python agent.py
gpt-5.6-terraIf you want one place to set the model for LangChain, make it your own: read a variable in your config module and pass it to every constructor. That way the default is a value you control and can see in review.
Why does a default model break code that hasn't changed?
Because the model name lives in your dependency, not in your code. The default is a string inside the package version you installed. When the provider retires that model, your requests start asking for something that no longer exists, and nothing in your repository changed.
It's easy to miss for three reasons:
- Your code never names the model, so searching your repository for
gpt-3.5-turbofinds nothing. - Retirement notices name the model. If you never typed the name, the notice doesn't look like it's about you.
- Upgrading the wrapper doesn't help on its own. The newest langchain-openai and @langchain/openai still default to gpt-3.5-turbo today, so the fix is in your code, not in a version bump.
There's a second cost even before retirement: you're running whatever model the wrapper's authors picked when they wrote that line, at its price and quality, not the one you'd pick today. The OpenAI retirement calendar shows which model ids are still served and when each one ends.
How do I find calls that rely on a default model?
Search for constructors that don't pass a model, then confirm each hit by reading it. Text search is quick and catches most cases; it can't see a model set on a later line or passed through a variable, so read every match.
- List the wrapper classes your project imports: ChatOpenAI, OpenAI, VertexAI, ChatAnthropic in JavaScript, Agent, and any of your own subclasses.
- Search for those constructors on lines that don't mention a model.
- Open each hit and check whether a model is set anywhere: a keyword argument, a config object spread in, or a subclass default.
- Check your dependencies too. A package you install can create a ChatOpenAI inside its own code, and then the default is two levels away from you.
Here's step 2 on a small demo repository with one Python file and one TypeScript file:
$ git grep -nE '(ChatOpenAI|OpenAI|VertexAI)\(' \
-- '*.py' '*.ts' '*.js' | grep -v 'model'
app/chat.py:3:llm = ChatOpenAI(temperature=0)
app/chat.py:4:legacy = OpenAI()
web/chat.ts:3:const llm = new ChatOpenAI();All three are real: each one sends the default. A call that passes model="gpt-5.6-terra" on the same line is filtered out. To be sure at runtime, log the model once at startup with llm.model_name in Python or llm.model in JavaScript, which print the default when none was set.
If you'd rather check model ids you already know about, paste them into the free checker below. It tells you which are retired or retiring and what to move to. For finding them across a repository, the model retirement checker guide has the full search method.
How do I fix a ChatOpenAI that uses the default model?
Pass the model explicitly on every constructor. For calls that relied on gpt-3.5-turbo or gpt-3.5-turbo-instruct, OpenAI's deprecations page names gpt-5.6-terra as the replacement for both. I'd also move off the completions-style OpenAI class to ChatOpenAI while you're there.
$ cat app/chat.py
from langchain_openai import ChatOpenAI
model = "gpt-5.6-terra"
llm = ChatOpenAI(model=model, temperature=0)
legacy = ChatOpenAI(model=model)
pinned = ChatOpenAI(model=model)$ cat web/chat.ts
import { ChatOpenAI } from "@langchain/openai";
const llm = new ChatOpenAI({
model: "gpt-5.6-terra",
});
const fast = new ChatOpenAI({ model: "gpt-5.6-terra" });Then run the same search again:
$ git grep -nE '(ChatOpenAI|OpenAI|VertexAI)\(' \
-- '*.py' '*.ts' '*.js' | grep -v 'model'
web/chat.ts:3:const llm = new ChatOpenAI({The Python file is clean. The one hit left is the TypeScript constructor whose model is on the next line, which is the limit of line-based search. Reading it settles it: the model is set. Keep this in mind before you turn the search into a CI rule; put the model on the constructor's first line, or allow-list known hits.
A new model isn't always a drop-in swap. Newer models can differ in parameters they accept, defaults and output. Test the calls you changed before you ship, and read the provider's notes for the model you move to. The Since.dev page for gpt-3.5-turbo lists its dates, its replacement and what changes on the way.
How do I keep default models from coming back?
Make the model a required value in your own code, so a missing one fails early instead of falling through to the wrapper.
- Create every model through one small factory function of your own that takes the model as a required argument. Code review then only has to check that one function.
- Log the model id at startup, as above. A default showing up in the logs is the cheapest alarm you'll ever set.
- Keep the git grep from step 2 in CI as a warning, with the multi-line caveat in mind.
- Watch the models you do name. A pinned model retires too, just on a date you can see coming. The guide to tracking AI model retirements compares the ways to get told in time.
- If coding agents write your model calls, tell them the model to use. Agents trained before a retirement will happily write
ChatOpenAI()or an old id; the guide on stopping agents from writing retired model ids covers the setup.
Where Since.dev fits
Since.dev reads the code of the packages you depend on, so it knows which model a class sends when you don't name one. Checking langchain-openai 1.8.7 today, it answered that ChatOpenAI and BaseChatOpenAI send gpt-3.5-turbo when created without model or model_name, retired October 23, 2026, and to set model to gpt-5.6-terra. The langchain-openai package page lists its breaking changes by version, and a free scan of a public repository points at the lines in your code that create a wrapper without a model.
It reports what it finds and opens pull requests for review only, and nothing merges or deploys on its own. It doesn't pick your replacement model for you on quality or price; that's still your call.
Pages on Since.dev
Questions
What is the default model for ChatOpenAI in LangChain?
gpt-3.5-turbo. It is the default in langchain-openai 1.8.7 for Python and @langchain/openai 1.8.6 for JavaScript, the newest releases on December 4, 2026. OpenAI shut gpt-3.5-turbo down on October 23, 2026, so pass the model explicitly, for example gpt-5.6-terra, which OpenAI names as its replacement.
Does ChatOpenAI read OPENAI_DEFAULT_MODEL?
No. Neither LangChain package reads any environment variable for the model, and setting OPENAI_DEFAULT_MODEL still leaves ChatOpenAI on gpt-3.5-turbo. That variable belongs to OpenAI's Agents SDK, where it sets the model for agents that do not name one.
How do I check which model my LangChain object will use?
Print llm.model_name in Python or llm.model in JavaScript after you create it. Both show the default when you did not pass a model. Logging it once at startup catches a missing model in every environment.
What is the default model of the OpenAI Agents SDK?
gpt-5.6-luna, in openai-agents 0.26.2 for Python and @openai/agents 0.23.1 for JavaScript, checked December 4, 2026. Set the OPENAI_DEFAULT_MODEL environment variable to change it for every agent without a model, or pass model on the agent itself.
Does ChatAnthropic have a default model?
It depends on the language. In Python, langchain-anthropic 1.9.0 requires the model, so there is no default to go stale. In JavaScript, @langchain/anthropic 1.6.7 defaults to claude-sonnet-4-6, which Claude's model deprecations page lists as active and not retired sooner than February 17, 2027.
Will upgrading langchain-openai fix a retired default model?
Not today. The newest releases of langchain-openai and @langchain/openai on December 4, 2026 still default to gpt-3.5-turbo. The fix is to pass a model in your own code, which also protects you when a future default changes.
Related guides
Free tools
- AI model retirement checker: paste code, get datesFind code that uses retiring AI models: paste code or model IDs and see when each shuts down on OpenAI, Claude, Gemini, Azure, Bedrock and Vertex. Free.
Comparisons
- How to know when an AI model you use is retiringAI model deprecation calendars and feeds compared: provider pages, platform schedules, free trackers, scripts, and how to find model IDs in your code.
How-to
- How to stop a coding agent from writing retired model IDsCoding agents write model IDs from old training data. Five guardrails, each run and tested: one models file, AGENTS.md, an MCP lookup, a hook and a CI check.
- How to check your dependencies for breaking changes before you upgradeHow to check dependencies for breaking changes before upgrading: the commands, a real failing upgrade, CI that fails on deprecations, and where notices appear.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.