{"record":{"id":"d8a8d01d26203c3d","repo":"continuedev/continue","slug":"bedrock-skipping-unsupported-image-part-format-d8a8d0","errorCode":null,"errorMessage":"Bedrock: skipping unsupported image part format: ${format}","messagePattern":"Bedrock: skipping unsupported image part format: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/openai-adapters/src/apis/Bedrock.ts","lineNumber":162,"sourceCode":"        }\n        const { mimeType, base64Data } = parsed;\n        const format = mimeType.split(\"/\")[1]?.split(\";\")[0] || \"jpeg\";\n        if (\n          format === ImageFormat.JPEG ||\n          format === ImageFormat.PNG ||\n          format === ImageFormat.WEBP ||\n          format === ImageFormat.GIF\n        ) {\n          return {\n            image: {\n              format,\n              source: {\n                bytes: Uint8Array.from(Buffer.from(base64Data, \"base64\")),\n              },\n            },\n          };\n        } else {\n          console.warn(\n            `Bedrock: skipping unsupported image part format: ${format}`,\n          );\n          return { text: \"[Unsupported image format]\" };\n        }\n    }\n  }\n\n  private _convertMessages(\n    oaiMessages: OpenAI.Chat.Completions.ChatCompletionMessageParam[],\n    availableTools: Set<string>,\n  ): Message[] {\n    let currentRole: \"user\" | \"assistant\" = \"user\";\n    let currentBlocks: ContentBlock[] = [];\n    const converted: Message[] = [];\n    const hasAddedToolCallIds = new Set<string>();\n\n    const pushCurrentMessage = () => {\n      if (currentBlocks.length > 0) {","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/packages/openai-adapters/src/apis/Bedrock.ts#L144-L180","documentation":"After parsing an image data URL in _oaiPartToBedrockPart, the derived format (MIME subtype) is checked against Bedrock's supported ImageFormats (jpeg, png, gif, webp). Unsupported formats are replaced with the placeholder text \"[Unsupported image format]\" and this warning is emitted; the request continues without the image.","triggerScenarios":"Sending an image with MIME type not in {image/jpeg, image/png, image/gif, image/webp}, e.g. image/bmp, image/tiff, image/avif, or image/svg+xml.","commonSituations":"Uploading screenshots saved as TIFF/BMP, vector SVGs, or newer formats like AVIF; MIME subtype containing parameters (e.g. image/png;charset=utf-8 is handled, but exotic subtypes are not).","solutions":["Convert the image to PNG, JPEG, GIF, or WebP before sending (e.g. sharp: `sharp(input).png().toBuffer()`)","Fix the data URL MIME type if it is mislabeled (e.g. image/jpg should be image/jpeg)","For SVG, rasterize to PNG first"],"exampleFix":"// before\n`data:image/bmp;base64,${b64}`\n\n// after\nconst png = await sharp(inputBuffer).png().toBuffer();\n`data:image/png;base64,${png.toString(\"base64\")}`","handlingStrategy":"validation","validationCode":"const SUPPORTED = new Set([\"jpeg\", \"png\", \"gif\", \"webp\"]);\nconst subtype = mimeType.split(\"/\")[1]?.split(\";\")[0];\nif (!SUPPORTED.has(subtype)) {\n  image = await sharp(image).png().toBuffer(); // convert before sending\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Normalize all images to PNG/JPEG/WebP at ingest time","Fix mislabeled MIME types (image/jpg -> image/jpeg)","Watch responses for [Unsupported image format] placeholders"],"tags":["bedrock","vision","image-format","multimodal"],"backgroundTag":"unsupported-image-format","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}