From 4eb394bfbd9c81287b05dc74eeed63c0b2f83681 Mon Sep 17 00:00:00 2001 From: wangbo Date: Wed, 29 Jul 2026 17:43:34 +0800 Subject: [PATCH] =?UTF-8?q?test(cluster):=20=E6=94=AF=E6=8C=81=E5=9B=BA?= =?UTF-8?q?=E5=AE=9A=E6=88=90=E5=8A=9F=E5=80=99=E9=80=89=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E9=AA=8C=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为跨节点真实文件验收增加可选平台模型筛选,避免同名模型的失效候选掩盖共享文件链路结果。\n\n验证:真实任务 7888708e-a870-4676-bdfc-4021853365a7 由香港 Worker 执行,输入与生成结果在两节点下载的长度和 SHA-256 一致;单 attempt、结算、扣费及回调去重断言通过。 --- scripts/cluster/cross-node-file-e2e.mjs | 4 +++- scripts/cluster/run-cross-node-file-e2e.sh | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/cluster/cross-node-file-e2e.mjs b/scripts/cluster/cross-node-file-e2e.mjs index 4e9093f..c1d8b0e 100755 --- a/scripts/cluster/cross-node-file-e2e.mjs +++ b/scripts/cluster/cross-node-file-e2e.mjs @@ -56,6 +56,7 @@ const account = Buffer.from(process.env.E2E_ACCOUNT_B64 || '', 'base64').toStrin const password = Buffer.from(process.env.E2E_PASSWORD_B64 || '', 'base64').toString('utf8') const model = process.env.AI_GATEWAY_E2E_IMAGE_MODEL || 'openai:gpt-image-1' const imageSize = process.env.AI_GATEWAY_E2E_IMAGE_SIZE || '2048x2048' +const platformModelId = process.env.AI_GATEWAY_E2E_PLATFORM_MODEL_ID || '' assert(account && password, 'E2E login credentials are unavailable') assert(/^\d+x\d+$/.test(imageSize), 'E2E image size is invalid') const [imageWidth, imageHeight] = imageSize.split('x').map(Number) @@ -137,7 +138,8 @@ try { (item) => [item?.modelName, item?.modelAlias].includes(model) && Array.isArray(item?.modelType) && - item.modelType.includes('image_edit'), + item.modelType.includes('image_edit') && + (!platformModelId || item.id === platformModelId), ) assert(targetModels.length > 0, `no assignable image_edit platform model found for ${model}`) const resourceMap = new Map() diff --git a/scripts/cluster/run-cross-node-file-e2e.sh b/scripts/cluster/run-cross-node-file-e2e.sh index 8c9ed90..1901a8b 100755 --- a/scripts/cluster/run-cross-node-file-e2e.sh +++ b/scripts/cluster/run-cross-node-file-e2e.sh @@ -70,6 +70,8 @@ chmod 0600 "$credentials_file" "${AI_GATEWAY_E2E_IMAGE_MODEL:-openai:gpt-image-1}" printf 'AI_GATEWAY_E2E_IMAGE_SIZE=%s\n' \ "${AI_GATEWAY_E2E_IMAGE_SIZE:-2048x2048}" + printf 'AI_GATEWAY_E2E_PLATFORM_MODEL_ID=%s\n' \ + "${AI_GATEWAY_E2E_PLATFORM_MODEL_ID:-}" } >"$credentials_file" cluster_scp "$credentials_file" "$CLUSTER_NINGBO_HOST:/root/easyai-cross-node-e2e.env" cluster_scp "$script_dir/cross-node-file-e2e.mjs" \