Skip to content

Commit c41deda

Browse files
authored
fix(openai): make gpt-5 family reasoning models (#8646)
1 parent 2b3eafe commit c41deda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/langchain-openai/src/chat_models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function isBuiltInToolChoice(
140140
}
141141

142142
function isReasoningModel(model?: string) {
143-
return model && /^o\d/.test(model);
143+
return model && (/^o\d/.test(model) || model.startsWith("gpt-5"));
144144
}
145145

146146
function isStructuredOutputMethodParams(

0 commit comments

Comments
 (0)