{"record":{"id":"ae7ca7e86da90dc2","repo":"BoundaryML/baml","slug":"e","errorCode":null,"errorMessage":"{e}","messagePattern":"\\{e\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/baml-runtime/src/internal/llm_client/orchestrator/call.rs","lineNumber":100,"sourceCode":"                results.push((\n                    cancel_scope,\n                    LLMResponse::Cancelled(\"Operation cancelled\".to_string()),\n                    Some(Err(anyhow::anyhow!(\n                        crate::errors::ExposedError::AbortError {\n                            detailed_message: String::new()\n                        }\n                    ))),\n                ));\n                break;\n            }\n            result = async {\n                let prompt = match node.render_prompt(ir, prompt, ctx, params).await {\n                    Ok(p) => p,\n                    Err(e) => {\n                        return Some((\n                            node.scope,\n                            LLMResponse::InternalFailure(e.to_string()),\n                            Some(Err(anyhow::anyhow!(e.to_string()))),\n                        ));\n                    }\n                };\n\n                let ctx = CtxWithHttpRequestId::from(ctx);\n                let response = node.single_call(&ctx, &prompt).await;\n                let parsed_response = match &response {\n                    LLMResponse::Success(s) => {\n                        if !node\n                            .finish_reason_filter()\n                            .is_allowed(s.metadata.finish_reason.as_ref())\n                        {\n                            let message = \"Finish reason not allowed\".to_string();\n                            Some(Err(anyhow::anyhow!(\n                                crate::errors::ExposedError::FinishReasonError {\n                                    prompt: prompt.to_string(),\n                                    raw_output: s.content.clone(),\n                                    detailed_message: message.clone(),","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/engine/baml-runtime/src/internal/llm_client/orchestrator/call.rs#L82-L118","documentation":"During orchestration, BAML renders each strategy node's prompt before calling the LLM. If render_prompt fails, the node returns an InternalFailure LLMResponse plus this error whose message is the stringified prompt-rendering error ({e}). It means no HTTP request was made for this node — the failure happened entirely inside BAML's prompt pipeline.","triggerScenarios":"orchestrate() -> node.render_prompt(ir, prompt, ctx, params) returns Err: bad Jinja/template syntax in the .baml prompt, missing or wrongly-typed parameters, or IR resolution failure for the referenced prompt/client.","commonSituations":"Renaming a function/parameter in .baml without updating callers; passing None for a required param; template referencing an undefined variable; BAML CLI version mismatch between generated client and runtime.","solutions":["Read the embedded message {e}; it names the exact rendering problem.","Fix the prompt template: correct variable names and Jinja syntax; ensure all ctx/params values are provided and correctly typed.","Re-run `baml-cli dev` / regenerate the client so IR and generated code are in sync.","Add an orchestration fallback strategy so other nodes can still serve the request if one fails to render."],"exampleFix":"// before\nb.baml_value(\"name\", None)?; // render fails: missing param\n// after\nlet ctx = runtime.ctx.create(Some(maplit::btreemap! {\n    \"name\" => \"Alice\".into(),\n}))?;","handlingStrategy":"validation","validationCode":"// Ensure all template variables the prompt needs are present before invoking\nfn ensure_vars(prompt_vars: &[&str], params: &HashMap<String, String>) -> Result<(), String> {\n    prompt_vars.iter().find(|v| !params.contains_key(**v))\n        .map(|v| format!(\"prompt variable '{v}' not supplied\"))\n        .map_or(Ok(()), Err)\n}","typeGuard":null,"tryCatchPattern":"match node_result {\n    Err(e) if e.to_string().contains(\"render\") || e.to_string().contains(\"Missing\") => {\n        log::error!(\"prompt render failed: {e}\");\n        fallback_client_call()\n    }\n    other => other,\n}","preventionTips":["Regenerate the BAML client after every .baml change so params match prompt templates.","Use typed parameter structs from codegen instead of raw maps to catch missing fields at compile time.","Keep a test that renders every production prompt with sample params."],"tags":["llm","rust","prompt-rendering","orchestration"],"backgroundTag":"invalid-config-value","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}