BoundaryML/baml · error
no parsed result available from function call
Error message
no parsed result available from function call
What it means
try_vm_value_from_function_result expects the function result to contain a parsed output. The parsed() accessor returned None, meaning no parsed result exists for this call (e.g. the function failed to produce a parseable output and the parsed slot was never populated).
Solutions
- Check the underlying function result/LLM raw output and fix the prompt or output schema so parsing succeeds
- Strengthen the output type or add BAML retry policies / @check fallbacks so a parsed result is always produced
- Verify you are using a non-streaming call path that populates the parsed result
Defensive patterns
Strategy: try-catch
Type guard
// check before use
if fn_result.parsed().is_none() { handle_missing_parse(); } Try / catch
match call_function(...) { Err(e) if e.to_string().contains("no parsed result") => { /* inspect raw output, fix prompt/schema */ }, ... } Prevention
- Use non-streaming call paths that populate parsed results
- Add retry/repair policies so parsing always yields a result
- Log raw LLM output during development
When it happens
Trigger: Calling a function through the async VM runtime where the result's parsed() is None — typically when the LLM response could not be parsed into the output type and the failure was recorded without a parsed payload.
Common situations: LLM returning malformed output that fails parsing; calling a test/streaming path that never sets a parsed result; using the VM runtime on results that only carry raw text.
Related errors
- error parsing function result
- expected `null`, got
- expected `true` or `false`, got
- Failed to parse function result
- {0:?}
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/8a751e3c166f7f2e.
Report an issue: GitHub.
Appendix: source
Thrown at engine/baml-runtime/src/async_vm_runtime.rs:1349
}
BamlValue::Media(media) => Ok(vm.alloc_media(media.clone())),
}
}
fn try_vm_value_from_function_result(
vm: &mut Vm,
resolved_class_names: &HashMap<String, ObjectIndex>,
resolved_enums_names: &HashMap<String, ObjectIndex>,
result: anyhow::Result<FunctionResult>,
) -> anyhow::Result<baml_vm::Value> {
let fn_result = result.context("failed to get function result")?;
// TODO: Return type of .parsed() sucks.
let baml_value = fn_result
.parsed()
.as_ref()
.ok_or_else(|| anyhow!("no parsed result available from function call"))?
.as_ref()
.map_err(|e| anyhow!("error parsing function result: {e}"))?
.clone()
.0
.value();
try_vm_value_from_baml_value(vm, resolved_class_names, resolved_enums_names, &baml_value)
}
impl crate::runtime_interface::InternalRuntimeInterface for BamlAsyncVmRuntime {
fn features(&self) -> crate::internal::ir_features::IrFeatures {
self.llm_runtime.features()
}
fn diagnostics(&self) -> &internal_baml_core::internal_baml_diagnostics::Diagnostics {
self.llm_runtime.diagnostics()
}
View on GitHub (pinned to bd85ce9dee)