fix: restore image editing requests

Image editing requests included a generation-only response_format field that some compatible providers reject. Editing now sends only supported defaults while preserving explicitly configured custom request fields.\n\nRelease note: 修复部分图像服务商修改图片时报错的问题;参考图编辑现在可以正常提交。
This commit is contained in:
mesalogo
2026-09-08 18:53:15 +08:00
parent 024e6fb4b2
commit 28de0c45ba
2 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -5548,7 +5548,7 @@ describe('ModelAgentRuntime', () => {
expect(form.get('prompt')).toBe('把背景改成白色')
expect(form.get('n')).toBe('1')
expect(form.get('quality')).toBe('medium')
expect(form.get('response_format')).toBe('b64_json')
expect(form.get('response_format')).toBeNull()
expect(form.get('background')).toBe('transparent')
const uploaded = form.get('image')
expect(uploaded).toBeInstanceOf(Blob)