{"record":{"id":"1cd4f3b06e81e636","repo":"BoundaryML/baml","slug":"baml-internal-error-openai-transcriptions-chat-message","errorCode":null,"errorMessage":"BAML internal error (openai-transcriptions): chat message formatting is not used for multipart transcriptions","messagePattern":"BAML internal error \\(openai-transcriptions\\): chat message formatting is not used for multipart transcriptions","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"engine/baml-runtime/src/internal/llm_client/primitive/openai/openai_client.rs","lineNumber":347,"sourceCode":"                            }),\n                        );\n                    }\n                }\n            }\n        }\n    }\n\n    fn format_message_content(\n        &self,\n        content: &RenderedChatMessage,\n        parts_to_message: &dyn Fn(\n            &[ChatMessagePart],\n        )\n            -> Result<Vec<serde_json::Map<String, serde_json::Value>>>,\n    ) -> Result<serde_json::Value> {\n        match self {\n            ProviderStrategy::TranscriptionsApi => {\n                anyhow::bail!(\n                    \"BAML internal error (openai-transcriptions): chat message formatting is not used for multipart transcriptions\"\n                );\n            }\n            ProviderStrategy::ResponsesApi => {\n                // For responses API, use standard formatting\n                Ok(json!(parts_to_message(&content.parts)?))\n            }\n            ProviderStrategy::StandardOpenAI { provider } => {\n                if provider == \"openai-generic\" {\n                    // Check if all parts are text\n                    let all_text = content\n                        .parts\n                        .iter()\n                        .all(|part| matches!(part, ChatMessagePart::Text(_)));\n                    if all_text {\n                        // Concatenate all text parts into a single string\n                        let combined_text = content\n                            .parts","sourceCodeStart":329,"sourceCodeEnd":365,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/engine/baml-runtime/src/internal/llm_client/primitive/openai/openai_client.rs#L329-L365","documentation":"format_message_content only knows how to format chat message parts for the Responses API; for the transcriptions strategy it bails because chat-style message formatting is meaningless for multipart audio transcription requests. Like 982, this is an unimplemented-path guard.","triggerScenarios":"A transcriptions-strategy client path invokes format_message_content with rendered ChatMessageParts, e.g. when building the body for a transcriptions API request.","commonSituations":"Same as 982: a client configured for the OpenAI transcriptions strategy; any prompt render reaches this bail.","solutions":["Avoid the transcriptions strategy in BAML clients; use chat completions/responses instead","Perform transcription calls directly against OpenAI's /v1/audio/transcriptions outside BAML","Wait for BAML to implement multipart transcriptions formatting"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Avoid transcriptions strategy in BAML; use OpenAI's transcription API directly","Keep LLM and transcription concerns in separate integration layers"],"tags":["openai","transcriptions","not-implemented"],"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-23T08:17:48.524Z"}