image_edit_oai
fails to edit image
#7134
-
What happened?When using image_gen_oai, the response is successful and the image is generated as expected. However, when using image_edit_oai, the request fails with the following message: "Something went wrong when trying to edit the image. The OpenAI API may be unavailable: Error Message: canceled." Version Informationghcr.io/danny-avila/librechat-dev-api latest 3b237dabfbcc 6 hours ago 1.09GB Steps to Reproduce
What browsers are you seeing the problem on?Chrome Relevant log output{"data":{"error":{"code":"size_not_supported","message":"size not supported for this image model (request id: 2025042913575161775530164534904)","param":"","type":"Aihubmix_api_error"}},"headers":{"connection":"keep-alive","content-length":"176","content-type":"application/json; charset=utf-8","date":"Tue, 29 Apr 2025 13:57:51 GMT","x-aihubmix-request-id":"2025042913575161775530164534904"},"level":"error","message":"[image_edit_oai] Problem editing the image: The server responded with status 400: Request failed with status code 400","stack":"AxiosError: Request failed with status code 400\n at settle (/app/node_modules/axios/dist/node/axios.cjs:2031:12)\n at IncomingMessage.handleStreamEnd (/app/node_modules/axios/dist/node/axios.cjs:3148:11)\n at IncomingMessage.emit (node:events:536:35)\n at endReadableNT (node:internal/streams/readable:1698:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n at Axios.request (/app/node_modules/axios/dist/node/axios.cjs:4258:41)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async tool.name (/app/api/app/clients/tools/structured/OpenAIImageTools.js:430:26)\n at async DynamicStructuredTool.call (/app/node_modules/@langchain/core/dist/tools/index.cjs:118:22)\n at async /app/node_modules/@librechat/agents/dist/cjs/tools/ToolNode.cjs:47:32\n at async Promise.all (index 0)\n at async ToolNode.run (/app/node_modules/@librechat/agents/dist/cjs/tools/ToolNode.cjs:39:25)\n at async /app/node_modules/@librechat/agents/dist/cjs/utils/run.cjs:38:36","status":400}
{"level":"error","message":"[image_edit_oai] Problem editing the image: No response received for POST /images/edits: canceled","requestInfo":{"method":"post","url":"/images/edits"},"stack":"CanceledError: canceled\n at EventTarget.abort (/app/node_modules/axios/dist/node/axios.cjs:2769:54)\n at [nodejs.internal.kHybridDispatch] (node:internal/event_target:831:20)\n at EventTarget.dispatchEvent (node:internal/event_target:766:26)\n at abortSignal (node:internal/abort_controller:370:10)\n at node:internal/abort_controller:373:20\n at Set.forEach (<anonymous>)\n at abortSignal (node:internal/abort_controller:371:30)\n at AbortController.abort (node:internal/abort_controller:392:5)\n at ServerResponse.closeHandler (/app/api/server/controllers/agents/request.js:149:23)\n at ServerResponse.emit (node:events:536:35)\n at Axios.request (/app/node_modules/axios/dist/node/axios.cjs:4258:41)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async tool.name (/app/api/app/clients/tools/structured/OpenAIImageTools.js:430:26)\n at async DynamicStructuredTool.call (/app/node_modules/@langchain/core/dist/tools/index.cjs:118:22)\n at async /app/node_modules/@librechat/agents/dist/cjs/tools/ToolNode.cjs:47:32\n at async Promise.all (index 0)\n at async ToolNode.run (/app/node_modules/@librechat/agents/dist/cjs/tools/ToolNode.cjs:39:25)\n at async /app/node_modules/@librechat/agents/dist/cjs/utils/run.cjs:38:36"}
{"level":"error","message":"[api/server/controllers/agents/client.js #sendCompletion] Operation aborted Aborted","stack":"Error: Aborted\n at EventTarget.listener (/app/node_modules/@langchain/core/dist/utils/signal.cjs:20:24)\n at [nodejs.internal.kHybridDispatch] (node:internal/event_target:831:20)\n at EventTarget.dispatchEvent (node:internal/event_target:766:26)\n at abortSignal (node:internal/abort_controller:370:10)\n at node:internal/abort_controller:373:20\n at Set.forEach (<anonymous>)\n at abortSignal (node:internal/abort_controller:371:30)\n at AbortController.abort (node:internal/abort_controller:392:5)\n at ServerResponse.closeHandler (/app/api/server/controllers/agents/request.js:149:23)\n at ServerResponse.emit (node:events:536:35)"} ScreenshotsCode of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Seems to be an issue with your provider: Size is an allowed property for gpt-image-1: |
Beta Was this translation helpful? Give feedback.
-
I also got this error. I tried uploading the photo to OpenAI Image Playground, which gave me a more descriptive error. I hope this helps you understand the 400 error in Librechat, which to me was: |
Beta Was this translation helpful? Give feedback.
-
I have identified the issue: when deploying with nginx, the default timeout is set to 60 seconds. Generating high-quality images can exceed this time limit, causing the connection to be lost. I recommend increasing the timeout value to 600 seconds in the nginx.conf file.
|
Beta Was this translation helpful? Give feedback.
I have identified the issue: when deploying with nginx, the default timeout is set to 60 seconds. Generating high-quality images can exceed this time limit, causing the connection to be lost. I recommend increasing the timeout value to 600 seconds in the nginx.conf file.
@danny-avila