@langchain/openai 0.5.16 → 0.5.18

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.
@@ -367,7 +367,9 @@ function _convertMessagesToOpenAIResponsesParams(messages, model, zdrEnabled) {
367
367
  input.push({
368
368
  type: "message",
369
369
  role: "assistant",
370
- ...(lcMsg.id && !zdrEnabled ? { id: lcMsg.id } : {}),
370
+ ...(lcMsg.id && !zdrEnabled && lcMsg.id.startsWith("msg_")
371
+ ? { id: lcMsg.id }
372
+ : {}),
371
373
  content: typeof content === "string"
372
374
  ? content
373
375
  : content.flatMap((item) => {
@@ -329,7 +329,9 @@ function _convertMessagesToOpenAIResponsesParams(messages, model, zdrEnabled) {
329
329
  input.push({
330
330
  type: "message",
331
331
  role: "assistant",
332
- ...(lcMsg.id && !zdrEnabled ? { id: lcMsg.id } : {}),
332
+ ...(lcMsg.id && !zdrEnabled && lcMsg.id.startsWith("msg_")
333
+ ? { id: lcMsg.id }
334
+ : {}),
333
335
  content: typeof content === "string"
334
336
  ? content
335
337
  : content.flatMap((item) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/openai",
3
- "version": "0.5.16",
3
+ "version": "0.5.18",
4
4
  "description": "OpenAI integrations for LangChain.js",
5
5
  "type": "module",
6
6
  "engines": {
@@ -45,7 +45,7 @@
45
45
  "devDependencies": {
46
46
  "@azure/identity": "^4.2.1",
47
47
  "@jest/globals": "^29.5.0",
48
- "@langchain/core": "workspace:*",
48
+ "@langchain/core": "0.3.62",
49
49
  "@langchain/scripts": ">=0.1.0 <0.2.0",
50
50
  "@langchain/standard-tests": "0.0.0",
51
51
  "@swc/core": "^1.3.90",
@@ -102,4 +102,4 @@
102
102
  "index.d.ts",
103
103
  "index.d.cts"
104
104
  ]
105
- }
105
+ }