diff --git a/langchain/src/chat_models/universal.ts b/langchain/src/chat_models/universal.ts index 5c9c6fc6d0dd9..a61b1a5b4cb6f 100644 --- a/langchain/src/chat_models/universal.ts +++ b/langchain/src/chat_models/universal.ts @@ -175,7 +175,11 @@ async function _initChatModelHelper( * _inferModelProvider("unknown-model"); // returns undefined */ export function _inferModelProvider(modelName: string): string | undefined { - if (modelName.startsWith("gpt-3") || modelName.startsWith("gpt-4")) { + if ( + modelName.startsWith("gpt-3") || + modelName.startsWith("gpt-4") || + modelName.startsWith("o1") + ) { return "openai"; } else if (modelName.startsWith("claude")) { return "anthropic";