{"record":{"id":"6de86311d23b46ed","repo":"BoundaryML/baml","slug":"not-yet-implemented","errorCode":null,"errorMessage":"not yet implemented","messagePattern":"not yet implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/baml-runtime/src/internal/llm_client/primitive/aws/aws_client.rs","lineNumber":82,"sourceCode":"    },\n    json_body,\n    tracingv2::storage::storage::BAML_TRACER,\n    JsonBodyInput, RenderCurlSettings, RuntimeContext,\n};\n\n// Strip the MIME type prefix (\"type/subtype\" -> \"subtype\").\nfn strip_mime_prefix(mime: &str) -> &str {\n    mime.split_once('/').map(|(_, s)| s).unwrap_or(mime)\n}\n\nfn media_to_content_block_json(media: &BamlMedia) -> Result<serde_json::Value> {\n    let content_block = {\n        let mut obj = Map::new();\n        if let Some(mime) = media.mime_type.as_deref() {\n            obj.insert(\"format\".into(), json!(strip_mime_prefix(mime)));\n        }\n        let source = match &media.content {\n            BamlMediaContent::File(media_file) => todo!(),\n            BamlMediaContent::Url(url) => {\n                let parsed = Url::parse(&url.url).with_context(|| {\n                    format!(\"Invalid S3 URI for AWS Bedrock video source: {url}\")\n                })?;\n\n                if parsed.scheme() != \"s3\" {\n                    anyhow::bail!(\"AWS Bedrock requires s3:// URIs, but got: {}\", url.url);\n                }\n\n                // unimplemented!(\"make sure the test works\")\n                json!({\n                    \"s3Location\": {\n                        \"uri\": url.url,\n                    }\n                })\n            }\n            BamlMediaContent::Base64(base64) => json!({\n                \"bytes\": base64.base64,","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/engine/baml-runtime/src/internal/llm_client/primitive/aws/aws_client.rs#L64-L100","documentation":"This panic comes from a Rust `todo!()` in media_to_content_block_json when converting a chat media part for AWS Bedrock modular (Converse) requests. When the media content is a local file reference (BamlMediaContent::File), the AWS path has no implementation, so it panics with \"not yet implemented\" instead of returning a graceful error. It is a library limitation, not a problem with your model config.","triggerScenarios":"Calling chat/stream_chat on an aws-bedrock client whose rendered message contains a media part (image/pdf/video/audio) loaded from a local File (e.g. baml './file.png' or file:// content) instead of a URL or base64 payload.","commonSituations":"Developers testing Bedrock multimodal (e.g. Nova video) prompts with media referenced from local disk; CI environments where media was expected to be resolved to base64 but stayed as a file reference.","solutions":["Pass the media as a base64 data URL (e.g. data:image/png;base64,...) or an https:// URL rather than a local file path.","Set resolve_media_urls / media resolution options so BAML inlines file media into base64 before reaching the AWS client.","If you need file media on Bedrock, file an issue with BAML to implement BamlMediaContent::File in aws_client.rs, or patch the match arm to base64-encode the file."],"exampleFix":"// before\nmedia b \"baml://./video.mp4\"\n// after\nmedia b \"data:video/mp4;base64,AAAAIGZ0eXBpc29t...\"","handlingStrategy":"validation","validationCode":"if media.content is a local file reference:\n    # resolve to base64 before sending to aws-bedrock\n    media = to_base64_data_url(media)","typeGuard":"def is_bedrock_safe_media(media) -> bool:\n    c = media['content']\n    return isinstance(c, dict) and ('base64' in c or str(c.get('url','')).startswith(('s3://', 'data:')))","tryCatchPattern":null,"preventionTips":["Always pass media as base64 data URLs or s3:// URIs for aws-bedrock clients","Keep local-file media confined to providers that support file references","Check BAML release notes for Bedrock multimodal file support before upgrading prompts"],"tags":["aws","bedrock","multimodal","unimplemented","panic"],"backgroundTag":"method-not-implemented","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}