fix: disable reference images for grok2 provider (edit API not yet supported)
Some checks failed
Build & Push Docker Image / build-and-push (push) Has been cancelled
Some checks failed
Build & Push Docker Image / build-and-push (push) Has been cancelled
This commit is contained in:
@@ -154,7 +154,11 @@ export async function generateImageViaOpenAICompat(request: OpenAICompatImageReq
|
||||
const rawSize = resolveRawSize(options)
|
||||
const size = normalizeOpenAIImageSize(rawSize)
|
||||
|
||||
if (referenceImages.length > 0) {
|
||||
// Grok2 暂不支持图片编辑接口,忽略参考图
|
||||
const providerKey = providerId.split('-')[0]
|
||||
const shouldUseReferenceImages = referenceImages.length > 0 && providerKey !== 'grok2'
|
||||
|
||||
if (shouldUseReferenceImages) {
|
||||
const response = await client.images.edit({
|
||||
model: normalizedModelId,
|
||||
prompt,
|
||||
|
||||
Reference in New Issue
Block a user