@langchain/openai 0.6.7 → 0.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,13 @@ const openai_format_fndef_js_1 = require("./utils/openai-format-fndef.cjs");
20
20
  const tools_js_1 = require("./utils/tools.cjs");
21
21
  const _FUNCTION_CALL_IDS_MAP_KEY = "__openai_function_call_ids__";
22
22
  function isReasoningModel(model) {
23
- return model && (/^o\d/.test(model) || model.startsWith("gpt-5"));
23
+ if (!model)
24
+ return false;
25
+ if (/^o\d/.test(model ?? ""))
26
+ return true;
27
+ if (model.startsWith("gpt-5") && !model.startsWith("gpt-5-chat"))
28
+ return true;
29
+ return false;
24
30
  }
25
31
  function isStructuredOutputMethodParams(x
26
32
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -15,7 +15,13 @@ import { formatFunctionDefinitions, } from "./utils/openai-format-fndef.js";
15
15
  import { _convertToOpenAITool, convertCompletionsCustomTool, convertResponsesCustomTool, isBuiltInTool, isBuiltInToolChoice, isCustomTool, isCustomToolCall, isOpenAICustomTool, parseCustomToolCall, } from "./utils/tools.js";
16
16
  const _FUNCTION_CALL_IDS_MAP_KEY = "__openai_function_call_ids__";
17
17
  function isReasoningModel(model) {
18
- return model && (/^o\d/.test(model) || model.startsWith("gpt-5"));
18
+ if (!model)
19
+ return false;
20
+ if (/^o\d/.test(model ?? ""))
21
+ return true;
22
+ if (model.startsWith("gpt-5") && !model.startsWith("gpt-5-chat"))
23
+ return true;
24
+ return false;
19
25
  }
20
26
  function isStructuredOutputMethodParams(x
21
27
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/openai",
3
- "version": "0.6.7",
3
+ "version": "0.6.8",
4
4
  "description": "OpenAI integrations for LangChain.js",
5
5
  "type": "module",
6
6
  "engines": {