{"record":{"id":"25759dfe133013ee","repo":"linshenkx/prompt-optimizer","slug":"no-valid-image-evidence-could-be-resolved-for-eval","errorCode":null,"errorMessage":"No valid image evidence could be resolved for evaluation.","messagePattern":"No valid image evidence could be resolved for evaluation\\.","errorType":"exception","errorClass":"EvaluationExecutionError","httpStatus":null,"severity":"error","filePath":"packages/core/src/services/evaluation/service.ts","lineNumber":830,"sourceCode":"        resolvedMedia.push({\n          label: mediaItem.label.trim(),\n          role: request.type === 'compare' ? 'compare-output-image' : 'result-output-image',\n          snapshotId: snapshot.id.trim(),\n          snapshotLabel: snapshot.label.trim(),\n          blockLabel: block.label.trim(),\n          promptRefKind: snapshot.promptRef.kind,\n          testCaseLabel:\n            testCaseLabelMap.get(snapshot.testCaseId.trim()) ||\n            snapshot.testCaseId.trim(),\n          description: block.content?.trim() || snapshot.output.trim(),\n          b64: media.b64,\n          mimeType: media.mimeType,\n        });\n      }\n    }\n\n    if (!resolvedMedia.length) {\n      throw new EvaluationExecutionError('No valid image evidence could be resolved for evaluation.');\n    }\n\n    return resolvedMedia;\n  }\n\n  private async resolveEvaluationMediaItem(\n    mediaItem: EvaluationMediaItem\n  ): Promise<{ b64: string; mimeType?: string }> {\n    const label = mediaItem.label?.trim() || 'image';\n    const inlineB64 = mediaItem.b64?.trim() || '';\n    const assetId = mediaItem.assetId?.trim() || '';\n\n    if (inlineB64) {\n      return {\n        b64: inlineB64,\n        mimeType: mediaItem.mimeType?.trim() || 'image/png',\n      };\n    }","sourceCodeStart":812,"sourceCodeEnd":848,"githubUrl":"https://github.com/linshenkx/prompt-optimizer/blob/3e677b1d9f7e0493c142c175560531e7ae786dce/packages/core/src/services/evaluation/service.ts#L812-L848","documentation":"EvaluationExecutionError thrown by resolveEvaluationMedia when, after iterating all evidence items, zero usable images were resolved (every item failed to produce assetId/b64 media, e.g. all skipped or all resolved to nothing). The multimodal evaluator has no images to send, so execution aborts.","triggerScenarios":"Image-mode result/compare evaluation where every output evidence item lacks both assetId and inline b64 (they get skipped), or resolution of each item yields no media — even though validateRequest's hasSnapshotOutputMedia shape-check may have passed on different items.","commonSituations":"Evidence items store a URL or file path field the resolver ignores (only assetId/b64 are supported); b64 strings blank after JSON round-trip; asset ids referencing deleted images so items resolve empty; mismatch between which evidence array validation checked and which the resolver reads.","solutions":["Ensure each image evidence item carries a valid assetId (resolvable in ImageStorageService) or a non-empty b64 string","Verify referenced assets still exist in image storage (re-upload if purged)","If your evidence uses URLs, convert/download to b64 or register as stored assets before evaluating","Log which items were skipped to find the malformed evidence"],"exampleFix":"// before\nconst snapshot = { outputEvidence: [{ url: 'https://cdn/x.png' }] }; // unsupported shape\n\n// after\nconst snapshot = { outputEvidence: [{ b64: await fetchAsBase64('https://cdn/x.png'), mimeType: 'image/png' }] };","handlingStrategy":"validation","validationCode":"const usable = evidence.filter(e => Boolean(e.assetId?.trim() || e.b64?.trim()));\nif (!usable.length) throw new Error('No image evidence with assetId/b64; attach or upload images first');","typeGuard":"const hasResolvableMedia = (items: EvidenceItem[]) => items.some(e => Boolean(e.assetId?.trim() || e.b64?.trim()));","tryCatchPattern":null,"preventionTips":["Normalize evidence to {assetId|b64, mimeType} at capture time","Convert URL-based images to b64 or stored assets before evaluating"],"tags":["evaluation","image","evidence","multimodal"],"backgroundTag":"unresolvable-media-reference","analyzedSha":"3e677b1d9f7e0493c142c175560531e7ae786dce","analyzedAt":"2026-08-27T21:29:16.709Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}