fix(provider): 火山方舟图片 - 避免结果下载重复计费

集成 PR #256,保留原 PR 开发者为提交作者。
This commit is contained in:
MasterChiefCN
2026-08-19 20:31:34 +08:00
committed by ddCat
parent d47975f9bc
commit d2a35e10d8
4 changed files with 11 additions and 5 deletions

View File

@@ -919,6 +919,7 @@ export async function requestGeneration(config: AiConfig, prompt: string, option
model: requestConfig.model,
prompt: withSystemPrompt(requestConfig, prompt),
n,
response_format: "b64_json",
watermark: false,
...(normalizedRequestSize ? { [normalizedRequestSize.parameter]: normalizedRequestSize.value } : {}),
}
@@ -1014,6 +1015,7 @@ export async function requestEdit(config: AiConfig, prompt: string, references:
model: requestConfig.model,
prompt: withSystemPrompt(requestConfig, requestPrompt),
n,
response_format: "b64_json",
watermark: false,
...(requestSize ? { [requestSize.parameter]: requestSize.value } : {}),
...(images.length === 1 ? { image: images[0] } : images.length > 1 ? { image: images } : {}),