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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user